]> 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:25:50 +0000 (18:25 +0300)
commite8cb1260753863fe04c460b949a8d1aec304e3ee
tree06fc343c3454894076ab27fdae67ad880d6c6997
parent2cd67d013dab3f7e0482a765acda70edffd8b786
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>
hw/scsi/esp-pci.c