aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2024-01-12 12:53:28 +0000
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2024-02-13 19:37:28 +0000
commit66fd5657338b7a1ca9c362a593e2daca5a9f4300 (patch)
treef0a518395aace760905a0d80e394ae162c45a29e
parent1b2e34ca2e86f6487a9fc8b575f3ea6ce294fc95 (diff)
esp.c: remove s_without_satn_pdma_cb() PDMA callback
This can now be handled by the existing do_dma_pdma_cb() function. 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-37-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-rw-r--r--hw/scsi/esp.c22
-rw-r--r--include/hw/scsi/esp.h1
2 files changed, 1 insertions, 22 deletions
diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c
index df4d5f8811..16cb6c72fd 100644
--- a/hw/scsi/esp.c
+++ b/hw/scsi/esp.c
@@ -408,23 +408,6 @@ static void handle_satn(ESPState *s)
}
}
-static void s_without_satn_pdma_cb(ESPState *s)
-{
- uint8_t buf[ESP_FIFO_SZ];
- int n;
-
- /* Copy FIFO into cmdfifo */
- n = esp_fifo_pop_buf(&s->fifo, buf, fifo8_num_used(&s->fifo));
- n = MIN(fifo8_num_free(&s->cmdfifo), n);
- fifo8_push_all(&s->cmdfifo, buf, n);
-
- if (!esp_get_tc(s) && !fifo8_is_empty(&s->cmdfifo)) {
- s->cmdfifo_cdb_offset = 0;
- s->do_cmd = 0;
- do_cmd(s);
- }
-}
-
static void handle_s_without_atn(ESPState *s)
{
int32_t cmdlen;
@@ -433,7 +416,7 @@ static void handle_s_without_atn(ESPState *s)
s->dma_cb = handle_s_without_atn;
return;
}
- esp_set_pdma_cb(s, S_WITHOUT_SATN_PDMA_CB);
+ esp_set_pdma_cb(s, DO_DMA_PDMA_CB);
if (esp_select(s) < 0) {
return;
}
@@ -856,9 +839,6 @@ static void esp_pdma_cb(ESPState *s)
case SATN_PDMA_CB:
satn_pdma_cb(s);
break;
- case S_WITHOUT_SATN_PDMA_CB:
- s_without_satn_pdma_cb(s);
- break;
case SATN_STOP_PDMA_CB:
satn_stop_pdma_cb(s);
break;
diff --git a/include/hw/scsi/esp.h b/include/hw/scsi/esp.h
index 13b17496f8..b727181da9 100644
--- a/include/hw/scsi/esp.h
+++ b/include/hw/scsi/esp.h
@@ -153,7 +153,6 @@ struct SysBusESPState {
/* PDMA callbacks */
enum pdma_cb {
SATN_PDMA_CB = 0,
- S_WITHOUT_SATN_PDMA_CB = 1,
SATN_STOP_PDMA_CB = 2,
WRITE_RESPONSE_PDMA_CB = 3,
DO_DMA_PDMA_CB = 4