[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 21/88] esp.c: update condition for esp_dma_done() in esp_do_dma()
From: |
Mark Cave-Ayland |
Subject: |
[PULL 21/88] esp.c: update condition for esp_dma_done() in esp_do_dma() to device path |
Date: |
Tue, 13 Feb 2024 19:39:45 +0000 |
Ensure that esp_dma_done() is only called when TC is zero, which is currently
always the case for DMA transfers.
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-22-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
hw/scsi/esp.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c
index 96723efcf3..06be9f2e74 100644
--- a/hw/scsi/esp.c
+++ b/hw/scsi/esp.c
@@ -725,9 +725,11 @@ static void esp_do_dma(ESPState *s)
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 {
esp_set_pdma_cb(s, DO_DMA_PDMA_CB);
esp_raise_drq(s);
--
2.39.2
- [PULL 13/88] esp.c: decrement the TC during MESSAGE OUT and COMMAND phases, (continued)
- [PULL 13/88] esp.c: decrement the TC during MESSAGE OUT and COMMAND phases, Mark Cave-Ayland, 2024/02/13
- [PULL 12/88] esp.c: don't accumulate directly into cmdfifo, Mark Cave-Ayland, 2024/02/13
- [PULL 14/88] esp.c: introduce esp_set_phase() helper function, Mark Cave-Ayland, 2024/02/13
- [PULL 16/88] esp.c: remove MacOS TI workaround that pads FIFO transfers to ESP_FIFO_SZ, Mark Cave-Ayland, 2024/02/13
- [PULL 15/88] esp.c: remove another set of manual STAT_TC updates, Mark Cave-Ayland, 2024/02/13
- [PULL 19/88] esp.c: remove zero transfer size check from esp_do_dma(), Mark Cave-Ayland, 2024/02/13
- [PULL 18/88] esp.c: don't clear RFLAGS register when DMA is complete, Mark Cave-Ayland, 2024/02/13
- [PULL 17/88] esp.c: don't reset the TC and ESP_RSEQ state when executing a SCSI command, Mark Cave-Ayland, 2024/02/13
- [PULL 20/88] esp.c: update condition for esp_dma_done() in esp_do_dma() from device path, Mark Cave-Ayland, 2024/02/13
- [PULL 22/88] esp.c: ensure that the PDMA callback is called for every device read, Mark Cave-Ayland, 2024/02/13
- [PULL 21/88] esp.c: update condition for esp_dma_done() in esp_do_dma() to device path,
Mark Cave-Ayland <=
- [PULL 23/88] esp.c: don't immediately raise INTR_BS if SCSI data needed in esp_do_dma(), Mark Cave-Ayland, 2024/02/13
- [PULL 25/88] esp.c: remove unaligned adjustment in do_dma_pdma_cb() to device path, Mark Cave-Ayland, 2024/02/13
- [PULL 26/88] esp.c: remove unneeded if() check in esp_transfer_data(), Mark Cave-Ayland, 2024/02/13
- [PULL 24/88] esp.c: remove TC adjustment in esp_do_dma() from device path, Mark Cave-Ayland, 2024/02/13
- [PULL 27/88] esp.c: update end of transfer logic at the end of esp_transfer_data(), Mark Cave-Ayland, 2024/02/13
- [PULL 28/88] esp.c: consolidate async_len and TC == 0 checks in do_dma_pdma_cb() and esp_do_dma(), Mark Cave-Ayland, 2024/02/13
- [PULL 29/88] esp.c: fix premature end of phase logic esp_command_complete, Mark Cave-Ayland, 2024/02/13
- [PULL 30/88] esp.c: move TC and FIFO check logic into esp_dma_done(), Mark Cave-Ayland, 2024/02/13
- [PULL 31/88] esp.c: rename esp_dma_done() to esp_dma_ti_check(), Mark Cave-Ayland, 2024/02/13
- [PULL 32/88] esp.c: copy PDMA logic for transfers to device from do_dma_pdma_cb() to esp_do_dma(), Mark Cave-Ayland, 2024/02/13