aboutsummaryrefslogtreecommitdiff
path: root/hw/scsi
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2024-01-12 12:53:26 +0000
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2024-02-13 19:37:27 +0000
commit4460b86a04c705c009a0756f3ee67ec4831c56da (patch)
tree1e645492b0531b2d07e92fcf1877595b585a2e4a /hw/scsi
parent3c7f3c8b5755d855be868ee05099fcee93d06bfe (diff)
downloadqemu-4460b86a04c705c009a0756f3ee67ec4831c56da.zip
qemu-4460b86a04c705c009a0756f3ee67ec4831c56da.tar.gz
qemu-4460b86a04c705c009a0756f3ee67ec4831c56da.tar.bz2
esp.c: update esp_do_dma() bypass if async_len is zero to include non-zero transfer check
In the PDMA case the last transfer from the device to the FIFO has occurred (async_len is zero) but esp_do_dma() is still being called to drain the remaining FIFO contents. The additional non-zero transfer check ensures that we still defer the SCSI layer in the case where we are waiting for data for a TI command or a DMA enable signal. 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-35-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Diffstat (limited to 'hw/scsi')
-rw-r--r--hw/scsi/esp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c
index 14284ef..9647be4 100644
--- a/hw/scsi/esp.c
+++ b/hw/scsi/esp.c
@@ -696,7 +696,7 @@ static void esp_do_dma(ESPState *s)
if (!s->current_req) {
return;
}
- if (s->async_len == 0) {
+ if (s->async_len == 0 && esp_get_tc(s) && s->ti_size) {
/* Defer until data is available. */
return;
}