Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Jul 2002 11:26:44 +0300 (EEST)
From:      Taavi Talvik <taavi@uninet.ee>
To:        Martin Blapp <mb@imp.ch>
Cc:        hackers@freebsd.org, <mckay@thehub.com.au>, <wpaul@freebsd.org>
Subject:   Re: dc0: failed to force tx and rx to idle state
Message-ID:  <20020705112412.G47253-100000@valu.uninet.ee>
In-Reply-To: <20020705100135.U41780-100000@levais.imp.ch>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 5 Jul 2002, Martin Blapp wrote:

For me without "options PCI_ENABLE_IO_MODES" same card just
refused to work. Exactly same error message.

best regards,
taavi

>
> 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 <mckay@thehub.com.au> 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, <mb@imp.ch> <mbr@FreeBSD.org>
> ------------------------------------------------------------------
> ImproWare AG, UNIXSP & ISP, Zurlindenstrasse 29, 4133 Pratteln, CH
> Phone: +41 061 826 93 00: +41 61 826 93 01
> PGP: <finger -l mbr@freebsd.org>
> 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
>

-----------------------------------------------------------
Taavi Talvik                    | Internet: taavi@uninet.ee
AS Uninet                       | phone: +372 6800013
Parnu mnt. 105                  | fax: +372 6800001
Tallinn 11312, Estonia          | gsm: +372 56569996


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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