qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH RFC 06/11] ide: ATAPI-SCSI bridge can now forwar


From: Hannes Reinecke
Subject: Re: [Qemu-devel] [PATCH RFC 06/11] ide: ATAPI-SCSI bridge can now forward requests to SCSI
Date: Tue, 18 Aug 2015 08:12:25 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

On 08/18/2015 01:42 AM, Alexander Bezzubikov wrote:
> Signed-off-by: Alexander Bezzubikov <address@hidden>
> ---
>  hw/ide/atapi.c | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c
> index 79dd167..6e73910 100644
> --- a/hw/ide/atapi.c
> +++ b/hw/ide/atapi.c
> @@ -1257,5 +1257,21 @@ void ide_atapi_cmd(IDEState *s)
>          return;
>      }
>  
> +    if (s->drive_kind == IDE_BRIDGE) {
> +        IDEDevice *dev = s->bus->master;
> +        SCSIDevice *scsi_dev = scsi_device_find(&dev->scsi_bus, 0, 0, 0);
> +        s->cur_req = scsi_new_request_from_bridge(scsi_dev, 0, 0, buf, NULL);
> +
> +        /* Looks like a hack, but it's better than placing it at 
> scsi_do_read */

This needs some more explanations on why it's required.

> +        if (buf[0] == READ_10) {
> +            s->status |= BUSY_STAT;
> +        }
> +
> +        if (scsi_req_enqueue(s->cur_req)) {
> +            scsi_req_continue(s->cur_req);
> +        }
> +        return;
> +    }
> +
>      ide_atapi_cmd_error(s, ILLEGAL_REQUEST, ASC_ILLEGAL_OPCODE);
>  }
> 
And this patch should be merged with the two previous ones.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                   zSeries & Storage
address@hidden                        +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)



reply via email to

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