Date: Wed, 1 Dec 2010 16:44:47 -0800 From: Pyun YongHyeon <pyunyh@gmail.com> To: Karl Denninger <karl@denninger.net> Cc: freebsd-stable@freebsd.org Subject: Re: Uh, fxp driver broken in current -STABLE build?! Message-ID: <20101202004447.GD8893@michelle.cdnetworks.com> In-Reply-To: <4CF6E41F.8060101@denninger.net> References: <4CF6E41F.8060101@denninger.net>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On Wed, Dec 01, 2010 at 06:11:11PM -0600, Karl Denninger wrote:
> Works in this kernel, checked out on that day:
>
> FreeBSD 8.1-STABLE #10: Mon Aug 30 06:44:40 CDT 2010
> karl@FS.denninger.net:/usr/obj/usr/src/sys/KSD-SMP
>
> fxp0: <Intel 82558 Pro/100 Ethernet> port 0x1000-0x101f mem
> 0x94000000-0x94000fff,0x94100000-0x941fffff irq 21 at device 0.0 on pci6
> fxp0: Enabling Rx lock-up workaround
> miibus0: <MII bus> on fxp0
> fxp0: Ethernet address: 00:a0:c9:a4:78:c3
> fxp0: [ITHREAD]
>
> (and has been running for months, and for a very long time before that)
>
> Tried to update to today's check-out and got hosed.
>
> The driver now keeps resetting and sending out "down" and "up" messages
> repeatedly, and no traffic flows....
>
> This is the ident I have on the current build:
>
> fxp0: <Intel 82558 Pro/100 Ethernet> port 0x1000-0x101f mem
> 0x94000000-0x94000fff,0x94100000-0x941fffff irq 21 at device 0.0 on pci6
> fxp0: Enabling Rx lock-up workaround
> miibus0: <MII bus> on fxp0
> fxp0: Ethernet address: 00:a0:c9:a4:78:c3
> fxp0: [ITHREAD]
>
> Looks the same.....
>
> Something was touched though on Nov 30 in the CVS tree.
>
> It looks like there was a fairly serious commit posted on 10-15, and
> some other smaller ones related to VLANs and flow control (which don't
> apply to this configuration.)
>
> I can't find anything else related...... anyone know what's up here?
>
> Probably need to find this as we're going into the 8.2 RELEASE cycle.....
>
> DMESG from the failed kernel boot is attached.
>
Thanks for reporting. Try attached patch. It seems there is a bug
in RX lockup detection logic. Your controller is known to RX
lockup free so the workaround should not be enabled. Otherwise
fxp(4) reinitializes the controller every 15 seconds.
[-- Attachment #2 --]
Index: sys/dev/fxp/if_fxp.c
===================================================================
--- sys/dev/fxp/if_fxp.c (revision 216097)
+++ sys/dev/fxp/if_fxp.c (working copy)
@@ -526,10 +526,12 @@
}
/* Receiver lock-up workaround detection. */
- fxp_read_eeprom(sc, &data, 3, 1);
- if ((data & 0x03) != 0x03) {
- sc->flags |= FXP_FLAG_RXBUG;
- device_printf(dev, "Enabling Rx lock-up workaround\n");
+ if (sc->revision < FXP_REV_82558_A4) {
+ fxp_read_eeprom(sc, &data, 3, 1);
+ if ((data & 0x03) != 0x03) {
+ sc->flags |= FXP_FLAG_RXBUG;
+ device_printf(dev, "Enabling Rx lock-up workaround\n");
+ }
}
/*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101202004447.GD8893>
