From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:43063) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9aGV-00017j-T7 for qemu-devel@nongnu.org; Tue, 12 Apr 2011 05:52:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q9aGV-0000Gf-5Z for qemu-devel@nongnu.org; Tue, 12 Apr 2011 05:52:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42815) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9aGU-0000GK-T2 for qemu-devel@nongnu.org; Tue, 12 Apr 2011 05:52:07 -0400 Message-ID: <4DA42154.2090504@redhat.com> Date: Tue, 12 Apr 2011 11:54:28 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <5117cc4f49fb4fd756f3d56739b171f54aebdda8.1302600061.git.amit.shah@redhat.com> In-Reply-To: <5117cc4f49fb4fd756f3d56739b171f54aebdda8.1302600061.git.amit.shah@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 1/6] atapi: Allow GESN after media change List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amit Shah Cc: Juan Quintela , Stefan Hajnoczi , Markus Armbruster , qemu list , Paolo Bonzini Am 12.04.2011 11:27, schrieb Amit Shah: > After a media change, the only commands allowed from the guest were > REQUEST_SENSE and INQUIRY. The guest may also issue > GET_EVENT_STATUS_NOTIFICATION commands to get media > changed notification. > > Signed-off-by: Amit Shah > --- > hw/ide/core.c | 19 +++++++++++++------ > 1 files changed, 13 insertions(+), 6 deletions(-) > > diff --git a/hw/ide/core.c b/hw/ide/core.c > index c11d457..f839ef3 100644 > --- a/hw/ide/core.c > +++ b/hw/ide/core.c > @@ -1102,13 +1102,20 @@ static void ide_atapi_cmd(IDEState *s) > printf("\n"); > } > #endif > - /* If there's a UNIT_ATTENTION condition pending, only > - REQUEST_SENSE and INQUIRY commands are allowed to complete. */ > + /* > + * If there's a UNIT_ATTENTION condition pending, only > + * REQUEST_SENSE, INQUIRY and GET_EVENT_STATUS_NOTIFICATION > + * commands are allowed to complete. MMC-5, section 4.1.6.1 lists > + * only these commands being allowed to complete, with other > + * commands getting a CHECK condition response unless a higher > + * priority status, defined by the drive here, is pending. > + */ GET CONFIGURATION is allowed as well. That would be an unrelated fix, though, so we can do it on top. Kevin