summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2013-03-01 20:51:53 +0000
committermarius <marius@FreeBSD.org>2013-03-01 20:51:53 +0000
commit749e286432e014be6c8ae18a5494fb60b465b88f (patch)
tree533590003d4f4f85fd580eebdad129e39e1f35b2
parent0c5e0b209e594a9f0dd463bef0be7c42d11b6ef6 (diff)
downloadFreeBSD-src-749e286432e014be6c8ae18a5494fb60b465b88f.zip
FreeBSD-src-749e286432e014be6c8ae18a5494fb60b465b88f.tar.gz
- Move reporting of failures to disable RX/TX MAC under bootverbose as at
least the Saturn chips of 501-6738 cards may fail to do so the first time, which isn't fatal though. Reported by: Paul Keusemann - Explain why we don't enable infinite bursts on sparc64. - Given that these chips support memory write invalidate, make sure that it's enabled in the command register. Also make sure that PERR# and SERR# assertion is enabled. MFC after: 1 week
-rw-r--r--sys/dev/cas/if_cas.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/sys/dev/cas/if_cas.c b/sys/dev/cas/if_cas.c
index f98d4f0..eec8fa4 100644
--- a/sys/dev/cas/if_cas.c
+++ b/sys/dev/cas/if_cas.c
@@ -824,7 +824,8 @@ cas_disable_rx(struct cas_softc *sc)
BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE);
if (cas_bitwait(sc, CAS_MAC_RX_CONF, CAS_MAC_RX_CONF_EN, 0))
return (1);
- device_printf(sc->sc_dev, "cannot disable RX MAC\n");
+ if (bootverbose)
+ device_printf(sc->sc_dev, "cannot disable RX MAC\n");
return (0);
}
@@ -838,7 +839,8 @@ cas_disable_tx(struct cas_softc *sc)
BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE);
if (cas_bitwait(sc, CAS_MAC_TX_CONF, CAS_MAC_TX_CONF_EN, 0))
return (1);
- device_printf(sc->sc_dev, "cannot disable TX MAC\n");
+ if (bootverbose)
+ device_printf(sc->sc_dev, "cannot disable TX MAC\n");
return (0);
}
@@ -1041,7 +1043,8 @@ cas_init_locked(struct cas_softc *sc)
/*
* Enable infinite bursts for revisions without PCI issues if
* applicable. Doing so greatly improves the TX performance on
- * !__sparc64__.
+ * !__sparc64__ (on sparc64, setting CAS_INF_BURST improves TX
+ * performance only marginally but hurts RX throughput quite a bit).
*/
CAS_WRITE_4(sc, CAS_INF_BURST,
#if !defined(__sparc64__)
@@ -2691,7 +2694,10 @@ cas_pci_attach(device_t dev)
return (ENXIO);
}
- pci_enable_busmaster(dev);
+ /* PCI configuration */
+ pci_write_config(dev, PCIR_COMMAND,
+ pci_read_config(dev, PCIR_COMMAND, 2) | PCIM_CMD_BUSMASTEREN |
+ PCIM_CMD_MWRICEN | PCIM_CMD_PERRESPEN | PCIM_CMD_SERRESPEN, 2);
sc->sc_dev = dev;
if (sc->sc_variant == CAS_CAS && pci_get_devid(dev) < 0x02)
OpenPOWER on IntegriCloud