From owner-freebsd-current Thu Sep 19 13:59: 7 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 5DD8337B401 for ; Thu, 19 Sep 2002 13:59:06 -0700 (PDT) Received: from mail.speakeasy.net (mail14.speakeasy.net [216.254.0.214]) by mx1.FreeBSD.org (Postfix) with ESMTP id EEFD043E77 for ; Thu, 19 Sep 2002 13:59:05 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 17247 invoked from network); 19 Sep 2002 21:00:13 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail14.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 19 Sep 2002 21:00:13 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.5/8.12.5) with ESMTP id g8JKx2Bv066698; Thu, 19 Sep 2002 16:59:03 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Date: Thu, 19 Sep 2002 16:59:04 -0400 (EDT) From: John Baldwin To: mckay@FreeBSD.org Subject: dc(4) patch Cc: current@FreeBSD.org 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 A while ago I started having problems with a dc(4) cardbus card that I hadn't had before. Lots of failures to force tx and rx to idle state resulting in the card eventually hanging under load and basically being worthless until I ejected it and reinserted it. ifconfig up/down, etc. didn't help. So I bought a new dc(4) cardbus card and it had the same problems. First card: dc0: port 0x1100-0x11ff mem 0x88002000-0x880023ff irq 11 at device 0.0 on cardbus0 (really a LinkSys PCMP100 or some such) Second card: dc0: port 0x1100-0x11ff mem 0x88002000-0x880023ff irq 11 at device 0.0 on cardbus0 (really a SpeedStream SS1012). The patch below fixed the hangs on both cards: --- 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); } The automatic TX underrun recovery stuff didn't make a bit of difference for the SpeedStream card FWIW. Also, unlike one of the PR's which claimed that the SpeedStream SS1020 (PCI adapter rather than cardbus card), the dc(4) driver read the right MAC address just fine w/o the need for any changes. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message