From patchwork Fri Jan 22 23:07:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alyssa Milburn X-Patchwork-Id: 8095291 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E94919F440 for ; Sat, 23 Jan 2016 01:32:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5EE60205DC for ; Sat, 23 Jan 2016 01:32:25 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 21462205D6 for ; Sat, 23 Jan 2016 01:32:24 +0000 (UTC) Received: from localhost ([::1]:56065 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMn3v-0008Kc-67 for patchwork-qemu-devel@patchwork.kernel.org; Fri, 22 Jan 2016 20:32:23 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56966) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMkmz-00088G-7v for qemu-devel@nongnu.org; Fri, 22 Jan 2016 18:06:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMkmu-0007ZM-Ay for qemu-devel@nongnu.org; Fri, 22 Jan 2016 18:06:45 -0500 Received: from li141-249.members.linode.com ([109.74.194.249]:39870) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMkmu-0007Z7-5E; Fri, 22 Jan 2016 18:06:40 -0500 Received: by li141-249.members.linode.com (Postfix, from userid 1000) id D1AB879D4; Fri, 22 Jan 2016 23:07:24 +0000 (UTC) Date: Fri, 22 Jan 2016 23:07:24 +0000 From: Alyssa Milburn To: qemu-devel@nongnu.org Message-ID: <20160122230724.GA25949@li141-249.members.linode.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 109.74.194.249 X-Mailman-Approved-At: Fri, 22 Jan 2016 20:32:14 -0500 Cc: Mark Cave-Ayland , qemu-ppc@nongnu.org, Alexander Graf , David Gibson Subject: [Qemu-devel] [PATCH] cuda.c: return error for unknown commands X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This avoids MacsBug hanging at startup in the absence of ADB mouse input, by replying with an error (which is also what MOL does) when it sends an unknown command (0x1c). Signed-off-by: Alyssa Milburn --- hw/misc/macio/cuda.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/misc/macio/cuda.c b/hw/misc/macio/cuda.c index 9db4c64..7e57de5 100644 --- a/hw/misc/macio/cuda.c +++ b/hw/misc/macio/cuda.c @@ -605,6 +605,11 @@ static void cuda_receive_packet(CUDAState *s, } break; default: + obuf[0] = ERROR_PACKET; + obuf[1] = 0x2; + obuf[2] = CUDA_PACKET; + obuf[3] = data[0]; + cuda_send_packet_to_host(s, obuf, 4); break; } }