mirror of
https://github.com/torvalds/linux.git
synced 2026-07-30 03:01:41 +02:00
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 <jiri@nvidia.com> Signed-off-by: Vadim Pasternak <vadimp@nvidia.com> Signed-off-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
b691602c6f
commit
64e65a540e
|
|
@ -448,7 +448,7 @@ static int mlxsw_env_module_reset(struct mlxsw_core *mlxsw_core, u8 module)
|
|||
{
|
||||
char pmaos_pl[MLXSW_REG_PMAOS_LEN];
|
||||
|
||||
mlxsw_reg_pmaos_pack(pmaos_pl, module);
|
||||
mlxsw_reg_pmaos_pack(pmaos_pl, 0, module);
|
||||
mlxsw_reg_pmaos_rst_set(pmaos_pl, true);
|
||||
|
||||
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,
|
|||
enum mlxsw_reg_pmaos_admin_status admin_status;
|
||||
char pmaos_pl[MLXSW_REG_PMAOS_LEN];
|
||||
|
||||
mlxsw_reg_pmaos_pack(pmaos_pl, module);
|
||||
mlxsw_reg_pmaos_pack(pmaos_pl, 0, module);
|
||||
admin_status = enable ? MLXSW_REG_PMAOS_ADMIN_STATUS_ENABLED :
|
||||
MLXSW_REG_PMAOS_ADMIN_STATUS_DISABLED;
|
||||
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)
|
|||
for (i = 0; i < mlxsw_core_env(mlxsw_core)->module_count; i++) {
|
||||
char pmaos_pl[MLXSW_REG_PMAOS_LEN];
|
||||
|
||||
mlxsw_reg_pmaos_pack(pmaos_pl, i);
|
||||
mlxsw_reg_pmaos_pack(pmaos_pl, 0, i);
|
||||
mlxsw_reg_pmaos_e_set(pmaos_pl,
|
||||
MLXSW_REG_PMAOS_E_GENERATE_EVENT);
|
||||
mlxsw_reg_pmaos_ee_set(pmaos_pl, true);
|
||||
|
|
|
|||
|
|
@ -5769,9 +5769,10 @@ enum mlxsw_reg_pmaos_e {
|
|||
*/
|
||||
MLXSW_ITEM32(reg, pmaos, e, 0x04, 0, 2);
|
||||
|
||||
static inline void mlxsw_reg_pmaos_pack(char *payload, u8 module)
|
||||
static inline void mlxsw_reg_pmaos_pack(char *payload, u8 slot_index, u8 module)
|
||||
{
|
||||
MLXSW_REG_ZERO(pmaos, payload);
|
||||
mlxsw_reg_pmaos_slot_index_set(payload, slot_index);
|
||||
mlxsw_reg_pmaos_module_set(payload, module);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user