aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2024-01-12 12:53:43 +0000
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2024-02-13 19:37:28 +0000
commit9ff0fd12a20a50de2441057c9ecf180132500d0d (patch)
tree93f0cf7955d28da43538c3e43198815f6ca79e31 /hw
parent3fd325a2de38655f8cc2139d428311f3bdd140ee (diff)
downloadqemu-9ff0fd12a20a50de2441057c9ecf180132500d0d.zip
qemu-9ff0fd12a20a50de2441057c9ecf180132500d0d.tar.gz
qemu-9ff0fd12a20a50de2441057c9ecf180132500d0d.tar.bz2
esp.c: don't use get_cmd() for CMD_SEL DMA commands
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> Tested-by: Helge Deller <deller@gmx.de> Tested-by: Thomas Huth <thuth@redhat.com> Message-Id: <20240112125420.514425-52-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Diffstat (limited to 'hw')
-rw-r--r--hw/scsi/esp.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c
index 9f787d1..3cf8b2b 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);
}
}