Make console on multiport cards more likely to work (obvious bug,

fix still untested).
Closes PR kern/4095 by enami tsugutomo.
This commit is contained in:
drochner 1997-09-12 13:31:10 +00:00
parent daf8124106
commit 8f33476972
3 changed files with 24 additions and 15 deletions

View File

@ -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.

View File

@ -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");

View File

@ -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);