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)
commit6277d46b10a0b35c83656f085cf8e32ded6fdd60
tree91f0c0eac6986005cfa02e33bb879a86c6b199df
parentdd79cf7dd10028d00f99d332d5a0d04734908282
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: 56ade8fe3fe1 ("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