aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/scsi/megasas.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c
index 55d5b73606..2ae434683e 100644
--- a/hw/scsi/megasas.c
+++ b/hw/scsi/megasas.c
@@ -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;
@@ -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;
}