[openwrt/openwrt] ramips: fix NAND flash driver ECC bit position mask

LEDE Commits lede-commits at lists.infradead.org
Wed Feb 16 12:29:23 PST 2022


nbd pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/bf0c965af0c8cb6b3b12466e55ad88e38fa08a53

commit bf0c965af0c8cb6b3b12466e55ad88e38fa08a53
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed Feb 16 21:25:13 2022 +0100

    ramips: fix NAND flash driver ECC bit position mask
    
    The bit position mask was accidentally made too wide, overlapping with the LSB
    from the byte position mask. This caused ECC calculation to fail for odd bytes
    
    Signed-off-by: Chad Monroe <chad.monroe at smartrg.com>
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
    (cherry-picked from commit 918d4ab41ea34358c747aab5471bbb0a2a786dd8)
---
 .../0300-mtd-rawnand-add-driver-support-for-MT7621-nand-flash.patch     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ramips/patches-5.4/0300-mtd-rawnand-add-driver-support-for-MT7621-nand-flash.patch b/target/linux/ramips/patches-5.4/0300-mtd-rawnand-add-driver-support-for-MT7621-nand-flash.patch
index ba844fed0f..cca09cd706 100644
--- a/target/linux/ramips/patches-5.4/0300-mtd-rawnand-add-driver-support-for-MT7621-nand-flash.patch
+++ b/target/linux/ramips/patches-5.4/0300-mtd-rawnand-add-driver-support-for-MT7621-nand-flash.patch
@@ -233,7 +233,7 @@ Signed-off-by: Weijie Gao <weijie.gao at mediatek.com>
 +#define   DEC_EL_EVEN_S			0
 +#define   DEC_EL_M			0x1fff
 +#define   DEC_EL_BYTE_POS_S		3
-+#define   DEC_EL_BIT_POS_M		GENMASK(3, 0)
++#define   DEC_EL_BIT_POS_M		GENMASK(2, 0)
 +
 +#define ECC_FDMADDR			0x13c
 +



More information about the lede-commits mailing list