[PATCH] Davicom net driver jiffies cleanup

Andreas Dilger (adilger@turbolabs.com)
Sat, 3 Nov 2001 16:34:30 -0700


A patch for jiffies cleanup of the Davicom fast ethernet driver (dmfe).
The maintainer (Tobias Ringstrom <tori@unhappy.mine.nu>) 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/

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/