Sync with sys/i386/isa/sio.c revision 1.210.

This commit is contained in:
KATO Takenori 1998-08-13 07:36:40 +00:00
parent 28c1826359
commit c0e4cfbfe2
2 changed files with 20 additions and 30 deletions

View file

@ -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 <sys/conf.h>
#include <sys/dkstat.h>
#include <sys/fcntl.h>
#include <sys/interrupt.h>
#include <sys/kernel.h>
#include <sys/syslog.h>
#include <sys/sysctl.h>
@ -147,6 +148,7 @@
#endif
#include <machine/clock.h>
#include <machine/ipl.h>
#ifdef PC98
#include <pc98/pc98/pc98.h>
@ -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;

View file

@ -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 <sys/conf.h>
#include <sys/dkstat.h>
#include <sys/fcntl.h>
#include <sys/interrupt.h>
#include <sys/kernel.h>
#include <sys/syslog.h>
#include <sys/sysctl.h>
@ -147,6 +148,7 @@
#endif
#include <machine/clock.h>
#include <machine/ipl.h>
#ifdef PC98
#include <pc98/pc98/pc98.h>
@ -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;