Lines Matching refs:slot_index

41 					   u8 slot_index)  in __mlxsw_env_linecard_is_active()  argument
43 return mlxsw_env->line_cards[slot_index]->active; in __mlxsw_env_linecard_is_active()
47 u8 slot_index) in mlxsw_env_linecard_is_active() argument
52 active = __mlxsw_env_linecard_is_active(mlxsw_env, slot_index); in mlxsw_env_linecard_is_active()
60 u8 slot_index, u8 module) in mlxsw_env_module_info_get() argument
64 return &mlxsw_env->line_cards[slot_index]->module_info[module]; in mlxsw_env_module_info_get()
68 u8 slot_index, u8 module) in __mlxsw_env_validate_module_type() argument
74 if (!__mlxsw_env_linecard_is_active(mlxsw_env, slot_index)) in __mlxsw_env_validate_module_type()
77 module_info = mlxsw_env_module_info_get(core, slot_index, module); in __mlxsw_env_validate_module_type()
90 u8 slot_index, u8 module) in mlxsw_env_validate_module_type() argument
96 err = __mlxsw_env_validate_module_type(core, slot_index, module); in mlxsw_env_validate_module_type()
103 mlxsw_env_validate_cable_ident(struct mlxsw_core *core, u8 slot_index, int id, in mlxsw_env_validate_cable_ident() argument
111 err = mlxsw_env_validate_module_type(core, slot_index, id); in mlxsw_env_validate_cable_ident()
115 mlxsw_reg_mcia_pack(mcia_pl, slot_index, id, in mlxsw_env_validate_cable_ident()
146 mlxsw_env_query_module_eeprom(struct mlxsw_core *mlxsw_core, u8 slot_index, in mlxsw_env_query_module_eeprom() argument
189 mlxsw_reg_mcia_pack(mcia_pl, slot_index, module, page, offset, size, in mlxsw_env_query_module_eeprom()
208 mlxsw_env_module_temp_thresholds_get(struct mlxsw_core *core, u8 slot_index, in mlxsw_env_module_temp_thresholds_get() argument
223 mlxsw_reg_mtmp_pack(mtmp_pl, slot_index, in mlxsw_env_module_temp_thresholds_get()
254 err = mlxsw_env_validate_cable_ident(core, slot_index, module, &qsfp, in mlxsw_env_module_temp_thresholds_get()
267 mlxsw_reg_mcia_pack(mcia_pl, slot_index, module, page, in mlxsw_env_module_temp_thresholds_get()
272 mlxsw_reg_mcia_pack(mcia_pl, slot_index, module, in mlxsw_env_module_temp_thresholds_get()
290 struct mlxsw_core *mlxsw_core, u8 slot_index, in mlxsw_env_get_module_info() argument
300 if (!mlxsw_env_linecard_is_active(mlxsw_env, slot_index)) { in mlxsw_env_get_module_info()
305 err = mlxsw_env_validate_module_type(mlxsw_core, slot_index, module); in mlxsw_env_get_module_info()
312 err = mlxsw_env_query_module_eeprom(mlxsw_core, slot_index, module, 0, in mlxsw_env_get_module_info()
343 err = mlxsw_env_query_module_eeprom(mlxsw_core, slot_index, in mlxsw_env_get_module_info()
385 struct mlxsw_core *mlxsw_core, u8 slot_index, in mlxsw_env_get_module_eeprom() argument
399 if (!mlxsw_env_linecard_is_active(mlxsw_env, slot_index)) { in mlxsw_env_get_module_eeprom()
406 err = mlxsw_env_validate_cable_ident(mlxsw_core, slot_index, module, in mlxsw_env_get_module_eeprom()
412 err = mlxsw_env_query_module_eeprom(mlxsw_core, slot_index, in mlxsw_env_get_module_eeprom()
460 u8 slot_index, u8 module, in mlxsw_env_get_module_eeprom_by_page() argument
469 if (!mlxsw_env_linecard_is_active(mlxsw_env, slot_index)) { in mlxsw_env_get_module_eeprom_by_page()
475 err = mlxsw_env_validate_module_type(mlxsw_core, slot_index, module); in mlxsw_env_get_module_eeprom_by_page()
492 mlxsw_reg_mcia_pack(mcia_pl, slot_index, module, page->page, in mlxsw_env_get_module_eeprom_by_page()
516 static int mlxsw_env_module_reset(struct mlxsw_core *mlxsw_core, u8 slot_index, in mlxsw_env_module_reset() argument
521 mlxsw_reg_pmaos_pack(pmaos_pl, slot_index, module); in mlxsw_env_module_reset()
528 struct mlxsw_core *mlxsw_core, u8 slot_index, in mlxsw_env_reset_module() argument
540 if (!mlxsw_env_linecard_is_active(mlxsw_env, slot_index)) { in mlxsw_env_reset_module()
547 err = __mlxsw_env_validate_module_type(mlxsw_core, slot_index, module); in mlxsw_env_reset_module()
553 module_info = mlxsw_env_module_info_get(mlxsw_core, slot_index, module); in mlxsw_env_reset_module()
567 err = mlxsw_env_module_reset(mlxsw_core, slot_index, module); in mlxsw_env_reset_module()
582 mlxsw_env_get_module_power_mode(struct mlxsw_core *mlxsw_core, u8 slot_index, in mlxsw_env_get_module_power_mode() argument
595 err = __mlxsw_env_validate_module_type(mlxsw_core, slot_index, module); in mlxsw_env_get_module_power_mode()
601 module_info = mlxsw_env_module_info_get(mlxsw_core, slot_index, module); in mlxsw_env_get_module_power_mode()
605 if (!__mlxsw_env_linecard_is_active(mlxsw_env, slot_index)) in mlxsw_env_get_module_power_mode()
608 mlxsw_reg_mcion_pack(mcion_pl, slot_index, module); in mlxsw_env_get_module_power_mode()
631 u8 slot_index, u8 module, bool enable) in mlxsw_env_module_enable_set() argument
636 mlxsw_reg_pmaos_pack(pmaos_pl, slot_index, module); in mlxsw_env_module_enable_set()
646 u8 slot_index, u8 module, in mlxsw_env_module_low_power_set() argument
652 mlxsw_reg_pmmp_pack(pmmp_pl, slot_index, module); in mlxsw_env_module_low_power_set()
665 u8 slot_index, u8 module, in __mlxsw_env_set_module_power_mode() argument
676 if (!__mlxsw_env_linecard_is_active(mlxsw_env, slot_index)) in __mlxsw_env_set_module_power_mode()
679 err = mlxsw_env_module_enable_set(mlxsw_core, slot_index, module, false); in __mlxsw_env_set_module_power_mode()
685 err = mlxsw_env_module_low_power_set(mlxsw_core, slot_index, module, in __mlxsw_env_set_module_power_mode()
692 err = mlxsw_env_module_enable_set(mlxsw_core, slot_index, module, true); in __mlxsw_env_set_module_power_mode()
701 mlxsw_env_module_low_power_set(mlxsw_core, slot_index, module, in __mlxsw_env_set_module_power_mode()
704 mlxsw_env_module_enable_set(mlxsw_core, slot_index, module, true); in __mlxsw_env_set_module_power_mode()
710 u8 slot_index, u8 module, in mlxsw_env_set_module_power_mode_apply() argument
718 err = __mlxsw_env_validate_module_type(mlxsw_core, slot_index, module); in mlxsw_env_set_module_power_mode_apply()
725 module_info = mlxsw_env_module_info_get(mlxsw_core, slot_index, module); in mlxsw_env_set_module_power_mode_apply()
734 err = __mlxsw_env_set_module_power_mode(mlxsw_core, slot_index, module, in mlxsw_env_set_module_power_mode_apply()
746 mlxsw_env_set_module_power_mode(struct mlxsw_core *mlxsw_core, u8 slot_index, in mlxsw_env_set_module_power_mode() argument
761 err = mlxsw_env_set_module_power_mode_apply(mlxsw_core, slot_index, in mlxsw_env_set_module_power_mode()
770 u8 slot_index, u8 module, in mlxsw_env_module_has_temp_sensor() argument
777 mlxsw_reg_mtbr_pack(mtbr_pl, slot_index, in mlxsw_env_module_has_temp_sensor()
799 mlxsw_env_temp_event_set(struct mlxsw_core *mlxsw_core, u8 slot_index, in mlxsw_env_temp_event_set() argument
806 mlxsw_reg_mtmp_slot_index_set(mtmp_pl, slot_index); in mlxsw_env_temp_event_set()
814 slot_index, in mlxsw_env_temp_event_set()
842 u8 slot_index) in mlxsw_env_module_temp_event_enable() argument
848 for (i = 0; i < mlxsw_env->line_cards[slot_index]->module_count; i++) { in mlxsw_env_module_temp_event_enable()
849 err = mlxsw_env_module_has_temp_sensor(mlxsw_core, slot_index, in mlxsw_env_module_temp_event_enable()
858 err = mlxsw_env_temp_event_set(mlxsw_core, slot_index, in mlxsw_env_module_temp_event_enable()
962 u8 slot_index; member
982 event->slot_index, in mlxsw_env_pmpe_event_work()
988 event->slot_index, in mlxsw_env_pmpe_event_work()
1001 mlxsw_env_temp_event_set(mlxsw_env->core, event->slot_index, in mlxsw_env_pmpe_event_work()
1012 u8 slot_index = mlxsw_reg_pmpe_slot_index_get(pmpe_pl); in mlxsw_env_pmpe_listener_func() local
1019 slot_index >= mlxsw_env->num_of_slots)) in mlxsw_env_pmpe_listener_func()
1031 event->slot_index = slot_index; in mlxsw_env_pmpe_listener_func()
1060 u8 slot_index) in mlxsw_env_module_oper_state_event_enable() argument
1065 for (i = 0; i < mlxsw_env->line_cards[slot_index]->module_count; i++) { in mlxsw_env_module_oper_state_event_enable()
1068 mlxsw_reg_pmaos_pack(pmaos_pl, slot_index, i); in mlxsw_env_module_oper_state_event_enable()
1080 mlxsw_env_module_overheat_counter_get(struct mlxsw_core *mlxsw_core, u8 slot_index, in mlxsw_env_module_overheat_counter_get() argument
1087 module_info = mlxsw_env_module_info_get(mlxsw_core, slot_index, module); in mlxsw_env_module_overheat_counter_get()
1095 void mlxsw_env_module_port_map(struct mlxsw_core *mlxsw_core, u8 slot_index, in mlxsw_env_module_port_map() argument
1102 module_info = mlxsw_env_module_info_get(mlxsw_core, slot_index, module); in mlxsw_env_module_port_map()
1108 void mlxsw_env_module_port_unmap(struct mlxsw_core *mlxsw_core, u8 slot_index, in mlxsw_env_module_port_unmap() argument
1115 module_info = mlxsw_env_module_info_get(mlxsw_core, slot_index, module); in mlxsw_env_module_port_unmap()
1121 int mlxsw_env_module_port_up(struct mlxsw_core *mlxsw_core, u8 slot_index, in mlxsw_env_module_port_up() argument
1130 module_info = mlxsw_env_module_info_get(mlxsw_core, slot_index, module); in mlxsw_env_module_port_up()
1141 err = __mlxsw_env_set_module_power_mode(mlxsw_core, slot_index, module, in mlxsw_env_module_port_up()
1154 void mlxsw_env_module_port_down(struct mlxsw_core *mlxsw_core, u8 slot_index, in mlxsw_env_module_port_down() argument
1162 module_info = mlxsw_env_module_info_get(mlxsw_core, slot_index, module); in mlxsw_env_module_port_down()
1175 __mlxsw_env_set_module_power_mode(mlxsw_core, slot_index, module, true, in mlxsw_env_module_port_down()
1223 mlxsw_env_module_event_enable(struct mlxsw_env *mlxsw_env, u8 slot_index) in mlxsw_env_module_event_enable() argument
1228 slot_index); in mlxsw_env_module_event_enable()
1232 err = mlxsw_env_module_temp_event_enable(mlxsw_env->core, slot_index); in mlxsw_env_module_event_enable()
1240 mlxsw_env_module_event_disable(struct mlxsw_env *mlxsw_env, u8 slot_index) in mlxsw_env_module_event_disable() argument
1245 mlxsw_env_module_type_set(struct mlxsw_core *mlxsw_core, u8 slot_index) in mlxsw_env_module_type_set() argument
1250 for (i = 0; i < mlxsw_env->line_cards[slot_index]->module_count; i++) { in mlxsw_env_module_type_set()
1255 mlxsw_reg_pmtm_pack(pmtm_pl, slot_index, i); in mlxsw_env_module_type_set()
1260 module_info = mlxsw_env_module_info_get(mlxsw_core, slot_index, in mlxsw_env_module_type_set()
1271 u8 slot_index) in mlxsw_env_linecard_modules_power_mode_apply() argument
1275 for (i = 0; i < env->line_cards[slot_index]->module_count; i++) { in mlxsw_env_linecard_modules_power_mode_apply()
1281 module_info = &env->line_cards[slot_index]->module_info[i]; in mlxsw_env_linecard_modules_power_mode_apply()
1284 slot_index, i, in mlxsw_env_linecard_modules_power_mode_apply()
1292 mlxsw_env_got_active(struct mlxsw_core *mlxsw_core, u8 slot_index, void *priv) in mlxsw_env_got_active() argument
1299 if (__mlxsw_env_linecard_is_active(mlxsw_env, slot_index)) in mlxsw_env_got_active()
1302 mlxsw_reg_mgpir_pack(mgpir_pl, slot_index); in mlxsw_env_got_active()
1308 &mlxsw_env->line_cards[slot_index]->module_count, in mlxsw_env_got_active()
1311 err = mlxsw_env_module_event_enable(mlxsw_env, slot_index); in mlxsw_env_got_active()
1314 slot_index); in mlxsw_env_got_active()
1317 err = mlxsw_env_module_type_set(mlxsw_env->core, slot_index); in mlxsw_env_got_active()
1320 slot_index); in mlxsw_env_got_active()
1324 mlxsw_env->line_cards[slot_index]->active = true; in mlxsw_env_got_active()
1327 slot_index); in mlxsw_env_got_active()
1333 mlxsw_env_module_event_disable(mlxsw_env, slot_index); in mlxsw_env_got_active()
1340 mlxsw_env_got_inactive(struct mlxsw_core *mlxsw_core, u8 slot_index, in mlxsw_env_got_inactive() argument
1346 if (!__mlxsw_env_linecard_is_active(mlxsw_env, slot_index)) in mlxsw_env_got_inactive()
1348 mlxsw_env->line_cards[slot_index]->active = false; in mlxsw_env_got_inactive()
1349 mlxsw_env_module_event_disable(mlxsw_env, slot_index); in mlxsw_env_got_inactive()
1350 mlxsw_env->line_cards[slot_index]->module_count = 0; in mlxsw_env_got_inactive()