]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: nand: atmel: Fix get_sectorsize() function
authorBoris Brezillon <boris.brezillon@bootlin.com>
Tue, 27 Mar 2018 17:01:58 +0000 (19:01 +0200)
committerBoris Brezillon <boris.brezillon@bootlin.com>
Thu, 29 Mar 2018 17:29:06 +0000 (19:29 +0200)
commit2fdfe1794a253b8dd5cc52bc7a1e1d18546685fc
tree6aeb6b78909ca2bac8a3826a1d1a4d8b1480805b
parente05fd6bfc428a5168ab1176dd8a88eb8301fc2a1
mtd: nand: atmel: Fix get_sectorsize() function

get_sectorsize() was not using the appropriate macro to extract the
ECC sector size from the config cache, which led to buggy ECC when
using 1024 byte sectors.

Fixes: aa24d75544f4 ("mtd: nand: Cleanup/rework the atmel_nand driver")
Cc: <stable@vger.kernel.org>
Reported-by: Olivier Schonken <olivier.schonken@gmail.com>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Reviewed-by: Richard Weinberger <richard@nod.at>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Tested-by: Olivier Schonken <olivier.schonken@gmail.com>
drivers/mtd/nand/atmel/pmecc.c