diff options
Diffstat (limited to 'sys/i386/isa/cy.c')
-rw-r--r-- | sys/i386/isa/cy.c | 36 |
1 files changed, 10 insertions, 26 deletions
diff --git a/sys/i386/isa/cy.c b/sys/i386/isa/cy.c index 4181c44..8f2109c 100644 --- a/sys/i386/isa/cy.c +++ b/sys/i386/isa/cy.c @@ -123,7 +123,6 @@ #define p_com_addr p_cy_addr #define sioattach cyattach #define sioclose cyclose -#define siodevtotty cydevtotty #define siodriver cydriver #define siodtrwakeup cydtrwakeup #define sioinput cyinput @@ -136,7 +135,7 @@ #define sioread cyread #define siosettimeout cysettimeout #define siosetwater cysetwater -#define siostop cystop +#define comstop cystop #define siowrite cywrite #define sio_registered cy_registered #define sio_timeout cy_timeout @@ -179,7 +178,7 @@ * * The following com and tty flags correspond closely: * CS_BUSY = TS_BUSY (maintained by comstart(), siopoll() and - * siostop()) + * comstop()) * CS_TTGO = ~TS_TTSTOP (maintained by comparam() and comstart()) * CS_CTS_OFLOW = CCTS_OFLOW (maintained by comparam()) * CS_RTS_IFLOW = CRTS_IFLOW (maintained by comparam()) @@ -347,6 +346,7 @@ static int siosetwater __P((struct com_s *com, speed_t speed)); static int comspeed __P((speed_t speed, u_long cy_clock, int *prescaler_io)); static void comstart __P((struct tty *tp)); +static void comstop __P((struct tty *tp, int rw)); static timeout_t comwakeup; static void disc_optim __P((struct tty *tp, struct termios *t, struct com_s *com)); @@ -370,8 +370,6 @@ static d_close_t sioclose; static d_read_t sioread; static d_write_t siowrite; static d_ioctl_t sioioctl; -static d_stop_t siostop; -static d_devtotty_t siodevtotty; #define CDEV_MAJOR 48 static struct cdevsw sio_cdevsw = { @@ -380,10 +378,10 @@ static struct cdevsw sio_cdevsw = { /* read */ sioread, /* write */ siowrite, /* ioctl */ sioioctl, - /* stop */ siostop, + /* stop */ nostop, /* reset */ noreset, - /* devtotty */ siodevtotty, - /* poll */ ttpoll, + /* devtotty */ nodevtotty, + /* poll */ ttypoll, /* mmap */ nommap, /* strategy */ nostrategy, /* name */ driver_name, @@ -674,6 +672,7 @@ sioopen(dev, flag, mode, p) #else tp = com->tp = &sio_tty[unit]; #endif + dev->si_tty = tp; s = spltty(); /* * We jump to this label after all non-interrupted sleeps to pick @@ -721,6 +720,7 @@ open_top: * callout, and to complete a callin open after DCD rises. */ tp->t_oproc = comstart; + tp->t_stop = comstop; tp->t_param = comparam; tp->t_dev = dev; tp->t_termios = mynor & CALLOUT_MASK @@ -853,7 +853,7 @@ sioclose(dev, flag, mode, p) cd_etc(com, CD1400_ETC_STOPBREAK); (*linesw[tp->t_line].l_close)(tp, flag); disc_optim(tp, &tp->t_termios, com); - siostop(tp, FREAD | FWRITE); + comstop(tp, FREAD | FWRITE); comhardclose(com); ttyclose(tp); siosettimeout(); @@ -2414,7 +2414,7 @@ comstart(tp) } static void -siostop(tp, rw) +comstop(tp, rw) struct tty *tp; int rw; { @@ -2454,22 +2454,6 @@ siostop(tp, rw) comstart(tp); } -static struct tty * -siodevtotty(dev) - dev_t dev; -{ - int mynor; - int unit; - - mynor = minor(dev); - if (mynor & CONTROL_MASK) - return (NULL); - unit = MINOR_TO_UNIT(mynor); - if ((u_int) unit >= NSIO) - return (NULL); - return (&sio_tty[unit]); -} - static int commctl(com, bits, how) struct com_s *com; |