提交 97eeae1a 编写于 作者: B Belisko Marek 提交者: Tom Rini

mtd: nand: omap_gpmc: Fix update of read_ecc in oob

We need to flip only one bit not assign.
Signed-off-by: NMarek Belisko <marek.belisko@gmail.com>
Acked-by: NPekon Gupta <pekon@ti.com>
上级 2d92ba84
......@@ -403,7 +403,7 @@ static int omap_correct_data_bch(struct mtd_info *mtd, uint8_t *dat,
dat[byte_pos] ^= 1 << bit_pos;
printf("nand: bit-flip corrected @data=%d\n", byte_pos);
} else if (byte_pos < error_max) {
read_ecc[byte_pos - SECTOR_BYTES] = 1 << bit_pos;
read_ecc[byte_pos - SECTOR_BYTES] ^= 1 << bit_pos;
printf("nand: bit-flip corrected @oob=%d\n", byte_pos -
SECTOR_BYTES);
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册