qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v4 14/18] virtio-scsi: process control queue req


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v4 14/18] virtio-scsi: process control queue requests
Date: Fri, 24 Feb 2012 14:58:11 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120209 Thunderbird/10.0.1

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]