On 08/18/2015 01:42 AM, Alexander Bezzubikov wrote:
> Signed-off-by: Alexander Bezzubikov <[email protected]>
> ---
> 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
[email protected] +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)