]> git.ipfire.org Git - thirdparty/qemu.git/blobdiff - hw/isa/vt82c686.c
hw/isa/vt82c686: Keep track of PIRQ/PINT pins separately
[thirdparty/qemu.git] / hw / isa / vt82c686.c
index aa919427459f03a431aac41402f60b4d5e13741f..8582ac0322eb282454746fe44bdc3cc84db32395 100644 (file)
@@ -658,7 +658,7 @@ void via_isa_set_irq(PCIDevice *d, int pin, int level)
     ViaISAState *s = VIA_ISA(pci_get_function_0(d));
     uint8_t irq = d->config[PCI_INTERRUPT_LINE], max_irq = 15;
     int f = PCI_FUNC(d->devfn);
-    uint16_t mask = BIT(f);
+    uint16_t mask;
 
     switch (f) {
     case 0: /* PIRQ/PINT inputs */
@@ -673,6 +673,7 @@ void via_isa_set_irq(PCIDevice *d, int pin, int level)
     }
 
     /* Keep track of the state of all sources */
+    mask = BIT(f);
     if (level) {
         s->irq_state[0] |= mask;
     } else {