| /Linux-v5.4/drivers/net/ethernet/mellanox/mlxsw/ |
| D | core.h | 21 struct mlxsw_core; 27 unsigned int mlxsw_core_max_ports(const struct mlxsw_core *mlxsw_core); 29 void *mlxsw_core_driver_priv(struct mlxsw_core *mlxsw_core); 31 bool mlxsw_core_res_query_enabled(const struct mlxsw_core *mlxsw_core); 40 void mlxsw_core_bus_device_unregister(struct mlxsw_core *mlxsw_core, bool reload); 47 bool mlxsw_core_skb_transmit_busy(struct mlxsw_core *mlxsw_core, 49 int mlxsw_core_skb_transmit(struct mlxsw_core *mlxsw_core, struct sk_buff *skb, 51 void mlxsw_core_ptp_transmitted(struct mlxsw_core *mlxsw_core, 111 int mlxsw_core_rx_listener_register(struct mlxsw_core *mlxsw_core, 114 void mlxsw_core_rx_listener_unregister(struct mlxsw_core *mlxsw_core, [all …]
|
| D | core.c | 61 struct mlxsw_core { struct 90 static int mlxsw_ports_init(struct mlxsw_core *mlxsw_core) in mlxsw_ports_init() argument 93 if (MLXSW_CORE_RES_VALID(mlxsw_core, MAX_SYSTEM_PORT)) in mlxsw_ports_init() 94 mlxsw_core->max_ports = MLXSW_CORE_RES_GET(mlxsw_core, in mlxsw_ports_init() 97 mlxsw_core->max_ports = MLXSW_PORT_MAX_PORTS_DEFAULT + 1; in mlxsw_ports_init() 99 mlxsw_core->ports = kcalloc(mlxsw_core->max_ports, in mlxsw_ports_init() 101 if (!mlxsw_core->ports) in mlxsw_ports_init() 107 static void mlxsw_ports_fini(struct mlxsw_core *mlxsw_core) in mlxsw_ports_fini() argument 109 kfree(mlxsw_core->ports); in mlxsw_ports_fini() 112 unsigned int mlxsw_core_max_ports(const struct mlxsw_core *mlxsw_core) in mlxsw_core_max_ports() argument [all …]
|
| D | cmd.h | 26 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 …]
|
| D | core_env.c | 13 static int mlxsw_env_validate_cable_ident(struct mlxsw_core *core, int id, in mlxsw_env_validate_cable_ident() 46 mlxsw_env_query_module_eeprom(struct mlxsw_core *mlxsw_core, int module, in mlxsw_env_query_module_eeprom() argument 71 err = mlxsw_reg_query(mlxsw_core, MLXSW_REG(mcia), mcia_pl); in mlxsw_env_query_module_eeprom() 86 int mlxsw_env_module_temp_thresholds_get(struct mlxsw_core *core, int module, in mlxsw_env_module_temp_thresholds_get() 148 int mlxsw_env_get_module_info(struct mlxsw_core *mlxsw_core, int module, in mlxsw_env_get_module_info() argument 157 err = mlxsw_env_query_module_eeprom(mlxsw_core, module, 0, offset, in mlxsw_env_get_module_info() 187 err = mlxsw_env_query_module_eeprom(mlxsw_core, module, in mlxsw_env_get_module_info() 211 struct mlxsw_core *mlxsw_core, int module, in mlxsw_env_get_module_eeprom() argument 225 err = mlxsw_env_query_module_eeprom(mlxsw_core, module, offset, in mlxsw_env_get_module_eeprom()
|
| D | core_env.h | 7 int mlxsw_env_module_temp_thresholds_get(struct mlxsw_core *core, int module, 10 int mlxsw_env_get_module_info(struct mlxsw_core *mlxsw_core, int module, 14 struct mlxsw_core *mlxsw_core, int module,
|
| D | spectrum_trap.c | 128 int mlxsw_sp_trap_init(struct mlxsw_core *mlxsw_core, in mlxsw_sp_trap_init() argument 141 err = mlxsw_core_trap_register(mlxsw_core, listener, trap_ctx); in mlxsw_sp_trap_init() 149 void mlxsw_sp_trap_fini(struct mlxsw_core *mlxsw_core, in mlxsw_sp_trap_fini() argument 161 mlxsw_core_trap_unregister(mlxsw_core, listener, trap_ctx); in mlxsw_sp_trap_fini() 165 int mlxsw_sp_trap_action_set(struct mlxsw_core *mlxsw_core, in mlxsw_sp_trap_action_set() argument 191 err = mlxsw_core_trap_action_set(mlxsw_core, listener, in mlxsw_sp_trap_action_set() 253 int mlxsw_sp_trap_group_init(struct mlxsw_core *mlxsw_core, in mlxsw_sp_trap_group_init() argument 256 struct mlxsw_sp *mlxsw_sp = mlxsw_core_driver_priv(mlxsw_core); in mlxsw_sp_trap_group_init()
|
| D | minimal.c | 24 struct mlxsw_core *core; 91 struct mlxsw_core *core = mlxsw_m_port->mlxsw_m->core; in mlxsw_m_get_module_info() 101 struct mlxsw_core *core = mlxsw_m_port->mlxsw_m->core; in mlxsw_m_get_module_eeprom() 328 static int mlxsw_m_init(struct mlxsw_core *mlxsw_core, in mlxsw_m_init() argument 331 struct mlxsw_m *mlxsw_m = mlxsw_core_driver_priv(mlxsw_core); in mlxsw_m_init() 334 mlxsw_m->core = mlxsw_core; in mlxsw_m_init() 352 static void mlxsw_m_fini(struct mlxsw_core *mlxsw_core) in mlxsw_m_fini() argument 354 struct mlxsw_m *mlxsw_m = mlxsw_core_driver_priv(mlxsw_core); in mlxsw_m_fini()
|
| D | Makefile | 2 obj-$(CONFIG_MLXSW_CORE) += mlxsw_core.o 3 mlxsw_core-objs := core.o core_acl_flex_keys.o \ 5 mlxsw_core-$(CONFIG_MLXSW_CORE_HWMON) += core_hwmon.o 6 mlxsw_core-$(CONFIG_MLXSW_CORE_THERMAL) += core_thermal.o
|
| D | switchib.c | 31 struct mlxsw_core *core; 434 static int mlxsw_sib_basic_trap_groups_set(struct mlxsw_core *mlxsw_core) in mlxsw_sib_basic_trap_groups_set() argument 445 return mlxsw_reg_write(mlxsw_core, MLXSW_REG(htgt), htgt_pl); in mlxsw_sib_basic_trap_groups_set() 448 static int mlxsw_sib_init(struct mlxsw_core *mlxsw_core, in mlxsw_sib_init() argument 451 struct mlxsw_sib *mlxsw_sib = mlxsw_core_driver_priv(mlxsw_core); in mlxsw_sib_init() 454 mlxsw_sib->core = mlxsw_core; in mlxsw_sib_init() 482 static void mlxsw_sib_fini(struct mlxsw_core *mlxsw_core) in mlxsw_sib_fini() argument 484 struct mlxsw_sib *mlxsw_sib = mlxsw_core_driver_priv(mlxsw_core); in mlxsw_sib_fini()
|
| D | spectrum.h | 144 struct mlxsw_core *core; 394 int mlxsw_sp_sb_pool_get(struct mlxsw_core *mlxsw_core, 397 int mlxsw_sp_sb_pool_set(struct mlxsw_core *mlxsw_core, 416 int mlxsw_sp_sb_occ_snapshot(struct mlxsw_core *mlxsw_core, 418 int mlxsw_sp_sb_occ_max_clear(struct mlxsw_core *mlxsw_core, 628 int mlxsw_sp1_kvdl_resources_register(struct mlxsw_core *mlxsw_core); 975 int mlxsw_sp_trap_init(struct mlxsw_core *mlxsw_core, 977 void mlxsw_sp_trap_fini(struct mlxsw_core *mlxsw_core, 979 int mlxsw_sp_trap_action_set(struct mlxsw_core *mlxsw_core, 982 int mlxsw_sp_trap_group_init(struct mlxsw_core *mlxsw_core,
|
| D | spectrum_buffers.c | 263 static void mlxsw_sp_sb_pm_occ_query_cb(struct mlxsw_core *mlxsw_core, in mlxsw_sp_sb_pm_occ_query_cb() argument 986 int mlxsw_sp_sb_pool_get(struct mlxsw_core *mlxsw_core, in mlxsw_sp_sb_pool_get() argument 990 struct mlxsw_sp *mlxsw_sp = mlxsw_core_driver_priv(mlxsw_core); in mlxsw_sp_sb_pool_get() 1003 int mlxsw_sp_sb_pool_set(struct mlxsw_core *mlxsw_core, in mlxsw_sp_sb_pool_set() argument 1008 struct mlxsw_sp *mlxsw_sp = mlxsw_core_driver_priv(mlxsw_core); in mlxsw_sp_sb_pool_set() 1189 static void mlxsw_sp_sb_sr_occ_query_cb(struct mlxsw_core *mlxsw_core, in mlxsw_sp_sb_sr_occ_query_cb() argument 1193 struct mlxsw_sp *mlxsw_sp = mlxsw_core_driver_priv(mlxsw_core); in mlxsw_sp_sb_sr_occ_query_cb() 1205 local_port < mlxsw_core_max_ports(mlxsw_core); local_port++) { in mlxsw_sp_sb_sr_occ_query_cb() 1224 local_port < mlxsw_core_max_ports(mlxsw_core); local_port++) { in mlxsw_sp_sb_sr_occ_query_cb() 1238 int mlxsw_sp_sb_occ_snapshot(struct mlxsw_core *mlxsw_core, in mlxsw_sp_sb_occ_snapshot() argument [all …]
|
| D | spectrum.c | 444 static int mlxsw_sp_flash_update(struct mlxsw_core *mlxsw_core, in mlxsw_sp_flash_update() argument 448 struct mlxsw_sp *mlxsw_sp = mlxsw_core_driver_priv(mlxsw_core); in mlxsw_sp_flash_update() 4046 static int mlxsw_sp_port_split(struct mlxsw_core *mlxsw_core, u8 local_port, in mlxsw_sp_port_split() argument 4050 struct mlxsw_sp *mlxsw_sp = mlxsw_core_driver_priv(mlxsw_core); in mlxsw_sp_port_split() 4057 if (!MLXSW_CORE_RES_VALID(mlxsw_core, LOCAL_PORTS_IN_1X) || in mlxsw_sp_port_split() 4058 !MLXSW_CORE_RES_VALID(mlxsw_core, LOCAL_PORTS_IN_2X)) in mlxsw_sp_port_split() 4061 local_ports_in_1x = MLXSW_CORE_RES_GET(mlxsw_core, LOCAL_PORTS_IN_1X); in mlxsw_sp_port_split() 4062 local_ports_in_2x = MLXSW_CORE_RES_GET(mlxsw_core, LOCAL_PORTS_IN_2X); in mlxsw_sp_port_split() 4125 static int mlxsw_sp_port_unsplit(struct mlxsw_core *mlxsw_core, u8 local_port, in mlxsw_sp_port_unsplit() argument 4128 struct mlxsw_sp *mlxsw_sp = mlxsw_core_driver_priv(mlxsw_core); in mlxsw_sp_port_unsplit() [all …]
|
| D | spectrum_ptp.c | 62 struct mlxsw_core *core; 76 struct mlxsw_core *mlxsw_core = clock->core; in __mlxsw_sp1_ptp_read_frc() local 79 frc_h1 = mlxsw_core_read_frc_h(mlxsw_core); in __mlxsw_sp1_ptp_read_frc() 81 frc_l = mlxsw_core_read_frc_l(mlxsw_core); in __mlxsw_sp1_ptp_read_frc() 83 frc_h2 = mlxsw_core_read_frc_h(mlxsw_core); in __mlxsw_sp1_ptp_read_frc() 88 frc_l = mlxsw_core_read_frc_l(mlxsw_core); in __mlxsw_sp1_ptp_read_frc() 106 struct mlxsw_core *mlxsw_core = clock->core; in mlxsw_sp1_ptp_phc_adjfreq() local 111 return mlxsw_reg_write(mlxsw_core, MLXSW_REG(mtutc), mtutc_pl); in mlxsw_sp1_ptp_phc_adjfreq() 127 struct mlxsw_core *mlxsw_core = clock->core; in mlxsw_sp1_ptp_phc_settime() local 141 err = mlxsw_reg_write(mlxsw_core, MLXSW_REG(mtpps), mtpps_pl); in mlxsw_sp1_ptp_phc_settime() [all …]
|
| D | spectrum1_kvdl.c | 386 int mlxsw_sp1_kvdl_resources_register(struct mlxsw_core *mlxsw_core) in mlxsw_sp1_kvdl_resources_register() argument 388 struct devlink *devlink = priv_to_devlink(mlxsw_core); in mlxsw_sp1_kvdl_resources_register() 393 kvdl_max_size = MLXSW_CORE_RES_GET(mlxsw_core, KVD_SIZE) - in mlxsw_sp1_kvdl_resources_register() 394 MLXSW_CORE_RES_GET(mlxsw_core, KVD_SINGLE_MIN_SIZE) - in mlxsw_sp1_kvdl_resources_register() 395 MLXSW_CORE_RES_GET(mlxsw_core, KVD_DOUBLE_MIN_SIZE); in mlxsw_sp1_kvdl_resources_register()
|
| D | i2c.c | 75 struct mlxsw_core *core; 509 mlxsw_i2c_init(void *bus_priv, struct mlxsw_core *mlxsw_core, in mlxsw_i2c_init() argument 517 mlxsw_i2c->core = mlxsw_core; in mlxsw_i2c_init() 523 err = mlxsw_cmd_query_fw(mlxsw_core, mbox); in mlxsw_i2c_init() 534 err = mlxsw_core_resources_query(mlxsw_core, mbox, res); in mlxsw_i2c_init()
|
| D | switchx2.c | 30 struct mlxsw_core *core; 1376 static int mlxsw_sx_port_type_set(struct mlxsw_core *mlxsw_core, u8 local_port, in mlxsw_sx_port_type_set() argument 1379 struct mlxsw_sx *mlxsw_sx = mlxsw_core_driver_priv(mlxsw_core); in mlxsw_sx_port_type_set() 1551 static int mlxsw_sx_basic_trap_groups_set(struct mlxsw_core *mlxsw_core) in mlxsw_sx_basic_trap_groups_set() argument 1562 return mlxsw_reg_write(mlxsw_core, MLXSW_REG(htgt), htgt_pl); in mlxsw_sx_basic_trap_groups_set() 1565 static int mlxsw_sx_init(struct mlxsw_core *mlxsw_core, in mlxsw_sx_init() argument 1568 struct mlxsw_sx *mlxsw_sx = mlxsw_core_driver_priv(mlxsw_core); in mlxsw_sx_init() 1571 mlxsw_sx->core = mlxsw_core; in mlxsw_sx_init() 1607 static void mlxsw_sx_fini(struct mlxsw_core *mlxsw_core) in mlxsw_sx_fini() argument 1609 struct mlxsw_sx *mlxsw_sx = mlxsw_core_driver_priv(mlxsw_core); in mlxsw_sx_fini()
|
| D | pci.c | 108 struct mlxsw_core *core; 1366 static int mlxsw_pci_init(void *bus_priv, struct mlxsw_core *mlxsw_core, in mlxsw_pci_init() argument 1379 mlxsw_pci->core = mlxsw_core; in mlxsw_pci_init() 1403 err = mlxsw_cmd_query_fw(mlxsw_core, mbox); in mlxsw_pci_init() 1446 err = mlxsw_core_resources_query(mlxsw_core, mbox, res); in mlxsw_pci_init() 1450 if (MLXSW_CORE_RES_VALID(mlxsw_core, CQE_V2) && in mlxsw_pci_init() 1451 MLXSW_CORE_RES_GET(mlxsw_core, CQE_V2)) in mlxsw_pci_init() 1453 else if (MLXSW_CORE_RES_VALID(mlxsw_core, CQE_V1) && in mlxsw_pci_init() 1454 MLXSW_CORE_RES_GET(mlxsw_core, CQE_V1)) in mlxsw_pci_init() 1456 else if ((MLXSW_CORE_RES_VALID(mlxsw_core, CQE_V0) && in mlxsw_pci_init() [all …]
|
| D | core_thermal.c | 106 struct mlxsw_core *core; 162 mlxsw_thermal_module_trips_update(struct device *dev, struct mlxsw_core *core, in mlxsw_thermal_module_trips_update() 777 mlxsw_thermal_module_init(struct device *dev, struct mlxsw_core *core, in mlxsw_thermal_module_init() 819 mlxsw_thermal_modules_init(struct device *dev, struct mlxsw_core *core, in mlxsw_thermal_modules_init() 900 mlxsw_thermal_gearboxes_init(struct device *dev, struct mlxsw_core *core, in mlxsw_thermal_gearboxes_init() 959 int mlxsw_thermal_init(struct mlxsw_core *core, in mlxsw_thermal_init()
|
| D | core_hwmon.c | 35 struct mlxsw_core *core; 627 int mlxsw_hwmon_init(struct mlxsw_core *mlxsw_core, in mlxsw_hwmon_init() argument 638 mlxsw_hwmon->core = mlxsw_core; in mlxsw_hwmon_init()
|
| D | Kconfig | 13 module will be called mlxsw_core.
|