igc: Fix infinite loop in release_swfw_sync
authorSasha Neftin <sasha.neftin@intel.com>
Tue, 1 Mar 2022 13:32:10 +0000 (15:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Apr 2022 12:38:52 +0000 (14:38 +0200)
commitb3ce7d3a17424038c0f597581d6166e1826a5234
tree000585a43cbd1db06a3d03fd6d08299758b106e2
parent8920a03a3a152d00e5447669371f25368d3e35b5
igc: Fix infinite loop in release_swfw_sync

[ Upstream commit 907862e9aef75bf89e2b265efcc58870be06081e ]

An infinite loop may occur if we fail to acquire the HW semaphore,
which is needed for resource release.
This will typically happen if the hardware is surprise-removed.
At this stage there is nothing to do, except log an error and quit.

Fixes: c0071c7aa5fe ("igc: Add HW initialization code")
Suggested-by: Dima Ruinskiy <dima.ruinskiy@intel.com>
Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Naama Meir <naamax.meir@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/igc/igc_i225.c