Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d819fc52 authored by Mark Rustad's avatar Mark Rustad Committed by Jeff Kirsher
Browse files

ixgbe: Convert some udelays to usleep_range



Convert some udelay calls to the preferred usleep_range.

Signed-off-by: default avatarMark Rustad <mark.d.rustad@intel.com>
Tested-by: default avatarPhil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent ac3d2e5a
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -1386,7 +1386,7 @@ static s32 ixgbe_get_eeprom_semaphore(struct ixgbe_hw *hw)
			status = 0;
			status = 0;
			break;
			break;
		}
		}
		udelay(50);
		usleep_range(50, 100);
	}
	}


	if (i == timeout) {
	if (i == timeout) {
@@ -1399,7 +1399,7 @@ static s32 ixgbe_get_eeprom_semaphore(struct ixgbe_hw *hw)
		 */
		 */
		ixgbe_release_eeprom_semaphore(hw);
		ixgbe_release_eeprom_semaphore(hw);


		udelay(50);
		usleep_range(50, 100);
		/*
		/*
		 * one last try
		 * one last try
		 * If the SMBI bit is 0 when we read it, then the bit will be
		 * If the SMBI bit is 0 when we read it, then the bit will be
@@ -1427,7 +1427,7 @@ static s32 ixgbe_get_eeprom_semaphore(struct ixgbe_hw *hw)
			if (swsm & IXGBE_SWSM_SWESMBI)
			if (swsm & IXGBE_SWSM_SWESMBI)
				break;
				break;


			udelay(50);
			usleep_range(50, 100);
		}
		}


		/*
		/*
+2 −2
Original line number Original line Diff line number Diff line
@@ -699,7 +699,7 @@ static s32 ixgbe_get_swfw_sync_semaphore(struct ixgbe_hw *hw)
			status = 0;
			status = 0;
			break;
			break;
		}
		}
		udelay(50);
		usleep_range(50, 100);
	}
	}


	/* Now get the semaphore between SW/FW through the REGSMP bit */
	/* Now get the semaphore between SW/FW through the REGSMP bit */
@@ -709,7 +709,7 @@ static s32 ixgbe_get_swfw_sync_semaphore(struct ixgbe_hw *hw)
			if (!(swsm & IXGBE_SWFW_REGSMP))
			if (!(swsm & IXGBE_SWFW_REGSMP))
				break;
				break;


			udelay(50);
			usleep_range(50, 100);
		}
		}
	} else {
	} else {
		hw_dbg(hw, "Software semaphore SMBI between device drivers not granted.\n");
		hw_dbg(hw, "Software semaphore SMBI between device drivers not granted.\n");