Skip to contentSkip to conversation

megasas: Legacy command line handling fix

PATCH In review Andreas Färber 2 participants 2 messages Jul 21, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 hw/scsi/megasas.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
hw/scsi/megasas.c +4 -1
index 55d5b73..2ae4346 100644
@@ -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;
 }
 
Signature · 1 line
1.8.1.4
Acked-by on v1 1/1
#1 lore raw

Il 21/07/2013 12:24, Andreas Färber ha scritto:

Quoted 23 lines

Only apply legacy command line handling when the device has not been hot-plugged. Propagate failure of legacy command line handling.

---
 hw/scsi/megasas.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
hw/scsi/megasas.c +1 -0
index 55d5b73..2ae4346 100644
@@ -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;

hw/scsi/megasas.c static int megasas_scsi_init(PCIDevice *dev) · line 2179

Quoted 10 lines
hw/scsi/megasas.c +3 -1
@@ -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;
 }