summaryrefslogtreecommitdiff
path: root/sys/arch/sparc/dev/ms.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-08-11 05:35:37 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-08-11 05:35:37 +0000
commite511a52691ddb2290f5d3c9ca6e9f0fc3b320289 (patch)
treef68510b774a71e2a0879cb013e3abd7a15665abc /sys/arch/sparc/dev/ms.c
parentfc98d7c9a0046f274410f903f952ef6224f68e10 (diff)
netbsd port, now we merge our changes back in
Diffstat (limited to 'sys/arch/sparc/dev/ms.c')
-rw-r--r--sys/arch/sparc/dev/ms.c21
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???) */