aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPyun YongHyeon <yongari@FreeBSD.org>2009-06-21 06:27:35 +0000
committerPyun YongHyeon <yongari@FreeBSD.org>2009-06-21 06:27:35 +0000
commit43d8b117e414bad53bff18abfa6af9bb42a15823 (patch)
treec9253f963a5a99a21fe210b8c6a9e9fd5426c246
parenta996f02399dfc7a8ef27951686a9aaa3c4cd6dbd (diff)
Notes
-rw-r--r--sys/dev/fxp/if_fxp.c9
-rw-r--r--sys/dev/fxp/if_fxpvar.h1
2 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c
index b2ef0efb6c74..5c25553bf574 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.
*/
diff --git a/sys/dev/fxp/if_fxpvar.h b/sys/dev/fxp/if_fxpvar.h
index 77797f31a16a..9bef2424e0e4 100644
--- a/sys/dev/fxp/if_fxpvar.h
+++ b/sys/dev/fxp/if_fxpvar.h
@@ -204,6 +204,7 @@ struct fxp_softc {
#define FXP_FLAG_82559_RXCSUM 0x1000 /* 82559 compatible RX checksum */
#define FXP_FLAG_WOLCAP 0x2000 /* WOL capability */
#define FXP_FLAG_WOL 0x4000 /* WOL active */
+#define FXP_FLAG_RXBUG 0x8000 /* Rx lock-up bug */
/* Macros to ease CSR access. */
#define CSR_READ_1(sc, reg) bus_read_1(sc->fxp_res[0], reg)