Date: Wed, 13 Jul 2022 17:53:32 GMT From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: ece27cdfb33c - stable/12 - mptable_hostb: Use legacy_get_pcibus() to fetch PCI bus number. Message-ID: <202207131753.26DHrWZ3046832@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ece27cdfb33cc5dc2420653d7f86bff4f5aa344a commit ece27cdfb33cc5dc2420653d7f86bff4f5aa344a Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2022-06-23 17:49:09 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2022-07-13 16:52:58 +0000 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) --- sys/x86/x86/mptable.c | 2 +- sys/x86/x86/mptable_pci.c | 2 +- 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207131753.26DHrWZ3046832>