Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/pccbb/pccbb_pci.c
Show First 20 Lines • Show All 777 Lines • ▼ Show 20 Lines | #undef DELTA | ||||
retval = FILTER_HANDLED; | retval = FILTER_HANDLED; | ||||
} | } | ||||
return retval; | return retval; | ||||
} | } | ||||
#if defined(NEW_PCIB) && defined(PCI_RES_BUS) | #if defined(NEW_PCIB) && defined(PCI_RES_BUS) | ||||
static struct resource * | static struct resource * | ||||
cbb_pci_alloc_resource(device_t bus, device_t child, int type, int *rid, | cbb_pci_alloc_resource(device_t bus, device_t child, int type, int *rid, | ||||
u_long start, u_long end, u_long count, u_int flags) | rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) | ||||
{ | { | ||||
struct cbb_softc *sc; | struct cbb_softc *sc; | ||||
sc = device_get_softc(bus); | sc = device_get_softc(bus); | ||||
if (type == PCI_RES_BUS) | if (type == PCI_RES_BUS) | ||||
return (pcib_alloc_subbus(&sc->bus, child, rid, start, end, | return (pcib_alloc_subbus(&sc->bus, child, rid, start, end, | ||||
count, flags)); | count, flags)); | ||||
return (cbb_alloc_resource(bus, child, type, rid, start, end, count, | return (cbb_alloc_resource(bus, child, type, rid, start, end, count, | ||||
flags)); | flags)); | ||||
} | } | ||||
static int | static int | ||||
cbb_pci_adjust_resource(device_t bus, device_t child, int type, | cbb_pci_adjust_resource(device_t bus, device_t child, int type, | ||||
struct resource *r, u_long start, u_long end) | struct resource *r, rman_res_t start, rman_res_t end) | ||||
{ | { | ||||
struct cbb_softc *sc; | struct cbb_softc *sc; | ||||
sc = device_get_softc(bus); | sc = device_get_softc(bus); | ||||
if (type == PCI_RES_BUS) { | if (type == PCI_RES_BUS) { | ||||
if (!rman_is_region_manager(r, &sc->bus.rman)) | if (!rman_is_region_manager(r, &sc->bus.rman)) | ||||
return (EINVAL); | return (EINVAL); | ||||
return (rman_adjust_resource(r, start, end)); | return (rman_adjust_resource(r, start, end)); | ||||
▲ Show 20 Lines • Show All 160 Lines • Show Last 20 Lines |