]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
esp: implement FIFO flush command
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Thu, 4 Mar 2021 22:10:52 +0000 (22:10 +0000)
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Sun, 7 Mar 2021 10:39:05 +0000 (10:39 +0000)
At this point it is now possible to properly implement the FIFO flush command
without causing guest errors.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20210304221103.6369-32-mark.cave-ayland@ilande.co.uk>

hw/scsi/esp.c

index 2dded90be6537d0cce3be61562579b03189eda07..6aae6f91c284d1c1bb7f950549e5e8f8e6dea458 100644 (file)
@@ -769,6 +769,8 @@ void esp_reg_write(ESPState *s, uint32_t saddr, uint64_t val)
         case CMD_FLUSH:
             trace_esp_mem_writeb_cmd_flush(val);
             /*s->ti_size = 0;*/
+            s->ti_wptr = 0;
+            s->ti_rptr = 0;
             s->rregs[ESP_RINTR] = INTR_FC;
             s->rregs[ESP_RSEQ] = 0;
             s->rregs[ESP_RFLAGS] = 0;