summaryrefslogtreecommitdiffstats
path: root/drivers/net/sky2.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2006-07-12 15:23:46 -0700
committerJeff Garzik <jeff@garzik.org>2006-07-12 18:39:21 -0400
commit6a5706b99c98e3c974cf5b55324e4eed7f82e55a (patch)
tree259c1489196cfa91c2a1e5416421d30f6a8d2a07 /drivers/net/sky2.c
parent59139528c8e7880eee437e81647ade1b36af0d41 (diff)
downloadlinux-6a5706b99c98e3c974cf5b55324e4eed7f82e55a.tar.bz2
[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/net/sky2.c')
-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)
return -EINVAL;
del_timer_sync(&hw->idle_timer);
+ netif_poll_disable(hw->dev[0]);
for (i = 0; i < hw->ports; i++) {
struct net_device *dev = hw->dev[i];
- if (dev) {
- if (!netif_running(dev))
- continue;
-
+ if (netif_running(dev)) {
sky2_down(dev);
netif_device_detach(dev);
- netif_poll_disable(dev);
}
}
@@ -3474,9 +3471,8 @@ static int sky2_resume(struct pci_dev *pdev)
for (i = 0; i < hw->ports; i++) {
struct net_device *dev = hw->dev[i];
- if (dev && netif_running(dev)) {
+ if (netif_running(dev)) {
netif_device_attach(dev);
- netif_poll_enable(dev);
err = sky2_up(dev);
if (err) {
@@ -3488,6 +3484,7 @@ static int sky2_resume(struct pci_dev *pdev)
}
}
+ netif_poll_enable(hw->dev[0]);
sky2_idle_start(hw);
out:
return err;