diff options
author | gibbs <gibbs@FreeBSD.org> | 1998-11-10 06:44:54 +0000 |
---|---|---|
committer | gibbs <gibbs@FreeBSD.org> | 1998-11-10 06:44:54 +0000 |
commit | 12c10932ccb801caf51fe0c36160a63c47c30821 (patch) | |
tree | e1da86a46f5875e7efd3c258990c3555b79207b4 /sys/isa/bt_isa.c | |
parent | de6b8e170af7d1f2104bda47abec30de3677cabc (diff) | |
download | FreeBSD-src-12c10932ccb801caf51fe0c36160a63c47c30821.zip FreeBSD-src-12c10932ccb801caf51fe0c36160a63c47c30821.tar.gz |
Fix probes when a port address is specified.
Diffstat (limited to 'sys/isa/bt_isa.c')
-rw-r--r-- | sys/isa/bt_isa.c | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/sys/isa/bt_isa.c b/sys/isa/bt_isa.c index 8009a36..f646f85 100644 --- a/sys/isa/bt_isa.c +++ b/sys/isa/bt_isa.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: bt_isa.c,v 1.3 1998/10/10 00:44:12 imp Exp $ + * $Id: bt_isa.c,v 1.4 1998/10/12 18:53:33 imp Exp $ */ #include <sys/param.h> @@ -86,24 +86,10 @@ bt_isa_probe(dev) * Bound our board search if the user has * specified an exact port. */ - if (dev->id_iobase > 0) { - for (;port_index <= max_port_index; port_index++) - if (dev->id_iobase >= bt_isa_ports[port_index].addr) - break; - if ((port_index > max_port_index) - || (dev->id_iobase != bt_isa_ports[port_index].addr)) { - printf(" -bt_isa_probe: Invalid baseport of 0x%x specified. -bt_isa_probe: Nearest valid baseport is 0x%x. -bt_isa_probe: Failing probe.\n", - dev->id_iobase, - (port_index <= max_port_index) - ? bt_isa_ports[port_index].addr - : bt_isa_ports[max_port_index].addr); - return 0; - } - max_port_index = port_index; - } + bt_find_probe_range(dev->id_iobase, &port_index, &max_port_index); + + if (port_index < 0) + return 0; /* Attempt to find an adapter */ for (;port_index <= max_port_index; port_index++) { @@ -111,7 +97,7 @@ bt_isa_probe: Failing probe.\n", u_int ioport; int error; - ioport = bt_isa_ports[port_index].addr; + ioport = bt_iop_from_bio(port_index); /* * Ensure this port has not already been claimed already @@ -119,7 +105,7 @@ bt_isa_probe: Failing probe.\n", */ if (bt_check_probed_iop(ioport) != 0) continue; - dev->id_iobase = bt_isa_ports[port_index].addr; + dev->id_iobase = ioport; if (haveseen_isadev(dev, CC_IOADDR | CC_QUIET)) continue; @@ -169,6 +155,7 @@ bt_isa_probe: Failing probe.\n", printf("bt_isa_probe: Invalid DMA setting " "detected for adapter at 0x%x. " "Failing probe\n", ioport); + return (0); } } else { /* VL DMA */ |