Skip to content

Commit

Permalink
[PATCH] sky2: NAPI suspend/resume of dual port cards
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stephen Hemminger authored and Jeff Garzik committed Jul 12, 2006
1 parent 5913952 commit 6a5706b
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions drivers/net/sky2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand All @@ -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) {
Expand All @@ -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;
Expand Down

0 comments on commit 6a5706b

Please sign in to comment.