]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: nand: sunxi: fix sunxi_nfc_hw_ecc_read/write_chunk()
authorBoris BREZILLON <boris.brezillon@free-electrons.com>
Tue, 20 Oct 2015 20:16:00 +0000 (22:16 +0200)
committerBrian Norris <computersforpeace@gmail.com>
Mon, 2 Nov 2015 20:54:25 +0000 (12:54 -0800)
commit4b164ea0c30d49b8d521ef94e693dfe7eff01322
tree07d85514b222fe71100d67ab7bb03aea861f1748
parent3c8da205ae10d97d66444a4f1a8bbc5182c254c9
mtd: nand: sunxi: fix sunxi_nfc_hw_ecc_read/write_chunk()

The sunxi_nfc_hw_ecc_read/write_chunk() functions try to avoid changing
the column address if unnecessary, but the logic to determine whether it's
necessary or not is currently wrong: it adds the ecc->bytes value to the
current offset where it should actually add ecc->size.

Fixes: 65961b86dfe6 ("mtd: nand: sunxi: introduce sunxi_nfc_hw_ecc_read/write_chunk()")
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/sunxi_nand.c