summary refs log tree commit diff stats
path: root/hw/pci-hotplug.c
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2009-05-14 22:35:07 +0100
committerPaul Brook <paul@codesourcery.com>2009-05-14 22:35:07 +0100
commit9be5dafe488088bcff8f8365bc7dd35d3dac5186 (patch)
tree9c01abd9c63a4b34b9408a4a379d74d7dab13fc1 /hw/pci-hotplug.c
parent86394e969de181d95f2f03e9c93e31e0b3e6c90f (diff)
downloadfocaccia-qemu-9be5dafe488088bcff8f8365bc7dd35d3dac5186.tar.gz
focaccia-qemu-9be5dafe488088bcff8f8365bc7dd35d3dac5186.zip
LSI SCSI qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
Diffstat (limited to 'hw/pci-hotplug.c')
-rw-r--r--hw/pci-hotplug.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c
index 603d74d1e5..294fdd11e2 100644
--- a/hw/pci-hotplug.c
+++ b/hw/pci-hotplug.c
@@ -71,8 +71,8 @@ void drive_hot_add(Monitor *mon, const char *pci_addr, const char *opts)
     switch (type) {
     case IF_SCSI:
         success = 1;
-        lsi_scsi_attach (dev, drives_table[drive_idx].bdrv,
-                         drives_table[drive_idx].unit);
+        lsi_scsi_attach(&dev->qdev, drives_table[drive_idx].bdrv,
+                        drives_table[drive_idx].unit);
         break;
     default:
         monitor_printf(mon, "Can't hot-add drive to type %d\n", type);
@@ -117,10 +117,7 @@ static PCIDevice *qemu_pci_hot_add_storage(Monitor *mon, PCIBus *pci_bus,
 
     switch (type) {
     case IF_SCSI:
-        opaque = lsi_scsi_init (pci_bus, -1);
-        if (opaque && drive_idx >= 0)
-            lsi_scsi_attach (opaque, drives_table[drive_idx].bdrv,
-                             drives_table[drive_idx].unit);
+        opaque = pci_create_simple(pci_bus, -1, "lsi53c895a");
         break;
     case IF_VIRTIO:
         opaque = virtio_blk_init (pci_bus, drives_table[drive_idx].bdrv);