pcnet32: round off carrier watch timer
Subsystems (2)
PATCH 1/1 pcnet32: round off carrier watch timer
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.
drivers/net/pcnet32.c +2 -2
@@ -2282,7 +2282,7 @@ static int pcnet32_open(struct net_devicif (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)
Stephen Hemminger said the following on 2009-1-8 4:10:
Quoted 10 lines
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 <[email protected]>
drivers/net/pcnet32.c static int pcnet32_open(struct net_devic · line 2285
Quoted 5 lines
drivers/net/pcnet32.c +1
-1@@ -2282,7 +2282,7 @@ static int pcnet32_open(struct net_devicif (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()?
Quoted 12 lines
drivers/net/pcnet32.c +1
-1} 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)
Quoted 19 lines · On Thu, 08 Jan 2009 08:32:47 +0800 Wang Chen <[email protected]> wrote:
Stephen Hemminger said the following on 2009-1-8 4:10:
Quoted 10 lines
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 <[email protected]>drivers/net/pcnet32.c static int pcnet32_open(struct net_devic · line 2285
Quoted 5 lines
drivers/net/pcnet32.c +1
-1@@ -2282,7 +2282,7 @@ static int pcnet32_open(struct net_devicif (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
drivers/net/pcnet32.c +1
-0+mod_timer (&lp->watchdog_timer,round_jiffies (PCNET32_WATCHDOG_TIMEOUT ));
Quoted 1 line
same as that in
pcnet32_watchdog()?
It only gets run on the first tick so it doesn't matter.
From: Stephen Hemminger <[email protected]>
Date: Wed, 7 Jan 2009 12:10:36 -0800
Quoted 6 lines
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 <[email protected]>
Applied.