diff --git a/sys/dev/isa/ast.c b/sys/dev/isa/ast.c index a7df838b24dc..8aa9705406a7 100644 --- a/sys/dev/isa/ast.c +++ b/sys/dev/isa/ast.c @@ -1,4 +1,4 @@ -/* $NetBSD: ast.c,v 1.36 1997/08/23 14:06:17 drochner Exp $ */ +/* $NetBSD: ast.c,v 1.37 1997/09/12 13:31:10 drochner Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. @@ -147,15 +147,18 @@ astattach(parent, self, aux) struct isa_attach_args *ia = aux; struct commulti_attach_args ca; bus_space_tag_t iot = ia->ia_iot; - int i; + int i, iobase; sc->sc_iot = ia->ia_iot; sc->sc_iobase = ia->ia_iobase; - for (i = 0; i < NSLAVES; i++) - if (bus_space_map(iot, sc->sc_iobase + i * COM_NPORTS, - COM_NPORTS, 0, &sc->sc_slaveioh[i])) + for (i = 0; i < NSLAVES; i++) { + iobase = sc->sc_iobase + i * COM_NPORTS; + if (!com_is_console(iot, iobase, &sc->sc_slaveioh[i]) && + bus_space_map(iot, iobase, COM_NPORTS, 0, + &sc->sc_slaveioh[i])) panic("astattach: couldn't map slave %d", i); + } /* * Enable the master interrupt. diff --git a/sys/dev/isa/boca.c b/sys/dev/isa/boca.c index 80b923820724..8a10ef14dd51 100644 --- a/sys/dev/isa/boca.c +++ b/sys/dev/isa/boca.c @@ -1,4 +1,4 @@ -/* $NetBSD: boca.c,v 1.23 1997/08/23 14:06:18 drochner Exp $ */ +/* $NetBSD: boca.c,v 1.24 1997/09/12 13:31:11 drochner Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. @@ -147,15 +147,18 @@ bocaattach(parent, self, aux) struct isa_attach_args *ia = aux; struct commulti_attach_args ca; bus_space_tag_t iot = ia->ia_iot; - int i; + int i, iobase; sc->sc_iot = ia->ia_iot; sc->sc_iobase = ia->ia_iobase; - for (i = 0; i < NSLAVES; i++) - if (bus_space_map(iot, sc->sc_iobase + i * COM_NPORTS, - COM_NPORTS, 0, &sc->sc_slaveioh[i])) + for (i = 0; i < NSLAVES; i++) { + iobase = sc->sc_iobase + i * COM_NPORTS; + if (!com_is_console(iot, iobase, &sc->sc_slaveioh[i]) && + bus_space_map(iot, iobase, COM_NPORTS, 0, + &sc->sc_slaveioh[i])) panic("bocaattach: couldn't map slave %d", i); + } printf("\n"); diff --git a/sys/dev/isa/rtfps.c b/sys/dev/isa/rtfps.c index eba82a10e12f..2f7272cd2006 100644 --- a/sys/dev/isa/rtfps.c +++ b/sys/dev/isa/rtfps.c @@ -1,4 +1,4 @@ -/* $NetBSD: rtfps.c,v 1.31 1997/08/23 14:06:19 drochner Exp $ */ +/* $NetBSD: rtfps.c,v 1.32 1997/09/12 13:31:12 drochner Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. @@ -155,7 +155,7 @@ rtfpsattach(parent, self, aux) IOBASEUNK, IOBASEUNK, IOBASEUNK, IOBASEUNK }; bus_space_tag_t iot = ia->ia_iot; - int i; + int i, iobase; sc->sc_iot = ia->ia_iot; sc->sc_iobase = ia->ia_iobase; @@ -164,10 +164,13 @@ rtfpsattach(parent, self, aux) panic("rtfpsattach: invalid irq"); sc->sc_irqport = irqport[ia->ia_irq]; - for (i = 0; i < NSLAVES; i++) - if (bus_space_map(iot, sc->sc_iobase + i * COM_NPORTS, - COM_NPORTS, 0, &sc->sc_slaveioh[i])) + for (i = 0; i < NSLAVES; i++) { + iobase = sc->sc_iobase + i * COM_NPORTS; + if (!com_is_console(iot, iobase, &sc->sc_slaveioh[i]) && + bus_space_map(iot, iobase, COM_NPORTS, 0, + &sc->sc_slaveioh[i])) panic("rtfpsattach: couldn't map slave %d", i); + } if (bus_space_map(iot, sc->sc_irqport, 1, 0, &sc->sc_irqioh)) panic("rtfpsattach: couldn't map irq port at 0x%x\n", sc->sc_irqport);