提交 9a60c907 编写于 作者: I Ido Schimmel 提交者: David S. Miller

mlxsw: spectrum: Mark split ports as such

When a port is split we should mark it as such, as otherwise the split
ports aren't renamed correctly (e.g. sw1p3 -> sw1p3s1) and the unsplit
operation fails:

$ devlink port split sw1p3 count 4
$ devlink port unsplit eth0
devlink answers: Invalid argument
[  598.565307] mlxsw_spectrum 0000:03:00.0 eth0: Port wasn't split

Fixes: 67963a33 ("mlxsw: Make devlink port instances independent of spectrum/switchx2 port instances")
Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
Reported-by: NTamir Winetroub <tamirw@mellanox.com>
Reviewed-by: NElad Raz <eladr@mellanox.com>
Tested-by: NTamir Winetroub <tamirw@mellanox.com>
Signed-off-by: NJiri Pirko <jiri@mellanox.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 483c4933
...@@ -2404,7 +2404,7 @@ static int mlxsw_sp_port_create(struct mlxsw_sp *mlxsw_sp, u8 local_port, ...@@ -2404,7 +2404,7 @@ static int mlxsw_sp_port_create(struct mlxsw_sp *mlxsw_sp, u8 local_port,
local_port); local_port);
return err; return err;
} }
err = __mlxsw_sp_port_create(mlxsw_sp, local_port, false, err = __mlxsw_sp_port_create(mlxsw_sp, local_port, split,
module, width, lane); module, width, lane);
if (err) if (err)
goto err_port_create; goto err_port_create;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册