
14 Sep
2020
14 Sep
'20
9:40 p.m.
On Mon, Aug 31, 2020 at 02:27:37PM +0200, Michal Simek wrote:
From: T Karthik Reddy t.karthik.reddy@xilinx.com
Nand writes should skip the bad blocks with "nand write" command. In case of bad blocks with above 32-bit address, nand_block_isbad() returns false due to truncated bad block address.
In below code segment,
if (nand_block_isbad(mtd, offset & ~(mtd->erasesize - 1)))
offset is 64-bit and mtd->erasesize is 32-bit, hence the truncation is happening. Cast 'mtd->erasesize' with loff_t to fix this issue.
Signed-off-by: T Karthik Reddy t.karthik.reddy@xilinx.com Signed-off-by: Michal Simek michal.simek@xilinx.com
Applied to u-boot/master, thanks!
--
Tom