summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/pci_pci.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2002-11-25 21:53:14 +0000
committerjhb <jhb@FreeBSD.org>2002-11-25 21:53:14 +0000
commit0216c8a659b4de96652dcc7a6260ed0924b33c4b (patch)
treeb72587037aa4f1ea5d0a4addbc78f6ab7f2abbaa /sys/dev/pci/pci_pci.c
parent42b371136d56c73244441765e7f96f722dab3afd (diff)
downloadFreeBSD-src-0216c8a659b4de96652dcc7a6260ed0924b33c4b.zip
FreeBSD-src-0216c8a659b4de96652dcc7a6260ed0924b33c4b.tar.gz
Fix a couple of bugs in host_pcib_get_busno():
- If a PCI device is not present, then a 32-bit read_config() is going to return 0xffffffff not 0xffff. - For the 82454NX chipset, the MIOC that we read the bus numbers of the various host-PCI bridges from is at function (slot) 0x10 not 0x0. Approved by: re (rwatson)
Diffstat (limited to 'sys/dev/pci/pci_pci.c')
-rw-r--r--sys/dev/pci/pci_pci.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c
index 31d97f8..a0e864a 100644
--- a/sys/dev/pci/pci_pci.c
+++ b/sys/dev/pci/pci_pci.c
@@ -457,7 +457,7 @@ host_pcib_get_busno(pci_read_config_fn read_config, int bus, int slot, int func,
u_int32_t id;
id = read_config(bus, slot, func, PCIR_DEVVENDOR, 4);
- if (id == 0xffff)
+ if (id == 0xffffffff)
return (0);
switch (id) {
@@ -488,19 +488,19 @@ host_pcib_get_busno(pci_read_config_fn read_config, int bus, int slot, int func,
switch (slot) {
case 0x12:
/* Intel 82454NX PXB#0, Bus#A */
- *busnum = read_config(bus, 0, func, 0xd0, 1);
+ *busnum = read_config(bus, 0x10, func, 0xd0, 1);
break;
case 0x13:
/* Intel 82454NX PXB#0, Bus#B */
- *busnum = read_config(bus, 0, func, 0xd1, 1) + 1;
+ *busnum = read_config(bus, 0x10, func, 0xd1, 1) + 1;
break;
case 0x14:
/* Intel 82454NX PXB#1, Bus#A */
- *busnum = read_config(bus, 0, func, 0xd3, 1);
+ *busnum = read_config(bus, 0x10, func, 0xd3, 1);
break;
case 0x15:
/* Intel 82454NX PXB#1, Bus#B */
- *busnum = read_config(bus, 0, func, 0xd4, 1) + 1;
+ *busnum = read_config(bus, 0x10, func, 0xd4, 1) + 1;
break;
}
break;
OpenPOWER on IntegriCloud