Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Mar 2001 00:29:32 +1000
From:      Stephen McKay <mckay@thehub.com.au>
To:        stable@freebsd.org
Cc:        mckay@thehub.com.au
Subject:   Re: Problem with 4.2-STABLE and dc0 
Message-ID:  <200103181429.f2IETWu05880@dungeon.home>
In-Reply-To: <5.0.2.1.0.20010312122304.02ad89a8@pop.schulte.org> from Christopher Schulte at "Mon, 12 Mar 2001 18:31:07 %2B0000"
References:  <16DC0F334516F5478EC60CADEDB6A68410D9C6@moe.wojo.net> <5.0.2.1.0.20010312122304.02ad89a8@pop.schulte.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




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