[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)
- [Qemu-devel] [PATCH RFC 00/11] QEMU ATAPI-SCSI bridge GSoC project, Alexander Bezzubikov, 2015/08/18
- [Qemu-devel] [PATCH RFC 05/11] ide: bridge 'transfer' and 'complete' functions added, Alexander Bezzubikov, 2015/08/17
- [Qemu-devel] [PATCH RFC 06/11] ide: ATAPI-SCSI bridge can now forward requests to SCSI, Alexander Bezzubikov, 2015/08/17
- Re: [Qemu-devel] [PATCH RFC 06/11] ide: ATAPI-SCSI bridge can now forward requests to SCSI,
Hannes Reinecke <=
- [Qemu-devel] [PATCH RFC 07/11] ide: Makefile corrected due to bridge creation, Alexander Bezzubikov, 2015/08/17
- [Qemu-devel] [PATCH RFC 08/11] scsi: SCSIDiskReq declaration moved to header, Alexander Bezzubikov, 2015/08/17
- [Qemu-devel] [PATCH RFC 01/11] ide: ATAPI-SCSI bridge TypeInfo and init function created, Alexander Bezzubikov, 2015/08/17
- [Qemu-devel] [PATCH RFC 10/11] ide: corrected ATAPI checks to be ignored by ATAPI-SCSI bridge, Alexander Bezzubikov, 2015/08/17
- [Qemu-devel] [PATCH RFC 11/11] ide: bridge functions assigned to SCSIBusInfo, bridge is OK now, Alexander Bezzubikov, 2015/08/18