Skip to content

Commit

Permalink
megasas: Legacy command line handling fix
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
afaerber committed Jul 22, 2013
1 parent b09318c commit 22d6aa0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion hw/scsi/megasas.c
Expand Up @@ -2098,6 +2098,7 @@ static const struct SCSIBusInfo megasas_scsi_info = {

static int megasas_scsi_init(PCIDevice *dev)
{
DeviceState *d = DEVICE(dev);
MegasasState *s = MEGASAS(dev);
uint8_t *pci_conf;
int i, bar_type;
Expand Down Expand Up @@ -2170,7 +2171,9 @@ static int megasas_scsi_init(PCIDevice *dev)
}

scsi_bus_new(&s->bus, DEVICE(dev), &megasas_scsi_info, NULL);
scsi_bus_legacy_handle_cmdline(&s->bus);
if (!d->hotplugged) {
return scsi_bus_legacy_handle_cmdline(&s->bus);
}
return 0;
}

Expand Down

0 comments on commit 22d6aa0

Please sign in to comment.