]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: switchx2: Check if port is usable before calling port create
authorJiri Pirko <jiri@mellanox.com>
Fri, 28 Oct 2016 19:35:47 +0000 (21:35 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 30 Oct 2016 20:50:17 +0000 (16:50 -0400)
commitd0d429eff03a1a0db1824fd5b0d37c1b0ee74fe1
treecd43766138b73ac03fa12bacdead53a44363d094
parentd5750c28c84c367a59d55bd0ff19d375ee4c643c
mlxsw: switchx2: Check if port is usable before calling port create

Do it in a same way we do it in spectrum. Check if port is usable first
and only in that case create a port instance.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Elad Raz <eladr@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/switchx2.c