Patch "mtd: nand: pxa3xx: Fix READOOB implementation" has been added to the 4.14-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
mtd: nand: pxa3xx: Fix READOOB implementation
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
mtd-nand-pxa3xx-fix-readoob-implementation.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
fee4380f368e84ed216b62ccd2fbc4126f2bf40bMon Sep 17 00:00:00 2001
From: Boris Brezillon <[email protected]>
Date: Mon, 18 Dec 2017 11:32:45 +0100
Subject: mtd: nand: pxa3xx: Fix READOOB implementation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
From: Boris Brezillon <[email protected]>
commit fee4380f368e84ed216b62ccd2fbc4126f2bf40b upstream.
In the current driver, OOB bytes are accessed in raw mode, and when a page access is done with NDCR_SPARE_EN set and NDCR_ECC_EN cleared, the driver must read the whole spare area (64 bytes in case of a 2k page, 16 bytes for a 512 page). The driver was only reading the free OOB bytes, which was leaving some unread data in the FIFO and was somehow leading to a timeout.
We could patch the driver to read ->spare_size + ->ecc_size instead of just ->spare_size when READOOB is requested, but we'd better make in-band and OOB accesses consistent.
Since the driver is always accessing in-band data in non-raw mode (with the ECC engine enabled), we should also access OOB data in this mode. That's particularly useful when using the BCH engine because in this mode the free OOB bytes are also ECC protected.
--- drivers/mtd/nand/pxa3xx_nand.c | 1 + 1 file changed, 1 insertion(+)
drivers/mtd/nand/pxa3xx_nand.c +1 -0
@@ -950,6 +950,7 @@ static void prepare_start_command(structswitch (command) {case NAND_CMD_READ0 : +case NAND_CMD_READOOB :case NAND_CMD_PAGEPROG : info->use_ecc =1 ;break ;
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/mtd-nand-pxa3xx-fix-readoob-implementation.patch