Commit 03ddb787 authored by Elad Raz's avatar Elad Raz Committed by David S. Miller

mlxsw: switchx2: Add eth prefix to port create and remove

Since we are about to add Infiniband port remove and create we will add
"eth" prefix to port create and remove APIs.
Signed-off-by: default avatarElad Raz <eladr@mellanox.com>
Reviewed-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0c81ea5d
...@@ -994,8 +994,8 @@ mlxsw_sx_port_mac_learning_mode_set(struct mlxsw_sx_port *mlxsw_sx_port, ...@@ -994,8 +994,8 @@ mlxsw_sx_port_mac_learning_mode_set(struct mlxsw_sx_port *mlxsw_sx_port,
return mlxsw_reg_write(mlxsw_sx->core, MLXSW_REG(spmlr), spmlr_pl); return mlxsw_reg_write(mlxsw_sx->core, MLXSW_REG(spmlr), spmlr_pl);
} }
static int __mlxsw_sx_port_create(struct mlxsw_sx *mlxsw_sx, u8 local_port, static int __mlxsw_sx_port_eth_create(struct mlxsw_sx *mlxsw_sx, u8 local_port,
u8 module, u8 width) u8 module, u8 width)
{ {
struct mlxsw_sx_port *mlxsw_sx_port; struct mlxsw_sx_port *mlxsw_sx_port;
struct net_device *dev; struct net_device *dev;
...@@ -1119,8 +1119,8 @@ static int __mlxsw_sx_port_create(struct mlxsw_sx *mlxsw_sx, u8 local_port, ...@@ -1119,8 +1119,8 @@ static int __mlxsw_sx_port_create(struct mlxsw_sx *mlxsw_sx, u8 local_port,
return err; return err;
} }
static int mlxsw_sx_port_create(struct mlxsw_sx *mlxsw_sx, u8 local_port, static int mlxsw_sx_port_eth_create(struct mlxsw_sx *mlxsw_sx, u8 local_port,
u8 module, u8 width) u8 module, u8 width)
{ {
int err; int err;
...@@ -1130,7 +1130,7 @@ static int mlxsw_sx_port_create(struct mlxsw_sx *mlxsw_sx, u8 local_port, ...@@ -1130,7 +1130,7 @@ static int mlxsw_sx_port_create(struct mlxsw_sx *mlxsw_sx, u8 local_port,
local_port); local_port);
return err; return err;
} }
err = __mlxsw_sx_port_create(mlxsw_sx, local_port, module, width); err = __mlxsw_sx_port_eth_create(mlxsw_sx, local_port, module, width);
if (err) if (err)
goto err_port_create; goto err_port_create;
...@@ -1141,7 +1141,7 @@ static int mlxsw_sx_port_create(struct mlxsw_sx *mlxsw_sx, u8 local_port, ...@@ -1141,7 +1141,7 @@ static int mlxsw_sx_port_create(struct mlxsw_sx *mlxsw_sx, u8 local_port,
return err; return err;
} }
static void __mlxsw_sx_port_remove(struct mlxsw_sx *mlxsw_sx, u8 local_port) static void __mlxsw_sx_port_eth_remove(struct mlxsw_sx *mlxsw_sx, u8 local_port)
{ {
struct mlxsw_sx_port *mlxsw_sx_port = mlxsw_sx->ports[local_port]; struct mlxsw_sx_port *mlxsw_sx_port = mlxsw_sx->ports[local_port];
...@@ -1153,9 +1153,9 @@ static void __mlxsw_sx_port_remove(struct mlxsw_sx *mlxsw_sx, u8 local_port) ...@@ -1153,9 +1153,9 @@ static void __mlxsw_sx_port_remove(struct mlxsw_sx *mlxsw_sx, u8 local_port)
free_netdev(mlxsw_sx_port->dev); free_netdev(mlxsw_sx_port->dev);
} }
static void mlxsw_sx_port_remove(struct mlxsw_sx *mlxsw_sx, u8 local_port) static void mlxsw_sx_port_eth_remove(struct mlxsw_sx *mlxsw_sx, u8 local_port)
{ {
__mlxsw_sx_port_remove(mlxsw_sx, local_port); __mlxsw_sx_port_eth_remove(mlxsw_sx, local_port);
mlxsw_core_port_fini(mlxsw_sx->core, local_port); mlxsw_core_port_fini(mlxsw_sx->core, local_port);
} }
...@@ -1170,7 +1170,7 @@ static void mlxsw_sx_ports_remove(struct mlxsw_sx *mlxsw_sx) ...@@ -1170,7 +1170,7 @@ static void mlxsw_sx_ports_remove(struct mlxsw_sx *mlxsw_sx)
for (i = 1; i < MLXSW_PORT_MAX_PORTS; i++) for (i = 1; i < MLXSW_PORT_MAX_PORTS; i++)
if (mlxsw_sx_port_created(mlxsw_sx, i)) if (mlxsw_sx_port_created(mlxsw_sx, i))
mlxsw_sx_port_remove(mlxsw_sx, i); mlxsw_sx_port_eth_remove(mlxsw_sx, i);
kfree(mlxsw_sx->ports); kfree(mlxsw_sx->ports);
} }
...@@ -1193,7 +1193,7 @@ static int mlxsw_sx_ports_create(struct mlxsw_sx *mlxsw_sx) ...@@ -1193,7 +1193,7 @@ static int mlxsw_sx_ports_create(struct mlxsw_sx *mlxsw_sx)
goto err_port_module_info_get; goto err_port_module_info_get;
if (!width) if (!width)
continue; continue;
err = mlxsw_sx_port_create(mlxsw_sx, i, module, width); err = mlxsw_sx_port_eth_create(mlxsw_sx, i, module, width);
if (err) if (err)
goto err_port_create; goto err_port_create;
} }
...@@ -1203,7 +1203,7 @@ static int mlxsw_sx_ports_create(struct mlxsw_sx *mlxsw_sx) ...@@ -1203,7 +1203,7 @@ static int mlxsw_sx_ports_create(struct mlxsw_sx *mlxsw_sx)
err_port_module_info_get: err_port_module_info_get:
for (i--; i >= 1; i--) for (i--; i >= 1; i--)
if (mlxsw_sx_port_created(mlxsw_sx, i)) if (mlxsw_sx_port_created(mlxsw_sx, i))
mlxsw_sx_port_remove(mlxsw_sx, i); mlxsw_sx_port_eth_remove(mlxsw_sx, i);
kfree(mlxsw_sx->ports); kfree(mlxsw_sx->ports);
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment