diff options
author | David S. Miller <davem@davemloft.net> | 2011-04-07 14:05:23 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-07 14:05:23 -0700 |
commit | c1e48efc701b79ee4367c9a1a4e8bbc7c3586e02 (patch) | |
tree | 91921f7c0884813c72993fcd2ecd37dc5e56d89d /drivers/net/smsc911x.c | |
parent | 912d398d28b4359c2fb1f3763f1ce4f86de8350e (diff) | |
parent | 1b86a58f9d7ce4fe2377687f378fbfb53bdc9b6c (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/benet/be_main.c
Diffstat (limited to 'drivers/net/smsc911x.c')
-rw-r--r-- | drivers/net/smsc911x.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c index 8b501d53063f..05a882e6e139 100644 --- a/drivers/net/smsc911x.c +++ b/drivers/net/smsc911x.c @@ -1818,6 +1818,7 @@ static int __devinit smsc911x_init(struct net_device *dev) SMSC_TRACE(pdata, probe, "PHY will be autodetected."); spin_lock_init(&pdata->dev_lock); + spin_lock_init(&pdata->mac_lock); if (pdata->ioaddr == 0) { SMSC_WARN(pdata, probe, "pdata->ioaddr: 0x00000000"); @@ -1897,8 +1898,11 @@ static int __devinit smsc911x_init(struct net_device *dev) /* workaround for platforms without an eeprom, where the mac address * is stored elsewhere and set by the bootloader. This saves the * mac address before resetting the device */ - if (pdata->config.flags & SMSC911X_SAVE_MAC_ADDRESS) + if (pdata->config.flags & SMSC911X_SAVE_MAC_ADDRESS) { + spin_lock_irq(&pdata->mac_lock); smsc911x_read_mac_address(dev); + spin_unlock_irq(&pdata->mac_lock); + } /* Reset the LAN911x */ if (smsc911x_soft_reset(pdata)) @@ -2058,8 +2062,6 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev) "Network interface: \"%s\"", dev->name); } - spin_lock_init(&pdata->mac_lock); - retval = smsc911x_mii_init(pdev, dev); if (retval) { SMSC_WARN(pdata, probe, "Error %i initialising mii", retval); |