
Dear Fernando,
In message CAK3Qp=Uwwr62hg50LXdQ+44Z5wetxvNxZZVDCqkN_tPTsdjb3Q@mail.gmail.com you wrote:
I'm rebasing our internal code over v2017.11 and I found an unexpected change in drivers/mtd/nand/nand_base.c:
In such cases it is always a good idea to run "git blame" to find out where the code is coming from...
/* See nand_bch_init() for details. */ ecc->bytes = 0; ecc->priv = nand_bch_init(mtd);
This means that ecc->bytes = 0 is overwritting the board driver supplied value. Actually, back in v2014.03, that specific line (ecc->bytes = 0) did not exit. I also checked today in v2018.07 and master, and this potential bug is still there.
git blame says this comes from
commit ceee07b65875bb01bef55cba06940ef7afc1afba Author: Scott Wood oss@buserror.net Date: Mon May 30 13:57:58 2016 -0500
mtd: nand: Sync with Linux v4.6
Updates the NAND code to match Linux v4.6. The previous sync was from Linux v4.1 in commit d3963721d93fafa.
Note that none of the individual NAND drivers tracked Linux closely enough to be synced themselves, other than manually applying a few cross-tree changes.
Signed-off-by: Scott Wood oss@buserror.net Tested-by: Heiko Schocher hs@denx.de
Best regards,
Wolfgang Denk