]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/scsi/esp-pci: generate PCI interrupt from separate ESP and PCI sources
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Fri, 12 Jan 2024 13:15:27 +0000 (13:15 +0000)
committerMichael Tokarev <mjt@tls.msk.ru>
Sat, 20 Jan 2024 15:30:32 +0000 (18:30 +0300)
commitfd4e677c793855057a6204e1931eb927590f85f3
tree62e14cdef4622eea7ec4b05c8f1cd00e859212c8
parent528496a5d4a2667869f07bdd1ec46f4d41171975
hw/scsi/esp-pci: generate PCI interrupt from separate ESP and PCI sources

The am53c974/dc390 PCI interrupt has two separate sources: the first is from the
internal ESP device, and the second is from the PCI DMA transfer logic.

Update the ESP interrupt handler so that it sets DMA_STAT_SCSIINT rather than
driving the PCI IRQ directly, and introduce a new esp_pci_update_irq() function
to generate the correct PCI IRQ level. In particular this fixes spurious interrupts
being generated by setting DMA_STAT_DONE at the end of a transfer if DMA_CMD_INTE_D
isn't set in the DMA_CMD register.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Message-ID: <20240112131529.515642-3-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
(cherry picked from commit 6b41417d934b2640b7ccf893544d656eea92a2e7)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
(Mjt: fixup in hw/scsi/esp-pci.c due to v8.0.0-1556-g7d5b0d6864
 "bulk: Remove pointless QOM casts")
hw/scsi/esp-pci.c