Skip to contentSkip to conversation

ixgbe: Use udelay to avoid sleeping while atomic

PATCH New Mark D Rustad 2 participants 2 messages Jan 29, 2016 – Mar 1, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ixgbe: Use udelay to avoid sleeping while atomic

Use udelay instead of usleep_range because this can be called while a lock is held.

---
 drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c +1 -1
index 0985a39e7268..972c9aa17503 100644
@@ -356,7 +356,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;
#1 lore raw

PATCH 1/1 ixgbe: Use udelay to avoid sleeping while atomic

Quoted 8 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Mark D Rustad
Sent: Friday, January 29, 2016 2:44 PM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH] ixgbe: Use udelay to avoid sleeping while atomic

Quoted 7 lines

Use udelay instead of usleep_range because this can be called while a lock is held.

---
 drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Code changes correctly applied