mlxsw: spectrum: Add support for auto-negotiation disable mode
authorTal Bar <talb@mellanox.com>
Wed, 21 Mar 2018 07:34:06 +0000 (09:34 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Mar 2018 17:13:36 +0000 (13:13 -0400)
commit8e1ed7392c1b19db43c2b47998371cbea9babb3c
treee344b657badf170d2ccb3638c32fc6fb8775e42d
parent1c6e1037800ed70448befd0f9143e0dd57db9105
mlxsw: spectrum: Add support for auto-negotiation disable mode

In 'auto-neg off' the device have sent AN (auto-negotiation) frames
with the forced speed. Thus, fix it using an_disable_admin field in
Port type and speed (PTYS) register. This field indicates if speed
negotiation frames would be send by the port or not.

Add the field and enable/disable it for 'auto-neg on/off', make the
port to start/stop sending AN (auto-negotiation) frames. Note that for
SwitchX2 the behavior doesn't change (i.e support only AN enabled with
forced speed).

Signed-off-by: Tal Bar <talb@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/reg.h
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
drivers/net/ethernet/mellanox/mlxsw/switchx2.c