Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/aic/aic_isa.c
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
struct aic_isa_softc *sc = device_get_softc(dev); | struct aic_isa_softc *sc = device_get_softc(dev); | ||||
int rid; | int rid; | ||||
sc->sc_port = sc->sc_irq = sc->sc_drq = NULL; | sc->sc_port = sc->sc_irq = sc->sc_drq = NULL; | ||||
rid = 0; | rid = 0; | ||||
sc->sc_port = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, | sc->sc_port = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, | ||||
0ul, ~0ul, AIC_ISA_PORTSIZE, RF_ACTIVE); | 0, ~0, AIC_ISA_PORTSIZE, RF_ACTIVE); | ||||
if (!sc->sc_port) { | if (!sc->sc_port) { | ||||
device_printf(dev, "I/O port allocation failed\n"); | device_printf(dev, "I/O port allocation failed\n"); | ||||
return (ENOMEM); | return (ENOMEM); | ||||
} | } | ||||
if (isa_get_irq(dev) != -1) { | if (isa_get_irq(dev) != -1) { | ||||
rid = 0; | rid = 0; | ||||
sc->sc_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, | sc->sc_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, | ||||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |