Commit ea171491 authored by Daniel Ritz's avatar Daniel Ritz Committed by Jeff Garzik

[PATCH] more net driver timer fixes

following patch fixes some bogus additions to jiffies (w/o HZ beeing involved)
- appletalk/cops.c
- appletalk/ltpc.c
- declance.c
- sb1250-mac.c
- sk_mca.c
- via-rhine.c
against 2.5.73-bk
parent c6a56fe4
......@@ -424,7 +424,7 @@ static int cops_open(struct net_device *dev)
init_timer(&cops_timer);
cops_timer.function = cops_poll;
cops_timer.data = (unsigned long)dev;
cops_timer.expires = jiffies + 5;
cops_timer.expires = jiffies + HZ/20;
add_timer(&cops_timer);
}
else
......@@ -700,7 +700,8 @@ static void cops_poll(unsigned long ltdev)
status = inb(ioaddr+TANG_CARD_STATUS);
} while((++boguscount < 20) && (status&(TANG_RX_READY|TANG_TX_READY)));
cops_timer.expires = jiffies+5;
/* poll 20 times per second */
cops_timer.expires = jiffies + HZ/20;
add_timer(&cops_timer);
return;
......
......@@ -926,8 +926,9 @@ static void ltpc_poll(unsigned long l)
if (!dev)
return; /* we've been downed */
/* poll 20 times per second */
idle(dev);
ltpc_timer.expires = jiffies+5;
ltpc_timer.expires = jiffies + HZ/20;
add_timer(&ltpc_timer);
}
......@@ -1217,7 +1218,7 @@ int __init ltpc_probe(struct net_device *dev)
ltpc_timer.function=ltpc_poll;
ltpc_timer.data = (unsigned long) dev;
ltpc_timer.expires = jiffies + 5;
ltpc_timer.expires = jiffies + HZ/20;
add_timer(&ltpc_timer);
}
......
......@@ -992,7 +992,7 @@ static void lance_set_multicast(struct net_device *dev)
return;
if (lp->tx_old != lp->tx_new) {
mod_timer(&lp->multicast_timer, jiffies + 4);
mod_timer(&lp->multicast_timer, jiffies + 4 * HZ/100);
netif_wake_queue(dev);
return;
}
......
......@@ -2493,7 +2493,7 @@ static int sbmac_open(struct net_device *dev)
/* Set the timer to check for link beat. */
init_timer(&sc->sbm_timer);
sc->sbm_timer.expires = jiffies + 2;
sc->sbm_timer.expires = jiffies + 2 * HZ/100;
sc->sbm_timer.data = (unsigned long)dev;
sc->sbm_timer.function = &sbmac_timer;
add_timer(&sc->sbm_timer);
......
......@@ -537,7 +537,7 @@ static int __init ProbeIRQ(struct SKMCA_NETDEV *dev)
ResetBoard(dev);
InitBoard(dev);
njiffies = jiffies + 100;
njiffies = jiffies + HZ;
do {
csr0val = GetLANCE(dev, LANCE_CSR0);
}
......
......@@ -1152,7 +1152,7 @@ static int via_rhine_open(struct net_device *dev)
/* Set the timer to check for link beat. */
init_timer(&np->timer);
np->timer.expires = jiffies + 2;
np->timer.expires = jiffies + 2 * HZ/100;
np->timer.data = (unsigned long)dev;
np->timer.function = &via_rhine_timer; /* timer handler */
add_timer(&np->timer);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment