[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 51/88] esp.c: don't use get_cmd() for CMD_SEL DMA commands
|
From: |
Mark Cave-Ayland |
|
Subject: |
[PATCH 51/88] esp.c: don't use get_cmd() for CMD_SEL DMA commands |
|
Date: |
Fri, 12 Jan 2024 12:53:43 +0000 |
This can now be done using the existing logic in esp_do_dma() and
do_dma_pdma_cb().
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
hw/scsi/esp.c | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c
index 9f787d12a8..3cf8b2b4eb 100644
--- a/hw/scsi/esp.c
+++ b/hw/scsi/esp.c
@@ -396,8 +396,6 @@ static void handle_satn(ESPState *s)
static void handle_s_without_atn(ESPState *s)
{
- int32_t cmdlen;
-
if (s->dma && !s->dma_enabled) {
s->dma_cb = handle_s_without_atn;
return;
@@ -406,17 +404,17 @@ static void handle_s_without_atn(ESPState *s)
if (esp_select(s) < 0) {
return;
}
- cmdlen = get_cmd(s, ESP_CMDFIFO_SZ);
- if (cmdlen > 0) {
- s->cmdfifo_cdb_offset = 0;
- do_cmd(s);
- } else if (cmdlen == 0) {
- if (s->dma) {
- esp_raise_drq(s);
+
+ esp_set_phase(s, STAT_CD);
+ s->rregs[ESP_RSEQ] = SEQ_CD;
+ s->cmdfifo_cdb_offset = 0;
+
+ if (s->dma) {
+ esp_do_dma(s);
+ } else {
+ if (get_cmd(s, ESP_CMDFIFO_SZ)) {
+ do_cmd(s);
}
- /* Target present, but no cmd yet - switch to command phase */
- s->rregs[ESP_RSEQ] = SEQ_CD;
- esp_set_phase(s, STAT_CD);
}
}
--
2.39.2
- [PATCH 81/88] esp.c: remove redundant n variable in PDMA COMMAND phase, (continued)
- [PATCH 81/88] esp.c: remove redundant n variable in PDMA COMMAND phase, Mark Cave-Ayland, 2024/01/12
- [PATCH 72/88] esp.c: handle TC underflow for DMA SCSI requests, Mark Cave-Ayland, 2024/01/12
- [PATCH 64/88] esp.c: don't raise INTR_BS interrupt in DATA IN phase until TI command issued, Mark Cave-Ayland, 2024/01/12
- [PATCH 50/88] esp.c: move CMD_TI end of message phase detection to esp_do_dma() and do_dma_pdma_cb(), Mark Cave-Ayland, 2024/01/12
- [PATCH 75/88] esp.c: improve ESP_RSEQ logic consolidation, Mark Cave-Ayland, 2024/01/12
- [PATCH 79/88] esp.c: consolidate DMA and PDMA logic in DATA IN phase, Mark Cave-Ayland, 2024/01/12
- [PATCH 71/88] esp.c: don't clear the SCSI phase when reading ESP_RINTR, Mark Cave-Ayland, 2024/01/12
- [PATCH 55/88] esp.c: always use esp_do_dma() in pdma_cb(), Mark Cave-Ayland, 2024/01/12
- [PATCH 70/88] esp.c: ensure that STAT_INT is cleared when reading ESP_RINTR, Mark Cave-Ayland, 2024/01/12
- [PATCH 80/88] esp.c: consolidate DMA and PDMA logic in MESSAGE OUT phase, Mark Cave-Ayland, 2024/01/12
- [PATCH 51/88] esp.c: don't use get_cmd() for CMD_SEL DMA commands,
Mark Cave-Ayland <=
- [PATCH 65/88] esp.c: move non-DMA TI logic to separate esp_nodma_ti_dataout() function, Mark Cave-Ayland, 2024/01/12
- [PATCH 78/88] esp.c: consolidate DMA and PDMA logic in DATA OUT phase, Mark Cave-Ayland, 2024/01/12
- [PATCH 59/88] esp.c: separate logic based upon ESP command in esp_transfer_data(), Mark Cave-Ayland, 2024/01/12
- [PATCH 73/88] esp.c: remove restriction on FIFO read access when DMA memory routines defined, Mark Cave-Ayland, 2024/01/12
- [PATCH 84/88] esp.c: implement DMA Transfer Pad command for DATA phases, Mark Cave-Ayland, 2024/01/12
- [PATCH 53/88] esp.c: replace do_dma_pdma_cb() with esp_do_dma(), Mark Cave-Ayland, 2024/01/12
- [PATCH 58/88] esp.c: separate logic based upon ESP command in esp_command_complete(), Mark Cave-Ayland, 2024/01/12
- [PATCH 61/88] esp.c: remove DATA IN phase logic when reading from FIFO, Mark Cave-Ayland, 2024/01/12
- [PATCH 77/88] esp.c: only transfer non-DMA MESSAGE OUT phase data for specific commands, Mark Cave-Ayland, 2024/01/12
- [PATCH 62/88] esp.c: zero command register when TI command terminates due to phase change, Mark Cave-Ayland, 2024/01/12