FS_ENET: TX stuff should use fep->tx_lock, instead of fep->lock.
authorVitaly Bordug <vitb@kernel.crashing.org>
Tue, 18 Sep 2007 16:05:27 +0000 (20:05 +0400)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 10 Oct 2007 23:51:54 +0000 (16:51 -0700)
Signed-off-by: Vitaly Bordug <vitb@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/fs_enet/fs_enet-main.c

index f9079599dd22635e09d560834cf93cb42b5a1781..83c9bf27ecfdb6979849799511cfc019a7169ae0 100644 (file)
@@ -335,7 +335,7 @@ static void fs_enet_tx(struct net_device *dev)
        int dirtyidx, do_wake, do_restart;
        u16 sc;
 
-       spin_lock(&fep->lock);
+       spin_lock(&fep->tx_lock);
        bdp = fep->dirty_tx;
 
        do_wake = do_restart = 0;
@@ -415,7 +415,7 @@ static void fs_enet_tx(struct net_device *dev)
        if (do_restart)
                (*fep->ops->tx_restart)(dev);
 
-       spin_unlock(&fep->lock);
+       spin_unlock(&fep->tx_lock);
 
        if (do_wake)
                netif_wake_queue(dev);
@@ -818,7 +818,9 @@ static int fs_enet_close(struct net_device *dev)
        phy_stop(fep->phydev);
 
        spin_lock_irqsave(&fep->lock, flags);
+       spin_lock(&fep->tx_lock);
        (*fep->ops->stop)(dev);
+       spin_unlock(&fep->tx_lock);
        spin_unlock_irqrestore(&fep->lock, flags);
 
        /* release any irqs */