]> git.baikalelectronics.ru Git - kernel.git/commit
staging: mt29f_spinand: Enable the read ECC before program the page
authorArun Nagendran <arunrasppi@gmail.com>
Fri, 15 Sep 2017 16:30:32 +0000 (12:30 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Sep 2017 10:25:31 +0000 (12:25 +0200)
commit5464f889b64d8a65da2119526678c51599364fa7
tree533e0a1c20bb1eb630e52e656002cda3b826edb7
parent75fa23a76b5044f03b8aada85eae7e3fe194bf4a
staging: mt29f_spinand: Enable the read ECC before program the page

Current program_page function did following operation:

1. read page (with ECC OFF)
2. modify the page
3. write the page (with ECC ON)

For some case(buggy flash Chip), while read the page without ECC ON,
we may read the page with bit flip error and modify that bad page without
knowing the bit flip error on that page.
also we re-calculate the hash for bad page and write it.
This could bring potential in-consistency problem with Flash data.

Verify this logic with GIGA DEVICE Part(GD5F2GQ4RCFIG):
we see this in-conststency problem wit Giga Device and fix on
this patch resovle that issue.

Signed-off-by: Arun Nagendran <arunrasppi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/mt29f_spinand/mt29f_spinand.c