diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2011-12-23 15:34:39 -0600 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2012-06-18 15:14:38 +0200 |
commit | 0866aca1de15a12547f52ff8563cf7c163e1898e (patch) | |
tree | 511c043eb3de19d479f708209e588d828b751903 /hw/virtio-scsi.c | |
parent | f968fc6892daf02865cce8af277cc755be690eda (diff) |
qbus: Make child devices links
Make qbus children show up as link<> properties. There is no stable
addressing for qbus children so we use an unstable naming convention.
This is okay in QOM though because the composition name is expected to
be what's stable.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/virtio-scsi.c')
-rw-r--r-- | hw/virtio-scsi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/virtio-scsi.c b/hw/virtio-scsi.c index 5e39ce93c4..e1a767ea78 100644 --- a/hw/virtio-scsi.c +++ b/hw/virtio-scsi.c @@ -275,7 +275,7 @@ static void virtio_scsi_do_tmf(VirtIOSCSI *s, VirtIOSCSIReq *req) { SCSIDevice *d = virtio_scsi_device_find(s, req->req.tmf->lun); SCSIRequest *r, *next; - DeviceState *qdev; + BusChild *kid; int target; /* Here VIRTIO_SCSI_S_OK means "FUNCTION COMPLETE". */ @@ -346,8 +346,8 @@ static void virtio_scsi_do_tmf(VirtIOSCSI *s, VirtIOSCSIReq *req) case VIRTIO_SCSI_T_TMF_I_T_NEXUS_RESET: target = req->req.tmf->lun[1]; s->resetting++; - QTAILQ_FOREACH(qdev, &s->bus.qbus.children, sibling) { - d = DO_UPCAST(SCSIDevice, qdev, qdev); + QTAILQ_FOREACH(kid, &s->bus.qbus.children, sibling) { + d = DO_UPCAST(SCSIDevice, qdev, kid->child); if (d->channel == 0 && d->id == target) { qdev_reset_all(&d->qdev); } |