aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/natsemi.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c
index 527f9dcc7f69..b881786eebd4 100644
--- a/drivers/net/natsemi.c
+++ b/drivers/net/natsemi.c
@@ -1576,7 +1576,7 @@ static int netdev_open(struct net_device *dev)
1576 1576
1577 /* Set the timer to check for link beat. */ 1577 /* Set the timer to check for link beat. */
1578 init_timer(&np->timer); 1578 init_timer(&np->timer);
1579 np->timer.expires = jiffies + NATSEMI_TIMER_FREQ; 1579 np->timer.expires = round_jiffies(jiffies + NATSEMI_TIMER_FREQ);
1580 np->timer.data = (unsigned long)dev; 1580 np->timer.data = (unsigned long)dev;
1581 np->timer.function = &netdev_timer; /* timer handler */ 1581 np->timer.function = &netdev_timer; /* timer handler */
1582 add_timer(&np->timer); 1582 add_timer(&np->timer);
@@ -1856,7 +1856,11 @@ static void netdev_timer(unsigned long data)
1856 next_tick = 1; 1856 next_tick = 1;
1857 } 1857 }
1858 } 1858 }
1859 mod_timer(&np->timer, jiffies + next_tick); 1859
1860 if (next_tick > 1)
1861 mod_timer(&np->timer, round_jiffies(jiffies + next_tick));
1862 else
1863 mod_timer(&np->timer, jiffies + next_tick);
1860} 1864}
1861 1865
1862static void dump_ring(struct net_device *dev) 1866static void dump_ring(struct net_device *dev)
@@ -3331,7 +3335,7 @@ static int natsemi_resume (struct pci_dev *pdev)
3331 spin_unlock_irq(&np->lock); 3335 spin_unlock_irq(&np->lock);
3332 enable_irq(dev->irq); 3336 enable_irq(dev->irq);
3333 3337
3334 mod_timer(&np->timer, jiffies + 1*HZ); 3338 mod_timer(&np->timer, round_jiffies(jiffies + 1*HZ));
3335 } 3339 }
3336 netif_device_attach(dev); 3340 netif_device_attach(dev);
3337out: 3341out: