Commit b076d8d5 authored by John Baldwin's avatar John Baldwin
Browse files

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
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D35548
parent d1aefbc0
......@@ -1250,7 +1250,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)
......
......@@ -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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment