summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>2000-10-17 16:08:53 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>2000-10-17 16:08:53 +0000
commit24e3de5df67557e931b57c91faa1a8f7da923c7f (patch)
treebc7867453cf6d22ceb4dc071b03a393ef916506d /sys/dev
parent29c18391994ae09b253c7e73e4d5227c1cfbddcd (diff)
Undo the incorrect fix for my ASIX 88141. Instead of just relying on tx_cnt,
now we check the TX state in the ISR to make sure we are not transmitting when we run mii_tick(). Based on a suggestion by Bill Paul. The dc driver should now be ready for some heavy pre-2.8 testing.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/dc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/ic/dc.c b/sys/dev/ic/dc.c
index 349951abe0b..f82b972653c 100644
--- a/sys/dev/ic/dc.c
+++ b/sys/dev/ic/dc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dc.c,v 1.15 2000/10/16 17:08:07 aaron Exp $ */
+/* $OpenBSD: dc.c,v 1.16 2000/10/17 16:08:52 aaron Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -1919,7 +1919,8 @@ void dc_tick(xsc)
} else {
r = CSR_READ_4(sc, DC_ISR);
if ((r & DC_ISR_RX_STATE) == DC_RXSTATE_WAIT &&
- sc->dc_cdata.dc_tx_prod == 0)
+ (r & DC_ISR_TX_STATE) == DC_TXSTATE_RESET &&
+ sc->dc_cdata.dc_tx_cnt == 0)
mii_tick(mii);
if (!(mii->mii_media_status & IFM_ACTIVE))
sc->dc_link = 0;