linux-stable/drivers/mtd
Patrice Chotard bd5b5a3b04 mtd: spi-nor: fix spi_nor_spimem_setup_op() call in spi_nor_erase_{sector,chip}()
[ Upstream commit f8cd9f632f ]

For erase operations, reg_proto must be used as indicated in
struct spi_nor description in spi-nor.h.

This issue was found when DT property spi-tx-bus-width is set to 4.
In this case the spi_mem_op->addr.buswidth is set to 4 for erase command
which is not correct.

Tested on stm32mp157c-ev1 board with mx66l51235f spi-nor.

Fixes: 0e30f47232 ("mtd: spi-nor: add support for DTR protocol")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
[ta: use nor->reg_proto in spi_nor_controller_ops_erase()]
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Tested-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
Reviewed-by: Pratyush Yadav <p.yadav@ti.com>
Link: https://lore.kernel.org/r/20220629133013.3382393-1-patrice.chotard@foss.st.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-08-17 14:41:53 +02:00
..
chips mtd: cfi_cmdset_0002: Use chip_ready() for write on S29GL064N 2022-06-09 10:30:49 +02:00
devices mtd: dataflash: Add SPI ID table 2022-08-17 14:41:38 +02:00
hyperbus mtd: hyperbus: rpc-if: Fix RPM imbalance in probe error path 2022-08-17 14:41:38 +02:00
lpddr
maps mtd: maps: Fix refcount leak in ap_flash_init 2022-08-17 14:41:17 +02:00
nand mtd: rawnand: meson: Fix a potential double free issue 2022-08-17 14:41:17 +02:00
parsers mtd: parsers: ofpart: Fix refcount leak in bcm4908_partitions_fw_offset 2022-08-17 14:41:20 +02:00
spi-nor mtd: spi-nor: fix spi_nor_spimem_setup_op() call in spi_nor_erase_{sector,chip}() 2022-08-17 14:41:53 +02:00
tests mtd: tests: Fix eraseblock read speed miscalculation for lower partition sizes 2022-03-14 17:01:47 +01:00
ubi ubi: ubi_create_volume: Fix use-after-free when volume creation failed 2022-06-14 18:44:55 +02:00
Kconfig mtdblock: Add comment about UBI block devices 2021-08-06 22:05:13 +02:00
Makefile
ftl.c mtd/ftl: don't cast away the type when calling add_mtd_blktrans_dev 2021-08-23 10:01:04 +02:00
inftlcore.c mtd: inftlcore: Use module_mtd_blktrans to register driver 2021-03-11 09:37:48 +01:00
inftlmount.c mtd: inftl: remove unnecessary oom message 2021-06-11 20:44:21 +02:00
mtd_blkdevs.c mtd_blkdevs: avoid soft lockups with some mtd/spi devices 2022-01-26 11:43:02 +01:00
mtdblock.c mtdblock: warn if opened on NAND 2022-06-09 10:30:02 +02:00
mtdblock_ro.c mtdblock: Warn if added for a NAND device 2021-08-17 18:41:59 +02:00
mtdchar.c mtdchar: prevent unbounded allocation in MEMWRITE ioctl 2021-12-09 17:52:29 +01:00
mtdconcat.c mtd: mtdconcat: Check _read, _write callbacks existence before assignment 2021-08-17 18:43:33 +02:00
mtdcore.c Char/Misc and other driver updates for 5.18-rc1 2022-03-28 12:27:35 -07:00
mtdcore.h
mtdoops.c mtd: mtdoops: remove unnecessary oom message 2021-06-11 20:43:46 +02:00
mtdpart.c mtd: Fixed breaking list in __mtd_del_partition. 2021-12-03 14:27:18 +01:00
mtdpstore.c pstore/blk: Include zone in pstore_device_info 2021-06-16 21:09:31 -07:00
mtdsuper.c mm: don't include <linux/blkdev.h> in <linux/backing-dev.h> 2021-10-18 06:17:01 -06:00
mtdswap.c block: remove genhd.h 2022-02-02 07:49:59 -07:00
nftlcore.c mtd: nftlcore: remove set but rewrite variables 2021-05-10 12:11:46 +02:00
nftlmount.c mtd: nftl: remove unnecessary oom message 2021-06-11 20:43:26 +02:00
rfd_ftl.c mtd/rfd_ftl: don't cast away the type when calling add_mtd_blktrans_dev 2021-08-23 10:01:06 +02:00
sm_ftl.c mtd: sm_ftl: Fix deadlock caused by cancel_work_sync in sm_release 2022-08-17 14:41:20 +02:00
sm_ftl.h
ssfdc.c