]> git.proxmox.com Git - qemu.git/commitdiff
pci: fix bridge update
authorMichael S. Tsirkin <mst@redhat.com>
Tue, 6 Jul 2010 11:17:51 +0000 (14:17 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 11 Jul 2010 20:31:52 +0000 (23:31 +0300)
bridge config write should trigger updates
on the secondary bus. never on the primary bus.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/pci.c

index fbba6e38fe29794e67745c6e25a3fe6bf8705e3e..a98d6f3ad1730de0cf5b798fd6d8cd9c58e9db10 100644 (file)
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -1568,7 +1568,9 @@ static void pci_bridge_write_config(PCIDevice *d,
         /* memory base/limit, prefetchable base/limit and
            io base/limit upper 16 */
         ranges_overlap(address, len, PCI_MEMORY_BASE, 20)) {
-        pci_bridge_update_mappings(d->bus);
+        PCIBridge *s = container_of(d, PCIBridge, dev);
+        PCIBus *secondary_bus = &s->bus;
+        pci_bridge_update_mappings(secondary_bus);
     }
 }