[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 14/42] esp: remove minlen restriction in handle_ti
From: |
Mark Cave-Ayland |
Subject: |
[PULL 14/42] esp: remove minlen restriction in handle_ti |
Date: |
Sun, 7 Mar 2021 12:08:22 +0000 |
The limiting of DMA transfers to the maximum size of the available data is
already
handled by esp_do_dma() and do_dma_pdma_cb().
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20210304221103.6369-15-mark.cave-ayland@ilande.co.uk>
---
hw/scsi/esp.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c
index 92fea6a8c4..07d57cb791 100644
--- a/hw/scsi/esp.c
+++ b/hw/scsi/esp.c
@@ -552,7 +552,7 @@ void esp_transfer_data(SCSIRequest *req, uint32_t len)
static void handle_ti(ESPState *s)
{
- uint32_t dmalen, minlen;
+ uint32_t dmalen;
if (s->dma && !s->dma_enabled) {
s->dma_cb = handle_ti;
@@ -560,16 +560,8 @@ static void handle_ti(ESPState *s)
}
dmalen = esp_get_tc(s);
-
- if (s->do_cmd) {
- minlen = (dmalen < ESP_CMDBUF_SZ) ? dmalen : ESP_CMDBUF_SZ;
- } else if (s->ti_size < 0) {
- minlen = (dmalen < -s->ti_size) ? dmalen : -s->ti_size;
- } else {
- minlen = (dmalen < s->ti_size) ? dmalen : s->ti_size;
- }
- trace_esp_handle_ti(minlen);
if (s->dma) {
+ trace_esp_handle_ti(dmalen);
s->rregs[ESP_RSTAT] &= ~STAT_TC;
esp_do_dma(s);
} else if (s->do_cmd) {
--
2.20.1
- [PULL 04/42] esp: add vmstate_esp version to embedded ESPState, (continued)
- [PULL 04/42] esp: add vmstate_esp version to embedded ESPState, Mark Cave-Ayland, 2021/03/07
- [PULL 05/42] esp: add trace event when receiving a TI command, Mark Cave-Ayland, 2021/03/07
- [PULL 06/42] esp: fix esp_reg_read() trace event, Mark Cave-Ayland, 2021/03/07
- [PULL 07/42] esp: add PDMA trace events, Mark Cave-Ayland, 2021/03/07
- [PULL 08/42] esp: determine transfer direction directly from SCSI phase, Mark Cave-Ayland, 2021/03/07
- [PULL 09/42] esp: introduce esp_get_tc() and esp_set_tc(), Mark Cave-Ayland, 2021/03/07
- [PULL 10/42] esp: introduce esp_get_stc(), Mark Cave-Ayland, 2021/03/07
- [PULL 11/42] esp: apply transfer length adjustment when STC is zero at TC load time, Mark Cave-Ayland, 2021/03/07
- [PULL 12/42] esp: remove dma_counter from ESPState, Mark Cave-Ayland, 2021/03/07
- [PULL 13/42] esp: remove dma_left from ESPState, Mark Cave-Ayland, 2021/03/07
- [PULL 14/42] esp: remove minlen restriction in handle_ti,
Mark Cave-Ayland <=
- [PULL 15/42] esp: introduce esp_pdma_read() and esp_pdma_write() functions, Mark Cave-Ayland, 2021/03/07
- [PULL 16/42] esp: use pdma_origin directly in esp_pdma_read()/esp_pdma_write(), Mark Cave-Ayland, 2021/03/07
- [PULL 17/42] esp: move pdma_len and TC logic into esp_pdma_read()/esp_pdma_write(), Mark Cave-Ayland, 2021/03/07
- [PULL 18/42] esp: accumulate SCSI commands for PDMA transfers in cmdbuf instead of pdma_buf, Mark Cave-Ayland, 2021/03/07
- [PULL 19/42] esp: remove buf parameter from do_cmd(), Mark Cave-Ayland, 2021/03/07
- [PULL 20/42] esp: remove the buf and buflen parameters from get_cmd(), Mark Cave-Ayland, 2021/03/07
- [PULL 21/42] esp: remove redundant pdma_start from ESPState, Mark Cave-Ayland, 2021/03/07
- [PULL 22/42] esp: move PDMA length adjustments into esp_pdma_read()/esp_pdma_write(), Mark Cave-Ayland, 2021/03/07
- [PULL 23/42] esp: use ti_wptr/ti_rptr to manage the current FIFO position for PDMA, Mark Cave-Ayland, 2021/03/07
- [PULL 24/42] esp: use in-built TC to determine PDMA transfer length, Mark Cave-Ayland, 2021/03/07