A patch for jiffies cleanup of the Davicom fast ethernet driver (dmfe).
The maintainer (Tobias Ringstrom <[email protected]>) is CC'd, but
it is obviously correct.
Cheers, Andreas
===========================================================================
--- linux/drivers/net/dmfe.c.orig Thu Oct 25 02:08:43 2001
+++ linux/drivers/net/dmfe.c Fri Nov 2 21:52:45 2001
@@ -1109,11 +1109,11 @@
/* TX polling kick monitor */
if ( db->tx_packet_cnt &&
- ((jiffies - dev->trans_start) > DMFE_TX_KICK) ) {
+ time_after(jiffies, dev->trans_start + DMFE_TX_KICK) ) {
outl(0x1, dev->base_addr + DCR1); /* Tx polling again */
/* TX Timeout */
- if ( (jiffies - dev->trans_start) > DMFE_TX_TIMEOUT ) {
+ if ( time_after(jiffies, dev->trans_start + DMFE_TX_TIMEOUT) ) {
db->reset_TXtimeout++;
db->wait_reset = 1;
printk(KERN_WARNING "%s: Tx timeout - resetting\n",
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/