Received: from eggs.gnu.org ([2001:4830:134:3::10]:37341) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5uR2-00084J-NI for qemu-devel@nongnu.org; Sat, 12 Jul 2014 06:21:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X5uQv-00014V-8n for qemu-devel@nongnu.org; Sat, 12 Jul 2014 06:21:40 -0400 Received: from annex.linet.gr.jp ([182.163.76.19]:52157 helo=mail.linet.jp) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5uQv-000130-01 for qemu-devel@nongnu.org; Sat, 12 Jul 2014 06:21:33 -0400 Message-Id: <201407121021.AA01528@tamuki.linet.gr.jp> From: TAMUKI Shoichi Date: Sat, 12 Jul 2014 19:21:15 +0900 In-Reply-To: <53BFA831.5090008@redhat.com> References: <53BFA831.5090008@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: qemu-devel@nongnu.org Cc: Paolo Bonzini , TAMUKI Shoichi Hello, From: Paolo Bonzini Subject: Re: [PATCH] scsi-bus: fix to allow some special SCSI commands Date: Fri, 11 Jul 2014 11:02:41 +0200 > > @@ -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. Thank you for your quick response. It is just as you say. I will send the revised patch soon. Regards, TAMUKI Shoichi