Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit f8da133c authored by Pekon Gupta's avatar Pekon Gupta Committed by Greg Kroah-Hartman
Browse files

mtd: eLBC NAND: fix subpage write support



commit f034d87def51f026b735d1e2877e9387011b2ba3 upstream.

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 837a6ba4
   "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: default avatarHelmut Schaa <helmut.schaa@googlemail.com>
Tested-by: default avatarHelmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: default avatarPekon Gupta <pekon@ti.com>
Reviewed-by: default avatarScott Wood <scottwood@freescale.com>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9011eaa4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment