aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Lemon <jlemon@FreeBSD.org>2001-07-19 15:48:00 +0000
committerJonathan Lemon <jlemon@FreeBSD.org>2001-07-19 15:48:00 +0000
commit74396a0a26d156f552c07418ac629a51046a8bf7 (patch)
tree8ca879abe3292fbe3c6e7ce5db8059c38b14a595
parent4834ec4db99a4e48d4c085fcc116f20322219e48 (diff)
Notes
-rw-r--r--sys/dev/fxp/if_fxp.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c
index f89ee7b08907..2f2a8a485a98 100644
--- a/sys/dev/fxp/if_fxp.c
+++ b/sys/dev/fxp/if_fxp.c
@@ -482,10 +482,12 @@ fxp_attach(device_t dev)
*/
if (sc->chip != FXP_CHIP_82557) {
/*
- * If there is a valid cacheline size (8 or 16 dwords),
- * then turn on MWI.
+ * If MWI is enabled in the PCI configuration, and there
+ * is a valid cacheline size (8 or 16 dwords), then tell
+ * the board to turn on MWI.
*/
- if (pci_read_config(dev, PCIR_CACHELNSZ, 1) != 0)
+ if (val & PCIM_CMD_MWRICEN &&
+ pci_read_config(dev, PCIR_CACHELNSZ, 1) != 0)
sc->flags |= FXP_FLAG_MWI_ENABLE;
/* turn on the extended TxCB feature */
@@ -1235,10 +1237,9 @@ fxp_tick(void *xsc)
sp->rx_rnr_errors = 0;
sp->rx_overrun_errors = 0;
}
-
if (sc->miibus != NULL)
mii_tick(device_get_softc(sc->miibus));
-
+ splx(s);
/*
* Schedule another timeout one second from now.
*/