Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Sep 2002 00:48:55 +1000
From:      Stephen McKay <smckay@internode.on.net>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        current@FreeBSD.org, Stephen McKay <smckay@internode.on.net>
Subject:   Re: dc(4) patch 
Message-ID:  <200209201448.g8KEmt330410@dungeon.home>
In-Reply-To: <XFMail.20020919165904.jhb@FreeBSD.org> from John Baldwin at "Thu, 19 Sep 2002 16:59:04 -0400"
References:  <XFMail.20020919165904.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.
   
Stephen.

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 majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209201448.g8KEmt330410>