Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/fdc/fdc_isa.c
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
rid = 0; | rid = 0; | ||||
for (i = 0; i < FDC_MAXREG; i++) | for (i = 0; i < FDC_MAXREG; i++) | ||||
fdc->resio[i] = NULL; | fdc->resio[i] = NULL; | ||||
nport = isa_get_logicalid(dev) ? 1 : 6; | nport = isa_get_logicalid(dev) ? 1 : 6; | ||||
for (rid = 0; ; rid++) { | for (rid = 0; ; rid++) { | ||||
newrid = rid; | newrid = rid; | ||||
res = bus_alloc_resource(dev, SYS_RES_IOPORT, &newrid, | res = bus_alloc_resource(dev, SYS_RES_IOPORT, &newrid, | ||||
0ul, ~0ul, rid == 0 ? nport : 1, RF_ACTIVE); | 0, ~0, rid == 0 ? nport : 1, RF_ACTIVE); | ||||
if (res == NULL) | if (res == NULL) | ||||
break; | break; | ||||
/* | /* | ||||
* Mask off the upper bits of the register, and sanity | * Mask off the upper bits of the register, and sanity | ||||
* check resource ranges. | * check resource ranges. | ||||
*/ | */ | ||||
i = rman_get_start(res) & 0x7; | i = rman_get_start(res) & 0x7; | ||||
if (i + rman_get_size(res) - 1 > FDC_MAXREG) { | if (i + rman_get_size(res) - 1 > FDC_MAXREG) { | ||||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |