summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/pci.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2003-08-01 21:45:56 +0000
committerimp <imp@FreeBSD.org>2003-08-01 21:45:56 +0000
commit45cad995cd87697f5771f5ed30296d1b5b5a3a4c (patch)
tree014d79233fb42c9a2b0a194e7f32821fca02b739 /sys/dev/pci/pci.c
parent4fa745c89521708fccdc5175f1fe0965eefa3e8f (diff)
downloadFreeBSD-src-45cad995cd87697f5771f5ed30296d1b5b5a3a4c.zip
FreeBSD-src-45cad995cd87697f5771f5ed30296d1b5b5a3a4c.tar.gz
Define PCI_MAXHDRTYPE to be 2. We know about header types 0, 1 and 2.
Update the MI device scanning code to use PCI_MAXHDRTYPE rather than the hard coded 2.
Diffstat (limited to 'sys/dev/pci/pci.c')
-rw-r--r--sys/dev/pci/pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index e8e8245..0c7486e 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -835,7 +835,7 @@ pci_add_children(device_t dev, int busno, size_t dinfo_size)
pcifunchigh = 0;
f = 0;
hdrtype = REG(PCIR_HEADERTYPE, 1);
- if ((hdrtype & ~PCIM_MFDEV) > 2)
+ if ((hdrtype & ~PCIM_MFDEV) > PCI_MAXHDRTYPE)
continue;
if (hdrtype & PCIM_MFDEV)
pcifunchigh = PCI_FUNCMAX;
OpenPOWER on IntegriCloud