aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/smsc911x.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/smsc911x.c')
-rw-r--r--drivers/net/smsc911x.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c
index 1566259c1f27..4b42ecc63dcf 100644
--- a/drivers/net/smsc911x.c
+++ b/drivers/net/smsc911x.c
@@ -1669,7 +1669,7 @@ static int smsc911x_eeprom_send_cmd(struct smsc911x_data *pdata, u32 op)
1669 } 1669 }
1670 1670
1671 if (e2cmd & E2P_CMD_EPC_TIMEOUT_) { 1671 if (e2cmd & E2P_CMD_EPC_TIMEOUT_) {
1672 SMSC_TRACE(DRV, "Error occured during eeprom operation"); 1672 SMSC_TRACE(DRV, "Error occurred during eeprom operation");
1673 return -EINVAL; 1673 return -EINVAL;
1674 } 1674 }
1675 1675
@@ -1818,6 +1818,7 @@ static int __devinit smsc911x_init(struct net_device *dev)
1818 SMSC_TRACE(PROBE, "PHY will be autodetected."); 1818 SMSC_TRACE(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_WARNING(PROBE, "pdata->ioaddr: 0x00000000"); 1824 SMSC_WARNING(PROBE, "pdata->ioaddr: 0x00000000");
@@ -1895,8 +1896,11 @@ static int __devinit smsc911x_init(struct net_device *dev)
1895 /* workaround for platforms without an eeprom, where the mac address 1896 /* workaround for platforms without an eeprom, where the mac address
1896 * is stored elsewhere and set by the bootloader. This saves the 1897 * is stored elsewhere and set by the bootloader. This saves the
1897 * mac address before resetting the device */ 1898 * mac address before resetting the device */
1898 if (pdata->config.flags & SMSC911X_SAVE_MAC_ADDRESS) 1899 if (pdata->config.flags & SMSC911X_SAVE_MAC_ADDRESS) {
1900 spin_lock_irq(&pdata->mac_lock);
1899 smsc911x_read_mac_address(dev); 1901 smsc911x_read_mac_address(dev);
1902 spin_unlock_irq(&pdata->mac_lock);
1903 }
1900 1904
1901 /* Reset the LAN911x */ 1905 /* Reset the LAN911x */
1902 if (smsc911x_soft_reset(pdata)) 1906 if (smsc911x_soft_reset(pdata))
@@ -2059,8 +2063,6 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev)
2059 SMSC_TRACE(PROBE, "Network interface: \"%s\"", dev->name); 2063 SMSC_TRACE(PROBE, "Network interface: \"%s\"", dev->name);
2060 } 2064 }
2061 2065
2062 spin_lock_init(&pdata->mac_lock);
2063
2064 retval = smsc911x_mii_init(pdev, dev); 2066 retval = smsc911x_mii_init(pdev, dev);
2065 if (retval) { 2067 if (retval) {
2066 SMSC_WARNING(PROBE, 2068 SMSC_WARNING(PROBE,