]> Git Repo - qemu.git/commitdiff
hw/pci-bridge: set PCI_INTERRUPT_PIN register before shpc init
authorMarcel Apfelbaum <[email protected]>
Mon, 7 Oct 2013 07:36:36 +0000 (10:36 +0300)
committerMichael S. Tsirkin <[email protected]>
Mon, 14 Oct 2013 14:11:45 +0000 (17:11 +0300)
The PCI_INTERRUPT_PIN will be used by shpc init, so
was moved before the call to shpc_init.

Signed-off-by: Marcel Apfelbaum <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
hw/pci-bridge/pci_bridge_dev.c

index a9392c7bdc4e015493887565d26f370c1cf08a1e..440e187c463c6b867dd0d041b860629031d952c5 100644 (file)
@@ -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);
This page took 0.025264 seconds and 4 git commands to generate.