Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/pci/pci_pci.c
| Show First 20 Lines • Show All 2,434 Lines • ▼ Show 20 Lines | if (start < w->base || end > w->limit) { | ||||
| pcib_write_windows(sc, w->mask); | pcib_write_windows(sc, w->mask); | ||||
| } | } | ||||
| } | } | ||||
| return (rman_adjust_resource(r, start, end)); | return (rman_adjust_resource(r, start, end)); | ||||
| } | } | ||||
| static int | static int | ||||
| pcib_release_resource(device_t dev, device_t child, int type, int rid, | pcib_release_resource(device_t dev, device_t child, struct resource *r) | ||||
| struct resource *r) | |||||
| { | { | ||||
| struct pcib_softc *sc; | struct pcib_softc *sc; | ||||
| int error; | int error; | ||||
| sc = device_get_softc(dev); | sc = device_get_softc(dev); | ||||
| if (pcib_is_resource_managed(sc, r)) { | if (pcib_is_resource_managed(sc, r)) { | ||||
| if (rman_get_flags(r) & RF_ACTIVE) { | if (rman_get_flags(r) & RF_ACTIVE) { | ||||
| error = bus_deactivate_resource(child, type, rid, r); | error = bus_deactivate_resource(child, r); | ||||
| if (error) | if (error) | ||||
| return (error); | return (error); | ||||
| } | } | ||||
| return (rman_release_resource(r)); | return (rman_release_resource(r)); | ||||
| } | } | ||||
| return (bus_generic_release_resource(dev, child, type, rid, r)); | return (bus_generic_release_resource(dev, child, r)); | ||||
| } | } | ||||
| static int | static int | ||||
| pcib_activate_resource(device_t dev, device_t child, struct resource *r) | pcib_activate_resource(device_t dev, device_t child, struct resource *r) | ||||
| { | { | ||||
| struct pcib_softc *sc = device_get_softc(dev); | struct pcib_softc *sc = device_get_softc(dev); | ||||
| struct resource_map map; | struct resource_map map; | ||||
| int error, type; | int error, type; | ||||
| ▲ Show 20 Lines • Show All 693 Lines • Show Last 20 Lines | |||||