summaryrefslogtreecommitdiffstats
path: root/sys/dev/fxp/if_fxp.c
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2009-06-21 06:27:35 +0000
committeryongari <yongari@FreeBSD.org>2009-06-21 06:27:35 +0000
commitb8c10ee72ca8de1ab11e13f66c671183cf52e46b (patch)
treec9253f963a5a99a21fe210b8c6a9e9fd5426c246 /sys/dev/fxp/if_fxp.c
parent0e5575121cc2631be70948b1ee62e3357f36c014 (diff)
downloadFreeBSD-src-b8c10ee72ca8de1ab11e13f66c671183cf52e46b.zip
FreeBSD-src-b8c10ee72ca8de1ab11e13f66c671183cf52e46b.tar.gz
Don't blindly enable Rx lock-up workaround. Newer chips do not need
the Rx lock-up workaround. Obtained from: NetBSD
Diffstat (limited to 'sys/dev/fxp/if_fxp.c')
-rw-r--r--sys/dev/fxp/if_fxp.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c
index b2ef0ef..5c25553 100644
--- a/sys/dev/fxp/if_fxp.c
+++ b/sys/dev/fxp/if_fxp.c
@@ -500,6 +500,13 @@ fxp_attach(device_t dev)
sc->flags |= FXP_FLAG_WOLCAP;
}
+ /* 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");
+ }
+
/*
* Determine whether we must use the 503 serial interface.
*/
@@ -2021,7 +2028,7 @@ fxp_tick(void *xsc)
if (sp->rx_good) {
ifp->if_ipackets += le32toh(sp->rx_good);
sc->rx_idle_secs = 0;
- } else {
+ } else if (sc->flags & FXP_FLAG_RXBUG) {
/*
* Receiver's been idle for another second.
*/
OpenPOWER on IntegriCloud