mlxsw: spectrum: Prevent auto negotiation on number of lanes
authorShalom Toledo <shalomt@mellanox.com>
Wed, 28 Aug 2019 15:54:35 +0000 (18:54 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 29 Aug 2019 01:24:04 +0000 (18:24 -0700)
commit3f61967f4197547fb1888642d5178a64ca9fb191
tree6469a1bac1aa1fe8f5ee7c18bd2a1399de82ebcb
parentb97cd891268de9ccc5454c189232c74f262961ae
mlxsw: spectrum: Prevent auto negotiation on number of lanes

After 50G-1-lane and 100G-2-lanes link modes were introduced, the driver
is facing situations in which the hardware auto negotiates not only on
speed and type, but also on number of lanes.

Prevent auto negotiation on number of lanes by allowing only port speeds
that can be supported on a given port according to its width.

Signed-off-by: Shalom Toledo <shalomt@mellanox.com>
Acked-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/spectrum.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.h