via-ide: always use legacy IRQ 14/15 routing

The existing code uses fixed PCI IRQ routing on IRQ 14 rather than legacy IRQ
14/15 routing as documented in the datasheet.

With the changes in this patchset guest OSs now correctly detect and configure
the VIA controller in legacy IRQ routing mode, allowing the incorrect fixed
PCI IRQ routing to be removed.

Note that this fixed legacy IRQ 14/15 routing is identical to similar behaviour
in the early PIIX IDE controllers.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Tested-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-id: 20200313082444.2439-8-mark.cave-ayland@ilande.co.uk
Signed-off-by: John Snow <jsnow@redhat.com>
This commit is contained in:
Mark Cave-Ayland 2020-03-13 08:24:44 +00:00 committed by John Snow
parent 2004247981
commit 1a519323d3

View File

@ -113,10 +113,7 @@ static void via_ide_set_irq(void *opaque, int n, int level)
} }
level = (d->config[0x70] & 0x80) || (d->config[0x78] & 0x80); level = (d->config[0x70] & 0x80) || (d->config[0x78] & 0x80);
n = pci_get_byte(d->config + PCI_INTERRUPT_LINE); qemu_set_irq(isa_get_irq(NULL, 14 + n), level);
if (n) {
qemu_set_irq(isa_get_irq(NULL, n), level);
}
} }
static void via_ide_reset(DeviceState *dev) static void via_ide_reset(DeviceState *dev)