Hi Johan,

Resending because the ML rejected my mail sent from my other address... I have to figure out what I set up wrong to trigger the spam filter :)

On 7/14/26 8:39 AM, Johan Jonker wrote:
> The Rockchip boot ROM only checks for NAND chip 0 and with
> reduced ECC strength. Currently only the read page functions
> have this condition check added.
>
> Fix by adding the same condition to all read and write page
> functions by dropping the existing 'selected_bank == 0' check
> and use the NAND_IS_BOOT_MEDIUM option that was introduced to
> U-Boot more recently than this driver to behave
> identically to the Linux driver.
>
> It is now the users responsibility to apply the device tree
> property "nand-is-boot-medium" to only NAND chip 0.
>
> Fixes: b12dc5d6fa76 ("mtd: nand: NFC drivers for RK3308, RK2928 and others")
> Signed-off-by: Johan Jonker <[email protected]>
> Tested-by: Hüseyin BIYIK <[email protected]>
> Reviewed-by: Simon Glass <[email protected]>

You don't explain how the bug can be triggered. It'd be nice to provide the usecase when this is an issue so that other people looking on the Internet for bug reports could somehow stumble upon this patch.

I'm thinking the issue is that we currently verify all NAND chips use the boot_blks and boot_ecc from the boot medium whereas they might not be used as a boot medium (they are missing the nand-is-boot-medium property) so we cannot actually make use of them. Is that correct?

Considering boot_blks is 0 if rockchip,boot-blks property isn't set, we'll never be able to meet the page < pages_per_blk * 0) condition anyway so we would never enter the if block... or can page actually be negative????

To be clear, I don't disagree with the fix, I just am missing a lot of information that should be in the commit log.

Cheers,
Quentin

Reply via email to