From owner-freebsd-stable Sun Mar 18 6:29:20 2001 Delivered-To: freebsd-stable@freebsd.org Received: from ns5.pacific.net.au (ns5.pacific.net.au [203.143.252.30]) by hub.freebsd.org (Postfix) with ESMTP id A825337B719 for ; Sun, 18 Mar 2001 06:29:12 -0800 (PST) (envelope-from mckay@thehub.com.au) Received: from dungeon.home (ppp185.dyn249.pacific.net.au [203.143.249.185]) by ns5.pacific.net.au (8.9.0/8.9.1) with ESMTP id BAA05746 for ; Mon, 19 Mar 2001 01:29:10 +1100 (EST) Received: from dungeon.home (localhost [127.0.0.1]) by dungeon.home (8.11.1/8.11.1) with ESMTP id f2IETWu05880; Mon, 19 Mar 2001 00:29:32 +1000 (EST) (envelope-from mckay) Message-Id: <200103181429.f2IETWu05880@dungeon.home> To: stable@freebsd.org Cc: mckay@thehub.com.au Subject: Re: Problem with 4.2-STABLE and dc0 References: <16DC0F334516F5478EC60CADEDB6A68410D9C6@moe.wojo.net> <5.0.2.1.0.20010312122304.02ad89a8@pop.schulte.org> In-Reply-To: <5.0.2.1.0.20010312122304.02ad89a8@pop.schulte.org> from Christopher Schulte at "Mon, 12 Mar 2001 18:31:07 +0000" Date: Mon, 19 Mar 2001 00:29:32 +1000 From: Stephen McKay Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Monday, 12th March 2001, Christopher Schulte wrote: >Linksys LNE100-TX here also. I've been running 4.3-BETA for about 2 weeks, >with a few make worlds to date. My system exhibits the same behavior, aka >tail of dmesg output right after reboot: > >...normal boot messages... >Mounting root from ufs:/dev/ad0s1a >dc0: failed to force tx and rx to idle state >dc0: failed to force tx and rx to idle state >dc0: failed to force tx and rx to idle state > >The message only appears when the system is rebooted; the box runs just >fine and I don't see any more of that error until it's rebooted. I have >not noticed any network related problems with dc[x] interfaces. This is my fault, sort of. The long explanation follows: A real Intel 21143 requires both the transmitter and the receiver to be idle when changing certain things (selecting full or half duplex, for example). In dc_setcfg() the driver disables both the transmitter and the receiver so it can set a few flags, but, in earlier versions, only checked to see if *either* of them actually went idle. I fixed that bug, and most of the clone chips seem to implement this stuff properly. But the PNIC doesn't do this right. Or perhaps we are giving it grief some other way and it's bellyaching at an unfortunate time. It's hard to tell because the PNIC docs are a bit thin, and I don't have a PNIC to play with. Regardless, the old code works on the PNIC. Maybe the PNIC doesn't need to idle the transmitter to change these modes. Clone makers don't have to implement all the limitations of the original, after all. Now, if any of you are still reading :-) perhaps you'd like to try this patch. This should stop the "failed to force tx and rx to idle" message but will introduce a debugging message that would be helpful for me to see. I'd like anyone who is testing for the 4.3 release, who uses any of the cards supported by the dc driver, and who has a bit of spare time, to try this patch, and send me the results. When you get bored with the diag output, just delete the obvious printf. Stephen. --- if_dc.c.orig Tue Mar 6 22:41:17 2001 +++ if_dc.c Sun Mar 18 20:16:30 2001 @@ -1204,11 +1204,12 @@ for (i = 0; i < DC_TIMEOUT; i++) { isr = CSR_READ_4(sc, DC_ISR); - if (isr & DC_ISR_TX_IDLE && + if ((isr & DC_ISR_TX_IDLE || DC_IS_PNIC(sc)) && (isr & DC_ISR_RX_STATE) == DC_RXSTATE_STOPPED) break; DELAY(10); } + printf("dc%d: i=%d isr=0x%x\n", sc->dc_unit, i, isr); if (i == DC_TIMEOUT) printf("dc%d: failed to force tx and " To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message