summaryrefslogtreecommitdiffstats
path: root/sys/i386/pci
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2003-08-01 21:50:09 +0000
committerimp <imp@FreeBSD.org>2003-08-01 21:50:09 +0000
commitbd7b1417aa74e92e6478b2f8e43c6d495718355c (patch)
treef3de2f46a704641c4737e1ee678ef6acfd496462 /sys/i386/pci
parent45cad995cd87697f5771f5ed30296d1b5b5a3a4c (diff)
downloadFreeBSD-src-bd7b1417aa74e92e6478b2f8e43c6d495718355c.zip
FreeBSD-src-bd7b1417aa74e92e6478b2f8e43c6d495718355c.tar.gz
The MI code was modified to filter the devices based on its header
type. We know about header types 0, 1 and 2. Ignore the rest in the MD i386 code when we're looking for bridges. You cannot look at the vendor tag. And if you don't you certainly can't look at function > 0 if the device isn't there. The new soekris boards' GEODE cpu has issues with the old way. This is reported to have fixed it. MFC After: 2 days
Diffstat (limited to 'sys/i386/pci')
-rw-r--r--sys/i386/pci/pci_bus.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/i386/pci/pci_bus.c b/sys/i386/pci/pci_bus.c
index 3bffef4..832516a 100644
--- a/sys/i386/pci/pci_bus.c
+++ b/sys/i386/pci/pci_bus.c
@@ -323,6 +323,14 @@ legacy_pcib_identify(driver_t *driver, device_t parent)
func = 0;
hdrtype = legacy_pcib_read_config(0, bus, slot, func,
PCIR_HEADERTYPE, 1);
+ /*
+ * When enumerating bus devices, the standard says that
+ * one should check the header type and ignore the slots whose
+ * header types that the software doesn't know about. We use
+ * this to filter out devices.
+ */
+ if ((hdrtype & ~PCIM_MFDEV) > PCI_MAXHDRTYPE)
+ continue;
if ((hdrtype & PCIM_MFDEV) &&
(!found_orion || hdrtype != 0xff))
pcifunchigh = 7;
OpenPOWER on IntegriCloud