From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:49994) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0vfE-0004pV-Og for qemu-devel@nongnu.org; Fri, 24 Feb 2012 08:58:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S0vf8-0006zK-N0 for qemu-devel@nongnu.org; Fri, 24 Feb 2012 08:58:24 -0500 Received: from mail-pz0-f45.google.com ([209.85.210.45]:62482) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0vf8-0006zF-Fi for qemu-devel@nongnu.org; Fri, 24 Feb 2012 08:58:18 -0500 Received: by dadp14 with SMTP id p14so3003248dad.4 for ; Fri, 24 Feb 2012 05:58:17 -0800 (PST) Sender: Paolo Bonzini Message-ID: <4F479773.2080002@redhat.com> Date: Fri, 24 Feb 2012 14:58:11 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1329921236-23461-1-git-send-email-pbonzini@redhat.com> <1329921236-23461-15-git-send-email-pbonzini@redhat.com> <20120224075437.GA6937@localhost.localdomain> In-Reply-To: <20120224075437.GA6937@localhost.localdomain> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 14/18] virtio-scsi: process control queue requests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hu Tao Cc: qemu-devel@nongnu.org On 02/24/2012 08:54 AM, Hu Tao wrote: > diff --git a/hw/virtio-scsi.c b/hw/virtio-scsi.c > index 380073a..1f3b851 100644 > --- a/hw/virtio-scsi.c > +++ b/hw/virtio-scsi.c > @@ -239,7 +239,7 @@ static VirtIOSCSIReq *virtio_scsi_pop_req(VirtIOSCSI *s, VirtQueue *vq) > > static void virtio_scsi_do_tmf(VirtIOSCSI *s, VirtIOSCSIReq *req) > { > - SCSIDevice *d = virtio_scsi_device_find(s, req->req.cmd->lun); > + SCSIDevice *d = virtio_scsi_device_find(s, req->req.tmf->lun); > SCSIRequest *r, *next; > DeviceState *qdev; > int target; > @@ -253,11 +253,11 @@ static void virtio_scsi_do_tmf(VirtIOSCSI *s, VirtIOSCSIReq *req) > if (!d) { > goto fail; > } > - if (d->lun != virtio_scsi_get_lun(req->req.cmd->lun)) { > + if (d->lun != virtio_scsi_get_lun(req->req.tmf->lun)) { > goto incorrect_lun; > } > QTAILQ_FOREACH_SAFE(r, &d->requests, next, next) { > - if (r->tag == req->req.cmd->tag) { > + if (r->tag == req->req.tmf->tag) { > break; > } > } > @@ -277,7 +277,7 @@ static void virtio_scsi_do_tmf(VirtIOSCSI *s, VirtIOSCSIReq *req) > if (!d) { > goto fail; > } > - if (d->lun != virtio_scsi_get_lun(req->req.cmd->lun)) { > + if (d->lun != virtio_scsi_get_lun(req->req.tmf->lun)) { > goto incorrect_lun; > } > s->resetting++; > @@ -291,7 +291,7 @@ static void virtio_scsi_do_tmf(VirtIOSCSI *s, VirtIOSCSIReq *req) > if (!d) { > goto fail; > } > - if (d->lun != virtio_scsi_get_lun(req->req.cmd->lun)) { > + if (d->lun != virtio_scsi_get_lun(req->req.tmf->lun)) { > goto incorrect_lun; > } > QTAILQ_FOREACH_SAFE(r, &d->requests, next, next) { > @@ -310,7 +310,7 @@ static void virtio_scsi_do_tmf(VirtIOSCSI *s, VirtIOSCSIReq *req) > break; > > case VIRTIO_SCSI_T_TMF_I_T_NEXUS_RESET: > - target = req->req.cmd->lun[1]; > + target = req->req.tmf->lun[1]; > s->resetting++; > QTAILQ_FOREACH(qdev, &s->bus.qbus.children, sibling) { > d = DO_UPCAST(SCSIDevice, qdev, qdev); This is now fixed on github. Paolo