qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 4/4] scsi-generic: do not do VPD emulation for s


From: Max Reitz
Subject: Re: [Qemu-devel] [PATCH 4/4] scsi-generic: do not do VPD emulation for sense other than ILLEGAL_REQUEST
Date: Tue, 6 Nov 2018 03:22:00 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1

On 29.10.18 18:34, Paolo Bonzini wrote:
> Pass other sense, such as UNIT_ATTENTION or BUSY, directly to the
> guest.
> 
> Reported-by: Max Reitz <address@hidden>
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
>  hw/scsi/scsi-generic.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)

[...]

> @@ -269,12 +268,15 @@ static void scsi_read_complete(void * opaque, int ret)
>       * resulted in sense error but would need emulation.
>       * In this case, emulate a valid VPD response.
>       */
> -    if (s->needs_vpd_bl_emulation) {
> +    if (ret == 0 &&
> +        (r->io_header.driver_status & SG_ERR_DRIVER_SENSE) &&
> +        scsi_parse_sense_buf(r->req.sense, r->io_header.sb_len_wr).key == 
> ILLEGAL_REQUEST &&

As noted by Patchew, this line needs to be split.  With that done:

Reviewed-by: Max Reitz <address@hidden>


Thanks for the series!

Max

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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