From f99964396acce1b118f4711ca6187ef2ebb5acac Mon Sep 17 00:00:00 2001 From: kato Date: Thu, 13 Aug 1998 07:36:40 +0000 Subject: Sync with sys/i386/isa/sio.c revision 1.210. --- sys/pc98/cbus/sio.c | 25 ++++++++++--------------- sys/pc98/pc98/sio.c | 25 ++++++++++--------------- 2 files changed, 20 insertions(+), 30 deletions(-) (limited to 'sys/pc98') diff --git a/sys/pc98/cbus/sio.c b/sys/pc98/cbus/sio.c index b6ff188..da6a0c4 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.62 1998/06/24 13:37:23 kato Exp $ + * $Id: sio.c,v 1.63 1998/07/15 12:18:32 bde Exp $ */ #include "opt_comconsole.h" @@ -139,6 +139,7 @@ #include #include #include +#include #include #include #include @@ -147,6 +148,7 @@ #endif #include +#include #ifdef PC98 #include @@ -395,19 +397,6 @@ struct com_s { #endif }; -/* - * XXX public functions in drivers should be declared in headers produced - * by `config', not here. - */ - -/* Interrupt handling entry point. */ -void siopoll __P((void)); - -/* Device switch entry points. */ -#define sioreset noreset -#define siommap nommap -#define siostrategy nostrategy - #ifdef COM_ESP static int espattach __P((struct isa_device *isdp, struct com_s *com, Port_t esp_port)); @@ -419,6 +408,7 @@ static void comhardclose __P((struct com_s *com)); static void siointr1 __P((struct com_s *com)); static int commctl __P((struct com_s *com, int bits, int how)); static int comparam __P((struct tty *tp, struct termios *t)); +static swihand_t siopoll; static int sioprobe __P((struct isa_device *dev)); static void siosettimeout __P((void)); static void comstart __P((struct tty *tp)); @@ -460,6 +450,7 @@ static int comconsole = -1; static volatile speed_t comdefaultrate = CONSPEED; static u_int com_events; /* input chars + weighted output completions */ static Port_t siocniobase; +static bool_t siopoll_registered; static int sio_timeout; static int sio_timeouts_until_log; static struct callout_handle sio_timeout_handle @@ -1459,6 +1450,10 @@ determined_type: ; unit | CALLOUT_MASK | CONTROL_LOCK_STATE, DV_CHR, UID_UUCP, GID_DIALER, 0660, "cuala%r", unit); #endif + if (!siopoll_registered) { + register_swi(SWI_TTY, siopoll); + siopoll_registered = TRUE; + } com->id_flags = isdp->id_flags; /* Heritate id_flags for later */ return (1); } @@ -2444,7 +2439,7 @@ sioioctl(dev, cmd, data, flag, p) return (0); } -void +static void siopoll() { int unit; diff --git a/sys/pc98/pc98/sio.c b/sys/pc98/pc98/sio.c index b6ff188..da6a0c4 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.62 1998/06/24 13:37:23 kato Exp $ + * $Id: sio.c,v 1.63 1998/07/15 12:18:32 bde Exp $ */ #include "opt_comconsole.h" @@ -139,6 +139,7 @@ #include #include #include +#include #include #include #include @@ -147,6 +148,7 @@ #endif #include +#include #ifdef PC98 #include @@ -395,19 +397,6 @@ struct com_s { #endif }; -/* - * XXX public functions in drivers should be declared in headers produced - * by `config', not here. - */ - -/* Interrupt handling entry point. */ -void siopoll __P((void)); - -/* Device switch entry points. */ -#define sioreset noreset -#define siommap nommap -#define siostrategy nostrategy - #ifdef COM_ESP static int espattach __P((struct isa_device *isdp, struct com_s *com, Port_t esp_port)); @@ -419,6 +408,7 @@ static void comhardclose __P((struct com_s *com)); static void siointr1 __P((struct com_s *com)); static int commctl __P((struct com_s *com, int bits, int how)); static int comparam __P((struct tty *tp, struct termios *t)); +static swihand_t siopoll; static int sioprobe __P((struct isa_device *dev)); static void siosettimeout __P((void)); static void comstart __P((struct tty *tp)); @@ -460,6 +450,7 @@ static int comconsole = -1; static volatile speed_t comdefaultrate = CONSPEED; static u_int com_events; /* input chars + weighted output completions */ static Port_t siocniobase; +static bool_t siopoll_registered; static int sio_timeout; static int sio_timeouts_until_log; static struct callout_handle sio_timeout_handle @@ -1459,6 +1450,10 @@ determined_type: ; unit | CALLOUT_MASK | CONTROL_LOCK_STATE, DV_CHR, UID_UUCP, GID_DIALER, 0660, "cuala%r", unit); #endif + if (!siopoll_registered) { + register_swi(SWI_TTY, siopoll); + siopoll_registered = TRUE; + } com->id_flags = isdp->id_flags; /* Heritate id_flags for later */ return (1); } @@ -2444,7 +2439,7 @@ sioioctl(dev, cmd, data, flag, p) return (0); } -void +static void siopoll() { int unit; -- cgit v1.1