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 Date: Fri, 22 Jan 2016 23:07:24 +0000 From: Alyssa Milburn Message-ID: <20160122230724.GA25949@li141-249.members.linode.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH] cuda.c: return error for unknown commands List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland , qemu-ppc@nongnu.org, Alexander Graf , David Gibson 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; } } -- 2.5.3