Skip to content

Commit 64e65a5

Browse files
vadimp-nvidiakuba-moo
authored andcommitted
mlxsw: core_env: Pass slot index during PMAOS register write call
Pass the slot index down to PMAOS pack helper alongside with the module. Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: Vadim Pasternak <[email protected]> Signed-off-by: Ido Schimmel <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent b691602 commit 64e65a5

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

drivers/net/ethernet/mellanox/mlxsw/core_env.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ static int mlxsw_env_module_reset(struct mlxsw_core *mlxsw_core, u8 module)
448448
{
449449
char pmaos_pl[MLXSW_REG_PMAOS_LEN];
450450

451-
mlxsw_reg_pmaos_pack(pmaos_pl, module);
451+
mlxsw_reg_pmaos_pack(pmaos_pl, 0, module);
452452
mlxsw_reg_pmaos_rst_set(pmaos_pl, true);
453453

454454
return mlxsw_reg_write(mlxsw_core, MLXSW_REG(pmaos), pmaos_pl);
@@ -548,7 +548,7 @@ static int mlxsw_env_module_enable_set(struct mlxsw_core *mlxsw_core,
548548
enum mlxsw_reg_pmaos_admin_status admin_status;
549549
char pmaos_pl[MLXSW_REG_PMAOS_LEN];
550550

551-
mlxsw_reg_pmaos_pack(pmaos_pl, module);
551+
mlxsw_reg_pmaos_pack(pmaos_pl, 0, module);
552552
admin_status = enable ? MLXSW_REG_PMAOS_ADMIN_STATUS_ENABLED :
553553
MLXSW_REG_PMAOS_ADMIN_STATUS_DISABLED;
554554
mlxsw_reg_pmaos_admin_status_set(pmaos_pl, admin_status);
@@ -931,7 +931,7 @@ mlxsw_env_module_oper_state_event_enable(struct mlxsw_core *mlxsw_core)
931931
for (i = 0; i < mlxsw_core_env(mlxsw_core)->module_count; i++) {
932932
char pmaos_pl[MLXSW_REG_PMAOS_LEN];
933933

934-
mlxsw_reg_pmaos_pack(pmaos_pl, i);
934+
mlxsw_reg_pmaos_pack(pmaos_pl, 0, i);
935935
mlxsw_reg_pmaos_e_set(pmaos_pl,
936936
MLXSW_REG_PMAOS_E_GENERATE_EVENT);
937937
mlxsw_reg_pmaos_ee_set(pmaos_pl, true);

drivers/net/ethernet/mellanox/mlxsw/reg.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -5769,9 +5769,10 @@ enum mlxsw_reg_pmaos_e {
57695769
*/
57705770
MLXSW_ITEM32(reg, pmaos, e, 0x04, 0, 2);
57715771

5772-
static inline void mlxsw_reg_pmaos_pack(char *payload, u8 module)
5772+
static inline void mlxsw_reg_pmaos_pack(char *payload, u8 slot_index, u8 module)
57735773
{
57745774
MLXSW_REG_ZERO(pmaos, payload);
5775+
mlxsw_reg_pmaos_slot_index_set(payload, slot_index);
57755776
mlxsw_reg_pmaos_module_set(payload, module);
57765777
}
57775778

0 commit comments

Comments
 (0)