ixgbe: Convert some udelays to usleep_range
authorMark Rustad <mark.d.rustad@intel.com>
Tue, 22 Jul 2014 06:50:36 +0000 (06:50 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sat, 26 Jul 2014 01:45:15 +0000 (18:45 -0700)
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>
drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c

index 3f318c52e0531ab2e5b18a8b674b7e36bba6982a..db759f98f9f07899979990e652280e97c43ea584 100644 (file)
@@ -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);
                }
 
                /*
index 40dd798e1290efb6b3d67928d86320b12cb767fe..942ad13c684aba6c61bcef7f4e0166f8c9a3e1c3 100644 (file)
@@ -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");