qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v2] hw/nand.c: bug fix to erase operation


From: Kuo-Jung Su
Subject: [Qemu-devel] [PATCH v2] hw/nand.c: bug fix to erase operation
Date: Fri, 25 Jan 2013 15:21:32 +0800

From: Kuo-Jung Su <address@hidden>

The s->addr should be reset along with the s->addrlen,
or it might contains the previous address at last address cycle,
and causes problem to nand erase operation.

Signed-off-by: Kuo-Jung Su <address@hidden>
Cc: address@hidden
---

Changes for v2:
   - coding style fix

---
 hw/nand.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/nand.c b/hw/nand.c
index 4ddb22b..cbc45cc 100644
--- a/hw/nand.c
+++ b/hw/nand.c
@@ -510,6 +510,7 @@ void nand_setio(DeviceState *dev, uint32_t value)
             nand_command(s);
 
         if (s->cmd != NAND_CMD_RANDOMREAD2) {
+            s->addr = 0;
             s->addrlen = 0;
         }
     }
-- 
1.7.9.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]