]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: eLBC NAND: fix subpage write support
authorPekon Gupta <pekon@ti.com>
Tue, 6 May 2014 04:11:32 +0000 (09:41 +0530)
committerBrian Norris <computersforpeace@gmail.com>
Tue, 20 May 2014 23:35:31 +0000 (16:35 -0700)
commit03969c9010fc9fc17e4a96302bb8f66502a2b5cb
tree2c89a1214796d309856efbbcfe25372df9fc665d
parente1da51010604f2c84268aabe0edff01afec18b91
mtd: eLBC NAND: fix subpage write support

As subpage write is enabled by default for all drivers, nand_write_subpage_hwecc
causes a crash if the driver did not register ecc->hwctl or ecc->calculate.
This behavior was introduced in
   commit 41298ac516d8894fa5689042699c8cd9d2c068d3
   "mtd: nand: subpage write support for hardware based ECC schemes".

This fixes a crash by emulating subpage write support by padding sub-page data
with 0xff on either sides to make it full page compatible.

Reported-by: Helmut Schaa <helmut.schaa@googlemail.com>
Tested-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Pekon Gupta <pekon@ti.com>
Reviewed-by: Scott Wood <scottwood@freescale.com>
Cc: <stable@vger.kernel.org> # 3.10.x+
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/fsl_elbc_nand.c