mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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: f88fc122cc ("mtd: nand: Cleanup/rework the atmel_nand driver")
Cc: <[email protected]>
Reported-by: Olivier Schonken <[email protected]>
Signed-off-by: Boris Brezillon <[email protected]>
Reviewed-by: Richard Weinberger <[email protected]>
Acked-by: Nicolas Ferre <[email protected]>
Tested-by: Olivier Schonken <[email protected]>
This commit is contained in:
parent
3eb2ce825e
commit
2b1b1b4ac7
1 changed files with 1 additions and 1 deletions
|
|
@ -426,7 +426,7 @@ static int get_strength(struct atmel_pmecc_user *user)
|
|||
|
||||
static int get_sectorsize(struct atmel_pmecc_user *user)
|
||||
{
|
||||
return user->cache.cfg & PMECC_LOOKUP_TABLE_SIZE_1024 ? 1024 : 512;
|
||||
return user->cache.cfg & PMECC_CFG_SECTOR1024 ? 1024 : 512;
|
||||
}
|
||||
|
||||
static void atmel_pmecc_gen_syndrome(struct atmel_pmecc_user *user, int sector)
|
||||
|
|
|
|||
Loading…
Reference in a new issue