[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 44/88] esp.c: convert esp_reg_write() do_cmd path to check for SCS
From: |
Mark Cave-Ayland |
Subject: |
[PULL 44/88] esp.c: convert esp_reg_write() do_cmd path to check for SCSI phase instead |
Date: |
Tue, 13 Feb 2024 19:40:08 +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-45-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
hw/scsi/esp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c
index 14759ada78..e679b1c39b 100644
--- a/hw/scsi/esp.c
+++ b/hw/scsi/esp.c
@@ -1207,7 +1207,7 @@ void esp_reg_write(ESPState *s, uint32_t saddr, uint64_t
val)
s->rregs[ESP_RSTAT] &= ~STAT_TC;
break;
case ESP_FIFO:
- if (s->do_cmd) {
+ if (esp_get_phase(s) == STAT_MO || esp_get_phase(s) == STAT_CD) {
if (!fifo8_is_full(&s->fifo)) {
esp_fifo_push(&s->fifo, val);
esp_fifo_push(&s->cmdfifo, fifo8_pop(&s->fifo));
--
2.39.2
- [PULL 33/88] esp.c: copy logic for do_cmd transfers from do_dma_pdma_cb() to esp_do_dma(), (continued)
- [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, 2024/02/13
- [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 <=
- [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
- [PULL 81/88] esp.c: remove redundant n variable in PDMA COMMAND phase, Mark Cave-Ayland, 2024/02/13
- [PULL 78/88] esp.c: consolidate DMA and PDMA logic in DATA OUT phase, Mark Cave-Ayland, 2024/02/13