summaryrefslogtreecommitdiffstats
path: root/sys/dev/si/si_pci.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2007-12-01 20:39:47 +0000
committerpeter <peter@FreeBSD.org>2007-12-01 20:39:47 +0000
commita032664fc9c37f7b29a9713d084d2e3510510531 (patch)
treeadf8d0900d3b836fa0f3a0eb712650e9facec721 /sys/dev/si/si_pci.c
parent993b36f0abf3d3e1ea23c20cead94b1fa5e8e2c8 (diff)
downloadFreeBSD-src-a032664fc9c37f7b29a9713d084d2e3510510531.zip
FreeBSD-src-a032664fc9c37f7b29a9713d084d2e3510510531.tar.gz
Based in info gleaned from the web and other drivers (including the Linux
sx driver), change a magic value in the PLX bridge chip. Apparently later builds of the PCI cards had corrected values in the configuration eeprom. This change supposedly fixes some pci bus problems.
Diffstat (limited to 'sys/dev/si/si_pci.c')
-rw-r--r--sys/dev/si/si_pci.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/sys/dev/si/si_pci.c b/sys/dev/si/si_pci.c
index 7aa390f..81c74e1 100644
--- a/sys/dev/si/si_pci.c
+++ b/sys/dev/si/si_pci.c
@@ -105,6 +105,29 @@ si_pci_attach(device_t dev)
goto fail;
}
+ if (pci_get_devid(dev) == 0x200011cb) {
+ int rid;
+ struct resource *plx_res;
+ uint32_t *addr;
+ uint32_t oldvalue;
+
+ /* Perform a PLX control register fixup */
+ rid = PCIR_BAR(0);
+ plx_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid,
+ RF_ACTIVE);
+ if (plx_res == NULL) {
+ device_printf(dev, "couldn't map plx registers\n");
+ } else {
+ addr = rman_get_virtual(plx_res);
+ oldvalue = addr[0x50 / 4];
+ if (oldvalue != 0x18260000) {
+ device_printf(dev, "PLX register 0x50: 0x%08x changed to 0x%08x\n", oldvalue, 0x18260000);
+ addr[0x50 / 4] = 0x18260000;
+ }
+ bus_release_resource(dev, SYS_RES_MEMORY, rid, plx_res);
+ }
+ }
+
error = siattach(dev);
if (error)
goto fail;
OpenPOWER on IntegriCloud