[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 73/88] esp.c: remove restriction on FIFO read access when DMA memo
From: |
Mark Cave-Ayland |
Subject: |
[PULL 73/88] esp.c: remove restriction on FIFO read access when DMA memory routines defined |
Date: |
Tue, 13 Feb 2024 19:40:37 +0000 |
The latest state machines can handle mixing DMA and non-DMA FIFO access for all
SCSI phases except DATA IN and DATA OUT. For DATA IN and DATA OUT phases, the
transfer is complete when TC == 0 and the updated logic will now handle TC
underflow correctly, which makes it just about impossible to manually manipulate
the FIFO during a DMA transfer.
Remove the restriction on FIFO read access when DMA memory routines are defined
which also allows the NeXTCube machine to pass its self-test.
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-74-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
hw/scsi/esp.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c
index a3e18bb3d7..f9d848171f 100644
--- a/hw/scsi/esp.c
+++ b/hw/scsi/esp.c
@@ -1133,14 +1133,7 @@ uint64_t esp_reg_read(ESPState *s, uint32_t saddr)
switch (saddr) {
case ESP_FIFO:
- if (s->dma_memory_read && s->dma_memory_write &&
- (s->rregs[ESP_RSTAT] & STAT_PIO_MASK) == 0) {
- /* Data out. */
- qemu_log_mask(LOG_UNIMP, "esp: PIO data read not implemented\n");
- s->rregs[ESP_FIFO] = 0;
- } else {
- s->rregs[ESP_FIFO] = esp_fifo_pop(&s->fifo);
- }
+ s->rregs[ESP_FIFO] = esp_fifo_pop(&s->fifo);
val = s->rregs[ESP_FIFO];
break;
case ESP_RINTR:
--
2.39.2
- [PULL 69/88] esp.c: consolidate end of command sequence after ICCS command, (continued)
- [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
- [PULL 64/88] esp.c: don't raise INTR_BS interrupt in DATA IN phase until TI command issued, Mark Cave-Ayland, 2024/02/13
- [PULL 51/88] esp.c: don't use get_cmd() for CMD_SEL DMA commands, Mark Cave-Ayland, 2024/02/13
- [PULL 57/88] esp.c: rename data_in_ready to to data_ready, Mark Cave-Ayland, 2024/02/13
- [PULL 79/88] esp.c: consolidate DMA and PDMA logic in DATA IN phase, Mark Cave-Ayland, 2024/02/13
- [PULL 71/88] esp.c: don't clear the SCSI phase when reading ESP_RINTR, Mark Cave-Ayland, 2024/02/13
- [PULL 65/88] esp.c: move non-DMA TI logic to separate esp_nodma_ti_dataout() function, Mark Cave-Ayland, 2024/02/13
- [PULL 73/88] esp.c: remove restriction on FIFO read access when DMA memory routines defined,
Mark Cave-Ayland <=
- [PULL 54/88] esp.c: move CMD_ICCS command logic to esp_do_dma(), Mark Cave-Ayland, 2024/02/13
- [PULL 87/88] esp.c: switch TypeInfo registration to use DEFINE_TYPES() macro, Mark Cave-Ayland, 2024/02/13
- [PULL 67/88] esp.c: replace get_cmd() with esp_do_nodma(), Mark Cave-Ayland, 2024/02/13
- [PULL 53/88] esp.c: replace do_dma_pdma_cb() with esp_do_dma(), Mark Cave-Ayland, 2024/02/13
- [PULL 88/88] esp.c: add my copyright to the file, Mark Cave-Ayland, 2024/02/13
- [PULL 83/88] esp.c: replace n variable with len in esp_do_nodma(), Mark Cave-Ayland, 2024/02/13
- [PULL 52/88] esp.c: move CMD_SELATNS end of command logic to esp_do_dma() and do_dma_pdma_cb(), Mark Cave-Ayland, 2024/02/13
- [PULL 62/88] esp.c: zero command register when TI command terminates due to phase change, Mark Cave-Ayland, 2024/02/13
- [PULL 77/88] esp.c: only transfer non-DMA MESSAGE OUT phase data for specific commands, Mark Cave-Ayland, 2024/02/13
- [PULL 55/88] esp.c: always use esp_do_dma() in pdma_cb(), Mark Cave-Ayland, 2024/02/13