From d90aafb50d7be161b7cf6cbb6f20d2a9fab60327 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Mon, 14 Mar 2005 19:09:29 +0000 Subject: [PATCH] Only allocate 1 port for non-zero rids. Either we'll get the proper length form the enumeration mechanism, or we're dealing with the FDCTL register, which is only 1 port long. --- sys/dev/fdc/fdc_isa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/fdc/fdc_isa.c b/sys/dev/fdc/fdc_isa.c index b52da52d026..68fee402fb8 100644 --- a/sys/dev/fdc/fdc_isa.c +++ b/sys/dev/fdc/fdc_isa.c @@ -90,7 +90,7 @@ fdc_isa_alloc_resources(device_t dev, struct fdc_data *fdc) for (rid = 0; ; rid++) { newrid = rid; res = bus_alloc_resource(dev, SYS_RES_IOPORT, &newrid, - 0ul, ~0ul, nport, RF_ACTIVE); + 0ul, ~0ul, rid == 0 ? nport : 1, RF_ACTIVE); if (res == NULL) break; /*