summaryrefslogtreecommitdiffstats
path: root/sys/pci/pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/pci/pci.c')
-rw-r--r--sys/pci/pci.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/pci/pci.c b/sys/pci/pci.c
index 2913c5b..054bdaa 100644
--- a/sys/pci/pci.c
+++ b/sys/pci/pci.c
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** $Id: pci.c,v 1.57 1996/10/22 20:20:11 se Exp $
+** $Id: pci.c,v 1.58 1996/11/12 23:10:17 se Exp $
**
** General subroutines for the PCI bus.
** pci_configure ()
@@ -1743,9 +1743,14 @@ pci_remember(int bus, int dev, int func)
p->pc_sel.pc_bus = bus;
p->pc_sel.pc_dev = dev;
p->pc_sel.pc_func = func;
+ p->pc_hdr = (pci_conf_read (tag, PCI_HEADER_MISC) >> 16) & 0xff;
tag = pcibus->pb_tag (bus, dev, func);
p->pc_devid = pci_conf_read(tag, PCI_ID_REG);
- p->pc_subid = pci_conf_read(tag, PCI_SUBID_REG);
+ if ((p->pc_hdr & 0x7f) == 1) {
+ p->pc_subid = pci_conf_read(tag, PCI_SUBID_REG1);
+ } else {
+ p->pc_subid = pci_conf_read(tag, PCI_SUBID_REG0);
+ }
p->pc_class = pci_conf_read(tag, PCI_CLASS_REG);
}
OpenPOWER on IntegriCloud