* [Qemu-devel] [PATCH qom-next] megasas: Legacy command line handling fix
@ 2013-07-21 10:24 Andreas Färber
2013-07-21 23:11 ` Paolo Bonzini
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Färber @ 2013-07-21 10:24 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, qemu-stable, Hannes Reinecke, Andreas Färber
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
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
hw/scsi/megasas.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c
index 55d5b73..2ae4346 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;
}
--
1.8.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH qom-next] megasas: Legacy command line handling fix
2013-07-21 10:24 [Qemu-devel] [PATCH qom-next] megasas: Legacy command line handling fix Andreas Färber
@ 2013-07-21 23:11 ` Paolo Bonzini
0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2013-07-21 23:11 UTC (permalink / raw)
To: Andreas Färber; +Cc: Hannes Reinecke, qemu-devel, qemu-stable
Il 21/07/2013 12:24, Andreas Färber ha scritto:
> 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
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
> hw/scsi/megasas.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c
> index 55d5b73..2ae4346 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;
> }
>
>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-07-21 23:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-21 10:24 [Qemu-devel] [PATCH qom-next] megasas: Legacy command line handling fix Andreas Färber
2013-07-21 23:11 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).