From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=50939 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q7kvu-0005Fs-3i for qemu-devel@nongnu.org; Thu, 07 Apr 2011 04:51:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q7kvs-0005fU-Sl for qemu-devel@nongnu.org; Thu, 07 Apr 2011 04:51:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:5655) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q7kvs-0005eu-JW for qemu-devel@nongnu.org; Thu, 07 Apr 2011 04:51:16 -0400 Date: Thu, 7 Apr 2011 14:21:06 +0530 From: Amit Shah Message-ID: <20110407085106.GA11546@amit-x200.redhat.com> References: <20110407084230.GB21709@stefanha-thinkpad.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110407084230.GB21709@stefanha-thinkpad.localdomain> Subject: [Qemu-devel] Re: [PATCH v2 1/2] cdrom: Allow the TEST_UNIT_READY command after a cdrom change List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , Gleb Natapov , Juan Quintela , Markus Armbruster , qemu list On (Thu) 07 Apr 2011 [09:42:30], Stefan Hajnoczi wrote: > On Thu, Apr 07, 2011 at 10:35:18AM +0530, Amit Shah wrote: > > @@ -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; > > Looks good but please update the comment. Argh! I'll update to a generic one as there are more commands that we need to allow. Amit