0df155b014
- Why I did it Currently, non upstream patches are applied only after upstream patches. Depends on sonic-net/sonic-linux-kernel#313. Can be merged in any order, preferably together - What I did it Non upstream Patches that reside in the sonic repo will not be saved in a tar file bur rather in a folder pointed out by EXTERNAL_KERNEL_PATCH_LOC. This is to make changes to the non upstream patches easily traceable. The build variable name is also updated to INCLUDE_EXTERNAL_PATCHES Files/folders expected under EXTERNAL_KERNEL_PATCH_LOC EXTERNAL_KERNEL_PATCH_LOC/ ├──── patches/ ├── 0001-xxxxx.patch ├── 0001-yyyyyyyy.patch ├── ............. ├──── series.patch series.patch should contain a diff that is applied on the sonic-linux-kernel/patch/series file. The diff should include all the non-upstream patches. How to verify it Build the Kernel and verified if all the patches are applied properly Signed-off-by: Vivek Reddy Karri <vkarri@nvidia.com>
103 lines
3.6 KiB
Diff
103 lines
3.6 KiB
Diff
From 4392d92a40328fe18d1152fae6fada74f46fa1a3 Mon Sep 17 00:00:00 2001
|
|
From: Vadim Pasternak <vadimp@nvidia.com>
|
|
Date: Tue, 7 Dec 2021 16:07:31 +0200
|
|
Subject: [PATCH] mlxsw: core: Remove unnecessary asserts
|
|
|
|
Remove unnecessary asserts for module index validation. Leave only one
|
|
that is actually necessary in mlxsw_env_pmpe_listener_func() where the
|
|
module index is directly read from the firmware event.
|
|
|
|
Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
|
|
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
|
|
---
|
|
.../net/ethernet/mellanox/mlxsw/core_env.c | 24 -------------------
|
|
1 file changed, 24 deletions(-)
|
|
|
|
diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_env.c b/drivers/net/ethernet/mellanox/mlxsw/core_env.c
|
|
index 61f7a40c0..4cbed2e3b 100644
|
|
--- a/drivers/net/ethernet/mellanox/mlxsw/core_env.c
|
|
+++ b/drivers/net/ethernet/mellanox/mlxsw/core_env.c
|
|
@@ -416,9 +416,6 @@ int mlxsw_env_reset_module(struct net_device *netdev,
|
|
!(req & (ETH_RESET_PHY << ETH_RESET_SHARED_SHIFT)))
|
|
return 0;
|
|
|
|
- if (WARN_ON_ONCE(module >= mlxsw_env->module_count))
|
|
- return -EINVAL;
|
|
-
|
|
mutex_lock(&mlxsw_env->module_info_lock);
|
|
|
|
if (mlxsw_env->module_info[module].num_ports_up) {
|
|
@@ -458,9 +455,6 @@ mlxsw_env_get_module_power_mode(struct mlxsw_core *mlxsw_core, u8 module,
|
|
u32 status_bits;
|
|
int err;
|
|
|
|
- if (WARN_ON_ONCE(module >= mlxsw_env->module_count))
|
|
- return -EINVAL;
|
|
-
|
|
mutex_lock(&mlxsw_env->module_info_lock);
|
|
|
|
params->policy = mlxsw_env->module_info[module].power_mode_policy;
|
|
@@ -562,9 +556,6 @@ mlxsw_env_set_module_power_mode(struct mlxsw_core *mlxsw_core, u8 module,
|
|
bool low_power;
|
|
int err = 0;
|
|
|
|
- if (WARN_ON_ONCE(module >= mlxsw_env->module_count))
|
|
- return -EINVAL;
|
|
-
|
|
if (policy != ETHTOOL_MODULE_POWER_MODE_POLICY_HIGH &&
|
|
policy != ETHTOOL_MODULE_POWER_MODE_POLICY_AUTO) {
|
|
NL_SET_ERR_MSG_MOD(extack, "Unsupported power mode policy");
|
|
@@ -903,9 +894,6 @@ mlxsw_env_module_overheat_counter_get(struct mlxsw_core *mlxsw_core, u8 module,
|
|
{
|
|
struct mlxsw_env *mlxsw_env = mlxsw_core_env(mlxsw_core);
|
|
|
|
- if (WARN_ON_ONCE(module >= mlxsw_env->module_count))
|
|
- return -EINVAL;
|
|
-
|
|
mutex_lock(&mlxsw_env->module_info_lock);
|
|
*p_counter = mlxsw_env->module_info[module].module_overheat_counter;
|
|
mutex_unlock(&mlxsw_env->module_info_lock);
|
|
@@ -918,9 +906,6 @@ void mlxsw_env_module_port_map(struct mlxsw_core *mlxsw_core, u8 module)
|
|
{
|
|
struct mlxsw_env *mlxsw_env = mlxsw_core_env(mlxsw_core);
|
|
|
|
- if (WARN_ON_ONCE(module >= mlxsw_env->module_count))
|
|
- return;
|
|
-
|
|
mutex_lock(&mlxsw_env->module_info_lock);
|
|
mlxsw_env->module_info[module].num_ports_mapped++;
|
|
mutex_unlock(&mlxsw_env->module_info_lock);
|
|
@@ -931,9 +916,6 @@ void mlxsw_env_module_port_unmap(struct mlxsw_core *mlxsw_core, u8 module)
|
|
{
|
|
struct mlxsw_env *mlxsw_env = mlxsw_core_env(mlxsw_core);
|
|
|
|
- if (WARN_ON_ONCE(module >= mlxsw_env->module_count))
|
|
- return;
|
|
-
|
|
mutex_lock(&mlxsw_env->module_info_lock);
|
|
mlxsw_env->module_info[module].num_ports_mapped--;
|
|
mutex_unlock(&mlxsw_env->module_info_lock);
|
|
@@ -945,9 +927,6 @@ int mlxsw_env_module_port_up(struct mlxsw_core *mlxsw_core, u8 module)
|
|
struct mlxsw_env *mlxsw_env = mlxsw_core_env(mlxsw_core);
|
|
int err = 0;
|
|
|
|
- if (WARN_ON_ONCE(module >= mlxsw_env->module_count))
|
|
- return -EINVAL;
|
|
-
|
|
mutex_lock(&mlxsw_env->module_info_lock);
|
|
|
|
if (mlxsw_env->module_info[module].power_mode_policy !=
|
|
@@ -977,9 +956,6 @@ void mlxsw_env_module_port_down(struct mlxsw_core *mlxsw_core, u8 module)
|
|
{
|
|
struct mlxsw_env *mlxsw_env = mlxsw_core_env(mlxsw_core);
|
|
|
|
- if (WARN_ON_ONCE(module >= mlxsw_env->module_count))
|
|
- return;
|
|
-
|
|
mutex_lock(&mlxsw_env->module_info_lock);
|
|
|
|
mlxsw_env->module_info[module].num_ports_up--;
|
|
--
|
|
2.30.2
|
|
|