Parcourir la source

ixgbe: Correct error path in semaphore handling

The timeout path is supposed to release the semaphore, so do that.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Mark Rustad il y a 10 ans
Parent
commit
5967fe2256
1 fichiers modifiés avec 5 ajouts et 0 suppressions
  1. 5 0
      drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c

+ 5 - 0
drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c

@@ -711,6 +711,11 @@ static s32 ixgbe_get_swfw_sync_semaphore(struct ixgbe_hw *hw)
 		usleep_range(50, 100);
 		usleep_range(50, 100);
 	}
 	}
 
 
+	/* Release semaphores and return error if SW NVM semaphore
+	 * was not granted because we do not have access to the EEPROM
+	 */
+	hw_dbg(hw, "REGSMP Software NVM semaphore not granted\n");
+	ixgbe_release_swfw_sync_semaphore(hw);
 	return IXGBE_ERR_EEPROM;
 	return IXGBE_ERR_EEPROM;
 }
 }