netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@linux-foundation.org>
To: Gary Zambrano <zambrano@broadcom.com>
Cc: netdev@vger.kernel.org
Subject: [PATCH 1/4] b44: timer power saving
Date: Mon, 04 Jun 2007 13:25:37 -0700	[thread overview]
Message-ID: <20070604202712.223155106@linux-foundation.org> (raw)
In-Reply-To: 20070604202536.503165465@linux-foundation.org

[-- Attachment #1: b44-modtimer.patch --]
[-- Type: text/plain, Size: 1090 bytes --]

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);
+
 	return 0;
 }
 

-- 
Stephen Hemminger <shemminger@linux-foundation.org>


  reply	other threads:[~2007-06-04 20:40 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 ` Stephen Hemminger [this message]
2007-06-06 19:01   ` [PATCH 1/4] b44: timer power saving Michael Buesch
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=20070604202712.223155106@linux-foundation.org \
    --to=shemminger@linux-foundation.org \
    --cc=netdev@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).