Subject: port-sparc/14774: 4800bps mouse on SS2 does not work
To: None <gnats-bugs@gnats.netbsd.org>
From: None <mochid@netside.co.jp>
List: netbsd-bugs
Date: 11/29/2001 23:10:39
>Number:         14774
>Category:       port-sparc
>Synopsis:       4800bps mouse on SS2 does not work
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-sparc-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 29 06:11:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     MOCHIDA Shuji
>Release:        NetBSD 1.5Y at 2001 Nov 27
>Organization:
NETside Technologies Inc.
>Environment:
NetBSD 1.5Y (OXI1) #0: Wed Nov 28 22:38:16 JST 2001
>Description:

Sun Compact1 mouse (370-1587-01, 4800bps) on SS2 does not work 
with current kernel. I defined 

    options         SUN_MS_BPS=4800

in my config file, but dmesg shows 

    ms0 at zs1 channel 1: baud rate 1200

maybe  sys/dev/sun/ms_zs.c:ms_zs_attach() 

        if ((bps = cs->cs_defspeed) == 0)
                bps = ms_zs_bps;

parent device zs1 set cs->cs_defspeed as 1200bps.

>How-To-Repeat:

Attach 4800bps mouse to SS2.

>Fix:

I think, if SUN_MS_BPS is defined, force baud rate to it.

--- sys/dev/sun/msvar.h.ORIG	Tue Oct 31 16:40:15 2000
+++ sys/dev/sun/msvar.h	Thu Nov 29 22:15:37 2001
@@ -60,11 +60,7 @@
  * Keyboard serial line speed is fixed at 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
 
 /*
  * Mouse state.  A Mouse Systems mouse is a fairly simple device,
--- sys/dev/sun/ms_zs.c.ORIG	Wed Nov 28 18:36:27 2001
+++ sys/dev/sun/ms_zs.c	Thu Nov 29 22:22:29 2001
@@ -143,8 +143,12 @@
 	cs->cs_private = ms;
 	cs->cs_ops = &zsops_ms;
 	ms->ms_cs = cs;
+#ifndef SUN_MS_BPS
 	if ((bps = cs->cs_defspeed) == 0)
 		bps = ms_zs_bps;
+#else
+	bps = SUN_MS_BPS;
+#endif
 
 	printf(": baud rate %d\n", bps);
 
>Release-Note:
>Audit-Trail:
>Unformatted: