]> err.no Git - linux-2.6/commitdiff
mv643xx_eth: fix inconsistent lock semantics
authorLennert Buytenhek <buytenh@wantstofly.org>
Sun, 24 Aug 2008 00:30:42 +0000 (02:30 +0200)
committerLennert Buytenhek <buytenh@marvell.com>
Sun, 24 Aug 2008 01:33:16 +0000 (03:33 +0200)
Nicolas Pitre noted that mv643xx_eth_poll was incorrectly using
non-IRQ-safe locks while checking whether to wake up the netdevice's
transmit queue.  Convert the locking to *_irq() variants, since we
are running from softirq context where interrupts are enabled.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
drivers/net/mv643xx_eth.c

index 8a91d79383dd01cc12b9f7bc01e0bcb6334143f2..30e6d4b8d5644191d404d5547bba0a8248b01f40 100644 (file)
@@ -634,9 +634,9 @@ static int mv643xx_eth_poll(struct napi_struct *napi, int budget)
                                txq_reclaim(mp->txq + i, 0);
 
                if (netif_carrier_ok(mp->dev)) {
-                       spin_lock(&mp->lock);
+                       spin_lock_irq(&mp->lock);
                        __txq_maybe_wake(mp->txq + mp->txq_primary);
-                       spin_unlock(&mp->lock);
+                       spin_unlock_irq(&mp->lock);
                }
        }
 #endif