]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum: Prevent force of 56G
authorAmit Cohen <amitc@mellanox.com>
Wed, 29 May 2019 07:59:45 +0000 (10:59 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 May 2019 19:30:47 +0000 (12:30 -0700)
commit0df8fa28ec0873995ee1fb25186e2aae26bd09d1
tree0af4ead8c30b69f988ce9dc8dae9bf77a05f1c32
parent17545f0ca585c178932bd947ef68a4d6e9c4f75c
mlxsw: spectrum: Prevent force of 56G

Force of 56G is not supported by hardware in Ethernet devices. This
configuration fails with a bad parameter error from firmware.

Add check of this case. Instead of trying to set 56G with autoneg off,
return a meaningful error.

Fixes: 91747a7223b2 ("mlxsw: spectrum: Add initial support for Spectrum ASIC")
Signed-off-by: Amit Cohen <amitc@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