summaryrefslogtreecommitdiff
path: root/hw/pci-bridge
diff options
context:
space:
mode:
authorMarcel Apfelbaum <marcel.a@redhat.com>2013-10-07 10:36:36 +0300
committerMichael S. Tsirkin <mst@redhat.com>2013-10-14 17:11:45 +0300
commitc008ac0c1cb68dfe8dcfda0e25562fa81c687e50 (patch)
treedb4009589287a477448cf61fa328f50438f0adc9 /hw/pci-bridge
parentd98f08f54e0882b4da1177345161afabb8d47d94 (diff)
downloadqemu-c008ac0c1cb68dfe8dcfda0e25562fa81c687e50.tar.gz
hw/pci-bridge: set PCI_INTERRUPT_PIN register before shpc init
The PCI_INTERRUPT_PIN will be used by shpc init, so was moved before the call to shpc_init. Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/pci-bridge')
-rw-r--r--hw/pci-bridge/pci_bridge_dev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/pci-bridge/pci_bridge_dev.c b/hw/pci-bridge/pci_bridge_dev.c
index a9392c7bdc..440e187c46 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);