From 5b684b5a56e81f6f88234952fe8ed68010c36e19 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Tue, 13 Oct 2009 13:59:55 +0200 Subject: 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 Signed-off-by: Anthony Liguori --- hw/lsi53c895a.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'hw/lsi53c895a.c') diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c index a4d3a57..012aaf6 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; } -- cgit v1.1