Skip to content

Commit

Permalink
ixgbe: Convert some udelays to usleep_range
Browse files Browse the repository at this point in the history
Convert some udelay calls to the preferred usleep_range.

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>
  • Loading branch information
Mark Rustad authored and Jeff Kirsher committed Jul 26, 2014
1 parent ac3d2e5 commit d819fc5
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
Original file line number Diff line number Diff line change
@@ -1386,7 +1386,7 @@ static s32 ixgbe_get_eeprom_semaphore(struct ixgbe_hw *hw)
status = 0;
break;
}
udelay(50);
usleep_range(50, 100);
}

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

udelay(50);
usleep_range(50, 100);
/*
* one last try
* 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)
break;

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

/*
4 changes: 2 additions & 2 deletions drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c
Original file line number Diff line number Diff line change
@@ -699,7 +699,7 @@ static s32 ixgbe_get_swfw_sync_semaphore(struct ixgbe_hw *hw)
status = 0;
break;
}
udelay(50);
usleep_range(50, 100);
}

/* 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))
break;

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

0 comments on commit d819fc5

Please sign in to comment.