aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sungem.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/sungem.c')
-rw-r--r--drivers/net/sungem.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c
index 86c765d83de1..491876341068 100644
--- a/drivers/net/sungem.c
+++ b/drivers/net/sungem.c
@@ -148,7 +148,7 @@ static u16 __phy_read(struct gem *gp, int phy_addr, int reg)
148 cmd |= (MIF_FRAME_TAMSB); 148 cmd |= (MIF_FRAME_TAMSB);
149 writel(cmd, gp->regs + MIF_FRAME); 149 writel(cmd, gp->regs + MIF_FRAME);
150 150
151 while (limit--) { 151 while (--limit) {
152 cmd = readl(gp->regs + MIF_FRAME); 152 cmd = readl(gp->regs + MIF_FRAME);
153 if (cmd & MIF_FRAME_TALSB) 153 if (cmd & MIF_FRAME_TALSB)
154 break; 154 break;
@@ -2221,6 +2221,8 @@ static int gem_do_start(struct net_device *dev)
2221 2221
2222 gp->running = 1; 2222 gp->running = 1;
2223 2223
2224 napi_enable(&gp->napi);
2225
2224 if (gp->lstate == link_up) { 2226 if (gp->lstate == link_up) {
2225 netif_carrier_on(gp->dev); 2227 netif_carrier_on(gp->dev);
2226 gem_set_link_modes(gp); 2228 gem_set_link_modes(gp);
@@ -2238,6 +2240,8 @@ static int gem_do_start(struct net_device *dev)
2238 spin_lock_irqsave(&gp->lock, flags); 2240 spin_lock_irqsave(&gp->lock, flags);
2239 spin_lock(&gp->tx_lock); 2241 spin_lock(&gp->tx_lock);
2240 2242
2243 napi_disable(&gp->napi);
2244
2241 gp->running = 0; 2245 gp->running = 0;
2242 gem_reset(gp); 2246 gem_reset(gp);
2243 gem_clean_rings(gp); 2247 gem_clean_rings(gp);
@@ -2338,8 +2342,6 @@ static int gem_open(struct net_device *dev)
2338 if (!gp->asleep) 2342 if (!gp->asleep)
2339 rc = gem_do_start(dev); 2343 rc = gem_do_start(dev);
2340 gp->opened = (rc == 0); 2344 gp->opened = (rc == 0);
2341 if (gp->opened)
2342 napi_enable(&gp->napi);
2343 2345
2344 mutex_unlock(&gp->pm_mutex); 2346 mutex_unlock(&gp->pm_mutex);
2345 2347
@@ -2476,8 +2478,6 @@ static int gem_resume(struct pci_dev *pdev)
2476 2478
2477 /* Re-attach net device */ 2479 /* Re-attach net device */
2478 netif_device_attach(dev); 2480 netif_device_attach(dev);
2479
2480 napi_enable(&gp->napi);
2481 } 2481 }
2482 2482
2483 spin_lock_irqsave(&gp->lock, flags); 2483 spin_lock_irqsave(&gp->lock, flags);