Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Stephen Hemminger and committed by
David S. Miller
283a21d3 9fd7a1d9

+2 -2
+2 -2
drivers/net/pcnet32.c
··· 2282 2282 if (lp->chip_version >= PCNET32_79C970A) { 2283 2283 /* Print the link status and start the watchdog */ 2284 2284 pcnet32_check_media(dev, 1); 2285 - mod_timer(&(lp->watchdog_timer), PCNET32_WATCHDOG_TIMEOUT); 2285 + mod_timer(&lp->watchdog_timer, PCNET32_WATCHDOG_TIMEOUT); 2286 2286 } 2287 2287 2288 2288 i = 0; ··· 2917 2917 pcnet32_check_media(dev, 0); 2918 2918 spin_unlock_irqrestore(&lp->lock, flags); 2919 2919 2920 - mod_timer(&(lp->watchdog_timer), PCNET32_WATCHDOG_TIMEOUT); 2920 + mod_timer(&lp->watchdog_timer, round_jiffies(PCNET32_WATCHDOG_TIMEOUT)); 2921 2921 } 2922 2922 2923 2923 static int pcnet32_pm_suspend(struct pci_dev *pdev, pm_message_t state)