]> git.proxmox.com Git - mirror_qemu.git/commit
esp.c: consolidate async_len and TC == 0 checks in do_dma_pdma_cb() and esp_do_dma()
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Fri, 12 Jan 2024 12:53:20 +0000 (12:53 +0000)
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Tue, 13 Feb 2024 19:37:27 +0000 (19:37 +0000)
commite4e166c8efc13ee8a81e07be2f81f6bc54339a7b
tree4cd449315dbfe2f4bef0204c2638b9bd552d9258
parenta79e767ab147164195b664f359ea6e54294b4698
esp.c: consolidate async_len and TC == 0 checks in do_dma_pdma_cb() and esp_do_dma()

Ensure that the async_len checks for requesting data from the SCSI layer and
the TC == 0 checks to detect the end of the DMA transfer are consistent in both
do_dma_pdma_cb() and esp_do_dma(). In particular this involves adding the check
to see if the FIFO is at its low threshold since PDMA and mixed DMA and non-DMA
requests can leave data remaining in the FIFO.

At the same time update all the comments so that they are also consistent between
all similar code paths.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Tested-by: Helge Deller <deller@gmx.de>
Tested-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20240112125420.514425-29-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
hw/scsi/esp.c