]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: nand: mxc: Fix mxc_v1 ooblayout
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Fri, 25 Nov 2016 10:32:32 +0000 (11:32 +0100)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Wed, 23 Aug 2017 14:49:21 +0000 (16:49 +0200)
commitf149c6c15660834c6594a675b5da7db1725241f9
tree04d973768bb3404725ccc0ae8f5ed26bd465ada2
parent62d019ff81a2bdafaa94227b708eaebf890c4888
mtd: nand: mxc: Fix mxc_v1 ooblayout

Commit bbbd1d8a2e64 ("mtd: nand: mxc: switch to mtd_ooblayout_ops")
introduced a bug in the OOB layout description. Even if the driver claims
that 3 ECC bytes are reserved to protect 512 bytes of data, it's actually
5 ECC bytes to protect 512+6 bytes of data (some OOB bytes are also
protected using extra ECC bytes).

Fix the mxc_v1_ooblayout_{free,ecc}() functions to reflect this behavior.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Fixes: bbbd1d8a2e64 ("mtd: nand: mxc: switch to mtd_ooblayout_ops")
Cc: <stable@vger.kernel.org>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/nand/mxc_nand.c