summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci
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
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')
-rw-r--r--sys/dev/pci/pci.c2
-rw-r--r--sys/dev/pci/pcireg.h10
2 files changed, 2 insertions, 10 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;
diff --git a/sys/dev/pci/pcireg.h b/sys/dev/pci/pcireg.h
index 049f391..6e5e1d9 100644
--- a/sys/dev/pci/pcireg.h
+++ b/sys/dev/pci/pcireg.h
@@ -43,6 +43,7 @@
#define PCI_SLOTMAX 31
#define PCI_FUNCMAX 7
#define PCI_REGMAX 255
+#define PCI_MAXHDRTYPE 2
/* PCI config header registers for all devices */
@@ -311,12 +312,3 @@
#define PCIXM_STATUS_MAXSPLITS 0x0380 /* Maximum Split Transactions */
#define PCIXM_STATUS_MAXCRDS 0x1C00 /* Maximum Cumulative Read Size */
#define PCIXM_STATUS_RCVDSCEM 0x2000 /* Received a Split Comp w/Error msg */
-
-#if 0
-/* some PCI vendor definitions (only used to identify ancient devices !!! */
-
-#define PCIV_INTEL 0x8086
-
-#define PCID_INTEL_SATURN 0x0483
-#define PCID_INTEL_ORION 0x84c4
-#endif
OpenPOWER on IntegriCloud