smc911x_enable, which enables irqs as a last task, is called with irqs 
disabled. 
There is no any other concurrent access at that phase so spinlock protection
is unneeded...

Signed-off-by: Bora Sahin <[EMAIL PROTECTED]>

Index: linux-2.6.18-rc4/drivers/net/smc911x.c
===================================================================
--- linux-2.6.18-rc4.orig/drivers/net/smc911x.c 2006-08-06 21:20:11.000000000 
+0300
+++ linux-2.6.18-rc4/drivers/net/smc911x.c      2006-09-04 13:54:26.621458832 
+0300
@@ -345,12 +348,10 @@
        SMC_SET_FIFO_TSL(64);
        SMC_SET_GPT_CFG(GPT_CFG_TIMER_EN_ | 10000);
 
-       spin_lock_irqsave(&lp->lock, flags);
        SMC_GET_MAC_CR(cr);
        cr |= MAC_CR_TXEN_ | MAC_CR_HBDIS_;
        SMC_SET_MAC_CR(cr);
        SMC_SET_TX_CFG(TX_CFG_TX_ON_);
-       spin_unlock_irqrestore(&lp->lock, flags);
 
        /* Add 2 byte padding to start of packets */
        SMC_SET_RX_CFG((2<<8) & RX_CFG_RXDOFF_);
@@ -359,9 +360,7 @@
        if (cr & MAC_CR_RXEN_)
                DBG(SMC_DEBUG_RX, "%s: Receiver already enabled\n", dev->name);
 
-       spin_lock_irqsave(&lp->lock, flags);
        SMC_SET_MAC_CR( cr | MAC_CR_RXEN_ );
-       spin_unlock_irqrestore(&lp->lock, flags);
 
        /* Interrupt on every received packet */
        SMC_SET_FIFO_RSA(0x01);
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to