summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/pci.c6
-rw-r--r--sys/dev/pci/pcireg.h9
2 files changed, 8 insertions, 7 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;
diff --git a/sys/dev/pci/pcireg.h b/sys/dev/pci/pcireg.h
index 75a276d..e851a8a 100644
--- a/sys/dev/pci/pcireg.h
+++ b/sys/dev/pci/pcireg.h
@@ -80,10 +80,11 @@
#define PCIR_CLASS 0x0b
#define PCIR_CACHELNSZ 0x0c
#define PCIR_LATTIMER 0x0d
-#define PCIR_HEADERTYPE 0x0e
-#define PCIM_HEADERTYPE_NORMAL 0x00
-#define PCIM_HEADERTYPE_BRIDGE 0x01
-#define PCIM_HEADERTYPE_CARDBUS 0x02
+#define PCIR_HDRTYPE 0x0e
+#define PCIM_HDRTYPE 0x7f
+#define PCIM_HDRTYPE_NORMAL 0x00
+#define PCIM_HDRTYPE_BRIDGE 0x01
+#define PCIM_HDRTYPE_CARDBUS 0x02
#define PCIM_MFDEV 0x80
#define PCIR_BIST 0x0f
OpenPOWER on IntegriCloud