X-Git-Url: http://git.maemo.org/git/?p=qemu;a=blobdiff_plain;f=hw%2Fpci-hotplug.c;fp=hw%2Fpci-hotplug.c;h=4d18ea2fca11689c0585e1c1d379bcc78018db9a;hp=603d74d1e5243d3d860cc1137a7690ddd67fec89;hb=759b334a9739814df2883aa4c41b1c0f5670e90a;hpb=7e2198fc87e878b8ce5df965477e21713ebf7834 diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c index 603d74d..4d18ea2 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,13 +117,11 @@ 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); + opaque = pci_create_simple(pci_bus, -1, "virtio-blk-pci"); + qdev_init(opaque); break; }