summaryrefslogtreecommitdiff
path: root/sys/dev/ic/dc.c
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2004-10-29 01:10:44 +0000
committerBrad Smith <brad@cvs.openbsd.org>2004-10-29 01:10:44 +0000
commitb9229d3b4e4582944c8babf32bb7588dd94c97d1 (patch)
treed673b7dfeb13a88482d2b10e987ab553476388ec /sys/dev/ic/dc.c
parent08135d9274a459e8ff5a3ffa240f5175efa7b5bb (diff)
rev 1.78
Enable the automatic TX underrun recovery for the ADMtek chips. This solves cvsup update on my laptop which aborts after a while without this patch. rev 1.79 Fix the support for the AN985/983 chips, which do not set the RXSTATE to STOPPED, but to WAIT. This should fix hangs which could only be solved by replugging the cable. From FreeBSD Thanks to C. Bensend <benny at bennyvision dot com> for testing.
Diffstat (limited to 'sys/dev/ic/dc.c')
-rw-r--r--sys/dev/ic/dc.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/dev/ic/dc.c b/sys/dev/ic/dc.c
index 4f1922d9aea..b4ed082f430 100644
--- a/sys/dev/ic/dc.c
+++ b/sys/dev/ic/dc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dc.c,v 1.72 2004/10/14 15:34:28 brad Exp $ */
+/* $OpenBSD: dc.c,v 1.73 2004/10/29 01:10:43 brad Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -1232,7 +1232,8 @@ dc_setcfg(sc, media)
for (i = 0; i < DC_TIMEOUT; i++) {
isr = CSR_READ_4(sc, DC_ISR);
if (isr & DC_ISR_TX_IDLE &&
- (isr & DC_ISR_RX_STATE) == DC_RXSTATE_STOPPED)
+ ((isr & DC_ISR_RX_STATE) == DC_RXSTATE_STOPPED ||
+ (isr & DC_ISR_RX_STATE) == DC_RXSTATE_WAIT))
break;
DELAY(10);
}
@@ -1766,6 +1767,13 @@ hasmac:
DELAY(10);
}
+ if (DC_IS_ADMTEK(sc)) {
+ /*
+ * Set automatic TX underrun recovery for the ADMtek chips
+ */
+ DC_SETBIT(sc, DC_AL_CR, DC_AL_CR_ATUR);
+ }
+
/*
* Call MI attach routines.
*/