diff options
author | Chen-Tsung Hsieh <chentsung@chromium.org> | 2022-01-26 15:32:26 +0800 |
---|---|---|
committer | Pratyush Yadav <p.yadav@ti.com> | 2022-04-27 14:57:35 +0530 |
commit | 70dd83d737d8900b2d98db6dc6b928c596334d37 (patch) | |
tree | 7eb5257f3af7ca2cb517e74a1dbe43681e0dcfb5 /certs/system_keyring.c | |
parent | b2d229d4ddb17db541098b83524d901257e93845 (diff) |
mtd: spi-nor: core: Check written SR value in spi_nor_write_16bit_sr_and_check()
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: 39d1e3340c73 ("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
Diffstat (limited to 'certs/system_keyring.c')
0 files changed, 0 insertions, 0 deletions