[PATCH] lockdep: fix smc91x
authorRussell King <rmk+lkml@arm.linux.org.uk>
Tue, 15 Aug 2006 06:00:20 +0000 (23:00 -0700)
committerJeff Garzik <jeff@garzik.org>
Sat, 19 Aug 2006 21:44:29 +0000 (17:44 -0400)
When booting using root-nfs, I'm seeing (independently) two lockdep dumps
in the smc91x driver.  The patch below fixes both.  Both dumps look like
real locking issues.

Nico - please review and ack if you think the patch is correct.

Dump 1:

Sending DHCP requests .
=================================
[ INFO: inconsistent lock state ]

Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/smc91x.c

index 3d8dcb6c8758f32eff96fcaf905374a6105d6427..cf62373b808b6eaf81b6f36888026da82b27c38b 100644 (file)
@@ -321,12 +321,12 @@ static void smc_reset(struct net_device *dev)
        DBG(2, "%s: %s\n", dev->name, __FUNCTION__);
 
        /* Disable all interrupts, block TX tasklet */
-       spin_lock(&lp->lock);
+       spin_lock_irq(&lp->lock);
        SMC_SELECT_BANK(2);
        SMC_SET_INT_MASK(0);
        pending_skb = lp->pending_tx_skb;
        lp->pending_tx_skb = NULL;
-       spin_unlock(&lp->lock);
+       spin_unlock_irq(&lp->lock);
 
        /* free any pending tx skb */
        if (pending_skb) {
@@ -448,12 +448,12 @@ static void smc_shutdown(struct net_device *dev)
        DBG(2, "%s: %s\n", CARDNAME, __FUNCTION__);
 
        /* no more interrupts for me */
-       spin_lock(&lp->lock);
+       spin_lock_irq(&lp->lock);
        SMC_SELECT_BANK(2);
        SMC_SET_INT_MASK(0);
        pending_skb = lp->pending_tx_skb;
        lp->pending_tx_skb = NULL;
-       spin_unlock(&lp->lock);
+       spin_unlock_irq(&lp->lock);
        if (pending_skb)
                dev_kfree_skb(pending_skb);
 
This page took 0.027495 seconds and 5 git commands to generate.