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)
commit2b1b1b4ac716fd929a2d221bd4ade62263bed915
tree6aeb6b78909ca2bac8a3826a1d1a4d8b1480805b
parent3eb2ce825ea1ad89d20f7a3b5780df850e4be274
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: f88fc122cc34 ("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