The Cuda-based ADB hardware has the ability to queue some commands and

return control to the main CPU before completing the ADB transaction.
Double the adb_op_sync() timeout as a result.  Fixes PR 11310.
This commit is contained in:
scottr 2000-11-15 06:35:51 +00:00
parent 6d80a2bff1
commit 1609858811
1 changed files with 10 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: adb.c,v 1.39 2000/09/27 03:22:05 scottr Exp $ */
/* $NetBSD: adb.c,v 1.40 2000/11/15 06:35:51 scottr Exp $ */
/*
* Copyright (C) 1994 Bradley A. Grantham
@ -285,8 +285,16 @@ adb_op_sync(Ptr buffer, Ptr compRout, Ptr data, short command)
* - up to 8 data bytes: 64 * 100 usec = 6400 usec
* - stop bit (with SRQ): 140 usec
* Total: 6900 usec
*
* This is the total time allowed by the specification. Any
* device that doesn't conform to this will fail to operate
* properly on some Apple systems. In spite of this we
* double the time to wait; some Cuda-based apparently
* queues some commands and allows the main CPU to continue
* processing (radical concept, eh?). To be safe, allow
* time for two complete ADB transactions to occur.
*/
for (tmout = 8000; !flag && tmout >= 10; tmout -= 10)
for (tmout = 13800; !flag && tmout >= 10; tmout -= 10)
delay(10);
if (!flag && tmout > 0)
delay(tmout);