]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mlxsw: spectrum: Prevent force of 56G
authorAmit Cohen <amitc@mellanox.com>
Wed, 29 May 2019 07:59:45 +0000 (10:59 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 Jun 2019 06:15:21 +0000 (08:15 +0200)
commitfedb1b9c9191687a7ceb117b8dc444d0d321692a
tree787f1df97b41ac69207b54eaf9778ba7633711d3
parent114e8135ae0031556ead1bcb67249ecb84b804de
mlxsw: spectrum: Prevent force of 56G

[ Upstream commit 275e928f19117d22f6d26dee94548baf4041b773 ]

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: 56ade8fe3fe1 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c