Home
last modified time | relevance | path

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

/linux/drivers/net/ethernet/mellanox/mlxsw/
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
37 return mlxsw_cmd_exec(mlxsw_core, opcode, opcode_mod, in_mod, false, in mlxsw_cmd_exec_in()
41 static inline int mlxsw_cmd_exec_out(struct mlxsw_core *mlxsw_core, u16 opcode, in mlxsw_cmd_exec_out() argument
46 return mlxsw_cmd_exec(mlxsw_core, opcode, opcode_mod, in_mod, in mlxsw_cmd_exec_out()
51 static inline int mlxsw_cmd_exec_none(struct mlxsw_core *mlxsw_core, u16 opcode, in mlxsw_cmd_exec_none() argument
54 return mlxsw_cmd_exec(mlxsw_core, opcode, opcode_mod, in_mod, false, in mlxsw_cmd_exec_none()
199 static inline int mlxsw_cmd_query_fw(struct mlxsw_core *mlxsw_core, in mlxsw_cmd_query_fw() argument
202 return mlxsw_cmd_exec_out(mlxsw_core, MLXSW_CMD_OPCODE_QUERY_FW, in mlxsw_cmd_query_fw()
[all …]
H A Dcore_env.h12 int mlxsw_env_module_temp_thresholds_get(struct mlxsw_core *core,
17 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,
54 mlxsw_env_module_overheat_counter_get(struct mlxsw_core *mlxsw_core, u8 slot_index,
57 void mlxsw_env_module_port_map(struct mlxsw_core *mlxsw_core, u8 slot_index,
[all …]
H A Dcore_linecards.c79 struct mlxsw_core *mlxsw_core = linecard->linecards->mlxsw_core; in mlxsw_linecard_type_name() local
84 err = mlxsw_reg_query(mlxsw_core, MLXSW_REG(mddq), mddq_pl); in mlxsw_linecard_type_name()
93 struct mlxsw_core *mlxsw_core; member
107 struct mlxsw_core *mlxsw_core = info->mlxsw_core; in mlxsw_linecard_device_fw_component_query() local
118 err = mlxsw_reg_query(mlxsw_core, MLXSW_REG(mddt), mddt_pl); in mlxsw_linecard_device_fw_component_query()
137 struct mlxsw_core *mlxsw_core = info->mlxsw_core; in mlxsw_linecard_device_fw_fsm_lock() local
148 err = mlxsw_reg_query(mlxsw_core, MLXSW_REG(mddt), mddt_pl); in mlxsw_linecard_device_fw_fsm_lock()
162 return mlxsw_reg_write(mlxsw_core, MLXSW_REG(mddt), mddt_pl); in mlxsw_linecard_device_fw_fsm_lock()
175 struct mlxsw_core *mlxsw_core = info->mlxsw_core; in mlxsw_linecard_device_fw_fsm_component_update() local
185 return mlxsw_reg_write(mlxsw_core, MLXSW_REG(mddt), mddt_pl); in mlxsw_linecard_device_fw_fsm_component_update()
[all …]
H A Dcore_env.c31 struct mlxsw_core *core;
59 mlxsw_env_module_info *mlxsw_env_module_info_get(struct mlxsw_core *mlxsw_core, in mlxsw_env_module_info_get() argument
62 struct mlxsw_env *mlxsw_env = mlxsw_core_env(mlxsw_core); in mlxsw_env_module_info_get()
67 static int __mlxsw_env_validate_module_type(struct mlxsw_core *core, in __mlxsw_env_validate_module_type()
89 static int mlxsw_env_validate_module_type(struct mlxsw_core *core, 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()
146 mlxsw_env_query_module_eeprom(struct mlxsw_core *mlxsw_core, u8 slot_index, in mlxsw_env_query_module_eeprom() argument
150 struct mlxsw_env *mlxsw_env = mlxsw_core_env(mlxsw_core); in mlxsw_env_query_module_eeprom()
192 err = mlxsw_reg_query(mlxsw_core, MLXSW_REG(mcia), mcia_pl); 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()
[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()
135 struct mlxsw_core *core = mlxsw_m_port->mlxsw_m->core; in mlxsw_m_get_module_eeprom_by_page()
149 struct mlxsw_core *core = mlxsw_m_port->mlxsw_m->core; in mlxsw_m_set_module_eeprom_by_page()
160 struct mlxsw_core *core = mlxsw_m_port->mlxsw_m->core; in mlxsw_m_reset()
173 struct mlxsw_core *core = mlxsw_m_port->mlxsw_m->core; in mlxsw_m_get_module_power_mode()
186 struct mlxsw_core *core = mlxsw_m_port->mlxsw_m->core; in mlxsw_m_set_module_power_mode()
560 mlxsw_m_ports_remove_selected(struct mlxsw_core *mlxsw_core, in mlxsw_m_ports_remove_selected() argument
564 struct mlxsw_m *mlxsw_m = mlxsw_core_driver_priv(mlxsw_core); in mlxsw_m_ports_remove_selected()
[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
184 u16 max_fid = MLXSW_CORE_RES_GET(mlxsw_core, FID); in mlxsw_sp_txhdr_info_data_init()
1946 mlxsw_sp_ports_remove_selected(struct mlxsw_core *mlxsw_core, in mlxsw_sp_ports_remove_selected() argument
1950 struct mlxsw_sp *mlxsw_sp = mlxsw_core_driver_priv(mlxsw_core); in mlxsw_sp_ports_remove_selected()
1951 unsigned int max_ports = mlxsw_core_max_ports(mlxsw_core); in mlxsw_sp_ports_remove_selected()
2108 static int mlxsw_sp_port_split(struct mlxsw_core *mlxsw_core, u16 local_port, in mlxsw_sp_port_split() argument
2112 struct mlxsw_sp *mlxsw_sp = mlxsw_core_driver_priv(mlxsw_core); in mlxsw_sp_port_split()
2137 err = mlxsw_reg_query(mlxsw_core, MLXSW_REG(pmtdb), pmtdb_pl); in mlxsw_sp_port_split()
2173 static int mlxsw_sp_port_unsplit(struct mlxsw_core *mlxsw_core, u16 local_port, in mlxsw_sp_port_unsplit() argument
2176 struct mlxsw_sp *mlxsw_sp = mlxsw_core_driver_priv(mlxsw_core); in mlxsw_sp_port_unsplit()
[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()
122 frc_h2 = mlxsw_core_read_frc_h(mlxsw_core); in __mlxsw_sp1_ptp_read_frc()
127 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
150 return mlxsw_reg_write(mlxsw_core, MLXSW_REG(mtutc), mtutc_pl); in mlxsw_sp_ptp_phc_adjfreq()
166 struct mlxsw_core *mlxsw_core = clock->common.core; in mlxsw_sp1_ptp_phc_settime() local
180 err = mlxsw_reg_write(mlxsw_core, MLXSW_REG(mtpps), mtpps_pl); in mlxsw_sp1_ptp_phc_settime()
[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_trap.c1568 int mlxsw_sp_trap_init(struct mlxsw_core *mlxsw_core, in mlxsw_sp_trap_init() argument
1571 struct mlxsw_sp *mlxsw_sp = mlxsw_core_driver_priv(mlxsw_core); in mlxsw_sp_trap_init()
1586 err = mlxsw_core_trap_register(mlxsw_core, listener, trap_ctx); in mlxsw_sp_trap_init()
1594 void mlxsw_sp_trap_fini(struct mlxsw_core *mlxsw_core, in mlxsw_sp_trap_fini() argument
1597 struct mlxsw_sp *mlxsw_sp = mlxsw_core_driver_priv(mlxsw_core); in mlxsw_sp_trap_fini()
1611 mlxsw_core_trap_unregister(mlxsw_core, listener, trap_ctx); in mlxsw_sp_trap_fini()
1615 int mlxsw_sp_trap_action_set(struct mlxsw_core *mlxsw_core, in mlxsw_sp_trap_action_set() argument
1620 struct mlxsw_sp *mlxsw_sp = mlxsw_core_driver_priv(mlxsw_core); in mlxsw_sp_trap_action_set()
1652 err = mlxsw_core_trap_state_set(mlxsw_core, listener, enabled); in mlxsw_sp_trap_action_set()
1661 __mlxsw_sp_trap_group_init(struct mlxsw_core *mlxsw_core, in __mlxsw_sp_trap_group_init() argument
[all …]
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()
1578 local_port < mlxsw_core_max_ports(mlxsw_core); local_port++) { in mlxsw_sp_sb_sr_occ_query_cb()
1597 local_port < mlxsw_core_max_ports(mlxsw_core); local_port++) { 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
[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_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 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()
2012 err = mlxsw_core_resources_query(mlxsw_core, mbox, res); 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()
[all …]
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_fid.c397 struct mlxsw_core *core = fid_family->mlxsw_sp->core; in mlxsw_sp_fid_rfid_pgt_size_cff()
H A Dspectrum_router.c11064 struct mlxsw_core *core = mlxsw_sp->core; in mlxsw_sp_rifs_init()