From 1609858811b6f33f39bef89d7e3803e564e107b3 Mon Sep 17 00:00:00 2001 From: scottr Date: Wed, 15 Nov 2000 06:35:51 +0000 Subject: [PATCH] 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. --- sys/arch/mac68k/dev/adb.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sys/arch/mac68k/dev/adb.c b/sys/arch/mac68k/dev/adb.c index a46f1484d63c..044c02faae32 100644 --- a/sys/arch/mac68k/dev/adb.c +++ b/sys/arch/mac68k/dev/adb.c @@ -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);