Lines Matching refs:port_mapping

586 				struct mlxsw_sp_port_mapping *port_mapping)  in mlxsw_sp_port_module_info_parse()  argument
632 port_mapping->module = module; in mlxsw_sp_port_module_info_parse()
633 port_mapping->slot_index = slot_index; in mlxsw_sp_port_module_info_parse()
634 port_mapping->width = width; in mlxsw_sp_port_module_info_parse()
635 port_mapping->module_width = width; in mlxsw_sp_port_module_info_parse()
636 port_mapping->lane = mlxsw_reg_pmlp_tx_lane_get(pmlp_pl, 0); in mlxsw_sp_port_module_info_parse()
642 struct mlxsw_sp_port_mapping *port_mapping) in mlxsw_sp_port_module_info_get() argument
652 pmlp_pl, port_mapping); in mlxsw_sp_port_module_info_get()
657 const struct mlxsw_sp_port_mapping *port_mapping) in mlxsw_sp_port_module_map() argument
662 mlxsw_env_module_port_map(mlxsw_sp->core, port_mapping->slot_index, in mlxsw_sp_port_module_map()
663 port_mapping->module); in mlxsw_sp_port_module_map()
666 mlxsw_reg_pmlp_width_set(pmlp_pl, port_mapping->width); in mlxsw_sp_port_module_map()
667 for (i = 0; i < port_mapping->width; i++) { in mlxsw_sp_port_module_map()
669 port_mapping->slot_index); in mlxsw_sp_port_module_map()
670 mlxsw_reg_pmlp_module_set(pmlp_pl, i, port_mapping->module); in mlxsw_sp_port_module_map()
671 mlxsw_reg_pmlp_tx_lane_set(pmlp_pl, i, port_mapping->lane + i); /* Rx & Tx */ in mlxsw_sp_port_module_map()
680 mlxsw_env_module_port_unmap(mlxsw_sp->core, port_mapping->slot_index, in mlxsw_sp_port_module_map()
681 port_mapping->module); in mlxsw_sp_port_module_map()
1608 struct mlxsw_sp_port_mapping *port_mapping) in mlxsw_sp_port_create() argument
1612 u32 lanes = port_mapping->width; in mlxsw_sp_port_create()
1620 err = mlxsw_sp_port_module_map(mlxsw_sp, local_port, port_mapping); in mlxsw_sp_port_create()
1668 mlxsw_sp_port->mapping = *port_mapping; in mlxsw_sp_port_create()
1894 port_mapping->slot_index, in mlxsw_sp_port_create()
1895 port_mapping->module); in mlxsw_sp_port_create()
1998 struct mlxsw_sp_port_mapping port_mapping; in mlxsw_sp_port_mapping_events_work() local
2016 event->pmlp_pl, &port_mapping); in mlxsw_sp_port_mapping_events_work()
2020 if (WARN_ON_ONCE(!port_mapping.width)) in mlxsw_sp_port_mapping_events_work()
2027 false, &port_mapping); in mlxsw_sp_port_mapping_events_work()
2033 mlxsw_sp->port_mapping[local_port] = port_mapping; in mlxsw_sp_port_mapping_events_work()
2116 struct mlxsw_sp_port_mapping *port_mapping; in mlxsw_sp_ports_create() local
2142 port_mapping = &mlxsw_sp->port_mapping[i]; in mlxsw_sp_ports_create()
2143 if (!port_mapping->width) in mlxsw_sp_ports_create()
2145 err = mlxsw_sp_port_create(mlxsw_sp, i, false, port_mapping); in mlxsw_sp_ports_create()
2171 struct mlxsw_sp_port_mapping *port_mapping; in mlxsw_sp_port_module_info_init() local
2175 mlxsw_sp->port_mapping = kcalloc(max_ports, in mlxsw_sp_port_module_info_init()
2178 if (!mlxsw_sp->port_mapping) in mlxsw_sp_port_module_info_init()
2182 port_mapping = &mlxsw_sp->port_mapping[i]; in mlxsw_sp_port_module_info_init()
2183 err = mlxsw_sp_port_module_info_get(mlxsw_sp, i, port_mapping); in mlxsw_sp_port_module_info_init()
2190 kfree(mlxsw_sp->port_mapping); in mlxsw_sp_port_module_info_init()
2196 kfree(mlxsw_sp->port_mapping); in mlxsw_sp_port_module_info_fini()
2201 struct mlxsw_sp_port_mapping *port_mapping, in mlxsw_sp_port_split_create() argument
2207 split_port_mapping = *port_mapping; in mlxsw_sp_port_split_create()
2238 struct mlxsw_sp_port_mapping *port_mapping; in mlxsw_sp_port_unsplit_create() local
2245 port_mapping = &mlxsw_sp->port_mapping[local_port]; in mlxsw_sp_port_unsplit_create()
2246 if (!port_mapping->width || !mlxsw_sp_local_port_valid(local_port)) in mlxsw_sp_port_unsplit_create()
2249 false, port_mapping); in mlxsw_sp_port_unsplit_create()
2266 struct mlxsw_sp_port_mapping port_mapping; in mlxsw_sp_port_split() local
2302 port_mapping = mlxsw_sp_port->mapping; in mlxsw_sp_port_split()
2311 err = mlxsw_sp_port_split_create(mlxsw_sp, &port_mapping, in mlxsw_sp_port_split()