[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 41/88] esp.c: convert esp_do_dma() do_cmd path to check for SCSI p
From: |
Mark Cave-Ayland |
Subject: |
[PULL 41/88] esp.c: convert esp_do_dma() do_cmd path to check for SCSI phase instead |
Date: |
Tue, 13 Feb 2024 19:40:05 +0000 |
Currently do_cmd is used to determine whether MESSAGE OUT and COMMAND phase data
is being accumulated in cmdfifo. Update esp_do_dma() to check directly for these
two SCSI phases instead.
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-42-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
hw/scsi/esp.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c
index c1b44e5f18..22739d3875 100644
--- a/hw/scsi/esp.c
+++ b/hw/scsi/esp.c
@@ -635,11 +635,10 @@ static void esp_do_dma(ESPState *s)
int n;
len = esp_get_tc(s);
- if (s->do_cmd) {
- /*
- * handle_ti_cmd() case: esp_do_dma() is called only from
- * handle_ti_cmd() with do_cmd != NULL (see the assert())
- */
+
+ switch (esp_get_phase(s)) {
+ case STAT_MO:
+ case STAT_CD:
cmdlen = fifo8_num_used(&s->cmdfifo);
trace_esp_do_dma(cmdlen, len);
if (s->dma_memory_read) {
@@ -683,10 +682,8 @@ static void esp_do_dma(ESPState *s)
s->rregs[ESP_RINTR] |= INTR_BS;
esp_raise_irq(s);
}
- return;
- }
+ break;
- switch (esp_get_phase(s)) {
case STAT_DO:
if (!s->current_req) {
return;
--
2.39.2
- [PULL 31/88] esp.c: rename esp_dma_done() to esp_dma_ti_check(), (continued)
- [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
- [PULL 33/88] esp.c: copy logic for do_cmd transfers from do_dma_pdma_cb() to esp_do_dma(), Mark Cave-Ayland, 2024/02/13
- [PULL 34/88] esp.c: update esp_do_dma() bypass if async_len is zero to include non-zero transfer check, Mark Cave-Ayland, 2024/02/13
- [PULL 35/88] esp.c: move end of SCSI transfer check after TC adjustment in do_dma_pdma_cb(), Mark Cave-Ayland, 2024/02/13
- [PULL 36/88] esp.c: remove s_without_satn_pdma_cb() PDMA callback, Mark Cave-Ayland, 2024/02/13
- [PULL 39/88] esp.c: convert do_dma_pdma_db() to switch statement based upon SCSI phase, Mark Cave-Ayland, 2024/02/13
- [PULL 40/88] esp.c: convert esp_do_nodma() to switch statement based upon SCSI phase, Mark Cave-Ayland, 2024/02/13
- [PULL 38/88] esp.c: convert esp_do_dma() to switch statement based upon SCSI phase, Mark Cave-Ayland, 2024/02/13
- [PULL 37/88] esp.c: introduce esp_get_phase() function, Mark Cave-Ayland, 2024/02/13
- [PULL 41/88] esp.c: convert esp_do_dma() do_cmd path to check for SCSI phase instead,
Mark Cave-Ayland <=
- [PULL 43/88] esp.c: convert esp_do_nodma() do_cmd path to check for SCSI phase instead, Mark Cave-Ayland, 2024/02/13
- [PULL 44/88] esp.c: convert esp_reg_write() do_cmd path to check for SCSI phase instead, Mark Cave-Ayland, 2024/02/13
- [PULL 48/88] esp.c: untangle MESSAGE OUT and COMMAND phase logic in esp_do_nodma(), Mark Cave-Ayland, 2024/02/13
- [PULL 45/88] esp.c: remove do_cmd from ESPState, Mark Cave-Ayland, 2024/02/13
- [PULL 42/88] esp.c: convert do_dma_pdma_cb() do_cmd path to check for SCSI phase instead, Mark Cave-Ayland, 2024/02/13
- [PULL 49/88] esp.c: move CMD_SELATN end of message phase detection to esp_do_dma() and do_dma_pdma_cb(), Mark Cave-Ayland, 2024/02/13
- [PULL 46/88] esp.c: untangle MESSAGE OUT and COMMAND phase logic in esp_do_dma(), Mark Cave-Ayland, 2024/02/13
- [PULL 47/88] esp.c: untangle MESSAGE OUT and COMMAND phase logic in do_dma_pdma_cb(), Mark Cave-Ayland, 2024/02/13
- [PULL 69/88] esp.c: consolidate end of command sequence after ICCS command, Mark Cave-Ayland, 2024/02/13
- [PULL 70/88] esp.c: ensure that STAT_INT is cleared when reading ESP_RINTR, Mark Cave-Ayland, 2024/02/13