From owner-freebsd-hackers Fri Jul 5 1:12:18 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C502D37B400; Fri, 5 Jul 2002 01:12:13 -0700 (PDT) Received: from mail.imp.ch (mail.imp.ch [157.161.1.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 831EA43E09; Fri, 5 Jul 2002 01:12:12 -0700 (PDT) (envelope-from mb@imp.ch) Received: from nbs.imp.ch (nbs.imp.ch [157.161.4.7]) by mail.imp.ch (8.11.6/8.11.6) with ESMTP id g658C9j33150; Fri, 5 Jul 2002 10:12:10 +0200 (CEST) Received: from levais.imp.ch (levais.imp.ch [157.161.4.66]) by nbs.imp.ch (8.12.3/8.12.3) with ESMTP id g658Br9014659979; Fri, 5 Jul 2002 10:11:53 +0200 (MES) Date: Fri, 5 Jul 2002 10:13:58 +0200 (CEST) From: Martin Blapp To: Cc: , Subject: dc0: failed to force tx and rx to idle state Message-ID: <20020705100135.U41780-100000@levais.imp.ch> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi all, This problem still persists. On my Laptop a ACCTON MiniPCI 100Mbit card does make this output. Then I loose my network connection. Only a ifconfig down/up of the interface helps. This is very annoyoing. Doing a cvsup, it happens about 5 - 10 times. I have to stand by and look if it goes down again :P # pciconf -lv dc0@pci0:17:0: class=0x020000 card=0x22421113 chip=0x12161113 rev=0x11 hdr=0x0$vendor = 'Accton Technology Corporation' device = 'EN5251-Based Fast Ethernet Adapter' class = network subclass = ethernet It's a Acction MiniPCI 2242 card. I'm quoting here Stephen's mail he sent to the lists one year ago ... > 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. --- 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 " I've done this. All I get is this debug output: dc0: i=1000 isr=0xfc07c016 dc0: failed to force tx and rx to idle state As you see the message still persits. Maybe Stephen is correct when he tells: > 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. Martin Martin Blapp, ------------------------------------------------------------------ ImproWare AG, UNIXSP & ISP, Zurlindenstrasse 29, 4133 Pratteln, CH Phone: +41 061 826 93 00: +41 61 826 93 01 PGP: PGP Fingerprint: B434 53FC C87C FE7B 0A18 B84C 8686 EF22 D300 551E ------------------------------------------------------------------ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message