aboutsummaryrefslogtreecommitdiff
path: root/hw/pci.c
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2006-09-28 19:52:59 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2006-09-28 19:52:59 +0000
commit5e966ce6f44c29c3b9d5349c25c75de145d8a0b1 (patch)
treea085376f40e813998925a1dfa648ba7ceab819c2 /hw/pci.c
parent74ce674fa856b37bf3ff46bff2c7a4a49810ed80 (diff)
PCI IRC routing fix.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2185 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/pci.c')
-rw-r--r--hw/pci.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/hw/pci.c b/hw/pci.c
index 7c9db0e8d4..bc7c779e59 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -435,11 +435,12 @@ void pci_set_irq(PCIDevice *pci_dev, int irq_num, int level)
return;
pci_dev->irq_state[irq_num] = level;
- bus = pci_dev->bus;
- while (!bus->set_irq) {
+ for (;;) {
+ bus = pci_dev->bus;
irq_num = bus->map_irq(pci_dev, irq_num);
+ if (bus->set_irq)
+ break;
pci_dev = bus->parent_dev;
- bus = pci_dev->bus;
}
bus->irq_count[irq_num] += change;
bus->set_irq(bus->irq_opaque, irq_num, bus->irq_count[irq_num] != 0);