From: Paolo Bonzini <pbonzini@redhat.com>
To: Amit Shah <amit.shah@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>, Gleb Natapov <gleb@redhat.com>,
Juan Quintela <quintela@redhat.com>,
Stefan Hajnoczi <stefanha@gmail.com>,
Markus Armbruster <armbru@redhat.com>,
qemu list <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Re: [PATCH v2 1/2] cdrom: Allow the TEST_UNIT_READY command after a cdrom change
Date: Thu, 07 Apr 2011 09:22:52 +0200 [thread overview]
Message-ID: <4D9D664C.40807@redhat.com> (raw)
In-Reply-To: <f6b374c65b0b3c95edc73d6b39abae1fdbcd0750.1302152648.git.amit.shah@redhat.com>
On 04/07/2011 07:05 AM, Amit Shah wrote:
> We restrict the commands that a guest can send us after a cdrom change
> event. The current list includes REQUEST_SENSE and INQUIRY commands.
> Guests can also issue TEST_UNIT_READY to inquire for the status, so
> allow this command as well.
>
> Signed-off-by: Amit Shah<amit.shah@redhat.com>
> ---
> hw/ide/core.c | 9 +++++----
> 1 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/hw/ide/core.c b/hw/ide/core.c
> index 007a4ee..d55d804 100644
> --- a/hw/ide/core.c
> +++ b/hw/ide/core.c
> @@ -1105,10 +1105,11 @@ static void ide_atapi_cmd(IDEState *s)
> /* If there's a UNIT_ATTENTION condition pending, only
> REQUEST_SENSE and INQUIRY commands are allowed to complete. */
> if (s->sense_key == SENSE_UNIT_ATTENTION&&
> - s->io_buffer[0] != GPCMD_REQUEST_SENSE&&
> - s->io_buffer[0] != GPCMD_INQUIRY) {
> - ide_atapi_cmd_check_status(s);
> - return;
> + s->io_buffer[0] != GPCMD_REQUEST_SENSE&&
> + s->io_buffer[0] != GPCMD_INQUIRY&&
> + s->io_buffer[0] != GPCMD_TEST_UNIT_READY) {
> + ide_atapi_cmd_check_status(s);
> + return;
> }
> switch(s->io_buffer[0]) {
> case GPCMD_TEST_UNIT_READY:
ACK
Paolo
next prev parent reply other threads:[~2011-04-07 7:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-07 5:05 [Qemu-devel] [PATCH v2 0/2] Correct transitions for cd change state Amit Shah
2011-04-07 5:05 ` [Qemu-devel] [PATCH v2 1/2] cdrom: Allow the TEST_UNIT_READY command after a cdrom change Amit Shah
2011-04-07 7:22 ` Paolo Bonzini [this message]
2011-04-07 8:42 ` [Qemu-devel] " Stefan Hajnoczi
2011-04-07 8:51 ` Amit Shah
2011-04-07 8:59 ` Kevin Wolf
2011-04-07 9:11 ` Amit Shah
2011-04-07 10:20 ` Kevin Wolf
2011-04-07 11:15 ` Amit Shah
2011-04-07 5:05 ` [Qemu-devel] [PATCH v2 2/2] cdrom: Make disc change event visible to guests Amit Shah
2011-04-07 7:31 ` [Qemu-devel] " Paolo Bonzini
2011-04-07 8:01 ` Amit Shah
2011-04-07 8:41 ` Stefan Hajnoczi
2011-04-07 8:51 ` Amit Shah
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=4D9D664C.40807@redhat.com \
--to=pbonzini@redhat.com \
--cc=amit.shah@redhat.com \
--cc=armbru@redhat.com \
--cc=gleb@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=stefanha@gmail.com \
/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.