[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 08/33] esp: allow non-DMA callback in esp_transfer_data() initial
From: |
Paolo Bonzini |
Subject: |
[PULL 08/33] esp: allow non-DMA callback in esp_transfer_data() initial transfer |
Date: |
Tue, 15 Jun 2021 15:38:30 +0200 |
From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
The current implementation only resumes DMA transfers when incoming data is
received from the target device, but this is also required for non-DMA transfers
with the next set of non-DMA changes.
Rather than duplicate the DMA/non-DMA dispatch logic in the initial transfer
section, update the code so that the initial transfer section can just
fallthrough to the main DMA/non-DMA dispatch logic.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20210519100803.10293-2-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/scsi/esp.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c
index 18d4d56392..50757e9264 100644
--- a/hw/scsi/esp.c
+++ b/hw/scsi/esp.c
@@ -803,16 +803,6 @@ void esp_transfer_data(SCSIRequest *req, uint32_t len)
s->rregs[ESP_RSTAT] |= STAT_TC;
s->rregs[ESP_RINTR] |= INTR_BS;
esp_raise_irq(s);
-
- /*
- * If data is ready to transfer and the TI command has already
- * been executed, start DMA immediately. Otherwise DMA will start
- * when host sends the TI command
- */
- if (s->ti_size && (s->rregs[ESP_CMD] == (CMD_TI | CMD_DMA))) {
- esp_do_dma(s);
- }
- return;
}
if (s->ti_cmd == 0) {
@@ -826,7 +816,7 @@ void esp_transfer_data(SCSIRequest *req, uint32_t len)
return;
}
- if (s->ti_cmd & CMD_DMA) {
+ if (s->ti_cmd == (CMD_TI | CMD_DMA)) {
if (dmalen) {
esp_do_dma(s);
} else if (s->ti_size <= 0) {
@@ -837,7 +827,7 @@ void esp_transfer_data(SCSIRequest *req, uint32_t len)
esp_dma_done(s);
esp_lower_drq(s);
}
- } else {
+ } else if (s->ti_cmd == CMD_TI) {
esp_do_nodma(s);
}
}
--
2.31.1
- [PULL 00/33] Misc patches for 2021-06-15, Paolo Bonzini, 2021/06/15
- [PULL 01/33] vnc: avoid deprecation warnings for SASL on OS X, Paolo Bonzini, 2021/06/15
- [PULL 05/33] runstate: Initialize Error * to NULL, Paolo Bonzini, 2021/06/15
- [PULL 06/33] esp: only assert INTR_DC interrupt flag if selection fails, Paolo Bonzini, 2021/06/15
- [PULL 02/33] vl: Fix an assert failure in error path, Paolo Bonzini, 2021/06/15
- [PULL 07/33] esp: only set ESP_RSEQ at the start of the select sequence, Paolo Bonzini, 2021/06/15
- [PULL 13/33] esp: fix migration version check in esp_is_version_5(), Paolo Bonzini, 2021/06/15
- [PULL 08/33] esp: allow non-DMA callback in esp_transfer_data() initial transfer,
Paolo Bonzini <=
- [PULL 10/33] esp: ensure PDMA write transfers are flushed from the FIFO to the target immediately, Paolo Bonzini, 2021/06/15
- [PULL 16/33] softmmu/physmem: Fix ram_block_discard_range() to handle shared anonymous memory, Paolo Bonzini, 2021/06/15
- [PULL 11/33] esp: revert 75ef849696 "esp: correctly fill bus id with requested lun", Paolo Bonzini, 2021/06/15
- [PULL 04/33] block/scsi: correctly emulate the VPD block limits page, Paolo Bonzini, 2021/06/15
- [PULL 15/33] softmmu/physmem: Mark shared anonymous memory RAM_SHARED, Paolo Bonzini, 2021/06/15
- [PULL 17/33] softmmu/physmem: Fix qemu_ram_remap() to handle shared anonymous memory, Paolo Bonzini, 2021/06/15
- [PULL 09/33] esp: handle non-DMA transfers from the target one byte at a time, Paolo Bonzini, 2021/06/15
- [PULL 23/33] softmmu/memory: Pass ram_flags to qemu_ram_alloc() and qemu_ram_alloc_internal(), Paolo Bonzini, 2021/06/15
- [PULL 22/33] softmmu/memory: Pass ram_flags to memory_region_init_ram_shared_nomigrate(), Paolo Bonzini, 2021/06/15
- [PULL 03/33] qemu-config: use qemu_opts_from_qdict, Paolo Bonzini, 2021/06/15