diff options
author | nyan <nyan@FreeBSD.org> | 2002-06-19 13:20:20 +0000 |
---|---|---|
committer | nyan <nyan@FreeBSD.org> | 2002-06-19 13:20:20 +0000 |
commit | b7dd05aa7c6024d96ddc7083d8d56718e806e5ea (patch) | |
tree | a6892d5ba179f097fbbaee67fca83395eaf2c94f | |
parent | 9caea8601980bf2205e8337706c463d04b358346 (diff) | |
download | FreeBSD-src-b7dd05aa7c6024d96ddc7083d8d56718e806e5ea.zip FreeBSD-src-b7dd05aa7c6024d96ddc7083d8d56718e806e5ea.tar.gz |
Backout previous change and merge from sys/dev/sio/sio.c revision 1.375.
-rw-r--r-- | sys/pc98/cbus/sio.c | 29 | ||||
-rw-r--r-- | sys/pc98/pc98/sio.c | 29 |
2 files changed, 46 insertions, 12 deletions
diff --git a/sys/pc98/cbus/sio.c b/sys/pc98/cbus/sio.c index 85b073c..1f3e8f3 100644 --- a/sys/pc98/cbus/sio.c +++ b/sys/pc98/cbus/sio.c @@ -435,9 +435,7 @@ SYSCTL_UINT(_machdep, OID_AUTO, gdbspeed, CTLFLAG_RW, &gdbdefaultrate, GDBSPEED, ""); static u_int com_events; /* input chars + weighted output completions */ static Port_t siocniobase; -#ifndef __alpha__ -static int siocnunit; -#endif +static int siocnunit = -1; static Port_t siogdbiobase; static int siogdbunit = -1; static void *sio_slow_ih; @@ -4416,6 +4414,7 @@ siocnputc(dev, c) int s; struct siocnstate sp; Port_t iobase; + speed_t speed; if (minor(dev) == siocnunit) { iobase = siocniobase; @@ -4445,12 +4444,20 @@ siogdbgetc() { int c; Port_t iobase; + speed_t speed; int s; struct siocnstate sp; - iobase = siogdbiobase; + if (minor(dev) == siocnunit) { + iobase = siocniobase; + speed = comdefaultrate; + } else { + iobase = siogdbiobase; + speed = gdbdefaultrate; + } + s = spltty(); - siocnopen(&sp, iobase, gdbdefaultrate); + siocnopen(&sp, iobase, speed); while (!(inb(iobase + com_lsr) & LSR_RXRDY)) ; c = inb(iobase + com_data); @@ -4463,11 +4470,21 @@ void siogdbputc(c) int c; { + Port_t iobase; + speed_t speed; int s; struct siocnstate sp; + if (minor(dev) == siocnunit) { + iobase = siocniobase; + speed = comdefaultrate; + } else { + iobase = siogdbiobase; + speed = gdbdefaultrate; + } + s = spltty(); - siocnopen(&sp, siogdbiobase, gdbdefaultrate); + siocnopen(&sp, iobase, speed); siocntxwait(siogdbiobase); outb(siogdbiobase + com_data, c); siocnclose(&sp, siogdbiobase); diff --git a/sys/pc98/pc98/sio.c b/sys/pc98/pc98/sio.c index 85b073c..1f3e8f3 100644 --- a/sys/pc98/pc98/sio.c +++ b/sys/pc98/pc98/sio.c @@ -435,9 +435,7 @@ SYSCTL_UINT(_machdep, OID_AUTO, gdbspeed, CTLFLAG_RW, &gdbdefaultrate, GDBSPEED, ""); static u_int com_events; /* input chars + weighted output completions */ static Port_t siocniobase; -#ifndef __alpha__ -static int siocnunit; -#endif +static int siocnunit = -1; static Port_t siogdbiobase; static int siogdbunit = -1; static void *sio_slow_ih; @@ -4416,6 +4414,7 @@ siocnputc(dev, c) int s; struct siocnstate sp; Port_t iobase; + speed_t speed; if (minor(dev) == siocnunit) { iobase = siocniobase; @@ -4445,12 +4444,20 @@ siogdbgetc() { int c; Port_t iobase; + speed_t speed; int s; struct siocnstate sp; - iobase = siogdbiobase; + if (minor(dev) == siocnunit) { + iobase = siocniobase; + speed = comdefaultrate; + } else { + iobase = siogdbiobase; + speed = gdbdefaultrate; + } + s = spltty(); - siocnopen(&sp, iobase, gdbdefaultrate); + siocnopen(&sp, iobase, speed); while (!(inb(iobase + com_lsr) & LSR_RXRDY)) ; c = inb(iobase + com_data); @@ -4463,11 +4470,21 @@ void siogdbputc(c) int c; { + Port_t iobase; + speed_t speed; int s; struct siocnstate sp; + if (minor(dev) == siocnunit) { + iobase = siocniobase; + speed = comdefaultrate; + } else { + iobase = siogdbiobase; + speed = gdbdefaultrate; + } + s = spltty(); - siocnopen(&sp, siogdbiobase, gdbdefaultrate); + siocnopen(&sp, iobase, speed); siocntxwait(siogdbiobase); outb(siogdbiobase + com_data, c); siocnclose(&sp, siogdbiobase); |