]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: nand: fix chances to create incomplete ECC data when writing
authorRogerCC Lin <rogercc.lin@mediatek.com>
Mon, 19 Sep 2016 02:53:26 +0000 (10:53 +0800)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Mon, 19 Sep 2016 09:57:04 +0000 (11:57 +0200)
commitbc2bccb4ad10d7260b00d8716e2fdcd9e7dc8e78
tree9c0ac8720cf9981916b58c53fecf687798f986a7
parentb0a39b3fd626ed3c60645eaee87d909151b86ebb
mtd: nand: fix chances to create incomplete ECC data when writing

When mtk_nfc_do_write_page() comparing the sector number,because the
sector number field is at the 12th-bit position of NFI_BYTELEN
register,the masked register should be shifted 12 bits before being
compared.The result of this bug may cause the second subpage has
incomplete ECC parity bytes.

Signed-off-by: RogerCC Lin <rogercc.lin@mediatek.com>
Fixes: be1a31b54754 ("mtd: mediatek: driver for MTK Smart Device")
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/nand/mtk_nand.c