diff options
author | Andreas Färber <afaerber@suse.de> | 2013-07-21 12:20:15 +0200 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2013-08-13 09:30:49 -0500 |
commit | a561fcfed630c6a926f545ddcc20a0f31c65adf5 (patch) | |
tree | 6a9e51a259fb79d95588ee6603c03e31f4bf061f | |
parent | 685803fcf71c11c2ef8b9014b893c120dd00af25 (diff) | |
download | qemu-a561fcfed630c6a926f545ddcc20a0f31c65adf5.tar.gz |
megasas: Legacy command line handling fix
Only apply legacy command line handling when the device has not been
hot-plugged. Propagate failure of legacy command line handling.
Cc: qemu-stable@nongnu.org
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
(cherry picked from commit 22d6aa03fd87ba5f219d26bc1810646d0f95842a)
Conflicts:
hw/scsi/megasas.c
* modified to avoid dependency on fancy new upcast macros
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
-rw-r--r-- | hw/scsi/megasas.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c index 4934a815ce..27288b9222 100644 --- a/hw/scsi/megasas.c +++ b/hw/scsi/megasas.c @@ -2088,6 +2088,7 @@ static const struct SCSIBusInfo megasas_scsi_info = { static int megasas_scsi_init(PCIDevice *dev) { + DeviceState *d = DEVICE(dev); MegasasState *s = DO_UPCAST(MegasasState, dev, dev); uint8_t *pci_conf; int i, bar_type; @@ -2160,7 +2161,9 @@ static int megasas_scsi_init(PCIDevice *dev) } scsi_bus_new(&s->bus, &dev->qdev, &megasas_scsi_info, NULL); - scsi_bus_legacy_handle_cmdline(&s->bus); + if (!d->hotplugged) { + return scsi_bus_legacy_handle_cmdline(&s->bus); + } return 0; } |