aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/smsc911x.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-04-07 17:05:23 -0400
committerDavid S. Miller <davem@davemloft.net>2011-04-07 17:05:23 -0400
commitc1e48efc701b79ee4367c9a1a4e8bbc7c3586e02 (patch)
tree91921f7c0884813c72993fcd2ecd37dc5e56d89d /drivers/net/smsc911x.c
parent912d398d28b4359c2fb1f3763f1ce4f86de8350e (diff)
parent1b86a58f9d7ce4fe2377687f378fbfb53bdc9b6c (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.c8
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)
1818 SMSC_TRACE(pdata, probe, "PHY will be autodetected."); 1818 SMSC_TRACE(pdata, probe, "PHY will be autodetected.");
1819 1819
1820 spin_lock_init(&pdata->dev_lock); 1820 spin_lock_init(&pdata->dev_lock);
1821 spin_lock_init(&pdata->mac_lock);
1821 1822
1822 if (pdata->ioaddr == 0) { 1823 if (pdata->ioaddr == 0) {
1823 SMSC_WARN(pdata, probe, "pdata->ioaddr: 0x00000000"); 1824 SMSC_WARN(pdata, probe, "pdata->ioaddr: 0x00000000");
@@ -1897,8 +1898,11 @@ static int __devinit smsc911x_init(struct net_device *dev)
1897 /* workaround for platforms without an eeprom, where the mac address 1898 /* workaround for platforms without an eeprom, where the mac address
1898 * is stored elsewhere and set by the bootloader. This saves the 1899 * is stored elsewhere and set by the bootloader. This saves the
1899 * mac address before resetting the device */ 1900 * mac address before resetting the device */
1900 if (pdata->config.flags & SMSC911X_SAVE_MAC_ADDRESS) 1901 if (pdata->config.flags & SMSC911X_SAVE_MAC_ADDRESS) {
1902 spin_lock_irq(&pdata->mac_lock);
1901 smsc911x_read_mac_address(dev); 1903 smsc911x_read_mac_address(dev);
1904 spin_unlock_irq(&pdata->mac_lock);
1905 }
1902 1906
1903 /* Reset the LAN911x */ 1907 /* Reset the LAN911x */
1904 if (smsc911x_soft_reset(pdata)) 1908 if (smsc911x_soft_reset(pdata))
@@ -2058,8 +2062,6 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev)
2058 "Network interface: \"%s\"", dev->name); 2062 "Network interface: \"%s\"", dev->name);
2059 } 2063 }
2060 2064
2061 spin_lock_init(&pdata->mac_lock);
2062
2063 retval = smsc911x_mii_init(pdev, dev); 2065 retval = smsc911x_mii_init(pdev, dev);
2064 if (retval) { 2066 if (retval) {
2065 SMSC_WARN(pdata, probe, "Error %i initialising mii", retval); 2067 SMSC_WARN(pdata, probe, "Error %i initialising mii", retval);