summaryrefslogtreecommitdiffstats
path: root/drivers/net/au1000_eth.c
diff options
context:
space:
mode:
authorMartin Gebert <martin.gebert@alpha-bit.de>2008-07-23 09:40:09 +0200
committerJeff Garzik <jgarzik@redhat.com>2008-09-24 18:48:58 -0400
commit533763d34862101090f8563aa9da202583b2423d (patch)
tree516d09b5cd590c27f4a15f7740a617265ac143e7 /drivers/net/au1000_eth.c
parent894d6276ed8dca0365a91b6d4858c37c58b962d7 (diff)
downloadop-kernel-dev-533763d34862101090f8563aa9da202583b2423d.zip
op-kernel-dev-533763d34862101090f8563aa9da202583b2423d.tar.gz
[netdrvr] au1000_eth: Spinlock initialisation fix
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). Signed-off-by: Martin Gebert <Martin.Gebert@alpha-bit.de> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/au1000_eth.c')
-rw-r--r--drivers/net/au1000_eth.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c
index 5ee1b05..92c16c3 100644
--- a/drivers/net/au1000_eth.c
+++ b/drivers/net/au1000_eth.c
@@ -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;
OpenPOWER on IntegriCloud