diff options
Diffstat (limited to 'sys/arch/sparc/dev/ms.c')
-rw-r--r-- | sys/arch/sparc/dev/ms.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/sys/arch/sparc/dev/ms.c b/sys/arch/sparc/dev/ms.c index fb71f4ecb36..365d1c476b2 100644 --- a/sys/arch/sparc/dev/ms.c +++ b/sys/arch/sparc/dev/ms.c @@ -1,4 +1,4 @@ -/* $NetBSD: ms.c,v 1.5 1995/08/29 22:15:35 pk Exp $ */ +/* $NetBSD: ms.c,v 1.8 1996/04/01 17:29:52 christos Exp $ */ /* * Copyright (c) 1992, 1993 @@ -49,15 +49,20 @@ */ #include <sys/param.h> -#include <sys/conf.h> #include <sys/ioctl.h> #include <sys/kernel.h> #include <sys/proc.h> #include <sys/syslog.h> #include <sys/systm.h> #include <sys/tty.h> +#include <sys/signalvar.h> +#include <sys/conf.h> #include <machine/vuid_event.h> +#include <machine/cpu.h> +#include <machine/kbd.h> +#include <machine/conf.h> + #include <sparc/dev/event_var.h> /* @@ -92,7 +97,8 @@ struct ms_softc { void ms_serial(tp, iopen, iclose) struct tty *tp; - void (*iopen)(), (*iclose)(); + void (*iopen) __P((struct tty *)); + void (*iclose) __P((struct tty *)); { ms_softc.ms_mouse = tp; @@ -242,13 +248,18 @@ msopen(dev, flags, mode, p) int flags, mode; struct proc *p; { - int s, error; if (ms_softc.ms_events.ev_io) return (EBUSY); ms_softc.ms_events.ev_io = p; ev_init(&ms_softc.ms_events); /* may cause sleep */ + if (CPU_ISSUN4) { + /* We need to set the baud rate on the mouse. */ + ms_softc.ms_mouse->t_ispeed = + ms_softc.ms_mouse->t_ospeed = 1200; + } + (*ms_softc.ms_open)(ms_softc.ms_mouse); ms_softc.ms_ready = 1; /* start accepting events */ return (0); @@ -297,8 +308,6 @@ msioctl(dev, cmd, data, flag, p) int flag; struct proc *p; { - int s; - switch (cmd) { case FIONBIO: /* we will remove this someday (soon???) */ |