dcavalca / rpms / qemu

Forked from rpms/qemu a year ago
Clone

Blame 0023-scsi-esp-respect-FIFO-invariant-after-message-phase.patch

cf91b1
From: Paolo Bonzini <pbonzini@redhat.com>
cf91b1
Date: Tue, 14 Jun 2016 15:10:24 +0200
cf91b1
Subject: [PATCH] scsi: esp: respect FIFO invariant after message phase
cf91b1
cf91b1
The FIFO contains two bytes; hence the write ptr should be two bytes ahead
cf91b1
of the read pointer.
cf91b1
cf91b1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
cf91b1
(cherry picked from commit d020aa504cec8f525b55ba2ef982c09dc847c72e)
cf91b1
---
cf91b1
 hw/scsi/esp.c | 2 +-
cf91b1
 1 file changed, 1 insertion(+), 1 deletion(-)
cf91b1
cf91b1
diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c
cf91b1
index c2f6f8f..6407844 100644
cf91b1
--- a/hw/scsi/esp.c
cf91b1
+++ b/hw/scsi/esp.c
cf91b1
@@ -222,7 +222,7 @@ static void write_response(ESPState *s)
cf91b1
     } else {
cf91b1
         s->ti_size = 2;
cf91b1
         s->ti_rptr = 0;
cf91b1
-        s->ti_wptr = 0;
cf91b1
+        s->ti_wptr = 2;
cf91b1
         s->rregs[ESP_RFLAGS] = 2;
cf91b1
     }
cf91b1
     esp_raise_irq(s);