diff options
author | imp <imp@FreeBSD.org> | 2005-03-14 19:09:29 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2005-03-14 19:09:29 +0000 |
commit | 66a628923f4a3caa6e225f6b1bf033ddb7bbdf7d (patch) | |
tree | 3eb447c997b6e0aa9eb68d57b680e1bcb02cc271 | |
parent | c7663fe856836760e707c587ea2bb34782e9db1f (diff) | |
download | FreeBSD-src-66a628923f4a3caa6e225f6b1bf033ddb7bbdf7d.zip FreeBSD-src-66a628923f4a3caa6e225f6b1bf033ddb7bbdf7d.tar.gz |
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.
-rw-r--r-- | sys/dev/fdc/fdc_isa.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; /* |