diff options
| author | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2024-01-12 12:52:53 +0000 |
|---|---|---|
| committer | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2024-02-13 19:36:59 +0000 |
| commit | f3ace75be8d472f6ffd40501147f08c9616faf1c (patch) | |
| tree | ca92d748fa49f39734ea93c2ca182ab987d61ad3 /hw/scsi | |
| parent | bc2e8b18fba33f30f25b7c2d74328493c0a2231d (diff) | |
| download | focaccia-qemu-f3ace75be8d472f6ffd40501147f08c9616faf1c.tar.gz focaccia-qemu-f3ace75be8d472f6ffd40501147f08c9616faf1c.zip | |
esp.c: don't clear cmdfifo when esp_select() fails in get_cmd()
The FIFO contents should not be affected if the target selection fails. 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-2-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Diffstat (limited to 'hw/scsi')
| -rw-r--r-- | hw/scsi/esp.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c index 3a1c9f7c3b..68d07edc05 100644 --- a/hw/scsi/esp.c +++ b/hw/scsi/esp.c @@ -252,11 +252,9 @@ static uint32_t get_cmd(ESPState *s, uint32_t maxlen) fifo8_push_all(&s->cmdfifo, buf, dmalen); } else { if (esp_select(s) < 0) { - fifo8_reset(&s->cmdfifo); return -1; } esp_raise_drq(s); - fifo8_reset(&s->cmdfifo); return 0; } } else { @@ -271,7 +269,6 @@ static uint32_t get_cmd(ESPState *s, uint32_t maxlen) trace_esp_get_cmd(dmalen, target); if (esp_select(s) < 0) { - fifo8_reset(&s->cmdfifo); return -1; } return dmalen; |