Skip to contentSkip to conversation

Spinlock initialisation au1000_eth.c]

PATCH Jeff Garzik 1 participant 1 message Sep 13, 2008 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Jeff Garzik

author Applied
#1 lore raw
Quoted 20 lines · Martin Gebert

Seems like the spinlock for the AU1x00 ethernet device is initialised too late, as it is already used in enable_mac(), which is called via mii_probe() before the init takes place.
The attached patch is working here for a Linux Au1100 2.6.22.6 kernel, and as far as I checked should also be applicable to the current head (just line numbers differ).

net/au1000_eth.c 2008-06-26 14:23:00.000000000 +0200 renamed from net/au1000_eth.c 2008-06-26 14:21:53.000000000 +0200 +1 -0
@@ -656,6 +656,7 @@
        dev->name, base, irq);
 
    aup = dev->priv;
+    spin_lock_init(&aup->lock);
 
    /* Allocate the data buffers */
    /* Snooping works fine with eth on all au1xxx */

net/au1000_eth.c 2008-06-26 14:23:00.000000000 +0200 line 771

Quoted 6 lines
net/au1000_eth.c 2008-06-26 14:23:00.000000000 +0200 renamed from net/au1000_eth.c 2008-06-26 14:21:53.000000000 +0200 +0 -1
@@ -766,7 +767,6 @@
        aup->tx_db_inuse[i] = pDB;
    }
 
-    spin_lock_init(&aup->lock);
    dev->base_addr = base;
    dev->irq = irq;

applied