aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ioc3-eth.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ioc3-eth.c')
-rw-r--r--drivers/net/ioc3-eth.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/net/ioc3-eth.c b/drivers/net/ioc3-eth.c
index f0d30cf67b5f..4ad780719a84 100644
--- a/drivers/net/ioc3-eth.c
+++ b/drivers/net/ioc3-eth.c
@@ -836,13 +836,17 @@ static int ioc3_mii_init(struct ioc3_private *ip)
836 } 836 }
837 837
838 ip->mii.phy_id = i; 838 ip->mii.phy_id = i;
839
840out:
841 return res;
842}
843
844static void ioc3_mii_start(struct ioc3_private *ip)
845{
839 ip->ioc3_timer.expires = jiffies + (12 * HZ)/10; /* 1.2 sec. */ 846 ip->ioc3_timer.expires = jiffies + (12 * HZ)/10; /* 1.2 sec. */
840 ip->ioc3_timer.data = (unsigned long) ip; 847 ip->ioc3_timer.data = (unsigned long) ip;
841 ip->ioc3_timer.function = &ioc3_timer; 848 ip->ioc3_timer.function = &ioc3_timer;
842 add_timer(&ip->ioc3_timer); 849 add_timer(&ip->ioc3_timer);
843
844out:
845 return res;
846} 850}
847 851
848static inline void ioc3_clean_rx_ring(struct ioc3_private *ip) 852static inline void ioc3_clean_rx_ring(struct ioc3_private *ip)
@@ -1071,6 +1075,7 @@ static int ioc3_open(struct net_device *dev)
1071 ip->ehar_h = 0; 1075 ip->ehar_h = 0;
1072 ip->ehar_l = 0; 1076 ip->ehar_l = 0;
1073 ioc3_init(dev); 1077 ioc3_init(dev);
1078 ioc3_mii_start(ip);
1074 1079
1075 netif_start_queue(dev); 1080 netif_start_queue(dev);
1076 return 0; 1081 return 0;
@@ -1274,6 +1279,7 @@ static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1274 goto out_stop; 1279 goto out_stop;
1275 } 1280 }
1276 1281
1282 ioc3_mii_start(ip);
1277 ioc3_ssram_disc(ip); 1283 ioc3_ssram_disc(ip);
1278 ioc3_get_eaddr(ip); 1284 ioc3_get_eaddr(ip);
1279 1285
@@ -1314,6 +1320,7 @@ static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1314 1320
1315out_stop: 1321out_stop:
1316 ioc3_stop(ip); 1322 ioc3_stop(ip);
1323 del_timer_sync(&ip->ioc3_timer);
1317 ioc3_free_rings(ip); 1324 ioc3_free_rings(ip);
1318out_res: 1325out_res:
1319 pci_release_regions(pdev); 1326 pci_release_regions(pdev);
@@ -1335,6 +1342,8 @@ static void __devexit ioc3_remove_one (struct pci_dev *pdev)
1335 struct ioc3 *ioc3 = ip->regs; 1342 struct ioc3 *ioc3 = ip->regs;
1336 1343
1337 unregister_netdev(dev); 1344 unregister_netdev(dev);
1345 del_timer_sync(&ip->ioc3_timer);
1346
1338 iounmap(ioc3); 1347 iounmap(ioc3);
1339 pci_release_regions(pdev); 1348 pci_release_regions(pdev);
1340 free_netdev(dev); 1349 free_netdev(dev);
@@ -1492,6 +1501,7 @@ static void ioc3_timeout(struct net_device *dev)
1492 ioc3_stop(ip); 1501 ioc3_stop(ip);
1493 ioc3_init(dev); 1502 ioc3_init(dev);
1494 ioc3_mii_init(ip); 1503 ioc3_mii_init(ip);
1504 ioc3_mii_start(ip);
1495 1505
1496 spin_unlock_irq(&ip->ioc3_lock); 1506 spin_unlock_irq(&ip->ioc3_lock);
1497 1507