Changeset View
Changeset View
Standalone View
Standalone View
sys/x86/x86/mptable_pci.c
Show First 20 Lines • Show All 133 Lines • ▼ Show 20 Lines | if (type == SYS_RES_IOPORT && start + count - 1 == end) { | ||||
} | } | ||||
} | } | ||||
start = hostb_alloc_start(type, start, end, count); | start = hostb_alloc_start(type, start, end, count); | ||||
return (pcib_host_res_alloc(&sc->sc_host_res, child, type, rid, start, | return (pcib_host_res_alloc(&sc->sc_host_res, child, type, rid, start, | ||||
end, count, flags)); | end, count, flags)); | ||||
} | } | ||||
static int | static int | ||||
mptable_hostb_adjust_resource(device_t dev, device_t child, int type, | mptable_hostb_adjust_resource(device_t dev, device_t child, | ||||
struct resource *r, rman_res_t start, rman_res_t end) | struct resource *r, rman_res_t start, rman_res_t end) | ||||
{ | { | ||||
struct mptable_hostb_softc *sc; | struct mptable_hostb_softc *sc; | ||||
#ifdef PCI_RES_BUS | #ifdef PCI_RES_BUS | ||||
if (type == PCI_RES_BUS) | if (rman_get_type(r) == PCI_RES_BUS) | ||||
return (pci_domain_adjust_bus(0, child, r, start, end)); | return (pci_domain_adjust_bus(0, child, r, start, end)); | ||||
#endif | #endif | ||||
sc = device_get_softc(dev); | sc = device_get_softc(dev); | ||||
return (pcib_host_res_adjust(&sc->sc_host_res, child, type, r, start, | return (pcib_host_res_adjust(&sc->sc_host_res, child, r, start, end)); | ||||
end)); | |||||
} | } | ||||
#endif | #endif | ||||
static device_method_t mptable_hostb_methods[] = { | static device_method_t mptable_hostb_methods[] = { | ||||
/* Device interface */ | /* Device interface */ | ||||
DEVMETHOD(device_probe, mptable_hostb_probe), | DEVMETHOD(device_probe, mptable_hostb_probe), | ||||
DEVMETHOD(device_attach, mptable_hostb_attach), | DEVMETHOD(device_attach, mptable_hostb_attach), | ||||
DEVMETHOD(device_shutdown, bus_generic_shutdown), | DEVMETHOD(device_shutdown, bus_generic_shutdown), | ||||
▲ Show 20 Lines • Show All 74 Lines • Show Last 20 Lines |