aboutsummaryrefslogtreecommitdiff
path: root/hw/scsi
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2021-03-04 22:10:35 +0000
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2021-03-07 10:39:05 +0000
commitb76624de5062fdf874a377ade84af90c62903833 (patch)
treee14aa0b8c18f40136736845f4e671fe3e9cecd88 /hw/scsi
parent6cc88d6bf932a905ce36e933dc078eeb6b54ac92 (diff)
downloadqemu-b76624de5062fdf874a377ade84af90c62903833.zip
qemu-b76624de5062fdf874a377ade84af90c62903833.tar.gz
qemu-b76624de5062fdf874a377ade84af90c62903833.tar.bz2
esp: remove minlen restriction in handle_ti
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>
Diffstat (limited to 'hw/scsi')
-rw-r--r--hw/scsi/esp.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c
index 92fea6a..07d57cb 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) {