Patchwork [3/5] lsi: Purge message queue on reset

login
register
mail settings
Submitter Jan Kiszka
Date May 4, 2010, 12:21 p.m.
Message ID <c2c8bd32e6fcc66feb7b90923a082da7de7faba8.1272975660.git.jan.kiszka@siemens.com>
Download mbox | patch
Permalink /patch/51598/
State New
Headers show

Comments

Jan Kiszka - May 4, 2010, 12:21 p.m.
Declare the input message queue empty and initialize the related state
machine properly on controller reset. This fixes unrecoverable errors
when the controller was reset during ongoing requests.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 hw/lsi53c895a.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Patch

diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c
index 85eea15..61de23e 100644
--- a/hw/lsi53c895a.c
+++ b/hw/lsi53c895a.c
@@ -288,6 +288,8 @@  static void lsi_soft_reset(LSIState *s)
     DPRINTF("Reset\n");
     s->carry = 0;
 
+    s->msg_action = 0;
+    s->msg_len = 0;
     s->waiting = 0;
     s->dsa = 0;
     s->dnad = 0;