ixgbe: Use udelay to avoid sleeping while atomic
authorMark Rustad <mark.d.rustad@intel.com>
Fri, 29 Jan 2016 22:44:29 +0000 (14:44 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 30 Mar 2016 05:37:17 +0000 (22:37 -0700)
Use udelay instead of usleep_range because this can be called while
a lock is held.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c

index 87aca3f7c3dec65125fa757d4dfbedd5ca5a3748..68a9c646498e17aa3bc3a0e5494604f4a5e22067 100644 (file)
@@ -355,7 +355,7 @@ static s32 ixgbe_iosf_wait(struct ixgbe_hw *hw, u32 *ctrl)
                command = IXGBE_READ_REG(hw, IXGBE_SB_IOSF_INDIRECT_CTRL);
                if (!(command & IXGBE_SB_IOSF_CTRL_BUSY))
                        break;
-               usleep_range(10, 20);
+               udelay(10);
        }
        if (ctrl)
                *ctrl = command;