On Wed, Oct 29, 2014 at 08:53:37AM +0100, Hannes Reinecke wrote: > The sense code needs to be cleared after REQUEST SENSE. > > Signed-off-by: Hannes Reinecke <h...@suse.de> > --- > hw/ide/atapi.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > 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 *buf) > buf[7] = 10; > buf[12] = s->asc; > > - if (s->sense_key == UNIT_ATTENTION) { > - s->sense_key = NO_SENSE; > - } > + s->sense_key = NO_SENSE; > > 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 <stefa...@redhat.com>
pgpsaLIeivVnK.pgp
Description: PGP signature