Subject: Still having ADB problems (on 660av)
To: None <port-mac68k@netbsd.org>
From: Dave Huang <khym@bga.com>
List: port-mac68k
Date: 10/24/2000 21:12:48
This is from a 1.5_BETA kernel, Centris 660av, Logitech TrackMan Marble
(and a bit of debugging turned on):

adb0 (direct, Cuda): 2 targets
aed0 at adb0 addr 0: ADB Event device
akbd0 at adb0 addr 2: extended keyboard
wskbd0 at akbd0: console keyboard, using wsdisplay0
ams0 at adb0 addr 3: adb: ems_init timed out
Logitech MouseMan (non-EMP) mouse

The "ems_init timed out" is from line 299 of ams.c, BTW -- where it's
trying to set the handler type to ADBMS_EXTENDED. It used to say
something to the effect of "EMP trackball <LT02>". Also, one time during
the boot process, it crashed after printing the "Logitech MouseMan
(non-EMP) mouse" line, with the PC at 0x54303200. Which happens to be
"T02\0". I haven't looked into the code to see how adb_op and the
completion routine business works, but is it possible that if adb_op
takes longer than adb_op_sync is expecting (i.e. adb_op_sync times out,
but the ADB operation actually succeeds after a while), adb_op will
store its results in a buffer that's no longer valid? Do we need some
way for adb_op_sync to cancel an in-progress adb_op? (Or at least make
sure adb_op no longer tries to write anything to the buffer that was
passed in?)

I haven't tried increasing the delay in adb_op_sync yet... BTW, the
comment in adb_op_sync explains where 6900us comes from, but not why the
timeout is actually 8000us. And isn't the 6900us only the time it takes
to send the command across the ADB? It looks like it's not including
much time for the device to think about it and send the response back
(only 1100us?) I've forgotten how ADB works though, so maybe 6900us is
supposed to be all that's needed :)

And finally, should rev 1.39 of adb.c be pulled up to netbsd-1-5? (it's
the fix for the ADB address printing when there were collisions).
-- 
Name: Dave Huang     |   Mammal, mammal / their names are called /
INet: khym@bga.com   |   they raise a paw / the bat, the cat /
FurryMUCK: Dahan     |   dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 24 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++