linux-stable/drivers/mtd/nand/spi
Olivier Maignial f5a0506067 mtd: spinand: winbond: Fix ecc_get_status
Reading ECC status is failing.

w25n02kv_ecc_get_status() is using on-stack buffer for
SPINAND_GET_FEATURE_OP() output. It is not suitable for
DMA needs of spi-mem.

Fix this by using the spi-mem operations dedicated buffer
spinand->scratchbuf.

See
spinand->scratchbuf:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/mtd/spinand.h?h=v6.3#n418
spi_mem_check_op():
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/spi/spi-mem.c?h=v6.3#n199

Fixes: 6154c7a583 ("mtd: spinand: winbond: add Winbond W25N02KV flash support")
Cc: stable@vger.kernel.org
Signed-off-by: Olivier Maignial <olivier.maignial@hotmail.fr>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/DB4P250MB1032EDB9E36B764A33769039FE23A@DB4P250MB1032.EURP250.PROD.OUTLOOK.COM
2023-07-12 13:39:44 +02:00
..
alliancememory.c mtd: spinand: Add support for AllianceMemory AS5F34G04SND 2023-01-30 17:16:28 +01:00
ato.c mtd: spinand: Add support for ATO25D1GA 2022-06-06 15:05:33 +02:00
core.c mtd: spinand: add support for ESMT F50x1G41LB 2023-04-03 18:00:29 +02:00
esmt.c mtd: spinand: add support for ESMT F50x1G41LB 2023-04-03 18:00:29 +02:00
gigadevice.c mtd: spinand: gigadevice: add support for GD5F2GQ5xExxH 2023-05-26 19:36:41 +02:00
Kconfig mtd: spinand: Use the external ECC engine logic 2020-12-10 22:37:30 +01:00
macronix.c mtd: spinand: macronix: Add support for serial NAND flash 2023-06-09 17:21:17 +02:00
Makefile mtd: spinand: add support for ESMT F50x1G41LB 2023-04-03 18:00:29 +02:00
micron.c mtd: spinand: micron: Add support for MT29F2G01AAAED 2020-12-10 22:37:32 +01:00
paragon.c mtd: spinand: rework detect procedure for different READ_ID operation 2020-03-09 14:50:19 +01:00
toshiba.c mtd: spinand: toshiba: Fix ecc_get_status 2023-07-12 13:39:42 +02:00
winbond.c mtd: spinand: winbond: Fix ecc_get_status 2023-07-12 13:39:44 +02:00
xtx.c mtd: spinand: Add support for XTX XT26G0xA 2022-04-21 09:34:12 +02:00