diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2007-06-04 16:25:37 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-07-08 22:16:39 -0400 |
commit | a72a8179734393ca351f6ecf8cad6841ab7e1470 (patch) | |
tree | 774abed2532e59a3e986ee666f92357ba75608a9 /drivers/net/b44.c | |
parent | eb034a7998956bffdd2acccb7fddfc114c913120 (diff) |
b44: timer power saving
Make the PHY and statistic timer run on one second boundary
for powersaving.
On resume, the driver should check for link up immediately, to
get online faster (rather than waiting for the next second).
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/b44.c')
-rw-r--r-- | drivers/net/b44.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/b44.c b/drivers/net/b44.c index 879a2fff474e..e87bab9f9bea 100644 --- a/drivers/net/b44.c +++ b/drivers/net/b44.c | |||
@@ -599,8 +599,7 @@ static void b44_timer(unsigned long __opaque) | |||
599 | 599 | ||
600 | spin_unlock_irq(&bp->lock); | 600 | spin_unlock_irq(&bp->lock); |
601 | 601 | ||
602 | bp->timer.expires = jiffies + HZ; | 602 | mod_timer(&bp->timer, round_jiffies(jiffies + HZ)); |
603 | add_timer(&bp->timer); | ||
604 | } | 603 | } |
605 | 604 | ||
606 | static void b44_tx(struct b44 *bp) | 605 | static void b44_tx(struct b44 *bp) |
@@ -2348,11 +2347,11 @@ static int b44_resume(struct pci_dev *pdev) | |||
2348 | netif_device_attach(bp->dev); | 2347 | netif_device_attach(bp->dev); |
2349 | spin_unlock_irq(&bp->lock); | 2348 | spin_unlock_irq(&bp->lock); |
2350 | 2349 | ||
2351 | bp->timer.expires = jiffies + HZ; | ||
2352 | add_timer(&bp->timer); | ||
2353 | |||
2354 | b44_enable_ints(bp); | 2350 | b44_enable_ints(bp); |
2355 | netif_wake_queue(dev); | 2351 | netif_wake_queue(dev); |
2352 | |||
2353 | mod_timer(&bp->timer, jiffies + 1); | ||
2354 | |||
2356 | return 0; | 2355 | return 0; |
2357 | } | 2356 | } |
2358 | 2357 | ||