[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 74/88] esp.c: handle non-DMA FIFO writes used to terminate DMA co
|
From: |
Mark Cave-Ayland |
|
Subject: |
[PATCH 74/88] esp.c: handle non-DMA FIFO writes used to terminate DMA commands |
|
Date: |
Fri, 12 Jan 2024 12:54:06 +0000 |
Certain versions of MacOS send the first 5 bytes of the CDB using DMA and then
send the last byte of the CDB by writing to the FIFO. Update the non-DMA state
machine to detect the end of the CDB and execute the SCSI command using similar
logic as that which already exists for transferring the remainder of the CDB
using the ESP TI command.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
hw/scsi/esp.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c
index f9d848171f..aa7dec71e3 100644
--- a/hw/scsi/esp.c
+++ b/hw/scsi/esp.c
@@ -787,6 +787,16 @@ static void esp_do_nodma(ESPState *s)
}
break;
+ case CMD_SEL | CMD_DMA:
+ case CMD_SELATN | CMD_DMA:
+ /* Handle when DMA transfer is terminated by non-DMA FIFO write */
+ if (esp_cdb_length(s) && esp_cdb_length(s) ==
+ fifo8_num_used(&s->cmdfifo) - s->cmdfifo_cdb_offset) {
+ /* Command has been received */
+ do_cmd(s);
+ }
+ break;
+
case CMD_SEL:
case CMD_SELATN:
/* FIFO already contain entire CDB */
--
2.39.2
- [PATCH 47/88] esp.c: untangle MESSAGE OUT and COMMAND phase logic in do_dma_pdma_cb(), (continued)
- [PATCH 47/88] esp.c: untangle MESSAGE OUT and COMMAND phase logic in do_dma_pdma_cb(), Mark Cave-Ayland, 2024/01/12
- [PATCH 44/88] esp.c: convert esp_reg_write() do_cmd path to check for SCSI phase instead, Mark Cave-Ayland, 2024/01/12
- [PATCH 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/01/12
- [PATCH 46/88] esp.c: untangle MESSAGE OUT and COMMAND phase logic in esp_do_dma(), Mark Cave-Ayland, 2024/01/12
- [PATCH 48/88] esp.c: untangle MESSAGE OUT and COMMAND phase logic in esp_do_nodma(), Mark Cave-Ayland, 2024/01/12
- [PATCH 56/88] esp.c: remove unused PDMA callback implementation, Mark Cave-Ayland, 2024/01/12
- [PATCH 54/88] esp.c: move CMD_ICCS command logic to esp_do_dma(), Mark Cave-Ayland, 2024/01/12
- [PATCH 57/88] esp.c: rename data_in_ready to to data_ready, Mark Cave-Ayland, 2024/01/12
- [PATCH 76/88] esp.c: only transfer non-DMA COMMAND phase data for specific commands, Mark Cave-Ayland, 2024/01/12
- [PATCH 66/88] esp.c: process non-DMA FIFO writes in esp_do_nodma(), Mark Cave-Ayland, 2024/01/12
- [PATCH 74/88] esp.c: handle non-DMA FIFO writes used to terminate DMA commands,
Mark Cave-Ayland <=
- [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