]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: spinand: Handle the case where PROGRAM LOAD does not reset the cache
authorBoris Brezillon <bbrezillon@kernel.org>
Thu, 24 Jan 2019 14:20:07 +0000 (15:20 +0100)
committerBoris Brezillon <bbrezillon@kernel.org>
Thu, 31 Jan 2019 11:30:51 +0000 (12:30 +0100)
commit80172dc50ffd5d5ed061a610528aadf17753cd7a
tree99efe0fc738c899b0faca0df61350969c63fa314
parent607d144b83b16847bc18fb058d4d51857c4ff9c6
mtd: spinand: Handle the case where PROGRAM LOAD does not reset the cache

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: 4f55137c96ad ("mtd: nand: Add core infrastructure to support SPI NANDs")
Reported-by: Stefan Roese <sr@denx.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Boris Brezillon <bbrezillon@kernel.org>
Tested-by: Stefan Roese <sr@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
Acked-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/spi/core.c