[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 15/88] esp.c: remove another set of manual STAT_TC updates
From: |
Mark Cave-Ayland |
Subject: |
[PULL 15/88] esp.c: remove another set of manual STAT_TC updates |
Date: |
Tue, 13 Feb 2024 19:39:39 +0000 |
Following on from the recent changes to when the TC is updated, it is now
possible to remove another set of manual STAT_TC updates so that its state
is now managed within esp_set_tc().
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-16-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
hw/scsi/esp.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c
index 3fc7417d7c..6fd5c8767a 100644
--- a/hw/scsi/esp.c
+++ b/hw/scsi/esp.c
@@ -513,7 +513,6 @@ static void handle_satn_stop(ESPState *s)
static void write_response_pdma_cb(ESPState *s)
{
esp_set_phase(s, STAT_ST);
- s->rregs[ESP_RSTAT] |= STAT_TC;
s->rregs[ESP_RINTR] |= INTR_BS | INTR_FC;
s->rregs[ESP_RSEQ] = SEQ_CD;
esp_raise_irq(s);
@@ -532,7 +531,6 @@ static void write_response(ESPState *s)
if (s->dma_memory_write) {
s->dma_memory_write(s->dma_opaque, buf, 2);
esp_set_phase(s, STAT_ST);
- s->rregs[ESP_RSTAT] |= STAT_TC;
s->rregs[ESP_RINTR] |= INTR_BS | INTR_FC;
s->rregs[ESP_RSEQ] = SEQ_CD;
} else {
@@ -550,10 +548,8 @@ static void write_response(ESPState *s)
static void esp_dma_done(ESPState *s)
{
- s->rregs[ESP_RSTAT] |= STAT_TC;
s->rregs[ESP_RINTR] |= INTR_BS;
s->rregs[ESP_RFLAGS] = 0;
- esp_set_tc(s, 0);
esp_raise_irq(s);
}
@@ -592,7 +588,6 @@ static void do_dma_pdma_cb(ESPState *s)
*/
s->cmdfifo_cdb_offset = fifo8_num_used(&s->cmdfifo);
esp_set_phase(s, STAT_CD);
- s->rregs[ESP_RSTAT] |= STAT_TC;
s->rregs[ESP_RSEQ] = SEQ_CD;
s->rregs[ESP_RINTR] |= INTR_BS;
esp_raise_irq(s);
@@ -699,7 +694,6 @@ static void esp_do_dma(ESPState *s)
*/
s->cmdfifo_cdb_offset = fifo8_num_used(&s->cmdfifo);
esp_set_phase(s, STAT_CD);
- s->rregs[ESP_RSTAT] |= STAT_TC;
s->rregs[ESP_RSEQ] = SEQ_CD;
s->rregs[ESP_RINTR] |= INTR_BS;
esp_raise_irq(s);
@@ -829,7 +823,6 @@ static void esp_do_nodma(ESPState *s)
*/
s->cmdfifo_cdb_offset = fifo8_num_used(&s->cmdfifo);
esp_set_phase(s, STAT_CD);
- s->rregs[ESP_RSTAT] |= STAT_TC;
s->rregs[ESP_RSEQ] = SEQ_CD;
s->rregs[ESP_RINTR] |= INTR_BS;
esp_raise_irq(s);
@@ -952,7 +945,6 @@ void esp_transfer_data(SCSIRequest *req, uint32_t len)
* completion interrupt
*/
s->data_in_ready = true;
- s->rregs[ESP_RSTAT] |= STAT_TC;
s->rregs[ESP_RINTR] |= INTR_BS;
esp_raise_irq(s);
}
@@ -997,7 +989,6 @@ static void handle_ti(ESPState *s)
if (s->dma) {
dmalen = esp_get_tc(s);
trace_esp_handle_ti(dmalen);
- s->rregs[ESP_RSTAT] &= ~STAT_TC;
esp_do_dma(s);
} else {
trace_esp_handle_ti(s->ti_size);
@@ -1152,7 +1143,6 @@ uint64_t esp_reg_read(ESPState *s, uint32_t saddr)
* of the FIFO so switch to status phase
*/
esp_set_phase(s, STAT_ST);
- s->rregs[ESP_RSTAT] |= STAT_TC;
}
}
s->rregs[ESP_FIFO] = esp_fifo_pop(&s->fifo);
--
2.39.2
- [PULL 06/88] esp.c: update esp_set_tc() to set STAT_TC flag, (continued)
- [PULL 06/88] esp.c: update esp_set_tc() to set STAT_TC flag, Mark Cave-Ayland, 2024/02/13
- [PULL 08/88] esp.c: move command execution logic to new esp_run_cmd() function, Mark Cave-Ayland, 2024/02/13
- [PULL 07/88] esp.c: start removal of manual STAT_TC setting when transfer counter reaches zero, Mark Cave-Ayland, 2024/02/13
- [PULL 09/88] esp.c: update TC check logic in do_dma_pdma_cb() to check for TC == 0, Mark Cave-Ayland, 2024/02/13
- [PULL 10/88] esp.c: move buffer and TC logic into separate to/from device paths in esp_do_dma(), Mark Cave-Ayland, 2024/02/13
- [PULL 11/88] esp.c: remove unused case from esp_pdma_read(), Mark Cave-Ayland, 2024/02/13
- [PULL 13/88] esp.c: decrement the TC during MESSAGE OUT and COMMAND phases, Mark Cave-Ayland, 2024/02/13
- [PULL 12/88] esp.c: don't accumulate directly into cmdfifo, Mark Cave-Ayland, 2024/02/13
- [PULL 14/88] esp.c: introduce esp_set_phase() helper function, Mark Cave-Ayland, 2024/02/13
- [PULL 16/88] esp.c: remove MacOS TI workaround that pads FIFO transfers to ESP_FIFO_SZ, Mark Cave-Ayland, 2024/02/13
- [PULL 15/88] esp.c: remove another set of manual STAT_TC updates,
Mark Cave-Ayland <=
- [PULL 19/88] esp.c: remove zero transfer size check from esp_do_dma(), Mark Cave-Ayland, 2024/02/13
- [PULL 18/88] esp.c: don't clear RFLAGS register when DMA is complete, Mark Cave-Ayland, 2024/02/13
- [PULL 17/88] esp.c: don't reset the TC and ESP_RSEQ state when executing a SCSI command, Mark Cave-Ayland, 2024/02/13
- [PULL 20/88] esp.c: update condition for esp_dma_done() in esp_do_dma() from device path, Mark Cave-Ayland, 2024/02/13
- [PULL 22/88] esp.c: ensure that the PDMA callback is called for every device read, Mark Cave-Ayland, 2024/02/13
- [PULL 21/88] esp.c: update condition for esp_dma_done() in esp_do_dma() to device path, Mark Cave-Ayland, 2024/02/13
- [PULL 23/88] esp.c: don't immediately raise INTR_BS if SCSI data needed in esp_do_dma(), Mark Cave-Ayland, 2024/02/13
- [PULL 25/88] esp.c: remove unaligned adjustment in do_dma_pdma_cb() to device path, Mark Cave-Ayland, 2024/02/13
- [PULL 26/88] esp.c: remove unneeded if() check in esp_transfer_data(), Mark Cave-Ayland, 2024/02/13
- [PULL 24/88] esp.c: remove TC adjustment in esp_do_dma() from device path, Mark Cave-Ayland, 2024/02/13