aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2004-10-28 19:40:40 +0000
committerWarner Losh <imp@FreeBSD.org>2004-10-28 19:40:40 +0000
commit8ef493b6bcfb7c7a6af1fdf4c251e2c85b5558d5 (patch)
tree7d75c95f5256b2c32204c5fbaf0886f4c3485182
parent2cadbb916ef4f0a2ec050e10d2da2e46d7ef2fa5 (diff)
downloadsrc-8ef493b6bcfb7c7a6af1fdf4c251e2c85b5558d5.tar.gz
src-8ef493b6bcfb7c7a6af1fdf4c251e2c85b5558d5.zip
MF RELENG_5 1.9.2.4: another fdc resource layout
The RELENG_5_3_0_RELEASE tag will be slid forward to include this change. Approved by: re@ (kensmith) Forgtten by: imp@ Reminded by: bmah
Notes
Notes: svn path=/releng/5.3/; revision=137024
-rw-r--r--sys/dev/fdc/fdc_isa.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/fdc/fdc_isa.c b/sys/dev/fdc/fdc_isa.c
index 0833fed464d7..6700e751f38d 100644
--- a/sys/dev/fdc/fdc_isa.c
+++ b/sys/dev/fdc/fdc_isa.c
@@ -82,6 +82,7 @@ fdc_isa_alloc_resources(device_t dev, struct fdc_data *fdc)
* 6: 0x3f2-0x3f3,0x3f4-0x3f5,0x3f7 # becoming common
* 7: 0x3f2-0x3f3,0x3f4-0x3f5 # rare
* 8: 0x3f0-0x3f1,0x3f2-0x3f3,0x3f4-0x3f5,0x3f7
+ * 9: 0x3f0-0x3f3,0x3f4-0x3f5,0x3f7
*
* The following code is generic for any value of 0x3fx :-)
*/
@@ -99,8 +100,7 @@ again_ioport:
nports);
return (ENXIO);
}
- if ((rman_get_start(fdc->res_ioport) & 0x7) == 0 &&
- rman_get_size(fdc->res_ioport) == 2) {
+ if ((rman_get_end(fdc->res_ioport) & 0x7) == 1) {
/* Case 8 */
bus_release_resource(dev, SYS_RES_IOPORT, fdc->rid_ioport,
fdc->res_ioport);
@@ -116,9 +116,9 @@ again_ioport:
fdc->port_off = -(fdc->porth & 0x7);
/*
- * Deal with case 6, 7, and 8: FDSTS and FDSATA are in rid 1.
+ * Deal with case 6-9: FDSTS and FDDATA.
*/
- if (rman_get_size(fdc->res_ioport) == 2) {
+ if ((rman_get_end(fdc->res_ioport) & 0x7) == 3) {
fdc->rid_sts = fdc->rid_ioport + 1;
fdc->res_sts = bus_alloc_resource_any(dev, SYS_RES_IOPORT,
&fdc->rid_sts, RF_ACTIVE);