From owner-freebsd-current Fri Sep 20 7:49: 2 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1C08137B401; Fri, 20 Sep 2002 07:49:01 -0700 (PDT) Received: from smtp0.adl1.internode.on.net (smtp0.adl1.internode.on.net [203.16.214.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id AB01343E6A; Fri, 20 Sep 2002 07:48:59 -0700 (PDT) (envelope-from smckay@internode.on.net) Received: from dungeon.home (ppp1471.qld.padsl.internode.on.net [150.101.178.190]) by smtp0.adl1.internode.on.net (8.12.4/8.12.4) with ESMTP id g8KEmup5056166; Sat, 21 Sep 2002 00:18:56 +0930 (CST) Received: from dungeon.home (localhost [127.0.0.1]) by dungeon.home (8.11.6/8.11.6) with ESMTP id g8KEmt330410; Sat, 21 Sep 2002 00:48:55 +1000 (EST) (envelope-from mckay) Message-Id: <200209201448.g8KEmt330410@dungeon.home> To: John Baldwin Cc: current@FreeBSD.org, Stephen McKay Subject: Re: dc(4) patch References: In-Reply-To: from John Baldwin at "Thu, 19 Sep 2002 16:59:04 -0400" Date: Sat, 21 Sep 2002 00:48:55 +1000 From: Stephen McKay Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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