Home
last modified time | relevance | path

Searched refs:mlxsw_core (Results 1 – 25 of 27) sorted by relevance

12

/linux-6.15/drivers/net/ethernet/mellanox/mlxsw/
H A Dcore.h40 mlxsw_core_lag_mode(struct mlxsw_core *mlxsw_core);
42 mlxsw_core_flood_mode(struct mlxsw_core *mlxsw_core);
58 int mlxsw_core_fw_flash(struct mlxsw_core *mlxsw_core,
239 int mlxsw_reg_query(struct mlxsw_core *mlxsw_core,
241 int mlxsw_reg_write(struct mlxsw_core *mlxsw_core,
365 int (*init)(struct mlxsw_core *mlxsw_core,
368 void (*fini)(struct mlxsw_core *mlxsw_core);
377 int (*sb_pool_get)(struct mlxsw_core *mlxsw_core,
410 int (*trap_init)(struct mlxsw_core *mlxsw_core,
412 void (*trap_fini)(struct mlxsw_core *mlxsw_core,
[all …]
H A Dcore.c118 struct mlxsw_core *mlxsw_core = priv; in mlxsw_ports_occ_get() local
247 struct mlxsw_core *mlxsw_core; member
1074 struct mlxsw_core *mlxsw_core; member
1083 struct mlxsw_core *mlxsw_core = mlxsw_core_fw_info->mlxsw_core; in mlxsw_core_fw_component_query() local
1102 struct mlxsw_core *mlxsw_core = mlxsw_core_fw_info->mlxsw_core; in mlxsw_core_fw_fsm_lock() local
1125 struct mlxsw_core *mlxsw_core = mlxsw_core_fw_info->mlxsw_core; in mlxsw_core_fw_fsm_component_update() local
1138 struct mlxsw_core *mlxsw_core = mlxsw_core_fw_info->mlxsw_core; in mlxsw_core_fw_fsm_block_download() local
1237 .mlxsw_core = mlxsw_core in mlxsw_core_dev_fw_flash()
1773 struct mlxsw_core *mlxsw_core; member
1781 struct mlxsw_core *mlxsw_core; in mlxsw_core_health_event_work() local
[all …]
H A Dcmd.h26 struct mlxsw_core;
28 int mlxsw_cmd_exec(struct mlxsw_core *mlxsw_core, u16 opcode, u8 opcode_mod,
33 static inline int mlxsw_cmd_exec_in(struct mlxsw_core *mlxsw_core, u16 opcode, in mlxsw_cmd_exec_in() argument
41 static inline int mlxsw_cmd_exec_out(struct mlxsw_core *mlxsw_core, u16 opcode, in mlxsw_cmd_exec_out() argument
199 static inline int mlxsw_cmd_query_fw(struct mlxsw_core *mlxsw_core, in mlxsw_cmd_query_fw() argument
377 static inline int mlxsw_cmd_boardinfo(struct mlxsw_core *mlxsw_core, in mlxsw_cmd_boardinfo() argument
499 static inline int mlxsw_cmd_map_fa(struct mlxsw_core *mlxsw_core, in mlxsw_cmd_map_fa() argument
528 static inline int mlxsw_cmd_unmap_fa(struct mlxsw_core *mlxsw_core) in mlxsw_cmd_unmap_fa() argument
1103 static inline int mlxsw_cmd_2err_sdq(struct mlxsw_core *mlxsw_core, in mlxsw_cmd_2err_sdq() argument
1110 static inline int mlxsw_cmd_2err_rdq(struct mlxsw_core *mlxsw_core, in mlxsw_cmd_2err_rdq() argument
[all …]
H A Dcore_env.h17 struct mlxsw_core *mlxsw_core, u8 slot_index,
21 struct mlxsw_core *mlxsw_core, u8 slot_index,
26 mlxsw_env_get_module_eeprom_by_page(struct mlxsw_core *mlxsw_core,
32 mlxsw_env_set_module_eeprom_by_page(struct mlxsw_core *mlxsw_core,
38 struct mlxsw_core *mlxsw_core, u8 slot_index,
42 mlxsw_env_get_module_power_mode(struct mlxsw_core *mlxsw_core, u8 slot_index,
48 mlxsw_env_set_module_power_mode(struct mlxsw_core *mlxsw_core, u8 slot_index,
57 void mlxsw_env_module_port_map(struct mlxsw_core *mlxsw_core, u8 slot_index,
60 void mlxsw_env_module_port_unmap(struct mlxsw_core *mlxsw_core, u8 slot_index,
63 int mlxsw_env_module_port_up(struct mlxsw_core *mlxsw_core, u8 slot_index,
[all …]
H A Dcore_linecards.c93 struct mlxsw_core *mlxsw_core; member
107 struct mlxsw_core *mlxsw_core = info->mlxsw_core; in mlxsw_linecard_device_fw_component_query() local
137 struct mlxsw_core *mlxsw_core = info->mlxsw_core; in mlxsw_linecard_device_fw_fsm_lock() local
175 struct mlxsw_core *mlxsw_core = info->mlxsw_core; in mlxsw_linecard_device_fw_fsm_component_update() local
197 struct mlxsw_core *mlxsw_core = info->mlxsw_core; in mlxsw_linecard_device_fw_fsm_block_download() local
217 struct mlxsw_core *mlxsw_core = info->mlxsw_core; in mlxsw_linecard_device_fw_fsm_component_verify() local
237 struct mlxsw_core *mlxsw_core = info->mlxsw_core; in mlxsw_linecard_device_fw_fsm_activate() local
260 struct mlxsw_core *mlxsw_core = info->mlxsw_core; in mlxsw_linecard_device_fw_fsm_query_state() local
290 struct mlxsw_core *mlxsw_core = info->mlxsw_core; in mlxsw_linecard_device_fw_fsm_cancel() local
310 struct mlxsw_core *mlxsw_core = info->mlxsw_core; in mlxsw_linecard_device_fw_fsm_release() local
[all …]
H A Dcore_env.c31 struct mlxsw_core *core;
146 mlxsw_env_query_module_eeprom(struct mlxsw_core *mlxsw_core, u8 slot_index, in mlxsw_env_query_module_eeprom() argument
290 struct mlxsw_core *mlxsw_core, u8 slot_index, in mlxsw_env_get_module_info() argument
385 struct mlxsw_core *mlxsw_core, u8 slot_index, in mlxsw_env_get_module_eeprom() argument
459 mlxsw_env_get_module_eeprom_by_page(struct mlxsw_core *mlxsw_core, in mlxsw_env_get_module_eeprom_by_page() argument
517 mlxsw_env_set_module_eeprom_by_page(struct mlxsw_core *mlxsw_core, in mlxsw_env_set_module_eeprom_by_page() argument
585 struct mlxsw_core *mlxsw_core, u8 slot_index, in mlxsw_env_reset_module() argument
687 static int mlxsw_env_module_enable_set(struct mlxsw_core *mlxsw_core, in mlxsw_env_module_enable_set() argument
766 mlxsw_env_set_module_power_mode_apply(struct mlxsw_core *mlxsw_core, in mlxsw_env_set_module_power_mode_apply() argument
1098 mlxsw_env_module_plug_event_register(struct mlxsw_core *mlxsw_core) in mlxsw_env_module_plug_event_register() argument
[all …]
H A Dminimal.c36 struct mlxsw_core *core;
110 struct mlxsw_core *core = mlxsw_m_port->mlxsw_m->core; in mlxsw_m_get_module_info()
122 struct mlxsw_core *core = mlxsw_m_port->mlxsw_m->core; in mlxsw_m_get_module_eeprom()
560 mlxsw_m_ports_remove_selected(struct mlxsw_core *mlxsw_core, in mlxsw_m_ports_remove_selected() argument
596 mlxsw_m_got_active(struct mlxsw_core *mlxsw_core, u8 slot_index, void *priv) in mlxsw_m_got_active() argument
630 mlxsw_m_got_inactive(struct mlxsw_core *mlxsw_core, u8 slot_index, void *priv) in mlxsw_m_got_inactive() argument
649 static int mlxsw_m_init(struct mlxsw_core *mlxsw_core, in mlxsw_m_init() argument
656 mlxsw_m->core = mlxsw_core; in mlxsw_m_init()
691 mlxsw_linecards_event_ops_unregister(mlxsw_core, in mlxsw_m_init()
698 static void mlxsw_m_fini(struct mlxsw_core *mlxsw_core) in mlxsw_m_fini() argument
[all …]
H A Dspectrum.c179 static void mlxsw_sp_txhdr_info_data_init(struct mlxsw_core *mlxsw_core, in mlxsw_sp_txhdr_info_data_init() argument
1977 mlxsw_sp_ports_remove_selected(struct mlxsw_core *mlxsw_core, in mlxsw_sp_ports_remove_selected() argument
2425 static int mlxsw_sp_cpu_policers_set(struct mlxsw_core *mlxsw_core) in mlxsw_sp_cpu_policers_set() argument
2466 static int mlxsw_sp_trap_groups_set(struct mlxsw_core *mlxsw_core) in mlxsw_sp_trap_groups_set() argument
3027 static int mlxsw_sp_init(struct mlxsw_core *mlxsw_core, in mlxsw_sp_init() argument
3266 static int mlxsw_sp1_init(struct mlxsw_core *mlxsw_core, in mlxsw_sp1_init() argument
3299 static int mlxsw_sp2_init(struct mlxsw_core *mlxsw_core, in mlxsw_sp2_init() argument
3333 static int mlxsw_sp3_init(struct mlxsw_core *mlxsw_core, in mlxsw_sp3_init() argument
3367 static int mlxsw_sp4_init(struct mlxsw_core *mlxsw_core, in mlxsw_sp4_init() argument
3401 static void mlxsw_sp_fini(struct mlxsw_core *mlxsw_core) in mlxsw_sp_fini() argument
[all …]
H A Dspectrum.h581 int mlxsw_sp_sb_pool_get(struct mlxsw_core *mlxsw_core,
584 int mlxsw_sp_sb_pool_set(struct mlxsw_core *mlxsw_core,
603 int mlxsw_sp_sb_occ_snapshot(struct mlxsw_core *mlxsw_core,
605 int mlxsw_sp_sb_occ_max_clear(struct mlxsw_core *mlxsw_core,
1399 int mlxsw_sp_trap_init(struct mlxsw_core *mlxsw_core,
1401 void mlxsw_sp_trap_fini(struct mlxsw_core *mlxsw_core,
1403 int mlxsw_sp_trap_action_set(struct mlxsw_core *mlxsw_core,
1407 int mlxsw_sp_trap_group_init(struct mlxsw_core *mlxsw_core,
1409 int mlxsw_sp_trap_group_set(struct mlxsw_core *mlxsw_core,
1414 mlxsw_sp_trap_policer_init(struct mlxsw_core *mlxsw_core,
[all …]
H A Dspectrum_ptp.c77 struct mlxsw_core *core;
115 struct mlxsw_core *mlxsw_core = clock->common.core; in __mlxsw_sp1_ptp_read_frc() local
118 frc_h1 = mlxsw_core_read_frc_h(mlxsw_core); in __mlxsw_sp1_ptp_read_frc()
120 frc_l = mlxsw_core_read_frc_l(mlxsw_core); in __mlxsw_sp1_ptp_read_frc()
145 struct mlxsw_core *mlxsw_core = clock->core; in mlxsw_sp_ptp_phc_adjfreq() local
166 struct mlxsw_core *mlxsw_core = clock->common.core; in mlxsw_sp1_ptp_phc_settime() local
340 struct mlxsw_core *mlxsw_core = clock->core; in mlxsw_sp2_ptp_read_utc() local
362 struct mlxsw_core *mlxsw_core = clock->core; in mlxsw_sp2_ptp_phc_settime() local
390 struct mlxsw_core *mlxsw_core = clock->core; in mlxsw_sp2_ptp_adjtime() local
1391 static u32 mlxsw_ptp_utc_time_stamp_sec_get(struct mlxsw_core *mlxsw_core, in mlxsw_ptp_utc_time_stamp_sec_get() argument
[all …]
H A Dspectrum_trap.c1568 int mlxsw_sp_trap_init(struct mlxsw_core *mlxsw_core, in mlxsw_sp_trap_init() argument
1594 void mlxsw_sp_trap_fini(struct mlxsw_core *mlxsw_core, in mlxsw_sp_trap_fini() argument
1615 int mlxsw_sp_trap_action_set(struct mlxsw_core *mlxsw_core, in mlxsw_sp_trap_action_set() argument
1661 __mlxsw_sp_trap_group_init(struct mlxsw_core *mlxsw_core, in __mlxsw_sp_trap_group_init() argument
1694 int mlxsw_sp_trap_group_init(struct mlxsw_core *mlxsw_core, in mlxsw_sp_trap_group_init() argument
1697 return __mlxsw_sp_trap_group_init(mlxsw_core, group, in mlxsw_sp_trap_group_init()
1701 int mlxsw_sp_trap_group_set(struct mlxsw_core *mlxsw_core, in mlxsw_sp_trap_group_set() argument
1773 int mlxsw_sp_trap_policer_init(struct mlxsw_core *mlxsw_core, in mlxsw_sp_trap_policer_init() argument
1801 void mlxsw_sp_trap_policer_fini(struct mlxsw_core *mlxsw_core, in mlxsw_sp_trap_policer_fini() argument
1814 int mlxsw_sp_trap_policer_set(struct mlxsw_core *mlxsw_core, in mlxsw_sp_trap_policer_set() argument
[all …]
H A DMakefile2 obj-$(CONFIG_MLXSW_CORE) += mlxsw_core.o
3 mlxsw_core-objs := core.o core_acl_flex_keys.o \
6 mlxsw_core-$(CONFIG_MLXSW_CORE_HWMON) += core_hwmon.o
7 mlxsw_core-$(CONFIG_MLXSW_CORE_THERMAL) += core_thermal.o
H A Dspectrum_cnt.c242 int mlxsw_sp_counter_resources_register(struct mlxsw_core *mlxsw_core) in mlxsw_sp_counter_resources_register() argument
245 struct devlink *devlink = priv_to_devlink(mlxsw_core); in mlxsw_sp_counter_resources_register()
255 if (!MLXSW_CORE_RES_VALID(mlxsw_core, COUNTER_POOL_SIZE) || in mlxsw_sp_counter_resources_register()
256 !MLXSW_CORE_RES_VALID(mlxsw_core, COUNTER_BANK_SIZE)) in mlxsw_sp_counter_resources_register()
259 pool_size = MLXSW_CORE_RES_GET(mlxsw_core, COUNTER_POOL_SIZE); in mlxsw_sp_counter_resources_register()
260 bank_size = MLXSW_CORE_RES_GET(mlxsw_core, COUNTER_BANK_SIZE); in mlxsw_sp_counter_resources_register()
H A Dspectrum_policer.c82 struct mlxsw_core *core = family->mlxsw_sp->core; in mlxsw_sp_policer_single_rate_family_init()
404 int mlxsw_sp_policer_resources_register(struct mlxsw_core *mlxsw_core) in mlxsw_sp_policer_resources_register() argument
407 struct devlink *devlink = priv_to_devlink(mlxsw_core); in mlxsw_sp_policer_resources_register()
411 if (!MLXSW_CORE_RES_VALID(mlxsw_core, MAX_GLOBAL_POLICERS) || in mlxsw_sp_policer_resources_register()
412 !MLXSW_CORE_RES_VALID(mlxsw_core, MAX_CPU_POLICERS)) in mlxsw_sp_policer_resources_register()
415 global_policers = MLXSW_CORE_RES_GET(mlxsw_core, MAX_GLOBAL_POLICERS); in mlxsw_sp_policer_resources_register()
416 cpu_policers = MLXSW_CORE_RES_GET(mlxsw_core, MAX_CPU_POLICERS); in mlxsw_sp_policer_resources_register()
H A Dspectrum_cnt.h23 int mlxsw_sp_counter_resources_register(struct mlxsw_core *mlxsw_core);
H A Dspectrum_buffers.c288 static void mlxsw_sp_sb_pm_occ_query_cb(struct mlxsw_core *mlxsw_core, in mlxsw_sp_sb_pm_occ_query_cb() argument
1358 int mlxsw_sp_sb_pool_get(struct mlxsw_core *mlxsw_core, in mlxsw_sp_sb_pool_get() argument
1362 struct mlxsw_sp *mlxsw_sp = mlxsw_core_driver_priv(mlxsw_core); in mlxsw_sp_sb_pool_get()
1375 int mlxsw_sp_sb_pool_set(struct mlxsw_core *mlxsw_core, in mlxsw_sp_sb_pool_set() argument
1380 struct mlxsw_sp *mlxsw_sp = mlxsw_core_driver_priv(mlxsw_core); in mlxsw_sp_sb_pool_set()
1562 static void mlxsw_sp_sb_sr_occ_query_cb(struct mlxsw_core *mlxsw_core, in mlxsw_sp_sb_sr_occ_query_cb() argument
1566 struct mlxsw_sp *mlxsw_sp = mlxsw_core_driver_priv(mlxsw_core); in mlxsw_sp_sb_sr_occ_query_cb()
1611 int mlxsw_sp_sb_occ_snapshot(struct mlxsw_core *mlxsw_core, in mlxsw_sp_sb_occ_snapshot() argument
1678 if (local_port < mlxsw_core_max_ports(mlxsw_core)) { in mlxsw_sp_sb_occ_snapshot()
1691 int mlxsw_sp_sb_occ_max_clear(struct mlxsw_core *mlxsw_core, in mlxsw_sp_sb_occ_max_clear() argument
[all …]
H A Dspectrum1_kvdl.c385 int mlxsw_sp1_kvdl_resources_register(struct mlxsw_core *mlxsw_core) in mlxsw_sp1_kvdl_resources_register() argument
387 struct devlink *devlink = priv_to_devlink(mlxsw_core); in mlxsw_sp1_kvdl_resources_register()
392 kvdl_max_size = MLXSW_CORE_RES_GET(mlxsw_core, KVD_SIZE) - in mlxsw_sp1_kvdl_resources_register()
393 MLXSW_CORE_RES_GET(mlxsw_core, KVD_SINGLE_MIN_SIZE) - in mlxsw_sp1_kvdl_resources_register()
394 MLXSW_CORE_RES_GET(mlxsw_core, KVD_DOUBLE_MIN_SIZE); in mlxsw_sp1_kvdl_resources_register()
H A Dcore_thermal.c128 struct mlxsw_core *core;
415 mlxsw_thermal_modules_init(struct device *dev, struct mlxsw_core *core, in mlxsw_thermal_modules_init()
502 mlxsw_thermal_gearboxes_init(struct device *dev, struct mlxsw_core *core, in mlxsw_thermal_gearboxes_init()
569 mlxsw_thermal_got_active(struct mlxsw_core *mlxsw_core, u8 slot_index, in mlxsw_thermal_got_active() argument
607 mlxsw_thermal_got_inactive(struct mlxsw_core *mlxsw_core, u8 slot_index, in mlxsw_thermal_got_inactive() argument
626 int mlxsw_thermal_init(struct mlxsw_core *core, in mlxsw_thermal_init()
H A Dcore_hwmon.c60 struct mlxsw_core *core;
788 mlxsw_hwmon_got_active(struct mlxsw_core *mlxsw_core, u8 slot_index, in mlxsw_hwmon_got_active() argument
836 mlxsw_hwmon_got_inactive(struct mlxsw_core *mlxsw_core, u8 slot_index, in mlxsw_hwmon_got_inactive() argument
856 int mlxsw_hwmon_init(struct mlxsw_core *mlxsw_core, in mlxsw_hwmon_init() argument
867 err = mlxsw_reg_query(mlxsw_core, MLXSW_REG(mgpir), mgpir_pl); in mlxsw_hwmon_init()
879 mlxsw_hwmon->core = mlxsw_core; in mlxsw_hwmon_init()
H A Di2c.c90 struct mlxsw_core *core;
525 mlxsw_i2c_init(void *bus_priv, struct mlxsw_core *mlxsw_core, in mlxsw_i2c_init() argument
533 mlxsw_i2c->core = mlxsw_core; in mlxsw_i2c_init()
539 err = mlxsw_cmd_query_fw(mlxsw_core, mbox); in mlxsw_i2c_init()
550 err = mlxsw_core_resources_query(mlxsw_core, mbox, res); in mlxsw_i2c_init()
H A Dpci.c118 struct mlxsw_core *core;
1920 static int mlxsw_pci_init(void *bus_priv, struct mlxsw_core *mlxsw_core, in mlxsw_pci_init() argument
1930 mlxsw_pci->core = mlxsw_core; in mlxsw_pci_init()
1946 err = mlxsw_cmd_query_fw(mlxsw_core, mbox); in mlxsw_pci_init()
2016 if (MLXSW_CORE_RES_VALID(mlxsw_core, CQE_V2) && in mlxsw_pci_init()
2017 MLXSW_CORE_RES_GET(mlxsw_core, CQE_V2)) in mlxsw_pci_init()
2019 else if (MLXSW_CORE_RES_VALID(mlxsw_core, CQE_V1) && in mlxsw_pci_init()
2020 MLXSW_CORE_RES_GET(mlxsw_core, CQE_V1)) in mlxsw_pci_init()
2022 else if ((MLXSW_CORE_RES_VALID(mlxsw_core, CQE_V0) && in mlxsw_pci_init()
2023 MLXSW_CORE_RES_GET(mlxsw_core, CQE_V0)) || in mlxsw_pci_init()
[all …]
H A Dspectrum_acl_tcam.c1494 struct mlxsw_core *mlxsw_core = devlink_priv(devlink); in mlxsw_sp_acl_tcam_region_rehash_intrvl_get() local
1498 mlxsw_sp = mlxsw_core_driver_priv(mlxsw_core); in mlxsw_sp_acl_tcam_region_rehash_intrvl_get()
1510 struct mlxsw_core *mlxsw_core = devlink_priv(devlink); in mlxsw_sp_acl_tcam_region_rehash_intrvl_set() local
1519 mlxsw_sp = mlxsw_core_driver_priv(mlxsw_core); in mlxsw_sp_acl_tcam_region_rehash_intrvl_set()
H A Dspectrum_port_range.c163 struct mlxsw_core *core = mlxsw_sp->core; in mlxsw_sp_port_range_init()
H A DKconfig15 module will be called mlxsw_core.
H A Dspectrum_ethtool.c571 struct mlxsw_core *mlxsw_core = mlxsw_sp_port->mlxsw_sp->core; in mlxsw_sp_port_get_transceiver_overheat_stats() local
577 err = mlxsw_env_module_overheat_counter_get(mlxsw_core, slot_index, in mlxsw_sp_port_get_transceiver_overheat_stats()

12