diff mbox

[v5,05/14] mtd: nand: pxa3xx: Clear cmd buffer #3 (NDCB3) on command start

Message ID 1384464339-6817-6-git-send-email-ezequiel.garcia@free-electrons.com
State Superseded
Headers show

Commit Message

Ezequiel Garcia Nov. 14, 2013, 9:25 p.m. UTC
Command buffer #3 is not properly cleared and it keeps the last
set value. Fix this by clearing when a command is setup.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
 drivers/mtd/nand/pxa3xx_nand.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Brian Norris Nov. 14, 2013, 10:18 p.m. UTC | #1
On Thu, Nov 14, 2013 at 06:25:30PM -0300, Ezequiel Garcia wrote:
> Command buffer #3 is not properly cleared and it keeps the last
> set value. Fix this by clearing when a command is setup.
> 
> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>

Does this have any bugfix ramifications for -stable? You started using
ndcb3 in:

commit 41a634303f8dbf97c8087773b9d66914d2a9c0fd
Author: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Date:   Mon Aug 12 14:14:51 2013 -0300

    mtd: nand: pxa3xx: Use 'length override' in ONFI paramater page read

This was merged for 3.12.

Brian
diff mbox

Patch

diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
index 40eff6d..5b5243f 100644
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -606,6 +606,7 @@  static int prepare_command_pool(struct pxa3xx_nand_info *info, int command,
 	info->use_ecc		= 0;
 	info->use_spare		= 1;
 	info->retcode		= ERR_NONE;
+	info->ndcb3		= 0;
 	if (info->cs != 0)
 		info->ndcb0 = NDCB0_CSEL;
 	else
@@ -627,7 +628,6 @@  static int prepare_command_pool(struct pxa3xx_nand_info *info, int command,
 	default:
 		info->ndcb1 = 0;
 		info->ndcb2 = 0;
-		info->ndcb3 = 0;
 		break;
 	}