summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/pci.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2003-08-28 21:22:25 +0000
committerjhb <jhb@FreeBSD.org>2003-08-28 21:22:25 +0000
commit51be1787c3f88a0d7f0e7acc9c80f8efe14d4107 (patch)
treea1e7aeb2faa12e05e2679df87b9fa88f7bfd5295 /sys/dev/pci/pci.c
parentfed4d10a43fd7e42c8ab0e04aad88fa09632b414 (diff)
downloadFreeBSD-src-51be1787c3f88a0d7f0e7acc9c80f8efe14d4107.zip
FreeBSD-src-51be1787c3f88a0d7f0e7acc9c80f8efe14d4107.tar.gz
- Rename PCIx_HEADERTYPE* to PCIx_HDRTYPE* so the constants aren't so long.
- Add a new PCIM_HDRTYPE constant for the field in PCIR_HDRTYPE that holds the header type. - Replace several magic numbers with appropriate constants for the header type register and a couple of PCI_FUNCMAX. - Merge to amd64 the fix to the i386 bridge code to skip devices with unknown header types. Requested by: imp (1, 2)
Diffstat (limited to 'sys/dev/pci/pci.c')
-rw-r--r--sys/dev/pci/pci.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index aab9339..bd8c290 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -354,7 +354,7 @@ pci_read_device(device_t pcib, int b, int s, int f, size_t size)
cfg->subclass = REG(PCIR_SUBCLASS, 1);
cfg->progif = REG(PCIR_PROGIF, 1);
cfg->revid = REG(PCIR_REVID, 1);
- cfg->hdrtype = REG(PCIR_HEADERTYPE, 1);
+ cfg->hdrtype = REG(PCIR_HDRTYPE, 1);
cfg->cachelnsz = REG(PCIR_CACHELNSZ, 1);
cfg->lattimer = REG(PCIR_LATTIMER, 1);
cfg->intpin = REG(PCIR_INTPIN, 1);
@@ -834,8 +834,8 @@ pci_add_children(device_t dev, int busno, size_t dinfo_size)
for (s = 0; s <= maxslots; s++) {
pcifunchigh = 0;
f = 0;
- hdrtype = REG(PCIR_HEADERTYPE, 1);
- if ((hdrtype & ~PCIM_MFDEV) > PCI_MAXHDRTYPE)
+ hdrtype = REG(PCIR_HDRTYPE, 1);
+ if ((hdrtype & PCIM_HDRTYPE) > PCI_MAXHDRTYPE)
continue;
if (hdrtype & PCIM_MFDEV)
pcifunchigh = PCI_FUNCMAX;
OpenPOWER on IntegriCloud