diff options
author | Warner Losh <imp@FreeBSD.org> | 2005-03-14 19:09:29 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2005-03-14 19:09:29 +0000 |
commit | d90aafb50d7be161b7cf6cbb6f20d2a9fab60327 (patch) | |
tree | 3eb447c997b6e0aa9eb68d57b680e1bcb02cc271 /sys/dev/fdc | |
parent | 1c80835774419e51ce64baaba731c9c8f8995fa8 (diff) | |
download | src-d90aafb50d7be161b7cf6cbb6f20d2a9fab60327.tar.gz src-d90aafb50d7be161b7cf6cbb6f20d2a9fab60327.zip |
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.
Notes
Notes:
svn path=/head/; revision=143602
Diffstat (limited to 'sys/dev/fdc')
-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 b52da52d0260..68fee402fb80 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; /* |