diff --git a/hw/pci-host/apb.c b/hw/pci-host/apb.c index 599768e..714e654 100644 --- a/hw/pci-host/apb.c +++ b/hw/pci-host/apb.c @@ -454,9 +454,10 @@ static void apb_config_writel (void *opaque, hwaddr addr, break; case 0x1400 ... 0x14ff: /* PCI interrupt clear */ if (addr & 4) { - unsigned int ino = (addr & 0xff) >> 5; - if ((s->irq_request / 4) == ino) { - pbm_clear_request(s, s->irq_request); + unsigned int ino = (addr & 0xff) >> 3; + if (s->irq_request == ino) { + s->pci_irq_in &= ~(1ULL << ino); + s->irq_request = NO_IRQ_REQUEST; pbm_check_irqs(s); } } @@ -465,7 +466,8 @@ static void apb_config_writel (void *opaque, hwaddr addr, if (addr & 4) { unsigned int ino = ((addr & 0xff) >> 3) | 0x20; if (s->irq_request == ino) { - pbm_clear_request(s, ino); + s->pci_irq_in &= ~(1ULL << ino); + s->irq_request = NO_IRQ_REQUEST; pbm_check_irqs(s); } }