Subject: port-macppc/10240: Mouse does not work
To: None <gnats-bugs@gnats.netbsd.org>
From: None <t-horikawa@aj.jp.nec.com>
List: netbsd-bugs
Date: 05/30/2000 18:39:22
>Number: 10240
>Category: port-macppc
>Synopsis: Mouse does not work
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: port-macppc-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue May 30 18:40:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: Takashi Richard Horikawa Takashi Richard Horikawa
>Release: 1.4.2 for macppc
>Organization:
NEC Networks Development Laboratories
>Environment:
NetBSD 1.4.2 NetBSD 1.4.2 (GENERIC) #0: Wed Mar 15 21:53:17 PST 2000 toddpw
@leia.toddpw.net:/usr/src/sys/arch/macppc/compile/GENERIC macppc
>Description:
My mouse attached to Power Macintosh 4400/200
does not work, because its access is not ams0
but ams1 whose mouse events will not reach
to wsmouse0.
Although the Apple Desktop Bus has a key board
and a mouse, NetBSD prepares akdb0, akdb1, ams0,
and ams1, as shown in the following boot messsage,
and uses akdb1 and ams1. While the key-board
events from akbd1 are designed to be passed to wskbd0
via 'akbd_cd.cd_devs[0]', the mouse events from ams1
are not deliverd to anywhere.
--------
adb0 at obio0 offset 0x16000 irq 18: 4 targets
aed0 at adb0 addr 0: ADB Event device
akbd0 at adb0 addr 2: extended keyboard
wskbd0 at akbd0: console keyboard
ams0 at adb0 addr 3: 1-button, 100 dpi mouse
wsmouse0 at ams0
akbd1 at adb0 addr 2: keyboard II (Japanese layout)
wskbd at akbd1 not configured
ams1 at adb0 addr 3: 1-button, 100 dpi mouse
wsmouse at ams1 not configured
>How-To-Repeat:
Anytime when we start to use X-window system,
e.g. by executing 'xinit', as far as my Power
Macintosh 4400/200 is concerned.
>Fix:
To fix the mouse problem, I modified the last part of
ms_processevent()@/usr/src/sys/arch/macppc/dev/ams.c
so that the ams1 events can reach to wsmouse0 via
'ams_cd.cd_devs[0]'. So far, it works fine and produces
no bad side effect.
--------
if (msc->sc_wsmousedev) {
wsmouse_input(msc->sc_wsmousedev, new_event.u.m.buttons,
new_event.u.m.dx, -new_event.u.m.dy, 0);
} else {
extern struct cfdriver ams_cd;
struct ams_softc *sc = ams_cd.cd_devs[0];
if(sc->sc_wsmousedev)
wsmouse_input(sc->sc_wsmousedev, new_event.u.m.buttons,
new_event.u.m.dx, -new_event.u.m.dy, 0);
}
#if NAED > 0
aed_input(&new_event);
#endif
}
--------
The following source list is the corresponding part
involved in the original 1.4.2 release.
--------
if (msc->sc_wsmousedev)
wsmouse_input(msc->sc_wsmousedev, new_event.u.m.buttons,
new_event.u.m.dx, -new_event.u.m.dy, 0);
#if NAED > 0
aed_input(&new_event);
#endif
}
--------
>Release-Note:
>Audit-Trail:
>Unformatted: