From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47833) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VT5N4-0008PP-1n for qemu-devel@nongnu.org; Mon, 07 Oct 2013 03:36:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VT5My-0007uq-3B for qemu-devel@nongnu.org; Mon, 07 Oct 2013 03:36:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47048) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VT5Mx-0007um-Rf for qemu-devel@nongnu.org; Mon, 07 Oct 2013 03:36:44 -0400 From: Marcel Apfelbaum Date: Mon, 7 Oct 2013 10:36:36 +0300 Message-Id: <1381131401-15155-4-git-send-email-marcel.a@redhat.com> In-Reply-To: <1381131401-15155-1-git-send-email-marcel.a@redhat.com> References: <1381131401-15155-1-git-send-email-marcel.a@redhat.com> Subject: [Qemu-devel] [PATCH v3 3/8] hw/pci-bridge: set PCI_INTERRUPT_PIN register before shpc init List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, peter.maydell@linaro.org, peter.crosthwaite@xilinx.com, anthony@codemonkey.ws, mst@redhat.com, sw@weilnetz.de, jasowang@redhat.com, dkoch@verizon.com, keith.busch@intel.com, alex.williamson@redhat.com, kraxel@redhat.com, stefanha@redhat.com, dmitry@daynix.com, pbonzini@redhat.com, afaerber@suse.de, ehabkost@redhat.com The PCI_INTERRUPT_PIN will be used by shpc init, so was moved before the call to shpc_init. Signed-off-by: Marcel Apfelbaum --- hw/pci-bridge/pci_bridge_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci-bridge/pci_bridge_dev.c b/hw/pci-bridge/pci_bridge_dev.c index a9392c7..440e187 100644 --- a/hw/pci-bridge/pci_bridge_dev.c +++ b/hw/pci-bridge/pci_bridge_dev.c @@ -53,6 +53,7 @@ static int pci_bridge_dev_initfn(PCIDevice *dev) if (err) { goto bridge_error; } + dev->config[PCI_INTERRUPT_PIN] = 0x1; memory_region_init(&bridge_dev->bar, OBJECT(dev), "shpc-bar", shpc_bar_size(dev)); err = shpc_init(dev, &br->sec_bus, &bridge_dev->bar, 0); if (err) { @@ -73,7 +74,6 @@ static int pci_bridge_dev_initfn(PCIDevice *dev) * Check whether that works well. */ pci_register_bar(dev, 0, PCI_BASE_ADDRESS_SPACE_MEMORY | PCI_BASE_ADDRESS_MEM_TYPE_64, &bridge_dev->bar); - dev->config[PCI_INTERRUPT_PIN] = 0x1; return 0; msi_error: slotid_cap_cleanup(dev); -- 1.8.3.1