tmp_suning_uos_patched/drivers/mtd/spi-nor
Chen-Tsung Hsieh 0e1cd4edef mtd: spi-nor: core: Check written SR value in spi_nor_write_16bit_sr_and_check()
[ Upstream commit 70dd83d737d8900b2d98db6dc6b928c596334d37 ]

Read back Status Register 1 to ensure that the written byte match the
received value and return -EIO if read back test failed.

Without this patch, spi_nor_write_16bit_sr_and_check() only check the
second half of the 16bit. It causes errors like spi_nor_sr_unlock()
return success incorrectly when spi_nor_write_16bit_sr_and_check()
doesn't write SR successfully.

Fixes: 39d1e3340c ("mtd: spi-nor: Fix clearing of QE bit on lock()/unlock()")
Signed-off-by: Chen-Tsung Hsieh <chentsung@chromium.org>
Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
Reviewed-by: Michael Walle <michael@walle.cc>
Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Acked-by: Pratyush Yadav <p.yadav@ti.com>
Link: https://lore.kernel.org/r/20220126073227.3401275-1-chentsung@chromium.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-09 10:21:03 +02:00
..
controllers mtd: spi-nor: hisi-sfc: Remove excessive clk_disable_unprepare() 2021-11-18 14:04:23 +01:00
atmel.c
catalyst.c
core.c mtd: spi-nor: core: Check written SR value in spi_nor_write_16bit_sr_and_check() 2022-06-09 10:21:03 +02:00
core.h
eon.c
esmt.c
everspin.c
fujitsu.c
gigadevice.c
intel.c
issi.c
Kconfig
macronix.c Revert "mtd: spi-nor: macronix: Add support for mx25l51245g" 2021-05-11 14:47:13 +02:00
Makefile
micron-st.c
sfdp.c
sfdp.h
spansion.c
sst.c
winbond.c
xilinx.c
xmc.c