Lines Matching refs:mlxsw_m_port
27 struct mlxsw_m_port;
35 struct mlxsw_m_port **ports;
45 struct mlxsw_m_port { struct
68 struct mlxsw_m_port *mlxsw_m_port = netdev_priv(dev); in mlxsw_m_port_open() argument
69 struct mlxsw_m *mlxsw_m = mlxsw_m_port->mlxsw_m; in mlxsw_m_port_open()
72 mlxsw_m_port->module); in mlxsw_m_port_open()
77 struct mlxsw_m_port *mlxsw_m_port = netdev_priv(dev); in mlxsw_m_port_stop() local
78 struct mlxsw_m *mlxsw_m = mlxsw_m_port->mlxsw_m; in mlxsw_m_port_stop()
80 mlxsw_env_module_port_down(mlxsw_m->core, 0, mlxsw_m_port->module); in mlxsw_m_port_stop()
92 struct mlxsw_m_port *mlxsw_m_port = netdev_priv(dev); in mlxsw_m_module_get_drvinfo() local
93 struct mlxsw_m *mlxsw_m = mlxsw_m_port->mlxsw_m; in mlxsw_m_module_get_drvinfo()
109 struct mlxsw_m_port *mlxsw_m_port = netdev_priv(netdev); in mlxsw_m_get_module_info() local
110 struct mlxsw_core *core = mlxsw_m_port->mlxsw_m->core; in mlxsw_m_get_module_info()
113 mlxsw_m_port->slot_index, in mlxsw_m_get_module_info()
114 mlxsw_m_port->module, modinfo); in mlxsw_m_get_module_info()
121 struct mlxsw_m_port *mlxsw_m_port = netdev_priv(netdev); in mlxsw_m_get_module_eeprom() local
122 struct mlxsw_core *core = mlxsw_m_port->mlxsw_m->core; in mlxsw_m_get_module_eeprom()
125 mlxsw_m_port->slot_index, in mlxsw_m_get_module_eeprom()
126 mlxsw_m_port->module, ee, data); in mlxsw_m_get_module_eeprom()
134 struct mlxsw_m_port *mlxsw_m_port = netdev_priv(netdev); in mlxsw_m_get_module_eeprom_by_page() local
135 struct mlxsw_core *core = mlxsw_m_port->mlxsw_m->core; in mlxsw_m_get_module_eeprom_by_page()
138 mlxsw_m_port->slot_index, in mlxsw_m_get_module_eeprom_by_page()
139 mlxsw_m_port->module, in mlxsw_m_get_module_eeprom_by_page()
148 struct mlxsw_m_port *mlxsw_m_port = netdev_priv(netdev); in mlxsw_m_set_module_eeprom_by_page() local
149 struct mlxsw_core *core = mlxsw_m_port->mlxsw_m->core; in mlxsw_m_set_module_eeprom_by_page()
152 mlxsw_m_port->slot_index, in mlxsw_m_set_module_eeprom_by_page()
153 mlxsw_m_port->module, in mlxsw_m_set_module_eeprom_by_page()
159 struct mlxsw_m_port *mlxsw_m_port = netdev_priv(netdev); in mlxsw_m_reset() local
160 struct mlxsw_core *core = mlxsw_m_port->mlxsw_m->core; in mlxsw_m_reset()
162 return mlxsw_env_reset_module(netdev, core, mlxsw_m_port->slot_index, in mlxsw_m_reset()
163 mlxsw_m_port->module, in mlxsw_m_reset()
172 struct mlxsw_m_port *mlxsw_m_port = netdev_priv(netdev); in mlxsw_m_get_module_power_mode() local
173 struct mlxsw_core *core = mlxsw_m_port->mlxsw_m->core; in mlxsw_m_get_module_power_mode()
175 return mlxsw_env_get_module_power_mode(core, mlxsw_m_port->slot_index, in mlxsw_m_get_module_power_mode()
176 mlxsw_m_port->module, in mlxsw_m_get_module_power_mode()
185 struct mlxsw_m_port *mlxsw_m_port = netdev_priv(netdev); in mlxsw_m_set_module_power_mode() local
186 struct mlxsw_core *core = mlxsw_m_port->mlxsw_m->core; in mlxsw_m_set_module_power_mode()
188 return mlxsw_env_set_module_power_mode(core, mlxsw_m_port->slot_index, in mlxsw_m_set_module_power_mode()
189 mlxsw_m_port->module, in mlxsw_m_set_module_power_mode()
223 mlxsw_m_port_dev_addr_get(struct mlxsw_m_port *mlxsw_m_port) in mlxsw_m_port_dev_addr_get() argument
225 struct mlxsw_m *mlxsw_m = mlxsw_m_port->mlxsw_m; in mlxsw_m_port_dev_addr_get()
235 eth_hw_addr_gen(mlxsw_m_port->dev, addr, mlxsw_m_port->module + 1 + in mlxsw_m_port_dev_addr_get()
236 mlxsw_m_port->module_offset); in mlxsw_m_port_dev_addr_get()
249 struct mlxsw_m_port *mlxsw_m_port; in mlxsw_m_port_create() local
263 dev = alloc_etherdev(sizeof(struct mlxsw_m_port)); in mlxsw_m_port_create()
271 mlxsw_m_port = netdev_priv(dev); in mlxsw_m_port_create()
273 mlxsw_m_port, dev); in mlxsw_m_port_create()
274 mlxsw_m_port->dev = dev; in mlxsw_m_port_create()
275 mlxsw_m_port->mlxsw_m = mlxsw_m; in mlxsw_m_port_create()
276 mlxsw_m_port->local_port = local_port; in mlxsw_m_port_create()
277 mlxsw_m_port->module = module; in mlxsw_m_port_create()
278 mlxsw_m_port->slot_index = slot_index; in mlxsw_m_port_create()
284 mlxsw_m_port->module_offset = mlxsw_m_port->slot_index ? in mlxsw_m_port_create()
285 (mlxsw_m_port->slot_index - 1) * in mlxsw_m_port_create()
291 err = mlxsw_m_port_dev_addr_get(mlxsw_m_port); in mlxsw_m_port_create()
294 mlxsw_m_port->local_port); in mlxsw_m_port_create()
299 mlxsw_m->ports[local_port] = mlxsw_m_port; in mlxsw_m_port_create()
303 mlxsw_m_port->local_port); in mlxsw_m_port_create()
320 struct mlxsw_m_port *mlxsw_m_port = mlxsw_m->ports[local_port]; in mlxsw_m_port_remove() local
322 unregister_netdev(mlxsw_m_port->dev); /* This calls ndo_stop */ in mlxsw_m_port_remove()
324 free_netdev(mlxsw_m_port->dev); in mlxsw_m_port_remove()