fix small nand_base errors
Subsystems (2)
PATCH 1/1 fix small nand_base errors
Hi Thomas,
please find the patch that fixes small nand_base errors inlined.
Brief explanation: for nand_write_oob_syndrome, you should first set the position to eccsize, as OOB starts past the eccsize, not eccsize + chunk. For nand_fill_oob I guess that's just a typo, otherwise it just doesn't make sense (and OTOH makes this routine write to 0-th OOB byte thus actually marking it as bad).
Best regards,
Vitaly
drivers/mtd/nand/nand_base.c +2 -2
@@ -1203,7 +1203,7 @@ static int nand_write_oob_syndrome(struc pos = steps * (eccsize + chunk); steps =0 ; }else - pos = eccsize + chunk; + pos = eccsize; chip->cmdfunc (mtd,NAND_CMD_SEQIN , pos, page);for (i =0 ; i < steps; i++) {
@@ -1566,7 +1566,7 @@ static uint8_t *nand_fill_oob(struct nan bytes =min_t (size_t, len, free->length); boffs = free->offset; } -memcpy (chip->oob_poi + woffs, oob, bytes); +memcpy (chip->oob_poi + boffs, oob, bytes); oob += bytes; }return oob;
Thomas,
Quoted 6 lines · Vitaly Wool
Hi Thomas,
please find the patch that fixes small
nand_baseerrors inlined.
Brief explanation: fornand_write_oob_syndrome, you should first set the position to eccsize, as OOB starts past the eccsize, not eccsize + chunk. Fornand_fill_oobI guess that's just a typo, otherwise it just doesn't make sense (and OTOH makes this routine write to 0-th OOB byte thus actually marking it as bad).
Can't see this patch applied, which makes NAND base fail for me.
Vitaly
Quoted 13 lines
Thomas,
Quoted 10 lines · Vitaly Wool
Hi Thomas,
please find the patch that fixes small
nand_baseerrors inlined. Brief explanation: fornand_write_oob_syndrome, you should first set the position to eccsize, as OOB starts past the eccsize, not eccsize + chunk.
Fornand_fill_oobI guess that's just a typo, otherwise it just doesn't make sense (and OTOH makes this routine write to 0-th OOB byte thus actually marking it as bad).
Quoted 1 line
Can't see this patch applied, which makes NAND base fail for me.
Blame dwmw2. It's in my git tree since 2 month
tglx