summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/Makefile
diff options
context:
space:
mode:
authorRoger Quadros <rogerq@ti.com>2017-10-20 15:16:21 +0300
committerBoris Brezillon <boris.brezillon@free-electrons.com>2017-10-27 16:53:23 +0200
commit739c64414f01748a36e7d82c8e0611dea94412bd (patch)
tree92bbd573a2aae1eca85b20040e734c08e01dce23 /drivers/mtd/nand/Makefile
parent1f3df4dc088d927683b292118cd8b4eaaf1af573 (diff)
downloadop-kernel-dev-739c64414f01748a36e7d82c8e0611dea94412bd.zip
op-kernel-dev-739c64414f01748a36e7d82c8e0611dea94412bd.tar.gz
mtd: nand: omap2: Fix subpage write
Since v4.12, NAND subpage writes were causing a NULL pointer dereference on OMAP platforms (omap2-nand) using OMAP_ECC_BCH4_CODE_HW, OMAP_ECC_BCH8_CODE_HW and OMAP_ECC_BCH16_CODE_HW. This is because for those ECC modes, omap_calculate_ecc_bch() generates ECC bytes for the entire (multi-sector) page and this can overflow the ECC buffer provided by nand_write_subpage_hwecc() as it expects ecc.calculate() to return ECC bytes for just one sector. However, the root cause of the problem is present since v3.9 but was not seen then as NAND buffers were being allocated as one big chunk prior to commit 3deb9979c731 ("mtd: nand: allocate aligned buffers if NAND_OWN_BUFFERS is unset"). Fix the issue by providing a OMAP optimized write_subpage() implementation. Fixes: 62116e5171e0 ("mtd: nand: omap2: Support for hardware BCH error correction.") Cc: <stable@vger.kernel.org> Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Diffstat (limited to 'drivers/mtd/nand/Makefile')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud