aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2024-01-12 12:53:35 +0000
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2024-02-13 19:37:28 +0000
commit83e803decde74b06c7b1d11f0b9e2c3343d4b683 (patch)
tree945e1d95c6b5bc5f99972a858fe98fc2fcefbb5c /hw
parente8c84b19733172bc68ff9fde90981464e9aab443 (diff)
downloadqemu-83e803decde74b06c7b1d11f0b9e2c3343d4b683.zip
qemu-83e803decde74b06c7b1d11f0b9e2c3343d4b683.tar.gz
qemu-83e803decde74b06c7b1d11f0b9e2c3343d4b683.tar.bz2
esp.c: convert esp_do_nodma() do_cmd path to check for SCSI phase instead
Currently do_cmd is used to determine whether MESSAGE OUT and COMMAND phase data is being accumulated in cmdfifo. Update esp_do_dma() to check directly for these two SCSI phases instead. 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-44-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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c
index b48e020..14759ad 100644
--- a/hw/scsi/esp.c
+++ b/hw/scsi/esp.c
@@ -787,7 +787,9 @@ static void esp_do_nodma(ESPState *s)
uint32_t cmdlen;
int len, n;
- if (s->do_cmd) {
+ switch (esp_get_phase(s)) {
+ case STAT_MO:
+ case STAT_CD:
/* 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);
@@ -816,10 +818,8 @@ static void esp_do_nodma(ESPState *s)
s->rregs[ESP_RINTR] |= INTR_BS;
esp_raise_irq(s);
}
- return;
- }
+ break;
- switch (esp_get_phase(s)) {
case STAT_DO:
if (!s->current_req) {
return;