On Thursday, 19th September 2002, John Baldwin wrote:

>--- if_dc.c     4 Sep 2002 18:14:17 -0000       1.77
>+++ if_dc.c     19 Sep 2002 20:57:03 -0000
>@@ -1366,7 +1370,8 @@
>                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);
>                }

Sadly this change is insufficient to satisfy all cards.
The PNIC 82c169 does not idle the transmitter (stays in DC_TXSTATE_WAITEND),   
though the receiver goes idle OK.  The Davicom DM9102 does not idle the 
receiver when asked (seems to get stuck in DC_RXSTATE_ENDCHECK) though it 
stops the transmitter OK.  Your card does yet another thing.
I know these things through 3rd party reports, not because I have any
hardware to test.
So at this point I think the best idea is to do the checks only on Intel
hardware.  At least I can verify that works on a real card I can see with
my own eyes.
Another valid option is to send me one of every dc(4) supported card,
except genuine Intel and the Macronix 98715AEC.

PS The Intel manual says that one should check bit 8, not the receiver
state bits, to see if the receiver is idle.  That makes the test:

        (isr & DC_ISR_TX_IDLE && isr & DC_ISR_RX_READ)

It doesn't help though since the uncooperative cards don't set that bit
either.  Also, I think DC_ISR_RX_READ should be spelled as DC_ISR_RX_IDLE.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to