summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2016-06-14 15:10:24 +0200
committerMichael Roth <mdroth@linux.vnet.ibm.com>2016-08-09 14:30:39 -0500
commitaa6905db9667687293a558c14c78b05884c2b4eb (patch)
tree197b9fc3ce5c8e7e5662a07b66cda7e819d152e7
parente5c4e642be623670ecc474316edd777ec4cbc424 (diff)
downloadqemu-aa6905db9667687293a558c14c78b05884c2b4eb.tar.gz
scsi: esp: respect FIFO invariant after message phase
The FIFO contains two bytes; hence the write ptr should be two bytes ahead of the read pointer. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> (cherry picked from commit d020aa504cec8f525b55ba2ef982c09dc847c72e) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
-rw-r--r--hw/scsi/esp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c
index c2f6f8ff85..6407844ce4 100644
--- a/hw/scsi/esp.c
+++ b/hw/scsi/esp.c
@@ -222,7 +222,7 @@ static void write_response(ESPState *s)
} else {
s->ti_size = 2;
s->ti_rptr = 0;
- s->ti_wptr = 0;
+ s->ti_wptr = 2;
s->rregs[ESP_RFLAGS] = 2;
}
esp_raise_irq(s);