From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36641) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tw5K0-0003Bz-Fh for qemu-devel@nongnu.org; Fri, 18 Jan 2013 01:21:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tw5Jv-0002ep-3G for qemu-devel@nongnu.org; Fri, 18 Jan 2013 01:21:00 -0500 Received: from ftcsun4.faraday-tech.com ([60.248.181.187]:56112 helo=ftcsun4.faraday.com.tw) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tw5Ju-0002dp-4G for qemu-devel@nongnu.org; Fri, 18 Jan 2013 01:20:54 -0500 Received: from ftcpcs100.faraday.com.tw ([192.168.31.10]) by ftcsun4.faraday.com.tw (8.11.7p1+Sun/8.11.6) with ESMTP id r0I6Kom07038 for ; Fri, 18 Jan 2013 14:20:51 +0800 (CST) From: Dante Date: Fri, 18 Jan 2013 14:20:20 +0800 Message-ID: <1358490020-18061-2-git-send-email-dantesu@faraday-tech.com> In-Reply-To: <1358490020-18061-1-git-send-email-dantesu@faraday-tech.com> References: <1358490020-18061-1-git-send-email-dantesu@faraday-tech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH 2/2] hw/nand.c: bug fix to erase operation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: balrog@zabor.org, Dante The s->addr is supposed to be reset along with the s->addrlen, or it might be contains the previous address at last address cycle, and causes problem to nand erase operation. Signed-off-by: Kuo-Jung Su --- hw/nand.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/nand.c b/hw/nand.c index 76479ed..b70a371 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 ********************* Confidentiality Notice ************************ This electronic message and any attachments may contain confidential and legally privileged information or information which is otherwise protected from disclosure. If you are not the intended recipient,please do not disclose the contents, either in whole or in part, to anyone,and immediately delete the message and any attachments from your computer system and destroy all hard copies. Thank you for your cooperation. ***********************************************************************