]> 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)
commit32df91f9622c921d41168d002892800c9ab249df
tree91f0c0eac6986005cfa02e33bb879a86c6b199df
parentcc486daeefd2a292f5029c132eb9f08c0de522d3
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: 91747a7223b2 ("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