[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 6 Jun 2007 21:01:20 +0200
From: Michael Buesch <mb@...sch.de>
To: Stephen Hemminger <shemminger@...ux-foundation.org>
Cc: Gary Zambrano <zambrano@...adcom.com>, netdev@...r.kernel.org
Subject: Re: [PATCH 1/4] b44: timer power saving
On Monday 04 June 2007 22:25:37 Stephen Hemminger wrote:
> 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@...ux-foundation.org>
>
>
> ---
> drivers/net/b44.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> --- a/drivers/net/b44.c 2007-06-04 12:31:27.000000000 -0700
> +++ b/drivers/net/b44.c 2007-06-04 12:31:34.000000000 -0700
> @@ -599,8 +599,7 @@ static void b44_timer(unsigned long __op
>
> spin_unlock_irq(&bp->lock);
>
> - bp->timer.expires = jiffies + HZ;
> - add_timer(&bp->timer);
> + mod_timer(&bp->timer, round_jiffies(jiffies + HZ));
> }
>
> static void b44_tx(struct b44 *bp)
> @@ -2348,11 +2347,11 @@ static int b44_resume(struct pci_dev *pd
> netif_device_attach(bp->dev);
> spin_unlock_irq(&bp->lock);
>
> - bp->timer.expires = jiffies + HZ;
> - add_timer(&bp->timer);
> -
> b44_enable_ints(bp);
> netif_wake_queue(dev);
> +
> + mod_timer(&bp->timer, jiffies + 1);
I don't think we need +1, if you need to fire immediately
(on the next tick). The timer core will always fire
timers that are in the past immediately.
--
Greetings Michael.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists