aboutsummaryrefslogtreecommitdiff
path: root/hw/lsi53c895a.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2009-10-13 13:59:55 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-10-27 12:28:42 -0500
commit5b684b5a56e81f6f88234952fe8ed68010c36e19 (patch)
treeb3bc7f3b86f8cce64e83429ec7d28e0687039fe2 /hw/lsi53c895a.c
parente8ee28fb3e6cc2c4f5ec10d0aec9ff8ae9469e93 (diff)
hotplug: fix "pci_add storage if=scsi"
Explicitly add the drive to the bus of the newly created scsi adapter instead of hoping that scsi_bus_legacy_handle_cmdline() picks it up correctly. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/lsi53c895a.c')
-rw-r--r--hw/lsi53c895a.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c
index a4d3a5740f..012aaf689f 100644
--- a/hw/lsi53c895a.c
+++ b/hw/lsi53c895a.c
@@ -2178,7 +2178,9 @@ static int lsi_scsi_init(PCIDevice *dev)
lsi_soft_reset(s);
scsi_bus_new(&s->bus, &dev->qdev, 1, LSI_MAX_DEVS, lsi_command_complete);
- scsi_bus_legacy_handle_cmdline(&s->bus);
+ if (!dev->qdev.hotplugged) {
+ scsi_bus_legacy_handle_cmdline(&s->bus);
+ }
register_savevm("lsiscsi", -1, 0, lsi_scsi_save, lsi_scsi_load, s);
return 0;
}