diff options
author | Haojian Zhuang <haojian.zhuang@marvell.com> | 2009-09-14 14:21:01 +0200 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2009-12-01 02:02:37 +0100 |
commit | 7ce33aff68f653769ba16108834ed212788bcbb6 (patch) | |
tree | 159bfd0e8bdc25219281e3b5c2a05985334f577b /drivers/mtd | |
parent | pxa3xx_nand: fix memory out of bound (diff) | |
download | linux-7ce33aff68f653769ba16108834ed212788bcbb6.tar.xz linux-7ce33aff68f653769ba16108834ed212788bcbb6.zip |
pxa3xx_nand: reset read buffer before reading
Initialize the read buffer content to 0xFF.
Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/nand/pxa3xx_nand.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c index f463ad272d3b..9140fdc42bca 100644 --- a/drivers/mtd/nand/pxa3xx_nand.c +++ b/drivers/mtd/nand/pxa3xx_nand.c @@ -670,6 +670,7 @@ static void pxa3xx_nand_cmdfunc(struct mtd_info *mtd, unsigned command, /* disable HW ECC to get all the OOB data */ info->buf_count = mtd->writesize + mtd->oobsize; info->buf_start = mtd->writesize + column; + memset(info->data_buff, 0xFF, info->buf_count); if (prepare_read_prog_cmd(info, cmdset->read1, column, page_addr)) break; |