Commit 5e966ce6f44c29c3b9d5349c25c75de145d8a0b1

Authored by pbrook
1 parent 74ce674f

PCI IRC routing fix.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2185 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 4 additions and 3 deletions
hw/pci.c
... ... @@ -435,11 +435,12 @@ void pci_set_irq(PCIDevice *pci_dev, int irq_num, int level)
435 435 return;
436 436  
437 437 pci_dev->irq_state[irq_num] = level;
438   - bus = pci_dev->bus;
439   - while (!bus->set_irq) {
  438 + for (;;) {
  439 + bus = pci_dev->bus;
440 440 irq_num = bus->map_irq(pci_dev, irq_num);
  441 + if (bus->set_irq)
  442 + break;
441 443 pci_dev = bus->parent_dev;
442   - bus = pci_dev->bus;
443 444 }
444 445 bus->irq_count[irq_num] += change;
445 446 bus->set_irq(bus->irq_opaque, irq_num, bus->irq_count[irq_num] != 0);
... ...