From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60498) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V9GH2-0005iz-Cy for qemu-devel@nongnu.org; Tue, 13 Aug 2013 11:12:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V9GGq-00044M-OY for qemu-devel@nongnu.org; Tue, 13 Aug 2013 11:12:38 -0400 Sender: fluxion From: Michael Roth Date: Tue, 13 Aug 2013 10:10:59 -0500 Message-Id: <1376406680-16302-36-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1376406680-16302-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1376406680-16302-1-git-send-email-mdroth@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH 35/56] megasas: Legacy command line handling fix List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com, qemu-stable@nongnu.org From: 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 Acked-by: Paolo Bonzini Signed-off-by: Andreas Färber (cherry picked from commit 22d6aa03fd87ba5f219d26bc1810646d0f95842a) Conflicts: hw/scsi/megasas.c * modified to avoid dependency on fancy new upcast macros Signed-off-by: Michael Roth --- 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 4934a81..27288b9 100644 --- a/hw/scsi/megasas.c +++ b/hw/scsi/megasas.c @@ -2088,6 +2088,7 @@ static const struct SCSIBusInfo megasas_scsi_info = { static int megasas_scsi_init(PCIDevice *dev) { + DeviceState *d = DEVICE(dev); MegasasState *s = DO_UPCAST(MegasasState, dev, dev); uint8_t *pci_conf; int i, bar_type; @@ -2160,7 +2161,9 @@ static int megasas_scsi_init(PCIDevice *dev) } scsi_bus_new(&s->bus, &dev->qdev, &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.7.9.5