From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35278) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5WjF-00043d-Vh for qemu-devel@nongnu.org; Fri, 11 Jul 2014 05:03:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X5Wj9-0003GD-S4 for qemu-devel@nongnu.org; Fri, 11 Jul 2014 05:02:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49715) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5Wj9-0003G9-Jb for qemu-devel@nongnu.org; Fri, 11 Jul 2014 05:02:47 -0400 Message-ID: <53BFA831.5090008@redhat.com> Date: Fri, 11 Jul 2014 11:02:41 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <201407110853.AA01527@tamuki.linet.gr.jp> In-Reply-To: <201407110853.AA01527@tamuki.linet.gr.jp> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] scsi-bus: fix to allow some special SCSI commands List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: TAMUKI Shoichi , qemu-devel@nongnu.org Il 11/07/2014 10:53, TAMUKI Shoichi ha scritto: > @@ -563,7 +565,8 @@ SCSIRequest *scsi_req_new(SCSIDevice *d, uint32_t tag, uint32_t lun, > SCSIRequest *req; > SCSICommand cmd; > > - if (scsi_req_parse(&cmd, d, buf) != 0) { > + if (scsi_req_parse(&cmd, d, buf, > + ((VirtIOSCSIReq *) hba_private)->dev->parent_obj.cdb_size) != 0) { > trace_scsi_req_parse_bad(d->id, lun, tag, buf[0]); > req = scsi_req_alloc(&reqops_invalid_opcode, d, tag, lun, hba_private); > } else { This function is not called only for virtio-scsi. You need to add a new argument to scsi_req_new, and modify all invocations in hw/scsi. Thanks, Paolo