Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ncv/ncr53c500_pccard.c
Show First 20 Lines • Show All 136 Lines • ▼ Show 20 Lines | ncv_release_resource(device_t dev) | ||||
mtx_destroy(&sc->sc_sclow.sl_lock); | mtx_destroy(&sc->sc_sclow.sl_lock); | ||||
} | } | ||||
static int | static int | ||||
ncv_alloc_resource(device_t dev) | ncv_alloc_resource(device_t dev) | ||||
{ | { | ||||
struct ncv_softc *sc = device_get_softc(dev); | struct ncv_softc *sc = device_get_softc(dev); | ||||
u_int32_t flags = device_get_flags(dev); | u_int32_t flags = device_get_flags(dev); | ||||
u_long ioaddr, iosize, maddr, msize; | rman_res_t ioaddr, iosize, maddr, msize; | ||||
int error; | int error; | ||||
bus_addr_t offset = 0; | bus_addr_t offset = 0; | ||||
if(flags & KME_KXLC004_01) | if(flags & KME_KXLC004_01) | ||||
offset = OFFSET_KME_KXLC004_01; | offset = OFFSET_KME_KXLC004_01; | ||||
error = bus_get_resource(dev, SYS_RES_IOPORT, 0, &ioaddr, &iosize); | error = bus_get_resource(dev, SYS_RES_IOPORT, 0, &ioaddr, &iosize); | ||||
if (error || (iosize < (offset + NCVIOSZ))) { | if (error || (iosize < (offset + NCVIOSZ))) { | ||||
▲ Show 20 Lines • Show All 184 Lines • Show Last 20 Lines |