mirror of https://github.com/xqemu/xqemu.git
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>
This commit is contained in:
parent
b09318cac6
commit
22d6aa03fd
|
@ -2098,6 +2098,7 @@ static const struct SCSIBusInfo megasas_scsi_info = {
|
||||||
|
|
||||||
static int megasas_scsi_init(PCIDevice *dev)
|
static int megasas_scsi_init(PCIDevice *dev)
|
||||||
{
|
{
|
||||||
|
DeviceState *d = DEVICE(dev);
|
||||||
MegasasState *s = MEGASAS(dev);
|
MegasasState *s = MEGASAS(dev);
|
||||||
uint8_t *pci_conf;
|
uint8_t *pci_conf;
|
||||||
int i, bar_type;
|
int i, bar_type;
|
||||||
|
@ -2170,7 +2171,9 @@ static int megasas_scsi_init(PCIDevice *dev)
|
||||||
}
|
}
|
||||||
|
|
||||||
scsi_bus_new(&s->bus, DEVICE(dev), &megasas_scsi_info, NULL);
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue