Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/mvs/mvs_pci.c
| Show First 20 Lines • Show All 416 Lines • ▼ Show 20 Lines | case SYS_RES_IRQ: | ||||
| if (*rid == ATA_IRQ_RID) | if (*rid == ATA_IRQ_RID) | ||||
| res = ctlr->irq.r_irq; | res = ctlr->irq.r_irq; | ||||
| break; | break; | ||||
| } | } | ||||
| return (res); | return (res); | ||||
| } | } | ||||
| static int | static int | ||||
| mvs_release_resource(device_t dev, device_t child, int type, int rid, | mvs_release_resource(device_t dev, device_t child, struct resource *r) | ||||
| struct resource *r) | |||||
| { | { | ||||
| switch (type) { | switch (rman_get_type(r)) { | ||||
| case SYS_RES_MEMORY: | case SYS_RES_MEMORY: | ||||
| rman_release_resource(r); | rman_release_resource(r); | ||||
| return (0); | return (0); | ||||
| case SYS_RES_IRQ: | case SYS_RES_IRQ: | ||||
| if (rid != ATA_IRQ_RID) | if (rman_get_rid(r) != ATA_IRQ_RID) | ||||
| return ENOENT; | return ENOENT; | ||||
| return (0); | return (0); | ||||
| } | } | ||||
| return (EINVAL); | return (EINVAL); | ||||
| } | } | ||||
| static int | static int | ||||
| mvs_setup_intr(device_t dev, device_t child, struct resource *irq, | mvs_setup_intr(device_t dev, device_t child, struct resource *irq, | ||||
| ▲ Show 20 Lines • Show All 82 Lines • Show Last 20 Lines | |||||