summary refs log tree commit diff stats
path: root/hw/scsi-bus.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2009-11-26 15:33:49 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2009-12-03 09:41:36 -0600
commit9af99d980e9ff6270f291b11a064087b33dd3ab8 (patch)
treeb0ac0266b94e7024c904973dddf84b51ca14b4ec /hw/scsi-bus.c
parent4c41d2ef5f599372a35d446fb75898fe9841bda4 (diff)
downloadfocaccia-qemu-9af99d980e9ff6270f291b11a064087b33dd3ab8.tar.gz
focaccia-qemu-9af99d980e9ff6270f291b11a064087b33dd3ab8.zip
scsi: move request lists to QTAILQ.
Changes:
 * Move from open-coded lists to QTAILQ macros.
 * Move the struct elements to the common data structures
   (SCSIDevice + SCSIRequest).
 * Drop free request pools.
 * Fix request cleanup in the destroy callback.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/scsi-bus.c')
-rw-r--r--hw/scsi-bus.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c
index 641db812f8..801922b7db 100644
--- a/hw/scsi-bus.c
+++ b/hw/scsi-bus.c
@@ -50,6 +50,7 @@ static int scsi_qdev_init(DeviceState *qdev, DeviceInfo *base)
     bus->devs[dev->id] = dev;
 
     dev->info = info;
+    QTAILQ_INIT(&dev->requests);
     rc = dev->info->init(dev);
     if (rc != 0) {
         bus->devs[dev->id] = NULL;