Commit c771c041 authored by Boris Brezillon's avatar Boris Brezillon Committed by Xie XiuQi
Browse files

mtd: spinand: Handle the case where PROGRAM LOAD does not reset the cache



commit 13c15e07 upstream.

Looks like PROGRAM LOAD (AKA write cache) does not necessarily reset
the cache content to 0xFF (depends on vendor implementation), so we
must fill the page cache entirely even if we only want to program the
data portion of the page, otherwise we might corrupt the BBM or user
data previously programmed in OOB area.

Fixes: 7529df46 ("mtd: nand: Add core infrastructure to support SPI NANDs")
Reported-by: default avatarStefan Roese <sr@denx.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarBoris Brezillon <bbrezillon@kernel.org>
Tested-by: default avatarStefan Roese <sr@denx.de>
Reviewed-by: default avatarStefan Roese <sr@denx.de>
Acked-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>

Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 0a790902
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment