Skip to contentSkip to conversation

8390: fix CONFIG_LOCKDEP error, 2.6.24-rc7

PATCH New Frank Rowand 1 participant 1 message Jan 15, 2008

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

PATCH 1/1 8390: fix CONFIG_LOCKDEP error, 2.6.24-rc7

From: Frank Rowand <[email protected]>

Turning on CONFIG_LOCKDEP for CONFIG_PREEMPT invokes a path which may sleep with IRQs disabled. Change disable_irq_nosync_lockdep() to disable_irq_nosync(), etc. Note the comment near the top of drivers/net/lib8390.c, which is an lkml email from Alan Cox, pre-saging the need of this patch.

---
drivers/net/lib8390.c | 14 7 + 7 - 0 !

 1 files changed, 7 insertions(+), 7 deletions(-)
drivers/net/lib8390.c +7 -7
Index: linux-2.6.24-rc5/drivers/net/lib8390.c
===================================================================
@@ -284,7 +284,7 @@ static void ei_tx_timeout(struct net_dev
 
 	/* Ugly but a reset can be slow, yet must be protected */
 
-	disable_irq_nosync_lockdep(dev->irq);
+	disable_irq_nosync(dev->irq);
 	spin_lock(&ei_local->page_lock);
 
 	/* Try to restart the card.  Perhaps the user has fixed something. */
@@ -292,7 +292,7 @@ static void ei_tx_timeout(struct net_dev
 	__NS8390_init(dev, 1);
 
 	spin_unlock(&ei_local->page_lock);
-	enable_irq_lockdep(dev->irq);
+	enable_irq(dev->irq);
 	netif_wake_queue(dev);
 }
 
@@ -334,7 +334,7 @@ static int ei_start_xmit(struct sk_buff 
 	 *	Slow phase with lock held.
 	 */
 
-	disable_irq_nosync_lockdep_irqsave(dev->irq, &flags);
+	disable_irq_nosync(dev->irq);
 
 	spin_lock(&ei_local->page_lock);
 
@@ -373,7 +373,7 @@ static int ei_start_xmit(struct sk_buff 
 		netif_stop_queue(dev);
 		ei_outb_p(ENISR_ALL, e8390_base + EN0_IMR);
 		spin_unlock(&ei_local->page_lock);
-		enable_irq_lockdep_irqrestore(dev->irq, &flags);
+		enable_irq(dev->irq);
 		ei_local->stat.tx_errors++;
 		return 1;
 	}
@@ -414,7 +414,7 @@ static int ei_start_xmit(struct sk_buff 
 	ei_outb_p(ENISR_ALL, e8390_base + EN0_IMR);
 
 	spin_unlock(&ei_local->page_lock);
-	enable_irq_lockdep_irqrestore(dev->irq, &flags);
+	enable_irq(dev->irq);
 
 	dev_kfree_skb (skb);
 	ei_local->stat.tx_bytes += send_length;
@@ -530,9 +530,9 @@ static irqreturn_t __ei_interrupt(int ir
 #ifdef CONFIG_NET_POLL_CONTROLLER
 static void __ei_poll(struct net_device *dev)
 {
-	disable_irq_lockdep(dev->irq);
+	disable_irq(dev->irq);
 	__ei_interrupt(dev->irq, dev);
-	enable_irq_lockdep(dev->irq);
+	enable_irq(dev->irq);
 }
 #endif