Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/hyperv/pcib/vmbus_pcib.c
| Show First 20 Lines • Show All 1,718 Lines • ▼ Show 20 Lines | vmbus_pcib_adjust_resource(device_t dev, device_t child, | ||||
| if (rman_get_type(r) == PCI_RES_BUS) | if (rman_get_type(r) == PCI_RES_BUS) | ||||
| return (pci_domain_adjust_bus(sc->hbus->pci_domain, child, r, | return (pci_domain_adjust_bus(sc->hbus->pci_domain, child, r, | ||||
| start, end)); | start, end)); | ||||
| return (bus_generic_adjust_resource(dev, child, r, start, end)); | return (bus_generic_adjust_resource(dev, child, r, start, end)); | ||||
| } | } | ||||
| static int | static int | ||||
| vmbus_pcib_release_resource(device_t dev, device_t child, int type, int rid, | vmbus_pcib_release_resource(device_t dev, device_t child, struct resource *r) | ||||
| struct resource *r) | |||||
| { | { | ||||
| struct vmbus_pcib_softc *sc = device_get_softc(dev); | struct vmbus_pcib_softc *sc = device_get_softc(dev); | ||||
| if (type == PCI_RES_BUS) | switch (rman_get_type(r)) { | ||||
| return (pci_domain_release_bus(sc->hbus->pci_domain, child, | case PCI_RES_BUS: | ||||
| rid, r)); | return (pci_domain_release_bus(sc->hbus->pci_domain, child, r)); | ||||
| case SYS_RES_IOPORT: | |||||
| if (type == SYS_RES_IOPORT) | |||||
| return (EINVAL); | return (EINVAL); | ||||
| default: | |||||
| return (bus_generic_release_resource(dev, child, type, rid, r)); | return (bus_generic_release_resource(dev, child, r)); | ||||
| } | |||||
| } | } | ||||
| static int | static int | ||||
| vmbus_pcib_activate_resource(device_t dev, device_t child, struct resource *r) | vmbus_pcib_activate_resource(device_t dev, device_t child, struct resource *r) | ||||
| { | { | ||||
| struct vmbus_pcib_softc *sc = device_get_softc(dev); | struct vmbus_pcib_softc *sc = device_get_softc(dev); | ||||
| if (rman_get_type(r) == PCI_RES_BUS) | if (rman_get_type(r) == PCI_RES_BUS) | ||||
| ▲ Show 20 Lines • Show All 289 Lines • Show Last 20 Lines | |||||