From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48368) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V12ma-00063j-T7 for qemu-devel@nongnu.org; Sun, 21 Jul 2013 19:11:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V12mZ-0005L5-Rk for qemu-devel@nongnu.org; Sun, 21 Jul 2013 19:11:16 -0400 Sender: Paolo Bonzini Message-ID: <51EC6A86.7080600@redhat.com> Date: Mon, 22 Jul 2013 01:11:02 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1374402247-21828-1-git-send-email-afaerber@suse.de> In-Reply-To: <1374402247-21828-1-git-send-email-afaerber@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH qom-next] megasas: Legacy command line handling fix List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= Cc: Hannes Reinecke , qemu-devel@nongnu.org, qemu-stable@nongnu.org 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 > --- > 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