]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum: Force link training according to admin state
authorIdo Schimmel <idosch@mellanox.com>
Fri, 15 Jul 2016 09:14:58 +0000 (11:14 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Jul 2016 21:49:50 +0000 (14:49 -0700)
commit7c9b2263d42118722cf3255b7addbc228a70ad2e
tree91f0c0eac6986005cfa02e33bb879a86c6b199df
parentfd34d0841ce01898d6d1ba10aa98596f4a1650bb
mlxsw: spectrum: Force link training according to admin state

When setting a new speed we need to disable and enable the port for the
changes to take effect. We currently only do that if the operational
state of the port is up. However, setting a new speed following link
training failure will require us to explicitly set the port down and then
up.

Instead, disable and enable the port based on its administrative state.

Fixes: a3f159160767 ("mlxsw: spectrum: Add initial support for Spectrum ASIC")
Signed-off-by: Ido Schimmel <idosch@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