From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40573) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VVjYg-0003ZU-HV for qemu-devel@nongnu.org; Mon, 14 Oct 2013 10:55:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VVjYZ-0001WY-VB for qemu-devel@nongnu.org; Mon, 14 Oct 2013 10:55:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:2524) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VVjYZ-0001WP-99 for qemu-devel@nongnu.org; Mon, 14 Oct 2013 10:55:39 -0400 Date: Mon, 14 Oct 2013 17:58:09 +0300 From: "Michael S. Tsirkin" Message-ID: <1381762577-12526-7-git-send-email-mst@redhat.com> References: <1381762577-12526-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1381762577-12526-1-git-send-email-mst@redhat.com> Subject: [Qemu-devel] [PULL 06/43] 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, Anthony Liguori Cc: peter.maydell@linaro.org, imammedo@redhat.com, mst@redhat.com, kraxel@redhat.com, marcel.a@redhat.com From: Marcel Apfelbaum The PCI_INTERRUPT_PIN will be used by shpc init, so was moved before the call to shpc_init. Signed-off-by: Marcel Apfelbaum Signed-off-by: Michael S. Tsirkin --- 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); -- MST