Home
last modified time | relevance | path

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

/linux/drivers/net/ethernet/mellanox/mlxsw/
H A Dcore.c43 static const char mlxsw_core_driver_name[] = "mlxsw_core";
66 struct mlxsw_core { struct
103 struct mlxsw_linecards *mlxsw_core_linecards(struct mlxsw_core *mlxsw_core) in mlxsw_core_linecards() argument
105 return mlxsw_core->linecards; in mlxsw_core_linecards()
108 void mlxsw_core_linecards_set(struct mlxsw_core *mlxsw_core, in mlxsw_core_linecards_set() argument
111 mlxsw_core->linecards = linecards; in mlxsw_core_linecards_set()
118 struct mlxsw_core *mlxsw_core in mlxsw_ports_occ_get() local
67 drivermlxsw_core global() argument
91 portsmlxsw_core global() argument
123 mlxsw_core_resources_ports_register(struct mlxsw_core * mlxsw_core) mlxsw_core_resources_ports_register() argument
141 mlxsw_ports_init(struct mlxsw_core * mlxsw_core,bool reload) mlxsw_ports_init() argument
174 mlxsw_ports_fini(struct mlxsw_core * mlxsw_core,bool reload) mlxsw_ports_fini() argument
185 mlxsw_core_max_ports(const struct mlxsw_core * mlxsw_core) mlxsw_core_max_ports() argument
191 mlxsw_core_max_lag(struct mlxsw_core * mlxsw_core,u16 * p_max_lag) mlxsw_core_max_lag() argument
209 mlxsw_core_lag_mode(struct mlxsw_core * mlxsw_core) mlxsw_core_lag_mode() argument
216 mlxsw_core_flood_mode(struct mlxsw_core * mlxsw_core) mlxsw_core_flood_mode() argument
222 mlxsw_core_driver_priv(struct mlxsw_core * mlxsw_core) mlxsw_core_driver_priv() argument
247 struct mlxsw_core *mlxsw_core; global() member
257 mlxsw_core_trap_groups_set(struct mlxsw_core * mlxsw_core) mlxsw_core_trap_groups_set() argument
517 mlxsw_emad_construct(const struct mlxsw_core * mlxsw_core,struct sk_buff * skb,const struct mlxsw_reg_info * reg,char * payload,enum mlxsw_core_reg_access_type type,u64 tid) mlxsw_emad_construct() argument
731 mlxsw_emad_transmit(struct mlxsw_core * mlxsw_core,struct mlxsw_reg_trans * trans) mlxsw_emad_transmit() argument
756 struct mlxsw_core *mlxsw_core = trans->core; mlxsw_emad_trans_finish() local
766 mlxsw_emad_transmit_retry(struct mlxsw_core * mlxsw_core,struct mlxsw_reg_trans * trans) mlxsw_emad_transmit_retry() argument
797 mlxsw_emad_process_response(struct mlxsw_core * mlxsw_core,struct mlxsw_reg_trans * trans,struct sk_buff * skb) mlxsw_emad_process_response() argument
828 struct mlxsw_core *mlxsw_core = priv; mlxsw_emad_rx_listener_func() local
854 mlxsw_emad_tlv_enable(struct mlxsw_core * mlxsw_core) mlxsw_emad_tlv_enable() argument
874 mlxsw_emad_tlv_disable(struct mlxsw_core * mlxsw_core) mlxsw_emad_tlv_disable() argument
880 mlxsw_emad_init(struct mlxsw_core * mlxsw_core) mlxsw_emad_init() argument
926 mlxsw_emad_fini(struct mlxsw_core * mlxsw_core) mlxsw_emad_fini() argument
939 mlxsw_emad_alloc(const struct mlxsw_core * mlxsw_core,u16 reg_len) mlxsw_emad_alloc() argument
964 mlxsw_emad_reg_access(struct mlxsw_core * mlxsw_core,const struct mlxsw_reg_info * reg,char * payload,enum mlxsw_core_reg_access_type type,struct mlxsw_reg_trans * trans,struct list_head * bulk_list,mlxsw_reg_trans_cb_t * cb,unsigned long cb_priv,u64 tid) mlxsw_emad_reg_access() argument
1058 mlxsw_core_fw_flash(struct mlxsw_core * mlxsw_core,struct mlxfw_dev * mlxfw_dev,const struct firmware * firmware,struct netlink_ext_ack * extack) mlxsw_core_fw_flash() argument
1074 struct mlxsw_core *mlxsw_core; global() member
1083 struct mlxsw_core *mlxsw_core = mlxsw_core_fw_info->mlxsw_core; mlxsw_core_fw_component_query() local
1102 struct mlxsw_core *mlxsw_core = mlxsw_core_fw_info->mlxsw_core; mlxsw_core_fw_fsm_lock() local
1125 struct mlxsw_core *mlxsw_core = mlxsw_core_fw_info->mlxsw_core; mlxsw_core_fw_fsm_component_update() local
1138 struct mlxsw_core *mlxsw_core = mlxsw_core_fw_info->mlxsw_core; mlxsw_core_fw_fsm_block_download() local
1150 struct mlxsw_core *mlxsw_core = mlxsw_core_fw_info->mlxsw_core; mlxsw_core_fw_fsm_component_verify() local
1162 struct mlxsw_core *mlxsw_core = mlxsw_core_fw_info->mlxsw_core; mlxsw_core_fw_fsm_activate() local
1175 struct mlxsw_core *mlxsw_core = mlxsw_core_fw_info->mlxsw_core; mlxsw_core_fw_fsm_query_state() local
1196 struct mlxsw_core *mlxsw_core = mlxsw_core_fw_info->mlxsw_core; mlxsw_core_fw_fsm_cancel() local
1207 struct mlxsw_core *mlxsw_core = mlxsw_core_fw_info->mlxsw_core; mlxsw_core_fw_fsm_release() local
1226 mlxsw_core_dev_fw_flash(struct mlxsw_core * mlxsw_core,const struct firmware * firmware,struct netlink_ext_ack * extack) mlxsw_core_dev_fw_flash() argument
1244 mlxsw_core_fw_rev_validate(struct mlxsw_core * mlxsw_core,const struct mlxsw_bus_info * mlxsw_bus_info,const struct mlxsw_fw_rev * req_rev,const char * filename) mlxsw_core_fw_rev_validate() argument
1301 mlxsw_core_fw_flash_update(struct mlxsw_core * mlxsw_core,struct devlink_flash_update_params * params,struct netlink_ext_ack * extack) mlxsw_core_fw_flash_update() argument
1326 mlxsw_core_fw_params_register(struct mlxsw_core * mlxsw_core) mlxsw_core_fw_params_register() argument
1344 mlxsw_core_fw_params_unregister(struct mlxsw_core * mlxsw_core) mlxsw_core_fw_params_unregister() argument
1361 struct mlxsw_core *mlxsw_core = devlink_priv(devlink); mlxsw_devlink_port_split() local
1375 struct mlxsw_core *mlxsw_core = devlink_priv(devlink); mlxsw_devlink_port_unsplit() local
1389 struct mlxsw_core *mlxsw_core = devlink_priv(devlink); mlxsw_devlink_sb_pool_get() local
1404 struct mlxsw_core *mlxsw_core = devlink_priv(devlink); mlxsw_devlink_sb_pool_set() local
1418 struct mlxsw_core *mlxsw_core = devlink_priv(devlink_port->devlink); mlxsw_devlink_sb_port_pool_get() local
1434 struct mlxsw_core *mlxsw_core = devlink_priv(devlink_port->devlink); mlxsw_devlink_sb_port_pool_set() local
1451 struct mlxsw_core *mlxsw_core = devlink_priv(devlink_port->devlink); mlxsw_devlink_sb_tc_pool_bind_get() local
1470 struct mlxsw_core *mlxsw_core = devlink_priv(devlink_port->devlink); mlxsw_devlink_sb_tc_pool_bind_set() local
1485 struct mlxsw_core *mlxsw_core = devlink_priv(devlink); mlxsw_devlink_sb_occ_snapshot() local
1496 struct mlxsw_core *mlxsw_core = devlink_priv(devlink); mlxsw_devlink_sb_occ_max_clear() local
1509 struct mlxsw_core *mlxsw_core = devlink_priv(devlink_port->devlink); mlxsw_devlink_sb_occ_port_pool_get() local
1526 struct mlxsw_core *mlxsw_core = devlink_priv(devlink_port->devlink); mlxsw_devlink_sb_occ_tc_port_bind_get() local
1542 struct mlxsw_core *mlxsw_core = devlink_priv(devlink); mlxsw_devlink_info_get() local
1583 struct mlxsw_core *mlxsw_core = devlink_priv(devlink); mlxsw_devlink_core_bus_device_reload_down() local
1597 struct mlxsw_core *mlxsw_core = devlink_priv(devlink); mlxsw_devlink_core_bus_device_reload_up() local
1613 struct mlxsw_core *mlxsw_core = devlink_priv(devlink); mlxsw_devlink_flash_update() local
1622 struct mlxsw_core *mlxsw_core = devlink_priv(devlink); mlxsw_devlink_trap_init() local
1634 struct mlxsw_core *mlxsw_core = devlink_priv(devlink); mlxsw_devlink_trap_fini() local
1647 struct mlxsw_core *mlxsw_core = devlink_priv(devlink); mlxsw_devlink_trap_action_set() local
1659 struct mlxsw_core *mlxsw_core = devlink_priv(devlink); mlxsw_devlink_trap_group_init() local
1673 struct mlxsw_core *mlxsw_core = devlink_priv(devlink); mlxsw_devlink_trap_group_set() local
1685 struct mlxsw_core *mlxsw_core = devlink_priv(devlink); mlxsw_devlink_trap_policer_init() local
1697 struct mlxsw_core *mlxsw_core = devlink_priv(devlink); mlxsw_devlink_trap_policer_fini() local
1711 struct mlxsw_core *mlxsw_core = devlink_priv(devlink); mlxsw_devlink_trap_policer_set() local
1725 struct mlxsw_core *mlxsw_core = devlink_priv(devlink); mlxsw_devlink_trap_policer_counter_get() local
1762 mlxsw_core_params_register(struct mlxsw_core * mlxsw_core) mlxsw_core_params_register() argument
1767 mlxsw_core_params_unregister(struct mlxsw_core * mlxsw_core) mlxsw_core_params_unregister() argument
1773 struct mlxsw_core *mlxsw_core; global() member
1781 struct mlxsw_core *mlxsw_core; mlxsw_core_health_event_work() local
1794 struct mlxsw_core *mlxsw_core = priv; mlxsw_core_health_listener_func() local
2003 struct mlxsw_core *mlxsw_core = devlink_health_reporter_priv(reporter); mlxsw_core_health_fw_fatal_test() local
2022 mlxsw_core_health_fw_fatal_config(struct mlxsw_core * mlxsw_core,bool enable) mlxsw_core_health_fw_fatal_config() argument
2036 mlxsw_core_health_init(struct mlxsw_core * mlxsw_core) mlxsw_core_health_init() argument
2070 mlxsw_core_health_fini(struct mlxsw_core * mlxsw_core) mlxsw_core_health_fini() argument
2082 mlxsw_core_irq_event_handler_init(struct mlxsw_core * mlxsw_core) mlxsw_core_irq_event_handler_init() argument
2088 mlxsw_core_irq_event_handler_fini(struct mlxsw_core * mlxsw_core) mlxsw_core_irq_event_handler_fini() argument
2102 struct mlxsw_core *mlxsw_core; __mlxsw_core_bus_device_register() local
2272 mlxsw_core_bus_device_unregister(struct mlxsw_core * mlxsw_core,bool reload) mlxsw_core_bus_device_unregister() argument
2323 mlxsw_core_skb_transmit_busy(struct mlxsw_core * mlxsw_core,const struct mlxsw_tx_info * tx_info) mlxsw_core_skb_transmit_busy() argument
2331 mlxsw_core_skb_transmit(struct mlxsw_core * mlxsw_core,struct sk_buff * skb,const struct mlxsw_txhdr_info * txhdr_info) mlxsw_core_skb_transmit() argument
2339 mlxsw_core_ptp_transmitted(struct mlxsw_core * mlxsw_core,struct sk_buff * skb,u16 local_port) mlxsw_core_ptp_transmitted() argument
2358 __find_rx_listener_item(struct mlxsw_core * mlxsw_core,const struct mlxsw_rx_listener * rxl) __find_rx_listener_item() argument
2370 mlxsw_core_rx_listener_register(struct mlxsw_core * mlxsw_core,const struct mlxsw_rx_listener * rxl,void * priv,bool enabled) mlxsw_core_rx_listener_register() argument
2391 mlxsw_core_rx_listener_unregister(struct mlxsw_core * mlxsw_core,const struct mlxsw_rx_listener * rxl) mlxsw_core_rx_listener_unregister() argument
2406 mlxsw_core_rx_listener_state_set(struct mlxsw_core * mlxsw_core,const struct mlxsw_rx_listener * rxl,bool enabled) mlxsw_core_rx_listener_state_set() argument
2422 struct mlxsw_core *mlxsw_core; mlxsw_core_event_listener_func() local
2451 __find_event_listener_item(struct mlxsw_core * mlxsw_core,const struct mlxsw_event_listener * el) __find_event_listener_item() argument
2463 mlxsw_core_event_listener_register(struct mlxsw_core * mlxsw_core,const struct mlxsw_event_listener * el,void * priv) mlxsw_core_event_listener_register() argument
2502 mlxsw_core_event_listener_unregister(struct mlxsw_core * mlxsw_core,const struct mlxsw_event_listener * el) mlxsw_core_event_listener_unregister() argument
2521 mlxsw_core_listener_register(struct mlxsw_core * mlxsw_core,const struct mlxsw_listener * listener,void * priv,bool enabled) mlxsw_core_listener_register() argument
2537 mlxsw_core_listener_unregister(struct mlxsw_core * mlxsw_core,const struct mlxsw_listener * listener,void * priv) mlxsw_core_listener_unregister() argument
2549 mlxsw_core_trap_register(struct mlxsw_core * mlxsw_core,const struct mlxsw_listener * listener,void * priv) mlxsw_core_trap_register() argument
2583 mlxsw_core_trap_unregister(struct mlxsw_core * mlxsw_core,const struct mlxsw_listener * listener,void * priv) mlxsw_core_trap_unregister() argument
2603 mlxsw_core_traps_register(struct mlxsw_core * mlxsw_core,const struct mlxsw_listener * listeners,size_t listeners_count,void * priv) mlxsw_core_traps_register() argument
2628 mlxsw_core_traps_unregister(struct mlxsw_core * mlxsw_core,const struct mlxsw_listener * listeners,size_t listeners_count,void * priv) mlxsw_core_traps_unregister() argument
2642 mlxsw_core_trap_state_set(struct mlxsw_core * mlxsw_core,const struct mlxsw_listener * listener,bool enabled) mlxsw_core_trap_state_set() argument
2670 mlxsw_core_tid_get(struct mlxsw_core * mlxsw_core) mlxsw_core_tid_get() argument
2675 mlxsw_core_reg_access_emad(struct mlxsw_core * mlxsw_core,const struct mlxsw_reg_info * reg,char * payload,enum mlxsw_core_reg_access_type type,struct list_head * bulk_list,mlxsw_reg_trans_cb_t * cb,unsigned long cb_priv) mlxsw_core_reg_access_emad() argument
2700 mlxsw_reg_trans_query(struct mlxsw_core * mlxsw_core,const struct mlxsw_reg_info * reg,char * payload,struct list_head * bulk_list,mlxsw_reg_trans_cb_t * cb,unsigned long cb_priv) mlxsw_reg_trans_query() argument
2711 mlxsw_reg_trans_write(struct mlxsw_core * mlxsw_core,const struct mlxsw_reg_info * reg,char * payload,struct list_head * bulk_list,mlxsw_reg_trans_cb_t * cb,unsigned long cb_priv) mlxsw_reg_trans_write() argument
2727 struct mlxsw_core *mlxsw_core = trans->core; mlxsw_reg_trans_wait() local
2783 mlxsw_core_irq_event_handler_register(struct mlxsw_core * mlxsw_core,mlxsw_irq_event_cb_t cb) mlxsw_core_irq_event_handler_register() argument
2799 mlxsw_core_irq_event_handler_unregister(struct mlxsw_core * mlxsw_core,mlxsw_irq_event_cb_t cb) mlxsw_core_irq_event_handler_unregister() argument
2816 mlxsw_core_irq_event_handlers_call(struct mlxsw_core * mlxsw_core) mlxsw_core_irq_event_handlers_call() argument
2829 mlxsw_core_reg_access_cmd(struct mlxsw_core * mlxsw_core,const struct mlxsw_reg_info * reg,char * payload,enum mlxsw_core_reg_access_type type) mlxsw_core_reg_access_cmd() argument
2892 mlxsw_core_reg_access_cb(struct mlxsw_core * mlxsw_core,char * payload,size_t payload_len,unsigned long cb_priv) mlxsw_core_reg_access_cb() argument
2901 mlxsw_core_reg_access(struct mlxsw_core * mlxsw_core,const struct mlxsw_reg_info * reg,char * payload,enum mlxsw_core_reg_access_type type) mlxsw_core_reg_access() argument
2926 mlxsw_reg_query(struct mlxsw_core * mlxsw_core,const struct mlxsw_reg_info * reg,char * payload) mlxsw_reg_query() argument
2934 mlxsw_reg_write(struct mlxsw_core * mlxsw_core,const struct mlxsw_reg_info * reg,char * payload) mlxsw_reg_write() argument
2942 mlxsw_core_skb_receive(struct mlxsw_core * mlxsw_core,struct sk_buff * skb,struct mlxsw_rx_info * rx_info) mlxsw_core_skb_receive() argument
2997 mlxsw_core_lag_mapping_index(struct mlxsw_core * mlxsw_core,u16 lag_id,u8 port_index) mlxsw_core_lag_mapping_index() argument
3004 mlxsw_core_lag_mapping_set(struct mlxsw_core * mlxsw_core,u16 lag_id,u8 port_index,u16 local_port) mlxsw_core_lag_mapping_set() argument
3014 mlxsw_core_lag_mapping_get(struct mlxsw_core * mlxsw_core,u16 lag_id,u8 port_index) mlxsw_core_lag_mapping_get() argument
3024 mlxsw_core_lag_mapping_clear(struct mlxsw_core * mlxsw_core,u16 lag_id,u16 local_port) mlxsw_core_lag_mapping_clear() argument
3039 mlxsw_core_res_valid(struct mlxsw_core * mlxsw_core,enum mlxsw_res_id res_id) mlxsw_core_res_valid() argument
3046 mlxsw_core_res_get(struct mlxsw_core * mlxsw_core,enum mlxsw_res_id res_id) mlxsw_core_res_get() argument
3058 __mlxsw_core_port_init(struct mlxsw_core * mlxsw_core,u16 local_port,enum devlink_port_flavour flavour,u8 slot_index,u32 port_number,bool split,u32 split_port_subnumber,bool splittable,u32 lanes,const unsigned char * switch_id,unsigned char switch_id_len) __mlxsw_core_port_init() argument
3099 __mlxsw_core_port_fini(struct mlxsw_core * mlxsw_core,u16 local_port) __mlxsw_core_port_fini() argument
3109 mlxsw_core_port_init(struct mlxsw_core * mlxsw_core,u16 local_port,u8 slot_index,u32 port_number,bool split,u32 split_port_subnumber,bool splittable,u32 lanes,const unsigned char * switch_id,unsigned char switch_id_len) mlxsw_core_port_init() argument
3131 mlxsw_core_port_fini(struct mlxsw_core * mlxsw_core,u16 local_port) mlxsw_core_port_fini() argument
3139 mlxsw_core_cpu_port_init(struct mlxsw_core * mlxsw_core,void * port_driver_priv,const unsigned char * switch_id,unsigned char switch_id_len) mlxsw_core_cpu_port_init() argument
3160 mlxsw_core_cpu_port_fini(struct mlxsw_core * mlxsw_core) mlxsw_core_cpu_port_fini() argument
3166 mlxsw_core_port_netdev_link(struct mlxsw_core * mlxsw_core,u16 local_port,void * port_driver_priv,struct net_device * dev) mlxsw_core_port_netdev_link() argument
3179 mlxsw_core_port_devlink_port_get(struct mlxsw_core * mlxsw_core,u16 local_port) mlxsw_core_port_devlink_port_get() argument
3191 mlxsw_core_port_linecard_get(struct mlxsw_core * mlxsw_core,u16 local_port) mlxsw_core_port_linecard_get() argument
3200 mlxsw_core_ports_remove_selected(struct mlxsw_core * mlxsw_core,bool (* selector)(void * priv,u16 local_port),void * priv) mlxsw_core_ports_remove_selected() argument
3209 mlxsw_core_env(const struct mlxsw_core * mlxsw_core) mlxsw_core_env() argument
3214 mlxsw_core_buf_dump_dbg(struct mlxsw_core * mlxsw_core,const char * buf,size_t size) mlxsw_core_buf_dump_dbg() argument
3232 mlxsw_cmd_exec(struct mlxsw_core * mlxsw_core,u16 opcode,u8 opcode_mod,u32 in_mod,bool out_mbox_direct,bool reset_ok,char * in_mbox,size_t in_mbox_size,char * out_mbox,size_t out_mbox_size) mlxsw_cmd_exec() argument
3296 mlxsw_core_kvd_sizes_get(struct mlxsw_core * mlxsw_core,const struct mlxsw_config_profile * profile,u64 * p_single_size,u64 * p_double_size,u64 * p_linear_size) mlxsw_core_kvd_sizes_get() argument
3312 mlxsw_core_resources_query(struct mlxsw_core * mlxsw_core,char * mbox,struct mlxsw_res * res) mlxsw_core_resources_query() argument
3346 mlxsw_core_read_frc_h(struct mlxsw_core * mlxsw_core) mlxsw_core_read_frc_h() argument
3352 mlxsw_core_read_frc_l(struct mlxsw_core * mlxsw_core) mlxsw_core_read_frc_l() argument
3358 mlxsw_core_read_utc_sec(struct mlxsw_core * mlxsw_core) mlxsw_core_read_utc_sec() argument
3364 mlxsw_core_read_utc_nsec(struct mlxsw_core * mlxsw_core) mlxsw_core_read_utc_nsec() argument
3370 mlxsw_core_sdq_supports_cqe_v2(struct mlxsw_core * mlxsw_core) mlxsw_core_sdq_supports_cqe_v2() argument
[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
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()
556 mlxsw_m_ports_remove_selected(struct mlxsw_core *mlxsw_core, in mlxsw_m_ports_remove_selected() argument
592 mlxsw_m_got_active(struct mlxsw_core * mlxsw_core,u8 slot_index,void * priv) mlxsw_m_got_active() argument
626 mlxsw_m_got_inactive(struct mlxsw_core * mlxsw_core,u8 slot_index,void * priv) mlxsw_m_got_inactive() argument
645 mlxsw_m_init(struct mlxsw_core * mlxsw_core,const struct mlxsw_bus_info * mlxsw_bus_info,struct netlink_ext_ack * extack) mlxsw_m_init() argument
694 mlxsw_m_fini(struct mlxsw_core * mlxsw_core) 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
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()
2107 static int mlxsw_sp_port_split(struct mlxsw_core *mlxsw_core, u16 local_port, in mlxsw_sp_port_split() argument
2111 struct mlxsw_sp *mlxsw_sp = mlxsw_core_driver_priv(mlxsw_core); in mlxsw_sp_port_split()
2172 mlxsw_sp_port_unsplit(struct mlxsw_core * mlxsw_core,u16 local_port,struct netlink_ext_ack * extack) mlxsw_sp_port_unsplit() argument
2395 mlxsw_sp_cpu_policers_set(struct mlxsw_core * mlxsw_core) mlxsw_sp_cpu_policers_set() argument
2436 mlxsw_sp_trap_groups_set(struct mlxsw_core * mlxsw_core) mlxsw_sp_trap_groups_set() argument
2995 mlxsw_sp_init(struct mlxsw_core * mlxsw_core,const struct mlxsw_bus_info * mlxsw_bus_info,struct netlink_ext_ack * extack) mlxsw_sp_init() argument
3234 mlxsw_sp1_init(struct mlxsw_core * mlxsw_core,const struct mlxsw_bus_info * mlxsw_bus_info,struct netlink_ext_ack * extack) mlxsw_sp1_init() argument
3267 mlxsw_sp2_init(struct mlxsw_core * mlxsw_core,const struct mlxsw_bus_info * mlxsw_bus_info,struct netlink_ext_ack * extack) mlxsw_sp2_init() argument
3301 mlxsw_sp3_init(struct mlxsw_core * mlxsw_core,const struct mlxsw_bus_info * mlxsw_bus_info,struct netlink_ext_ack * extack) mlxsw_sp3_init() argument
3335 mlxsw_sp4_init(struct mlxsw_core * mlxsw_core,const struct mlxsw_bus_info * mlxsw_bus_info,struct netlink_ext_ack * extack) mlxsw_sp4_init() argument
3369 mlxsw_sp_fini(struct mlxsw_core * mlxsw_core) mlxsw_sp_fini() argument
3475 mlxsw_sp_resource_size_params_prepare(struct mlxsw_core * mlxsw_core,struct devlink_resource_size_params * kvd_size_params,struct devlink_resource_size_params * linear_size_params,struct devlink_resource_size_params * hash_double_size_params,struct devlink_resource_size_params * hash_single_size_params) mlxsw_sp_resource_size_params_prepare() argument
3510 mlxsw_sp1_resources_kvd_register(struct mlxsw_core * mlxsw_core) mlxsw_sp1_resources_kvd_register() argument
3576 mlxsw_sp2_resources_kvd_register(struct mlxsw_core * mlxsw_core) mlxsw_sp2_resources_kvd_register() argument
3596 mlxsw_sp_resources_span_register(struct mlxsw_core * mlxsw_core) mlxsw_sp_resources_span_register() argument
3616 mlxsw_sp_resources_rif_mac_profile_register(struct mlxsw_core * mlxsw_core) mlxsw_sp_resources_rif_mac_profile_register() argument
3639 mlxsw_sp_resources_rifs_register(struct mlxsw_core * mlxsw_core) mlxsw_sp_resources_rifs_register() argument
3659 mlxsw_sp_resources_port_range_register(struct mlxsw_core * mlxsw_core) mlxsw_sp_resources_port_range_register() argument
3678 mlxsw_sp1_resources_register(struct mlxsw_core * mlxsw_core) mlxsw_sp1_resources_register() argument
3722 mlxsw_sp2_resources_register(struct mlxsw_core * mlxsw_core) mlxsw_sp2_resources_register() argument
3766 mlxsw_sp_kvd_sizes_get(struct mlxsw_core * mlxsw_core,const struct mlxsw_config_profile * profile,u64 * p_single_size,u64 * p_double_size,u64 * p_linear_size) mlxsw_sp_kvd_sizes_get() argument
3821 mlxsw_sp_ptp_transmitted(struct mlxsw_core * mlxsw_core,struct sk_buff * skb,u16 local_port) mlxsw_sp_ptp_transmitted() argument
[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 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 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.c240 int mlxsw_sp_counter_resources_register(struct mlxsw_core *mlxsw_core) in mlxsw_sp_counter_resources_register() argument
243 struct devlink *devlink = priv_to_devlink(mlxsw_core); in mlxsw_sp_counter_resources_register()
253 if (!MLXSW_CORE_RES_VALID(mlxsw_core, COUNTER_POOL_SIZE) || in mlxsw_sp_counter_resources_register()
254 !MLXSW_CORE_RES_VALID(mlxsw_core, COUNTER_BANK_SIZE)) in mlxsw_sp_counter_resources_register()
257 pool_size = MLXSW_CORE_RES_GET(mlxsw_core, COUNTER_POOL_SIZE); in mlxsw_sp_counter_resources_register()
258 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_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
1354 int mlxsw_sp_sb_pool_get(struct mlxsw_core *mlxsw_core, in mlxsw_sp_sb_pool_get() argument
1358 struct mlxsw_sp *mlxsw_sp = mlxsw_core_driver_priv(mlxsw_core); in mlxsw_sp_sb_pool_get()
1371 int mlxsw_sp_sb_pool_set(struct mlxsw_core *mlxsw_core, in mlxsw_sp_sb_pool_set() argument
1376 struct mlxsw_sp *mlxsw_sp = mlxsw_core_driver_priv(mlxsw_core); in mlxsw_sp_sb_pool_set()
1558 static void mlxsw_sp_sb_sr_occ_query_cb(struct mlxsw_core *mlxsw_core, in mlxsw_sp_sb_sr_occ_query_cb() argument
1562 struct mlxsw_sp *mlxsw_sp = mlxsw_core_driver_priv(mlxsw_core); in mlxsw_sp_sb_sr_occ_query_cb()
1574 local_port < mlxsw_core_max_ports(mlxsw_core); local_port++) { in mlxsw_sp_sb_sr_occ_query_cb()
1593 local_port < mlxsw_core_max_ports(mlxsw_core); local_port++) { in mlxsw_sp_sb_sr_occ_query_cb()
1607 int mlxsw_sp_sb_occ_snapshot(struct mlxsw_core *mlxsw_core, in mlxsw_sp_sb_occ_snapshot() argument
[all …]
H A Dspectrum_cnt.h23 int mlxsw_sp_counter_resources_register(struct mlxsw_core *mlxsw_core);
H A Dspectrum1_kvdl.c384 int mlxsw_sp1_kvdl_resources_register(struct mlxsw_core *mlxsw_core) in mlxsw_sp1_kvdl_resources_register() argument
386 struct devlink *devlink = priv_to_devlink(mlxsw_core); in mlxsw_sp1_kvdl_resources_register()
391 kvdl_max_size = MLXSW_CORE_RES_GET(mlxsw_core, KVD_SIZE) - in mlxsw_sp1_kvdl_resources_register()
392 MLXSW_CORE_RES_GET(mlxsw_core, KVD_SINGLE_MIN_SIZE) - in mlxsw_sp1_kvdl_resources_register()
393 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()
501 mlxsw_thermal_gearboxes_init(struct device *dev, struct mlxsw_core *core, in mlxsw_thermal_gearboxes_init()
567 mlxsw_thermal_got_active(struct mlxsw_core *mlxsw_core, u8 slot_index, in mlxsw_thermal_got_active() argument
605 mlxsw_thermal_got_inactive(struct mlxsw_core *mlxsw_core, u8 slot_index, in mlxsw_thermal_got_inactive() argument
624 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()
878 mlxsw_hwmon->core = mlxsw_core; in mlxsw_hwmon_init()
H A Dpci.c118 struct mlxsw_core *core;
1919 static int mlxsw_pci_init(void *bus_priv, struct mlxsw_core *mlxsw_core, in mlxsw_pci_init() argument
1929 mlxsw_pci->core = mlxsw_core; in mlxsw_pci_init()
1945 err = mlxsw_cmd_query_fw(mlxsw_core, mbox); in mlxsw_pci_init()
2011 err = mlxsw_core_resources_query(mlxsw_core, mbox, res); in mlxsw_pci_init()
2015 if (MLXSW_CORE_RES_VALID(mlxsw_core, CQE_V2) && in mlxsw_pci_init()
2016 MLXSW_CORE_RES_GET(mlxsw_core, CQE_V2)) in mlxsw_pci_init()
2018 else if (MLXSW_CORE_RES_VALID(mlxsw_core, CQE_V1) && in mlxsw_pci_init()
2019 MLXSW_CORE_RES_GET(mlxsw_core, CQE_V1)) in mlxsw_pci_init()
2021 else if ((MLXSW_CORE_RES_VALID(mlxsw_core, CQE_V0) && in mlxsw_pci_init()
[all …]
H A Dspectrum_acl_tcam.c1495 struct mlxsw_core *mlxsw_core = devlink_priv(devlink); in mlxsw_sp_acl_tcam_region_rehash_intrvl_get() local
1499 mlxsw_sp = mlxsw_core_driver_priv(mlxsw_core); in mlxsw_sp_acl_tcam_region_rehash_intrvl_get()
1511 struct mlxsw_core *mlxsw_core = devlink_priv(devlink); in mlxsw_sp_acl_tcam_region_rehash_intrvl_set() local
1520 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 Dspectrum_fid.c397 struct mlxsw_core *core = fid_family->mlxsw_sp->core; in mlxsw_sp_fid_rfid_pgt_size_cff()
H A Dspectrum_router.c11062 struct mlxsw_core *core = mlxsw_sp->core; in mlxsw_sp_rifs_init()