[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 26/88] esp.c: remove unneeded if() check in esp_transfer_data()
|
From: |
Mark Cave-Ayland |
|
Subject: |
[PATCH 26/88] esp.c: remove unneeded if() check in esp_transfer_data() |
|
Date: |
Fri, 12 Jan 2024 12:53:18 +0000 |
The following ti_cmd checks ensure that only DMA and non-DMA TI commmands will
can call into the esp_do_dma() and esp_do_nodma() callbacks.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
hw/scsi/esp.c | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c
index 3db90c9ab7..96123c5f7d 100644
--- a/hw/scsi/esp.c
+++ b/hw/scsi/esp.c
@@ -916,16 +916,13 @@ void esp_transfer_data(SCSIRequest *req, uint32_t len)
esp_raise_irq(s);
}
- if (s->ti_cmd == 0) {
- /*
- * Always perform the initial transfer upon reception of the next TI
- * command to ensure the DMA/non-DMA status of the command is correct.
- * It is not possible to use s->dma directly in the section below as
- * some OSs send non-DMA NOP commands after a DMA transfer. Hence if
the
- * async data transfer is delayed then s->dma is set incorrectly.
- */
- return;
- }
+ /*
+ * Always perform the initial transfer upon reception of the next TI
+ * command to ensure the DMA/non-DMA status of the command is correct.
+ * It is not possible to use s->dma directly in the section below as
+ * some OSs send non-DMA NOP commands after a DMA transfer. Hence if the
+ * async data transfer is delayed then s->dma is set incorrectly.
+ */
if (s->ti_cmd == (CMD_TI | CMD_DMA)) {
if (dmalen) {
--
2.39.2
- [PATCH 16/88] esp.c: remove MacOS TI workaround that pads FIFO transfers to ESP_FIFO_SZ, (continued)
- [PATCH 16/88] esp.c: remove MacOS TI workaround that pads FIFO transfers to ESP_FIFO_SZ, Mark Cave-Ayland, 2024/01/12
- [PATCH 17/88] esp.c: don't reset the TC and ESP_RSEQ state when executing a SCSI command, Mark Cave-Ayland, 2024/01/12
- [PATCH 19/88] esp: remove zero transfer size check from esp_do_dma(), Mark Cave-Ayland, 2024/01/12
- [PATCH 18/88] esp.c: don't clear RFLAGS register when DMA is complete, Mark Cave-Ayland, 2024/01/12
- [PATCH 20/88] esp.c: update condition for esp_dma_done() in esp_do_dma() from device path, Mark Cave-Ayland, 2024/01/12
- [PATCH 23/88] esp.c: don't immediately raise INTR_BS if SCSI data needed in esp_do_dma(), Mark Cave-Ayland, 2024/01/12
- [PATCH 22/88] esp.c: ensure that the PDMA callback is called for every device read, Mark Cave-Ayland, 2024/01/12
- [PATCH 21/88] esp.c: update condition for esp_dma_done() in esp_do_dma() to device path, Mark Cave-Ayland, 2024/01/12
- [PATCH 25/88] esp.c: remove unaligned adjustment in do_dma_pdma_cb() to device path, Mark Cave-Ayland, 2024/01/12
- [PATCH 24/88] esp.c: remove TC adjustment in esp_do_dma() from device path, Mark Cave-Ayland, 2024/01/12
- [PATCH 26/88] esp.c: remove unneeded if() check in esp_transfer_data(),
Mark Cave-Ayland <=
- [PATCH 27/88] esp.c: update end of transfer logic at the end of esp_transfer_data(), Mark Cave-Ayland, 2024/01/12
- [PATCH 28/88] esp.c: consolidate async_len and TC == 0 checks in do_dma_pdma_cb() and esp_do_dma(), Mark Cave-Ayland, 2024/01/12
- [PATCH 30/88] esp.c: move TC and FIFO check logic into esp_dma_done(), Mark Cave-Ayland, 2024/01/12
- [PATCH 29/88] esp.c: fix premature end of phase logic esp_command_complete, Mark Cave-Ayland, 2024/01/12
- [PATCH 34/88] esp.c: update esp_do_dma() bypass if async_len is zero to include non-zero transfer check, Mark Cave-Ayland, 2024/01/12
- [PATCH 35/88] esp.c: move end of SCSI transfer check after TC adjustment in do_dma_pdma_cb(), Mark Cave-Ayland, 2024/01/12
- [PATCH 33/88] esp.c: copy logic for do_cmd transfers from do_dma_pdma_cb() to esp_do_dma(), Mark Cave-Ayland, 2024/01/12
- [PATCH 31/88] esp.c: rename esp_dma_done() to esp_dma_ti_check(), Mark Cave-Ayland, 2024/01/12
- [PATCH 32/88] esp.c: copy PDMA logic for transfers to device from do_dma_pdma_cb() to esp_do_dma(), Mark Cave-Ayland, 2024/01/12
- [PATCH 36/88] esp.c: remove s_without_satn_pdma_cb() PDMA callback, Mark Cave-Ayland, 2024/01/12