Skip to content

Commit

Permalink
pcnet32: round off carrier watch timer
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Jan 8, 2009
1 parent 9fd7a1d commit 283a21d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/pcnet32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 283a21d

Please sign in to comment.