From 45cad995cd87697f5771f5ed30296d1b5b5a3a4c Mon Sep 17 00:00:00 2001 From: imp Date: Fri, 1 Aug 2003 21:45:56 +0000 Subject: 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. --- sys/dev/pci/pci.c | 2 +- sys/dev/pci/pcireg.h | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) (limited to 'sys') 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 -- cgit v1.1