From: Stephen Hemminger Date: Thu, 8 Jan 2009 19:17:13 +0000 (-0800) Subject: pcnet32: round off carrier watch timer X-Git-Tag: v2.6.29-rc1~45^2~4 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=283a21d3e16e9709012cc8b0839ec474d8888a5d;p=linux-2.6-omap-h63xx.git 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. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller --- diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c index c1bef953bf0..665a4286da3 100644 --- a/drivers/net/pcnet32.c +++ b/drivers/net/pcnet32.c @@ -2282,7 +2282,7 @@ static int pcnet32_open(struct net_device *dev) 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_device *dev) 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)