All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Alyssa Milburn <fuzzie@fuzzie.org>
Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
	qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
	Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCH] cuda.c: return error for unknown commands
Date: Mon, 25 Jan 2016 10:08:07 +1100	[thread overview]
Message-ID: <20160124230807.GM27454@voom.redhat.com> (raw)
In-Reply-To: <20160122230724.GA25949@li141-249.members.linode.com>

[-- Attachment #1: Type: text/plain, Size: 1361 bytes --]

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).
> 
> Signed-off-by: Alyssa Milburn <fuzzie@fuzzie.org>

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é'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(+)
> 
> 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;
>      }
>  }

-- 
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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

      parent reply	other threads:[~2016-01-24 23:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-22 23:07 [Qemu-devel] [PATCH] cuda.c: return error for unknown commands Alyssa Milburn
2016-01-23 19:11 ` Mark Cave-Ayland
2016-01-24 23:08 ` David Gibson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160124230807.GM27454@voom.redhat.com \
    --to=david@gibson.dropbear.id.au \
    --cc=agraf@suse.de \
    --cc=fuzzie@fuzzie.org \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.