netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pcnet32: round off carrier watch timer
@ 2009-01-07 20:10 Stephen Hemminger
  2009-01-08  0:32 ` Wang Chen
  2009-01-08 19:17 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Stephen Hemminger @ 2009-01-07 20:10 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

The link check watchdog timer on this driver fires every two seconds, but
since not aligned it causes extra wakeups. It is more important on this
driver than most because it is the hardware that is emulated by default
when using network interfaces on VMware.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

--- a/drivers/net/pcnet32.c	2009-01-07 12:05:54.218712996 -0800
+++ b/drivers/net/pcnet32.c	2009-01-07 12:06:37.430288101 -0800
@@ -2282,7 +2282,7 @@ static int pcnet32_open(struct net_devic
 	if (lp->chip_version >= PCNET32_79C970A) {
 		/* Print the link status and start the watchdog */
 		pcnet32_check_media(dev, 1);
-		mod_timer(&(lp->watchdog_timer), PCNET32_WATCHDOG_TIMEOUT);
+		mod_timer(&lp->watchdog_timer, PCNET32_WATCHDOG_TIMEOUT);
 	}
 
 	i = 0;
@@ -2917,7 +2917,7 @@ static void pcnet32_watchdog(struct net_
 	pcnet32_check_media(dev, 0);
 	spin_unlock_irqrestore(&lp->lock, flags);
 
-	mod_timer(&(lp->watchdog_timer), PCNET32_WATCHDOG_TIMEOUT);
+	mod_timer(&lp->watchdog_timer, round_jiffies(PCNET32_WATCHDOG_TIMEOUT));
 }
 
 static int pcnet32_pm_suspend(struct pci_dev *pdev, pm_message_t state)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] pcnet32: round off carrier watch timer
  2009-01-07 20:10 [PATCH] pcnet32: round off carrier watch timer Stephen Hemminger
@ 2009-01-08  0:32 ` Wang Chen
  2009-01-08  0:38   ` Stephen Hemminger
  2009-01-08 19:17 ` David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Wang Chen @ 2009-01-08  0:32 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev

Stephen Hemminger said the following on 2009-1-8 4:10:
> The link check watchdog timer on this driver fires every two seconds, but
> since not aligned it causes extra wakeups. It is more important on this
> driver than most because it is the hardware that is emulated by default
> when using network interfaces on VMware.
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
> 
> --- a/drivers/net/pcnet32.c	2009-01-07 12:05:54.218712996 -0800
> +++ b/drivers/net/pcnet32.c	2009-01-07 12:06:37.430288101 -0800
> @@ -2282,7 +2282,7 @@ static int pcnet32_open(struct net_devic
>  	if (lp->chip_version >= PCNET32_79C970A) {
>  		/* Print the link status and start the watchdog */
>  		pcnet32_check_media(dev, 1);
> -		mod_timer(&(lp->watchdog_timer), PCNET32_WATCHDOG_TIMEOUT);
> +		mod_timer(&lp->watchdog_timer, PCNET32_WATCHDOG_TIMEOUT);

should be
+		mod_timer(&lp->watchdog_timer, round_jiffies(PCNET32_WATCHDOG_TIMEOUT));
same as that in pcnet32_watchdog()?

>  	}
>  
>  	i = 0;
> @@ -2917,7 +2917,7 @@ static void pcnet32_watchdog(struct net_
>  	pcnet32_check_media(dev, 0);
>  	spin_unlock_irqrestore(&lp->lock, flags);
>  
> -	mod_timer(&(lp->watchdog_timer), PCNET32_WATCHDOG_TIMEOUT);
> +	mod_timer(&lp->watchdog_timer, round_jiffies(PCNET32_WATCHDOG_TIMEOUT));
>  }
>  
>  static int pcnet32_pm_suspend(struct pci_dev *pdev, pm_message_t state)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] pcnet32: round off carrier watch timer
  2009-01-08  0:32 ` Wang Chen
@ 2009-01-08  0:38   ` Stephen Hemminger
  0 siblings, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2009-01-08  0:38 UTC (permalink / raw)
  To: Wang Chen; +Cc: David Miller, netdev

On Thu, 08 Jan 2009 08:32:47 +0800
Wang Chen <wangchen@cn.fujitsu.com> wrote:

> Stephen Hemminger said the following on 2009-1-8 4:10:
> > The link check watchdog timer on this driver fires every two seconds, but
> > since not aligned it causes extra wakeups. It is more important on this
> > driver than most because it is the hardware that is emulated by default
> > when using network interfaces on VMware.
> > 
> > Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
> > 
> > --- a/drivers/net/pcnet32.c	2009-01-07 12:05:54.218712996 -0800
> > +++ b/drivers/net/pcnet32.c	2009-01-07 12:06:37.430288101 -0800
> > @@ -2282,7 +2282,7 @@ static int pcnet32_open(struct net_devic
> >  	if (lp->chip_version >= PCNET32_79C970A) {
> >  		/* Print the link status and start the watchdog */
> >  		pcnet32_check_media(dev, 1);
> > -		mod_timer(&(lp->watchdog_timer), PCNET32_WATCHDOG_TIMEOUT);
> > +		mod_timer(&lp->watchdog_timer, PCNET32_WATCHDOG_TIMEOUT);
> 
> should be
> +		mod_timer(&lp->watchdog_timer, round_jiffies(PCNET32_WATCHDOG_TIMEOUT));
> same as that in pcnet32_watchdog()?

It only gets run on the first tick so it doesn't matter.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] pcnet32: round off carrier watch timer
  2009-01-07 20:10 [PATCH] pcnet32: round off carrier watch timer Stephen Hemminger
  2009-01-08  0:32 ` Wang Chen
@ 2009-01-08 19:17 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2009-01-08 19:17 UTC (permalink / raw)
  To: shemminger; +Cc: netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Wed, 7 Jan 2009 12:10:36 -0800

> The link check watchdog timer on this driver fires every two seconds, but
> since not aligned it causes extra wakeups. It is more important on this
> driver than most because it is the hardware that is emulated by default
> when using network interfaces on VMware.
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Applied.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-01-08 19:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-07 20:10 [PATCH] pcnet32: round off carrier watch timer Stephen Hemminger
2009-01-08  0:32 ` Wang Chen
2009-01-08  0:38   ` Stephen Hemminger
2009-01-08 19:17 ` David Miller

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).