diff options
author | rik <rik@FreeBSD.org> | 2004-08-13 12:35:52 +0000 |
---|---|---|
committer | rik <rik@FreeBSD.org> | 2004-08-13 12:35:52 +0000 |
commit | 7cdae66efa4dcf9ab8f50f7d58bcec0e84ea50e6 (patch) | |
tree | b4a210a503728f0179f039ae928897527997cef6 /sys/dev/ctau | |
parent | 1500156262ccaa80f9cb9bf7f94cbc31784a980e (diff) | |
download | FreeBSD-src-7cdae66efa4dcf9ab8f50f7d58bcec0e84ea50e6.zip FreeBSD-src-7cdae66efa4dcf9ab8f50f7d58bcec0e84ea50e6.tar.gz |
Fix resource check while autodetection.
Diffstat (limited to 'sys/dev/ctau')
-rw-r--r-- | sys/dev/ctau/if_ct.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/ctau/if_ct.c b/sys/dev/ctau/if_ct.c index 8b66946..a044195 100644 --- a/sys/dev/ctau/if_ct.c +++ b/sys/dev/ctau/if_ct.c @@ -340,7 +340,7 @@ static void ct_identify (driver_t *driver, device_t dev) * devices, but we don't have a choise */ for (i = 0; (iobase = porttab [i]) != 0; i++) { - if (!ct_is_free_res (dev, 1, SYS_RES_IOPORT, + if (!ct_is_free_res (dev, 0, SYS_RES_IOPORT, iobase, iobase + NPORT, NPORT)) continue; if (ct_probe_board (iobase, -1, -1) == 0) @@ -377,7 +377,7 @@ static void ct_identify (driver_t *driver, device_t dev) if (porttab [i] != iobase) continue; - if (!ct_is_free_res (devices[k], 1, SYS_RES_IOPORT, + if (!ct_is_free_res (devices[k], 0, SYS_RES_IOPORT, iobase, iobase + NPORT, NPORT)) continue; @@ -404,7 +404,7 @@ static void ct_identify (driver_t *driver, device_t dev) for (i = 0; (iobase = porttab [i]) != 0; i++) { if (porttab [i] == -1) continue; - if (!ct_is_free_res (devices[k], 1, SYS_RES_IOPORT, + if (!ct_is_free_res (devices[k], 0, SYS_RES_IOPORT, iobase, iobase + NPORT, NPORT)) continue; if (ct_probe_board (iobase, -1, -1) == 0) @@ -443,7 +443,7 @@ static int ct_probe (device_t dev) return ENXIO; } - if (!ct_is_free_res (dev, 1, SYS_RES_IOPORT, + if (!ct_is_free_res (dev, 0, SYS_RES_IOPORT, iobase, iobase + NPORT, NPORT)) { printf ("ct%d: Resource IOPORT isn't free\n", unit); return ENXIO; @@ -566,7 +566,7 @@ static int ct_attach (device_t dev) if (bus_get_resource (dev, SYS_RES_DRQ, 0, &drq, &rescount) != 0) { for (i = 0; (drq = dmatab [i]) != 0; i++) { - if (!ct_is_free_res (dev, 1, SYS_RES_DRQ, + if (!ct_is_free_res (dev, 0, SYS_RES_DRQ, drq, drq + 1, 1)) continue; bus_set_resource (dev, SYS_RES_DRQ, 0, drq, 1); @@ -593,7 +593,7 @@ static int ct_attach (device_t dev) if (bus_get_resource (dev, SYS_RES_IRQ, 0, &irq, &rescount) != 0) { for (i = 0; (irq = irqtab [i]) != 0; i++) { - if (!ct_is_free_res (dev, 1, SYS_RES_IRQ, + if (!ct_is_free_res (dev, 0, SYS_RES_IRQ, irq, irq + 1, 1)) continue; bus_set_resource (dev, SYS_RES_IRQ, 0, irq, 1); |