Subject: Problems with Mouse Systems A3 mouse and wscons
To: None <port-mac68k@netbsd.org>
From: Stephen Brown <scbrown@netscape.com>
List: port-mac68k
Date: 05/09/2000 18:10:38
After further debugging, it seems the problems that I earlier attributed

to my ergonomic keyboard are instead caused by my Mouse Systems
A3 mouse(mechanical).  During boot, it seems to create a fictional
keyboard entry:

adb0 (direct, II series): 3 targets
aed0 at adb0 addr 0: ADB Event device
akbd0 at adb0 addr 2: mapped device (128)
wskbd0 at akbd0
ams0 at adb0 addr 3: Mouse Systems A3 mouse, 3-button, 300 dpi
wsmouse0 at ams0
akbd1 at adb0 addr 2: extended keyboard
wskbd1 at akbd1

I verified that it is indeed the mouse by trying with different
combinations
of keyboards and mice.  Only when the A3 mouse is connected does this
fictional keyboard entry show up.  With the latest "wscons" code, if a
second keyboard tries to attach to the console, the kernel panics.  This

comes from line 405 of /usr/src/sys/dev/wscons/wskbd.c, which reads as
follows:

    KASSERT(wskbd_console_device == NULL);

In the excerpt above, I was booting with a serial console, so no panic.
I already did a send-pr of this, but thought I would email the list as
well
in case anyone had any ideas.

I do notice from looking at the "akbd.c" file(around line 173) that
several
other mice list fictional keyboards(Logitech Mouseman, et al), but they
return valid handler ids, instead of the "128" value I am getting in my
case.
I'm guessing there might be something strange going on with the values
returned from the "GetIndADB()" call for this device.  If someone who
has
mucked around with the ADB code before has some clues as to what I
should try, please let me know.

Steve