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)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 13 Apr 2022 14:58:32 +0000 (07:58 -0700)
commit907862e9aef75bf89e2b265efcc58870be06081e
tree4c630cc8d08bc0ef1d27fa2cf9a02566a6db9ffe
parentef27324e2cb7bb24542d6cb2571740eefe6b00dc
igc: Fix infinite loop in release_swfw_sync

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>
drivers/net/ethernet/intel/igc/igc_i225.c