linux-stable/drivers/mtd
Tudor Ambarus 64b487be33 mtd: spi-nor: Fix mtd size for s3an flashes
[ Upstream commit f656b419d4 ]

As it was before the blamed commit, s3an_nor_scan() was called
after mtd size was set with params->size, and it overwrote the mtd
size value with '8 * nor->page_size * nor->info->n_sectors' when
XSR_PAGESIZE was set. With the introduction of
s3an_post_sfdp_fixups(), we missed to update the mtd size for the
s3an flashes. Fix the mtd size by updating both nor->params->size,
(which will update the mtd_info size later on) and nor->mtd.size
(which is used in spi_nor_set_addr_width()).

Fixes: 641edddb4f ("mtd: spi-nor: Add s3an_post_sfdp_fixups()")
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Pratyush Yadav <p.yadav@ti.com>
Link: https://lore.kernel.org/r/20211207140254.87681-2-tudor.ambarus@microchip.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-03-08 19:12:33 +01:00
..
chips mtd: fixup CFI on ixp4xx 2022-01-20 09:13:16 +01:00
devices mtd: phram: Prevent divide by zero bug in phram_setup() 2022-02-23 12:03:16 +01:00
hyperbus mtd: hyperbus: rpc-if: fix bug in rpcif_hb_remove 2022-01-27 11:03:15 +01:00
lpddr mtd: lpddr: fix excessive stack usage with clang 2020-08-27 14:36:07 +02:00
maps mtd: fixup CFI on ixp4xx 2022-01-20 09:13:16 +01:00
nand mtd: rawnand: ingenic: Fix missing put_device in ingenic_ecc_get 2022-02-23 12:03:16 +01:00
parsers mtd: parsers: qcom: Fix missing free for pparts in cleanup 2022-02-23 12:03:16 +01:00
spi-nor mtd: spi-nor: Fix mtd size for s3an flashes 2022-03-08 19:12:33 +01:00
tests mtd: tests: Remove redundant assignment to err 2021-05-10 12:48:35 +02:00
ubi This pull request contains the following changes for UBIFS: 2021-07-09 10:10:47 -07:00
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
Kconfig mtdblock: Add comment about UBI block devices 2021-08-06 22:05:13 +02:00
Makefile
mtd_blkdevs.c MTD changes: 2021-09-05 10:50:12 -07:00
mtdblock.c mtdblock: Warn if added for a NAND device 2021-08-17 18:41:59 +02:00
mtdblock_ro.c mtdblock: Warn if added for a NAND device 2021-08-17 18:41:59 +02:00
mtdchar.c mtd: add OTP (one-time-programmable) erase ioctl 2021-03-28 19:24:54 +02:00
mtdconcat.c mtd: mtdconcat: Check _read, _write callbacks existence before assignment 2021-08-17 18:43:33 +02:00
mtdcore.c mtd: core: Fix a conflict between MTD and NVMEM on wp-gpios property 2022-03-02 11:48:07 +01: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. 2022-01-27 11:02:48 +01:00
mtdpstore.c pstore/blk: Include zone in pstore_device_info 2021-06-16 21:09:31 -07:00
mtdsuper.c block: remove i_bdev 2020-12-01 14:53:39 -07:00
mtdswap.c mtd: mtdswap: Use module_mtd_blktrans to register driver 2021-03-11 09:37:48 +01: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 drivers: mtd: sm_ftl: Fix alignment of block comment 2021-05-10 12:49:00 +02:00
sm_ftl.h
ssfdc.c