summaryrefslogtreecommitdiffstats
path: root/sys/dev/fxp
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2010-12-02 03:53:29 +0000
committeryongari <yongari@FreeBSD.org>2010-12-02 03:53:29 +0000
commitd5aed127c2a68330ef5204979c0c780a1089318c (patch)
tree4aa2de1234f8cb16945fe771c1445050b14a5044 /sys/dev/fxp
parent5a5e2ec9384288b99d77567e6a6bb887c2752a0e (diff)
downloadFreeBSD-src-d5aed127c2a68330ef5204979c0c780a1089318c.zip
FreeBSD-src-d5aed127c2a68330ef5204979c0c780a1089318c.tar.gz
If RX lockup workaround is enabled, fxp(4) will periodically reset
the controller to workaround silicon bug of i82557. Each reset will re-establish link which in turn triggers MII status change callback. The callback will try to reconfigure controller if the controller is not i82557 to enable flow-control. This caused endless link UP/DOWN when the workaround was enabled on non-i82557 controller. To fix the issue, apply RX lockup workaround only for i82557. Previously it blindly checked undocumented EEPROM location such that it sometimes enabled the workaround for other controllers. At this time, only i82557 is known to have the silicon bug. This fixes a regression introduced in r215906 which enabled flow control support for all controllers except i82557. Reported by: Karl Denninger (karl <> denninger dot net) Tested by: Karl Denninger (karl <> denninger dot net) MFC after: 3 days
Diffstat (limited to 'sys/dev/fxp')
-rw-r--r--sys/dev/fxp/if_fxp.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c
index 6ccac92..fe9c0bd 100644
--- a/sys/dev/fxp/if_fxp.c
+++ b/sys/dev/fxp/if_fxp.c
@@ -526,10 +526,12 @@ fxp_attach(device_t dev)
}
/* 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");
+ }
}
/*
OpenPOWER on IntegriCloud