]> git.baikalelectronics.ru Git - uboot.git/commit
mtd: nand: pxa3xx: fix raw read when last_chunk_size == 0
authorBaruch Siach <baruch@tkos.co.il>
Sun, 5 Apr 2020 16:19:31 +0000 (19:19 +0300)
committerTom Rini <trini@konsulko.com>
Fri, 24 Apr 2020 19:17:14 +0000 (15:17 -0400)
commit20306e9a1627063d8aef6506667cb9ff86056cb1
tree7213cd065f7b07979fb315a98a3c3e2827b9f8a1
parente57ce97bead3195270dfcd678affb40b0c30a423
mtd: nand: pxa3xx: fix raw read when last_chunk_size == 0

Commit 23ae60a5fb0 ("mtd: nand: pxa3xx: add raw read support") added the
local data_len variable in handle_data_pio() to track read size, but
forgot to update the condition of drain_fifo() call. That happens to
work when the layout last_chunk_size != 0. But when last_chunk_size ==
0, drain_fifo() is not called to read the last chunk, which leads to
"Wait timeout!!!" error. Fix this.

Fixes: 23ae60a5fb0 ("mtd: nand: pxa3xx: add raw read support")
Cc: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
drivers/mtd/nand/raw/pxa3xx_nand.c