mtd: OneNAND: return read error for 4KiB page read

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Mar 11 10:59:04 EST 2011


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=b085058fe556328443f982d892c9657b3aff9d4a
Commit:     b085058fe556328443f982d892c9657b3aff9d4a
Parent:     7912a5e7f37512d8d105785046137435b70347ce
Author:     Adrian Hunter <adrian.hunter at nokia.com>
AuthorDate: Tue Feb 8 12:02:38 2011 +0200
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri Mar 11 14:22:44 2011 +0000

    mtd: OneNAND: return read error for 4KiB page read
    
    When reading using the 4KiB page read function, I/O
    errors could be ignored if more than 1 page was read
    at a time.
    
    Signed-off-by: Adrian Hunter <adrian.hunter at nokia.com>
    Acked-by: Kyungmin Park <kyungmin.park at samsung.com>
    Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/onenand/onenand_base.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index bac41ca..38e6d76 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -1132,6 +1132,8 @@ static int onenand_mlc_read_ops_nolock(struct mtd_info *mtd, loff_t from,
 			onenand_update_bufferram(mtd, from, !ret);
 			if (ret == -EBADMSG)
 				ret = 0;
+			if (ret)
+				break;
 		}
 
 		this->read_bufferram(mtd, ONENAND_DATARAM, buf, column, thislen);



More information about the linux-mtd-cvs mailing list