Re: [PATCH 2/6] mtd: rawnand: sunxi: fix sunxi_nfc_hw_ecc_read_extra_oob
From: Jernej Škrabec
Date: Sat Feb 21 2026 - 04:41:10 EST
Dne petek, 20. februar 2026 ob 17:10:07 Srednjeevropski standardni čas je Richard Genoud napisal(a):
> When dumping the OOB, the bytes at the end where actually copied from
> the beginning of the OOB instead of current_offset.
>
> That leads to something like:
> OOB: ff ff ff ff ff ff ff ff ea 19 00 3a 83 db aa 8d
> OOB: 99 09 c8 9a 90 36 35 7d aa 15 13 07 3d 97 b2 a4
> OOB: a8 bb 19 b3 07 e9 f6 25 52 d7 1a 23 e2 7e 0a e4
> OOB: 52 8a 09 d2 1a 86 3d cf b4 99 43 13 d3 90 33 0b
> OOB: ff ff ff ff ff ff ff ff ea 19 00 3a 83 db aa 8d
> OOB: 99 09 c8 9a 90 36 35 7d aa 15 13 07 3d 97 b2 a4
> OOB: a8 bb 19 b3 07 e9 f6 25 52 d7 1a 23 e2 7e 0a e4
> OOB: 52 8a 09 d2 1a 86 3d cf b4 99 43 13 d3 90 33 0b
> instead of:
> OOB: ff ff ff ff ff ff ff ff ea 19 00 3a 83 db aa 8d
> OOB: 99 09 c8 9a 90 36 35 7d aa 15 13 07 3d 97 b2 a4
> OOB: a8 bb 19 b3 07 e9 f6 25 52 d7 1a 23 e2 7e 0a e4
> OOB: 52 8a 09 d2 1a 86 3d cf b4 99 43 13 d3 90 33 0b
> OOB: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> OOB: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> OOB: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> OOB: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> (example with BCH16, user data [8,0], no scrambling)
>
> *cur_off (offset from the beginning of the page) was compared to offset
> (offset from the beginning of the OOB), and then, the
> nand_change_read_column_op() sets the current position to the beginning
> of the OOB instead of OOB+offset
>
> Fixes: 15d6f118285f ("mtd: rawnand: sunxi: Stop supporting ECC_HW_SYNDROME mode")
> Signed-off-by: Richard Genoud <richard.genoud@xxxxxxxxxxx>
Reviewed-by: Jernej Skrabec <jernej.skrabec@xxxxxxxxx>
Best regards,
Jernej