projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3eb2ce8
)
mtd: nand: atmel: Fix get_sectorsize() function
author
Boris Brezillon
<
[email protected]
>
Tue, 27 Mar 2018 17:01:58 +0000
(19:01 +0200)
committer
Boris Brezillon
<
[email protected]
>
Thu, 29 Mar 2018 17:29:06 +0000
(19:29 +0200)
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: <
[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]
>
drivers/mtd/nand/atmel/pmecc.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/nand/atmel/pmecc.c
b/drivers/mtd/nand/atmel/pmecc.c
index fcbe4fd6e684bcc45721d52b4845e4018cb8edeb..ca0a70389ba95521e6cd140c1fcc676413d8a651 100644
(file)
--- a/
drivers/mtd/nand/atmel/pmecc.c
+++ b/
drivers/mtd/nand/atmel/pmecc.c
@@
-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_SECTOR
1024 ? 1024 : 512;
}
static void atmel_pmecc_gen_syndrome(struct atmel_pmecc_user *user, int sector)