From 351267c1866c459f90ef4fa34d10fdbc95e8b058 Mon Sep 17 00:00:00 2001 From: Martin Blapp Date: Fri, 20 Sep 2002 15:18:13 +0000 Subject: [PATCH] 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. Submitted by: jhb Reviewed by: phk MFC after: 2 weeks --- sys/dev/dc/if_dc.c | 3 ++- sys/pci/if_dc.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/dc/if_dc.c b/sys/dev/dc/if_dc.c index e16e2f935240..5c330ff70194 100644 --- a/sys/dev/dc/if_dc.c +++ b/sys/dev/dc/if_dc.c @@ -1366,7 +1366,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); } diff --git a/sys/pci/if_dc.c b/sys/pci/if_dc.c index e16e2f935240..5c330ff70194 100644 --- a/sys/pci/if_dc.c +++ b/sys/pci/if_dc.c @@ -1366,7 +1366,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); }