diff options
author | kato <kato@FreeBSD.org> | 1998-01-16 11:20:22 +0000 |
---|---|---|
committer | kato <kato@FreeBSD.org> | 1998-01-16 11:20:22 +0000 |
commit | 60cfcc8b46b54678f36afb4ccd35f2d439150d6c (patch) | |
tree | 73f2a6e9d1409b09548c18b348474bdde63081f9 | |
parent | 4b3aac06b9db5f6f19767b98117f182e0a6edefc (diff) | |
download | FreeBSD-src-60cfcc8b46b54678f36afb4ccd35f2d439150d6c.zip FreeBSD-src-60cfcc8b46b54678f36afb4ccd35f2d439150d6c.tar.gz |
Fixed bugs introduced when files were synchronized with
sys/i386/isa/mse.c and sio.c.
Submitted by: Takahashi Yoshihiro <nyan@wyvern.cc.kogakuin.ac.jp>
-rw-r--r-- | sys/pc98/cbus/sio.c | 26 | ||||
-rw-r--r-- | sys/pc98/pc98/mse.c | 17 | ||||
-rw-r--r-- | sys/pc98/pc98/sio.c | 26 |
3 files changed, 30 insertions, 39 deletions
diff --git a/sys/pc98/cbus/sio.c b/sys/pc98/cbus/sio.c index c0d3e26..8c2d032 100644 --- a/sys/pc98/cbus/sio.c +++ b/sys/pc98/cbus/sio.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)com.c 7.5 (Berkeley) 5/16/91 - * $Id: sio.c,v 1.46 1997/12/29 16:08:48 kato Exp $ + * $Id: sio.c,v 1.47 1998/01/08 10:50:06 kato Exp $ */ #include "opt_comconsole.h" @@ -435,7 +435,6 @@ static int sioprobe __P((struct isa_device *dev)); static void siosettimeout __P((void)); static void comstart __P((struct tty *tp)); static timeout_t comwakeup; -static int tiocm_xxx2mcr __P((int tiocm_xxx)); static void disc_optim __P((struct tty *tp, struct termios *t, struct com_s *com)); @@ -821,14 +820,12 @@ sioprobe(dev) Port_t iobase; u_char mcr_image; int result; -#ifdef PC98 struct isa_device *xdev; +#ifdef PC98 int irqout=0; int ret = 0; int tmp; struct siodev iod; -#else - struct isa_device *xdev; #endif if (!already_init) { @@ -849,6 +846,11 @@ sioprobe(dev) already_init = TRUE; } + if (COM_LLCONSOLE(dev)) { + printf("sio%d: reserved for low-level i/o\n", dev->id_unit); + return (0); + } + #ifdef PC98 /* * If the port is i8251 UART (internal, B98_01) @@ -942,11 +944,6 @@ sioprobe(dev) bzero(failures, sizeof failures); iobase = dev->id_iobase; - if (COM_LLCONSOLE(dev)) { - printf("sio%d: reserved for low-level i/o\n", dev->id_unit); - return (0); - } - /* * We don't want to get actual interrupts, just masked ones. * Interrupts from this line should already be masked in the ICU, @@ -2027,7 +2024,6 @@ more_intr: || com->tp->t_iflag & INPCK)) recv_data = 0; } - ++com->bytes_in; if (com->hotchar != 0 && recv_data == com->hotchar) setsofttty(); @@ -2809,13 +2805,13 @@ retry: com_cflag_and_speed_set(com, cflag, t->c_ospeed); #endif if (!(tp->t_state & TS_TTSTOP)) + com->state |= CS_TTGO; + + if (cflag & CRTS_IFLOW) { if (com->st16650a) { outb(iobase + com_cfcr, 0xbf); outb(iobase + com_fifo, inb(iobase + com_fifo) | 0x40); } - com->state |= CS_TTGO; - - if (cflag & CRTS_IFLOW) { com->state |= CS_RTS_IFLOW; /* * If CS_RTS_IFLOW just changed from off to on, the change @@ -2858,6 +2854,7 @@ retry: } else { #endif if (!(com->last_modem_status & MSR_CTS)) + com->state &= ~CS_ODEVREADY; if (com->st16650a) { outb(iobase + com_cfcr, 0xbf); outb(iobase + com_fifo, inb(iobase + com_fifo) | 0x80); @@ -2870,7 +2867,6 @@ retry: outb(iobase + com_cfcr, 0xbf); outb(iobase + com_fifo, inb(iobase + com_fifo) & ~0x80); } - com->state &= ~CS_ODEVREADY; } diff --git a/sys/pc98/pc98/mse.c b/sys/pc98/pc98/mse.c index 740c646..0bde526 100644 --- a/sys/pc98/pc98/mse.c +++ b/sys/pc98/pc98/mse.c @@ -11,7 +11,7 @@ * this software for any purpose. It is provided "as is" * without express or implied warranty. * - * $Id: mse.c,v 1.13 1997/11/19 11:35:52 kato Exp $ + * $Id: mse.c,v 1.14 1997/12/09 11:57:59 kato Exp $ */ /* * Driver for the Logitech and ATI Inport Bus mice for use with 386bsd and @@ -74,7 +74,6 @@ struct isa_driver msedriver = { mseprobe, mseattach, "mse" }; - static d_open_t mseopen; static d_close_t mseclose; static d_read_t mseread; @@ -251,13 +250,15 @@ static struct mse_types { /* Disable interrupts routine */ void (*m_get) __P((u_int port, int *dx, int *dy, int *but)); /* and get mouse status */ -#ifndef PC98 mousehw_t m_hw; /* buttons iftype type model hwid */ mousemode_t m_mode; /* proto rate res accel level size mask */ -#endif } mse_types[] = { #ifdef PC98 - { MSE_98BUSMOUSE, mse_probe98m, mse_enable98m, mse_disable98m, mse_get98m }, + { MSE_98BUSMOUSE, + mse_probe98m, mse_enable98m, mse_disable98m, mse_get98m, + { 2, MOUSE_IF_BUS, MOUSE_MOUSE, MOUSE_MODEL_GENERIC, 0, }, + { MOUSE_PROTO_BUS, -1, -1, 0, 0, MOUSE_MSC_PACKETSIZE, + { MOUSE_MSC_SYNCMASK, MOUSE_MSC_SYNC, }, }, }, #else { MSE_ATIINPORT, mse_probeati, mse_enableati, mse_disableati, mse_getati, @@ -290,10 +291,8 @@ mseprobe(idp) sc->sc_enablemouse = mse_types[i].m_enable; sc->sc_disablemouse = mse_types[i].m_disable; sc->sc_getmouse = mse_types[i].m_get; -#ifndef PC98 sc->hw = mse_types[i].m_hw; sc->mode = mse_types[i].m_mode; -#endif return (1); } i++; @@ -911,8 +910,8 @@ mse_get98m(port, dx, dy, but) *but = (inb(port + PORT_A) >> 5) & 7; - *dx += x; - *dy += y; + *dx = x; + *dy = y; outb(port + HC, HC_NO_CLEAR); /* HC = 0 */ diff --git a/sys/pc98/pc98/sio.c b/sys/pc98/pc98/sio.c index c0d3e26..8c2d032 100644 --- a/sys/pc98/pc98/sio.c +++ b/sys/pc98/pc98/sio.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)com.c 7.5 (Berkeley) 5/16/91 - * $Id: sio.c,v 1.46 1997/12/29 16:08:48 kato Exp $ + * $Id: sio.c,v 1.47 1998/01/08 10:50:06 kato Exp $ */ #include "opt_comconsole.h" @@ -435,7 +435,6 @@ static int sioprobe __P((struct isa_device *dev)); static void siosettimeout __P((void)); static void comstart __P((struct tty *tp)); static timeout_t comwakeup; -static int tiocm_xxx2mcr __P((int tiocm_xxx)); static void disc_optim __P((struct tty *tp, struct termios *t, struct com_s *com)); @@ -821,14 +820,12 @@ sioprobe(dev) Port_t iobase; u_char mcr_image; int result; -#ifdef PC98 struct isa_device *xdev; +#ifdef PC98 int irqout=0; int ret = 0; int tmp; struct siodev iod; -#else - struct isa_device *xdev; #endif if (!already_init) { @@ -849,6 +846,11 @@ sioprobe(dev) already_init = TRUE; } + if (COM_LLCONSOLE(dev)) { + printf("sio%d: reserved for low-level i/o\n", dev->id_unit); + return (0); + } + #ifdef PC98 /* * If the port is i8251 UART (internal, B98_01) @@ -942,11 +944,6 @@ sioprobe(dev) bzero(failures, sizeof failures); iobase = dev->id_iobase; - if (COM_LLCONSOLE(dev)) { - printf("sio%d: reserved for low-level i/o\n", dev->id_unit); - return (0); - } - /* * We don't want to get actual interrupts, just masked ones. * Interrupts from this line should already be masked in the ICU, @@ -2027,7 +2024,6 @@ more_intr: || com->tp->t_iflag & INPCK)) recv_data = 0; } - ++com->bytes_in; if (com->hotchar != 0 && recv_data == com->hotchar) setsofttty(); @@ -2809,13 +2805,13 @@ retry: com_cflag_and_speed_set(com, cflag, t->c_ospeed); #endif if (!(tp->t_state & TS_TTSTOP)) + com->state |= CS_TTGO; + + if (cflag & CRTS_IFLOW) { if (com->st16650a) { outb(iobase + com_cfcr, 0xbf); outb(iobase + com_fifo, inb(iobase + com_fifo) | 0x40); } - com->state |= CS_TTGO; - - if (cflag & CRTS_IFLOW) { com->state |= CS_RTS_IFLOW; /* * If CS_RTS_IFLOW just changed from off to on, the change @@ -2858,6 +2854,7 @@ retry: } else { #endif if (!(com->last_modem_status & MSR_CTS)) + com->state &= ~CS_ODEVREADY; if (com->st16650a) { outb(iobase + com_cfcr, 0xbf); outb(iobase + com_fifo, inb(iobase + com_fifo) | 0x80); @@ -2870,7 +2867,6 @@ retry: outb(iobase + com_cfcr, 0xbf); outb(iobase + com_fifo, inb(iobase + com_fifo) & ~0x80); } - com->state &= ~CS_ODEVREADY; } |