From 66a628923f4a3caa6e225f6b1bf033ddb7bbdf7d Mon Sep 17 00:00:00 2001 From: imp Date: Mon, 14 Mar 2005 19:09:29 +0000 Subject: 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(-) (limited to 'sys/dev/fdc/fdc_isa.c') diff --git a/sys/dev/fdc/fdc_isa.c b/sys/dev/fdc/fdc_isa.c index b52da52..68fee40 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; /* -- cgit v1.1