aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2022-06-23 17:49:09 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2022-07-13 16:52:58 +0000
commitece27cdfb33cc5dc2420653d7f86bff4f5aa344a (patch)
tree15bfe9124aa18e1dda9a57887be82a4182997a07
parent22220027e26469e1d93ddc400ed519156e633b19 (diff)
downloadsrc-ece27cdfb33cc5dc2420653d7f86bff4f5aa344a.tar.gz
src-ece27cdfb33cc5dc2420653d7f86bff4f5aa344a.zip
mptable_hostb: Use legacy_get_pcibus() to fetch PCI bus number.
The mptable_hostb driver is a child of legacy0 and has legacy bus ivars, not PCI or PCI bridge ivars. PR: 264819 Reported by: Dennis Clarke <dclarke@blastwave.org> Diagnosed by: avg Reviewed by: avg Differential Revision: https://reviews.freebsd.org/D35548 (cherry picked from commit b076d8d54c2fd91a35aad6931d0bfa2aa0122036)
-rw-r--r--sys/x86/x86/mptable.c2
-rw-r--r--sys/x86/x86/mptable_pci.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/x86/x86/mptable.c b/sys/x86/x86/mptable.c
index 81e9157c3ba6..d6e5cbc27235 100644
--- a/sys/x86/x86/mptable.c
+++ b/sys/x86/x86/mptable.c
@@ -1252,7 +1252,7 @@ mptable_pci_host_res_init(device_t pcib)
struct host_res_args args;
KASSERT(pci0 != -1, ("do not know how to map PCI bus IDs"));
- args.bus = pci_get_bus(pcib) + pci0;
+ args.bus = legacy_get_pcibus(pcib) + pci0;
args.dev = pcib;
args.sc = device_get_softc(pcib);
if (pcib_host_res_init(pcib, &args.sc->sc_host_res) != 0)
diff --git a/sys/x86/x86/mptable_pci.c b/sys/x86/x86/mptable_pci.c
index bb5ec4fac66f..97001ed17bcb 100644
--- a/sys/x86/x86/mptable_pci.c
+++ b/sys/x86/x86/mptable_pci.c
@@ -57,7 +57,7 @@ mptable_hostb_probe(device_t dev)
if (pci_cfgregopen() == 0)
return (ENXIO);
- if (mptable_pci_probe_table(pcib_get_bus(dev)) != 0)
+ if (mptable_pci_probe_table(legacy_get_pcibus(dev)) != 0)
return (ENXIO);
device_set_desc(dev, "MPTable Host-PCI bridge");
return (0);