From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33240) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNUM4-0006OK-P2 for qemu-devel@nongnu.org; Sun, 24 Jan 2016 18:46:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aNUM0-0000pE-O2 for qemu-devel@nongnu.org; Sun, 24 Jan 2016 18:46:00 -0500 Date: Mon, 25 Jan 2016 10:08:07 +1100 From: David Gibson Message-ID: <20160124230807.GM27454@voom.redhat.com> References: <20160122230724.GA25949@li141-249.members.linode.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="XlS4q8O07AKt4+K1" Content-Disposition: inline In-Reply-To: <20160122230724.GA25949@li141-249.members.linode.com> Subject: Re: [Qemu-devel] [PATCH] cuda.c: return error for unknown commands List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alyssa Milburn Cc: Mark Cave-Ayland , qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Alexander Graf --XlS4q8O07AKt4+K1 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 22, 2016 at 11:07:24PM +0000, Alyssa Milburn wrote: > 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). >=20 > Signed-off-by: Alyssa Milburn I've applied this to ppc-for-2.6 for now, since it looks like it addresses a real problem, and I can't see that it could break things any worse than they are broken already. I think Herv=E9's patches need a few tweaks, but I do hope to apply them on top in the not too distant future. > --- > hw/misc/macio/cuda.c | 5 +++++ > 1 file changed, 5 insertions(+) >=20 > 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] =3D ERROR_PACKET; > + obuf[1] =3D 0x2; > + obuf[2] =3D CUDA_PACKET; > + obuf[3] =3D data[0]; > + cuda_send_packet_to_host(s, obuf, 4); > break; > } > } --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --XlS4q8O07AKt4+K1 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWpVlWAAoJEGw4ysog2bOSX8UQAKutY/ur2A6bJXHxgW5ONZFO cBuy4W5Gu/fS6/wIamnGzHmgSq6mvo1k33zjH2TmuqXmHF6EKsSsfR97eOEiwwQW pvNZoUfPssP6Rho2yGLIKcsTBiyM/cGrlKnyf6UwkbjZKqAw5wcqIGtce0GusxMU oyNrO2lsOSE4zuSxz6undhS0n2YtgnUhJed85Ydi5VSSOdxKrfxEmaNYuhe4CT89 6z91N+zZaqwOqARk0ywZlzovjylzpYopdOYHiNfkEiCmB+IbuZ0LF7JDh+5HcS1W StmPi521LH2oR5vcXoFPrKYuFHaSWYFTSDEtqcDfzLrVSXDTzivpW+6wMzuzsqPp X7OhEyXRabCEIx22tZkPxPnOQSBu3KOJHZUrVn1XUFHcuRCjkEQpPaC+k54PSMoe JiYpsUhdKXe+KV6o3gtjqr6VwrOkjxfSkkTr/PtMluRPaRwOpIPxKTOGP/oAz3zR HgYFrgb0AfNUxuYBIv37V/WrMhvwQU2avF3QQUqThSFlWpZu5WI5nZnAvL4rqHpe /DofthSEtG2FuOXhh/vECsj5tX4yYuHvPlEiY/nXgKvJqnRgWWjL/V2APnHjytI/ 2qmQV7KyIc6tg014ILheb98V+913y0W07huIG7Mg0YB+i7TlB7VJ3nxGio8TqBEa Xo9GttYBrjNl0i4oYZWE =DNZZ -----END PGP SIGNATURE----- --XlS4q8O07AKt4+K1--