]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum: Mark split ports as such
authorIdo Schimmel <idosch@mellanox.com>
Fri, 16 Dec 2016 18:29:03 +0000 (19:29 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 18 Dec 2016 02:44:51 +0000 (21:44 -0500)
commit02c93ed5885f9db57c3df7a206761c611deef43e
tree12d2e17ed6e02a8e5f0cf38fc68982eb8a7d835a
parentdbbd33b189327de14a447914338300acfa44db63
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: 8f9d9795c886 ("mlxsw: Make devlink port instances independent of spectrum/switchx2 port instances")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reported-by: Tamir Winetroub <tamirw@mellanox.com>
Reviewed-by: Elad Raz <eladr@mellanox.com>
Tested-by: Tamir Winetroub <tamirw@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c