Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 27211
b: refs/heads/master
c: eb35cf6
h: refs/heads/master
i:
  27209: 0477a22
  27207: 715d0d6
v: v3
  • Loading branch information
Stephen Hemminger authored and Linus Torvalds committed Jun 13, 2006
1 parent 8e77cd7 commit a6e2813
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8ab8fca2071cec559e4b77212cccffd150ce5ce7
refs/heads/master: eb35cf60e462491249166182e3e755d3d5d91a28
17 changes: 13 additions & 4 deletions trunk/drivers/net/sky2.c
Original file line number Diff line number Diff line change
Expand Up @@ -2161,6 +2161,13 @@ static void sky2_descriptor_error(struct sky2_hw *hw, unsigned port,
/* If idle then force a fake soft NAPI poll once a second
* to work around cases where sharing an edge triggered interrupt.
*/
static inline void sky2_idle_start(struct sky2_hw *hw)
{
if (idle_timeout > 0)
mod_timer(&hw->idle_timer,
jiffies + msecs_to_jiffies(idle_timeout));
}

static void sky2_idle(unsigned long arg)
{
struct sky2_hw *hw = (struct sky2_hw *) arg;
Expand Down Expand Up @@ -3350,9 +3357,7 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
sky2_write32(hw, B0_IMSK, Y2_IS_BASE);

setup_timer(&hw->idle_timer, sky2_idle, (unsigned long) hw);
if (idle_timeout > 0)
mod_timer(&hw->idle_timer,
jiffies + msecs_to_jiffies(idle_timeout));
sky2_idle_start(hw);

pci_set_drvdata(pdev, hw);

Expand Down Expand Up @@ -3430,6 +3435,8 @@ static int sky2_suspend(struct pci_dev *pdev, pm_message_t state)
if (!(pstate == PCI_D3hot || pstate == PCI_D3cold))
return -EINVAL;

del_timer_sync(&hw->idle_timer);

for (i = 0; i < hw->ports; i++) {
struct net_device *dev = hw->dev[i];

Expand Down Expand Up @@ -3472,10 +3479,12 @@ static int sky2_resume(struct pci_dev *pdev)
printk(KERN_ERR PFX "%s: could not up: %d\n",
dev->name, err);
dev_close(dev);
break;
goto out;
}
}
}

sky2_idle_start(hw);
out:
return err;
}
Expand Down

0 comments on commit a6e2813

Please sign in to comment.