diff options
author | David S. Miller <davem@davemloft.net> | 2011-04-07 23:05:23 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-07 23:05:23 +0200 |
commit | c1e48efc701b79ee4367c9a1a4e8bbc7c3586e02 (patch) | |
tree | 91921f7c0884813c72993fcd2ecd37dc5e56d89d /drivers/net/smsc911x.c | |
parent | net: fix skb_add_data_nocache() to calc csum correctly (diff) | |
parent | ipv4: Fix "Set rt->rt_iif more sanely on output routes." (diff) | |
download | linux-c1e48efc701b79ee4367c9a1a4e8bbc7c3586e02.tar.xz linux-c1e48efc701b79ee4367c9a1a4e8bbc7c3586e02.zip |
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); |