From: Michael Buesch <mb@bu3sch.de>
To: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: Gary Zambrano <zambrano@broadcom.com>, netdev@vger.kernel.org
Subject: Re: [PATCH 1/4] b44: timer power saving
Date: Wed, 6 Jun 2007 21:01:20 +0200 [thread overview]
Message-ID: <200706062101.20643.mb@bu3sch.de> (raw)
In-Reply-To: <20070604202712.223155106@linux-foundation.org>
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@linux-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.
next prev parent reply other threads:[~2007-06-06 19:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-04 20:25 [PATCH 0/4] b44 driver improvements Stephen Hemminger
2007-06-04 20:25 ` [PATCH 1/4] b44: timer power saving Stephen Hemminger
2007-06-06 19:01 ` Michael Buesch [this message]
2007-06-06 21:04 ` Stephen Hemminger
2007-06-07 8:37 ` Michael Buesch
2007-06-13 19:53 ` Jeff Garzik
2007-06-04 20:25 ` [PATCH 2/4] b44: tx bounce sizing Stephen Hemminger
2007-06-04 20:25 ` [PATCH 3/4] b44: packet offset is constant Stephen Hemminger
2007-06-04 20:25 ` [PATCH 4/4] b44: use netdev_alloc_skb Stephen Hemminger
2007-06-04 21:17 ` [PATCH 0/4] b44 driver improvements Jeff Garzik
2007-06-04 21:17 ` John W. Linville
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200706062101.20643.mb@bu3sch.de \
--to=mb@bu3sch.de \
--cc=netdev@vger.kernel.org \
--cc=shemminger@linux-foundation.org \
--cc=zambrano@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.