OSDN Git Service

mlxsw: spectrum: Distinguish between unsplittable and split port
authorJiri Pirko <jiri@mellanox.com>
Thu, 31 Oct 2019 09:42:10 +0000 (11:42 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 31 Oct 2019 17:54:47 +0000 (10:54 -0700)
commit26a6befa5df79dddb1a1c464b5758de9d618ee23
tree42e2fb04323116907ff4359dfa6d6ac66e35b737
parent2e6a2d7b4508ea01b276d8c7350582a07dca1c23
mlxsw: spectrum: Distinguish between unsplittable and split port

Currently when user does split, he is not able to distinguish if the
port cannot be split because it is already split, or because it cannot
be split at all. Add another check for split flag to distinguish this.
Also add check forbidding split when maximal width is 1.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Shalom Toledo <shalomt@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c