Received: from eggs.gnu.org ([2001:4830:134:3::10]:54313) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjUa8-0002Gw-Ls for qemu-devel@nongnu.org; Wed, 29 Oct 2014 10:50:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XjUa2-0005h5-VX for qemu-devel@nongnu.org; Wed, 29 Oct 2014 10:50:40 -0400 Received: from mail-la0-x22d.google.com ([2a00:1450:4010:c03::22d]:58990) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjUa2-0005gy-NU for qemu-devel@nongnu.org; Wed, 29 Oct 2014 10:50:34 -0400 Received: by mail-la0-f45.google.com with SMTP id gm9so2695847lab.18 for ; Wed, 29 Oct 2014 07:50:33 -0700 (PDT) Date: Wed, 29 Oct 2014 14:50:29 +0000 From: Stefan Hajnoczi Message-ID: <20141029145029.GD5218@stefanha-thinkpad.redhat.com> References: <1414569232-21357-1-git-send-email-hare@suse.de> <1414569232-21357-3-git-send-email-hare@suse.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HWvPVVuAAfuRc6SZ" Content-Disposition: inline In-Reply-To: <1414569232-21357-3-git-send-email-hare@suse.de> Subject: Re: [Qemu-devel] [PATCH 02/17] atapi: clear sense code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hannes Reinecke Cc: Paolo Bonzini , Alexander Graf , qemu-devel@nongnu.org, Andreas Faerber , Nic Bellinger --HWvPVVuAAfuRc6SZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 29, 2014 at 08:53:37AM +0100, Hannes Reinecke wrote: > The sense code needs to be cleared after REQUEST SENSE. >=20 > Signed-off-by: Hannes Reinecke > --- > hw/ide/atapi.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) >=20 > diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c > index 10218df..fca9174 100644 > --- a/hw/ide/atapi.c > +++ b/hw/ide/atapi.c > @@ -611,9 +611,7 @@ static void cmd_request_sense(IDEState *s, uint8_t *b= uf) > buf[7] =3D 10; > buf[12] =3D s->asc; > =20 > - if (s->sense_key =3D=3D UNIT_ATTENTION) { > - s->sense_key =3D NO_SENSE; > - } > + s->sense_key =3D NO_SENSE; > =20 > ide_atapi_cmd_reply(s, 18, max_len); > } I'm not a SCSI expert, but this patch seems justified. I skimmed through SPC, SAM, and ATA/ATAPI-4 sections on REQUEST SENSE and sense data. Reviewed-by: Stefan Hajnoczi --HWvPVVuAAfuRc6SZ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJUUP61AAoJEJykq7OBq3PIa98IAIO9FdwoDs5tZa9qKef3SCpV LyPHKNAOw3cqAYH0ktzLjNl+DckgNdY4soGvV9o8kaKLP5ZieREWtZA58ZzJvyhc 5M4yhqO4E9OHR1Hmv8yxC6/DgGU/yLnpiiBaT1D0SS9DoGbpzpTD8mXUyWuxrKdr CA8Ri5PJIl1pRz717IidGlJUk/62CIgmK79FPz0RnJSt7euCslpD9W02l72RyNho 62OOKBhKjbaGXtAk2aaEa5fGXoRlXiSaP7V1py5Ko7GJwgOiM2rTrD+wKlflaezq jvJ6MFacWyP0Z2zXbQnWmdqclPUzSlZL7o2PgN6M7wMFQO4SHqN1FTtm5J60fj0= =82HH -----END PGP SIGNATURE----- --HWvPVVuAAfuRc6SZ--