diff options
| author | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2024-01-12 12:53:12 +0000 |
|---|---|---|
| committer | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2024-02-13 19:37:27 +0000 |
| commit | 6b7b0030fb5c9275d5e4afa67264c6ce458afef3 (patch) | |
| tree | a498bc71dbb80a1307ffc0618d5729add753200b | |
| parent | 27bd0cc044287acc838098155c057380c1f60a07 (diff) | |
| download | focaccia-qemu-6b7b0030fb5c9275d5e4afa67264c6ce458afef3.tar.gz focaccia-qemu-6b7b0030fb5c9275d5e4afa67264c6ce458afef3.zip | |
esp.c: update condition for esp_dma_done() in esp_do_dma() from device path
No change to the condition itself, other than to clarify that esp_dma_done() must be called when TC is zero. 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-21-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
| -rw-r--r-- | hw/scsi/esp.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c index dc515e6435..96723efcf3 100644 --- a/hw/scsi/esp.c +++ b/hw/scsi/esp.c @@ -743,19 +743,13 @@ static void esp_do_dma(ESPState *s) if (s->async_len == 0) { scsi_req_continue(s->current_req); - /* - * If there is still data to be read from the device then - * complete the DMA operation immediately. Otherwise defer - * until the scsi layer has completed. - */ - if (esp_get_tc(s) != 0) { - return; - } } - /* Partially filled a scsi buffer. Complete immediately. */ - esp_dma_done(s); - esp_lower_drq(s); + if (esp_get_tc(s) == 0) { + /* Partially filled a scsi buffer. Complete immediately. */ + esp_dma_done(s); + esp_lower_drq(s); + } } else { /* Adjust TC for any leftover data in the FIFO */ if (!fifo8_is_empty(&s->fifo)) { |