i40e: don't restart nway if autoneg not supported
authorMitch Williams <mitch.a.williams@intel.com>
Fri, 26 Oct 2018 21:33:28 +0000 (14:33 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Dec 2019 07:51:17 +0000 (08:51 +0100)
commitea962fa132b6633479835b83aeb7944c958ccb8d
treea6bece817b0d44434f38ec2fb063f4ec28d4d4de
parent2538bbb0daf6cd31bdd9675b10eb0974330ba6ba
i40e: don't restart nway if autoneg not supported

[ Upstream commit 7c3758f7839377ab67529cc50264a640636c47af ]

On link types that do not support autoneg, we cannot attempt to restart
nway negotiation. This results in a dead link that requires a power
cycle to remedy.

Fix this by saving off the autoneg state and checking this value before
we try to restart nway.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/i40e/i40e_ethtool.c