From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39323) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZRa8N-0003Sw-O5 for qemu-devel@nongnu.org; Tue, 18 Aug 2015 02:12:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZRa8J-0005PE-9z for qemu-devel@nongnu.org; Tue, 18 Aug 2015 02:12:31 -0400 Received: from mx2.suse.de ([195.135.220.15]:45404) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZRa8J-0005P8-41 for qemu-devel@nongnu.org; Tue, 18 Aug 2015 02:12:27 -0400 Message-ID: <55D2CCC9.302@suse.de> Date: Tue, 18 Aug 2015 08:12:25 +0200 From: Hannes Reinecke MIME-Version: 1.0 References: <1439854945-5597-1-git-send-email-abezzubikov@ispras.ru> <1439854945-5597-7-git-send-email-abezzubikov@ispras.ru> In-Reply-To: <1439854945-5597-7-git-send-email-abezzubikov@ispras.ru> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH RFC 06/11] ide: ATAPI-SCSI bridge can now forward requests to SCSI List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Bezzubikov , qemu-devel@nongnu.org Cc: jsnow@redhat.com, abezzubikov@ispras.ru On 08/18/2015 01:42 AM, Alexander Bezzubikov wrote: > Signed-off-by: Alexander Bezzubikov > --- > hw/ide/atapi.c | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) >=20 > 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; > } > =20 > + if (s->drive_kind =3D=3D IDE_BRIDGE) { > + IDEDevice *dev =3D s->bus->master; > + SCSIDevice *scsi_dev =3D scsi_device_find(&dev->scsi_bus, 0, 0= , 0); > + s->cur_req =3D scsi_new_request_from_bridge(scsi_dev, 0, 0, bu= f, 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] =3D=3D READ_10) { > + s->status |=3D 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); > } >=20 And this patch should be merged with the two previous ones. Cheers, Hannes --=20 Dr. Hannes Reinecke zSeries & Storage hare@suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg GF: J. Hawn, J. Guild, F. Imend=F6rffer, HRB 16746 (AG N=FCrnberg)