aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2006-07-12 18:23:46 -0400
committerJeff Garzik <jeff@garzik.org>2006-07-12 18:39:21 -0400
commit6a5706b99c98e3c974cf5b55324e4eed7f82e55a (patch)
tree259c1489196cfa91c2a1e5416421d30f6a8d2a07 /drivers
parent59139528c8e7880eee437e81647ade1b36af0d41 (diff)
[PATCH] sky2: NAPI suspend/resume of dual port cards
The changes to handle suspend/resume didn't handle the case where a dual port card has the first port down, but the second is running. In this driver, all NAPI polling is done on the primary port. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/sky2.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 4af3b86f62b8..5e8f9efd90a9 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -3437,17 +3437,14 @@ static int sky2_suspend(struct pci_dev *pdev, pm_message_t state)
3437 return -EINVAL; 3437 return -EINVAL;
3438 3438
3439 del_timer_sync(&hw->idle_timer); 3439 del_timer_sync(&hw->idle_timer);
3440 netif_poll_disable(hw->dev[0]);
3440 3441
3441 for (i = 0; i < hw->ports; i++) { 3442 for (i = 0; i < hw->ports; i++) {
3442 struct net_device *dev = hw->dev[i]; 3443 struct net_device *dev = hw->dev[i];
3443 3444
3444 if (dev) { 3445 if (netif_running(dev)) {
3445 if (!netif_running(dev))
3446 continue;
3447
3448 sky2_down(dev); 3446 sky2_down(dev);
3449 netif_device_detach(dev); 3447 netif_device_detach(dev);
3450 netif_poll_disable(dev);
3451 } 3448 }
3452 } 3449 }
3453 3450
@@ -3474,9 +3471,8 @@ static int sky2_resume(struct pci_dev *pdev)
3474 3471
3475 for (i = 0; i < hw->ports; i++) { 3472 for (i = 0; i < hw->ports; i++) {
3476 struct net_device *dev = hw->dev[i]; 3473 struct net_device *dev = hw->dev[i];
3477 if (dev && netif_running(dev)) { 3474 if (netif_running(dev)) {
3478 netif_device_attach(dev); 3475 netif_device_attach(dev);
3479 netif_poll_enable(dev);
3480 3476
3481 err = sky2_up(dev); 3477 err = sky2_up(dev);
3482 if (err) { 3478 if (err) {
@@ -3488,6 +3484,7 @@ static int sky2_resume(struct pci_dev *pdev)
3488 } 3484 }
3489 } 3485 }
3490 3486
3487 netif_poll_enable(hw->dev[0]);
3491 sky2_idle_start(hw); 3488 sky2_idle_start(hw);
3492out: 3489out:
3493 return err; 3490 return err;