summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsilby <silby@FreeBSD.org>2002-05-15 17:05:28 +0000
committersilby <silby@FreeBSD.org>2002-05-15 17:05:28 +0000
commit3d150d9681974ebc0dc436ca9b34269f9f87c3fe (patch)
tree052f20d9b1d8b49759259c8adae1c4004b170b7b
parent578642c9319b6b4715148ec2b239499d4b9ffac3 (diff)
downloadFreeBSD-src-3d150d9681974ebc0dc436ca9b34269f9f87c3fe.zip
FreeBSD-src-3d150d9681974ebc0dc436ca9b34269f9f87c3fe.tar.gz
Enhance the use of the watchdog timer in this driver so that it will
allow recovery from transmission lockups which occur in the middle of the descriptor list, rather than just at the beginning. For some unknown reason, Rhine II chips have a tendency to stop transmitting while under heavy load, possibly due to collisions. Whether this behavior is due to a hardware bug or a driver glitch is unknown as of now. In either case, this change allows the driver to gracefully recover from such situations. Special thanks go to The Anarcat <anarcat@anarcat.dyndns.org>, who bugged me into looking at this and to Dominic Marks <dominic_marks@btinternet.com>, who performed a great deal of testing to help characterize this problem. MFC after: 3 days
-rw-r--r--sys/dev/vr/if_vr.c7
-rw-r--r--sys/pci/if_vr.c7
2 files changed, 6 insertions, 8 deletions
diff --git a/sys/dev/vr/if_vr.c b/sys/dev/vr/if_vr.c
index 5c15aae..1f4a07e 100644
--- a/sys/dev/vr/if_vr.c
+++ b/sys/dev/vr/if_vr.c
@@ -1071,8 +1071,8 @@ static void vr_txeof(sc)
ifp = &sc->arpcom.ac_if;
- /* Clear the timeout timer. */
- ifp->if_timer = 0;
+ /* Reset the timeout timer; if_txeoc will clear it. */
+ ifp->if_timer = 5;
/* Sanity check. */
if (sc->vr_cdata.vr_tx_head == NULL)
@@ -1129,11 +1129,10 @@ static void vr_txeoc(sc)
ifp = &sc->arpcom.ac_if;
- ifp->if_timer = 0;
-
if (sc->vr_cdata.vr_tx_head == NULL) {
ifp->if_flags &= ~IFF_OACTIVE;
sc->vr_cdata.vr_tx_tail = NULL;
+ ifp->if_timer = 0;
}
return;
diff --git a/sys/pci/if_vr.c b/sys/pci/if_vr.c
index 5c15aae..1f4a07e 100644
--- a/sys/pci/if_vr.c
+++ b/sys/pci/if_vr.c
@@ -1071,8 +1071,8 @@ static void vr_txeof(sc)
ifp = &sc->arpcom.ac_if;
- /* Clear the timeout timer. */
- ifp->if_timer = 0;
+ /* Reset the timeout timer; if_txeoc will clear it. */
+ ifp->if_timer = 5;
/* Sanity check. */
if (sc->vr_cdata.vr_tx_head == NULL)
@@ -1129,11 +1129,10 @@ static void vr_txeoc(sc)
ifp = &sc->arpcom.ac_if;
- ifp->if_timer = 0;
-
if (sc->vr_cdata.vr_tx_head == NULL) {
ifp->if_flags &= ~IFF_OACTIVE;
sc->vr_cdata.vr_tx_tail = NULL;
+ ifp->if_timer = 0;
}
return;
OpenPOWER on IntegriCloud