Subject: port-mac68k/11310: adb_op_sync timeout is still too short
To: None <gnats-bugs@gnats.netbsd.org>
From: Dave Huang <khym@bga.com>
List: netbsd-bugs
Date: 10/25/2000 09:42:10
>Number: 11310
>Category: port-mac68k
>Synopsis: adb_op_sync timeout is still too short
>Confidential: no
>Severity: non-critical
>Priority: high
>Responsible: port-mac68k-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Oct 25 09:41:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: Dave Huang
>Release: NetBSD-1.5_BETA as of October 24, 2000
>Organization:
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++
>Environment:
System: NetBSD gedd.metonymy.com 1.5_BETA NetBSD 1.5_BETA (GEDD) #608: Wed Oct 25 11:02:21 CDT 2000 khym@dahan.metonymy.com:/usr/src.local/sys/arch/mac68k/compile/GEDD mac68k
>Description:
The timeout in adb.c's adb_op_sync() was increased from 6.9ms
to 8ms, but the Logitech TrackMan Marble seems to need about 8.2ms or
so. (I increased the timeout and printed the difference between the
starting value of tmout and its value when the loop was exited). This
causes it to probe as a Logitech non-EMP mouse, when it actually does
support the EMP.
>How-To-Repeat:
Boot a 1.5_BETA kernel with a Logitech TrackMan Marble?
>Fix:
How about a 10ms timeout?
--- /usr/src/sys/arch/mac68k/dev/adb.c Fri Sep 22 05:48:43 2000
+++ adb.c Wed Oct 25 11:29:46 2000
@@ -285,8 +285,11 @@
* - up to 8 data bytes: 64 * 100 usec = 6400 usec
* - stop bit (with SRQ): 140 usec
* Total: 6900 usec
+ *
+ * Add a bit of extra time in case the device needs to
+ * think about it a bit.
*/
- for (tmout = 8000; !flag && tmout >= 10; tmout -= 10)
+ for (tmout = 10000; !flag && tmout >= 10; tmout -= 10)
delay(10);
if (!flag && tmout > 0)
delay(tmout);
>Release-Note:
>Audit-Trail:
>Unformatted: