qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 02/17] atapi: clear sense code


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH 02/17] atapi: clear sense code
Date: Wed, 29 Oct 2014 14:50:29 +0000
User-agent: Mutt/1.5.23 (2014-03-12)

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 <address@hidden>
> ---
>  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 <address@hidden>

Attachment: pgpd0ABq3w8rQ.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]