]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/au1000_eth.c
[netdrvr] convert sbmac tx to spin_lock_irqsave to prevent early IRQ enable
[linux-2.6-omap-h63xx.git] / drivers / net / au1000_eth.c
index 3ab61e40e86aa833e32d1acc82b8ae9985ef433d..92c16c37ff232a3b87a5228cac4d76f6213998ef 100644 (file)
@@ -653,6 +653,8 @@ static struct net_device * au1000_probe(int port_num)
 
        aup = dev->priv;
 
+       spin_lock_init(&aup->lock);
+
        /* Allocate the data buffers */
        /* Snooping works fine with eth on all au1xxx */
        aup->vaddr = (u32)dma_alloc_noncoherent(NULL, MAX_BUF_SIZE *
@@ -753,7 +755,6 @@ static struct net_device * au1000_probe(int port_num)
                aup->tx_db_inuse[i] = pDB;
        }
 
-       spin_lock_init(&aup->lock);
        dev->base_addr = base;
        dev->irq = irq;
        dev->open = au1000_open;
@@ -807,7 +808,7 @@ err_out:
 static int au1000_init(struct net_device *dev)
 {
        struct au1000_private *aup = (struct au1000_private *) dev->priv;
-       u32 flags;
+       unsigned long flags;
        int i;
        u32 control;
 
@@ -911,9 +912,8 @@ au1000_adjust_link(struct net_device *dev)
        if(phydev->link != aup->old_link) {
                // link state changed
 
-               if (phydev->link) // link went up
-                       netif_tx_schedule_all(dev);
-               else { // link went down
+               if (!phydev->link) {
+                       /* link went down */
                        aup->old_speed = 0;
                        aup->old_duplex = -1;
                }