Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/sun Allow SUN_MS_BPS to override the mouse baud rate...
details: https://anonhg.NetBSD.org/src/rev/d8421e17555f
branches: trunk
changeset: 519017:d8421e17555f
user: pk <pk%NetBSD.org@localhost>
date: Sun Dec 09 12:02:06 2001 +0000
description:
Allow SUN_MS_BPS to override the mouse baud rate at all times. (see PR14774).
diffstat:
sys/dev/sun/ms_zs.c | 13 ++++++++++---
sys/dev/sun/msvar.h | 11 +++--------
2 files changed, 13 insertions(+), 11 deletions(-)
diffs (68 lines):
diff -r 81943af3c195 -r d8421e17555f sys/dev/sun/ms_zs.c
--- a/sys/dev/sun/ms_zs.c Sun Dec 09 11:11:01 2001 +0000
+++ b/sys/dev/sun/ms_zs.c Sun Dec 09 12:02:06 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ms_zs.c,v 1.5 2001/11/13 06:54:32 lukem Exp $ */
+/* $NetBSD: ms_zs.c,v 1.6 2001/12/09 12:02:06 pk Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -56,7 +56,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ms_zs.c,v 1.5 2001/11/13 06:54:32 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ms_zs.c,v 1.6 2001/12/09 12:02:06 pk Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -91,7 +91,11 @@
};
/* Fall-back baud rate */
-int ms_zs_bps = MS_BPS;
+#ifdef SUN_MS_BPS
+int ms_zs_bps = SUN_MS_BPS;
+#else
+int ms_zs_bps = MS_DEFAULT_BPS;
+#endif
static int ms_zs_match(struct device *, struct cfdata *, void *);
static void ms_zs_attach(struct device *, struct device *, void *);
@@ -143,7 +147,10 @@
cs->cs_private = ms;
cs->cs_ops = &zsops_ms;
ms->ms_cs = cs;
+ /* Allow kernel option SUN_MS_BPS to hard-code baud rate */
+#ifndef SUN_MS_BPS
if ((bps = cs->cs_defspeed) == 0)
+#endif
bps = ms_zs_bps;
printf(": baud rate %d\n", bps);
diff -r 81943af3c195 -r d8421e17555f sys/dev/sun/msvar.h
--- a/sys/dev/sun/msvar.h Sun Dec 09 11:11:01 2001 +0000
+++ b/sys/dev/sun/msvar.h Sun Dec 09 12:02:06 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: msvar.h,v 1.2 2000/09/21 23:40:47 eeh Exp $ */
+/* $NetBSD: msvar.h,v 1.3 2001/12/09 12:02:06 pk Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -57,14 +57,9 @@
#define MS_TX_RING_SIZE 16
#define MS_TX_RING_MASK (MS_TX_RING_SIZE-1)
/*
- * Keyboard serial line speed is fixed at 1200 bps; mouse serial line
- * speed defaults to 1200 bps.
+ * mouse serial line speed defaults to 1200 bps.
*/
-#ifdef SUN_MS_BPS
-#define MS_BPS SUN_MS_BPS
-#else
-#define MS_BPS 1200
-#endif
+#define MS_DEFAULT_BPS 1200
/*
* Mouse state. A Mouse Systems mouse is a fairly simple device,
Home |
Main Index |
Thread Index |
Old Index