mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@turbolabs.com>
To: torvalds@transmeta.com, Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Tobias Ringstrom <tori@unhappy.mine.nu>, linux-kernel@vger.kernel.org
Subject: [PATCH] Davicom net driver jiffies cleanup
Date: Sat, 3 Nov 2001 16:34:30 -0700	[thread overview]
Message-ID: <20011103163430.B12523@lynx.no> (raw)

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/


                 reply	other threads:[~2001-11-05 16:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011103163430.B12523@lynx.no \
    --to=adilger@turbolabs.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tori@unhappy.mine.nu \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®