kernel-ark/drivers/mtd
Lothar Waßmann 69fc01296c mtd: nand: make Samsung SLC NAND usable again
commit c51d0ac59f ("mtd: nand: Move Samsung specific init/detection
logic in nand_samsung.c") introduced a regression for Samsung SLC NAND
chips. Prior to this commit chip->bits_per_cell was initialized by calling
nand_get_bits_per_cell() before using nand_is_slc().
With the offending commit this call is skipped, leaving
chip->bits_per_cell cleared to zero when the manufacturer specific
'.detect' function calls nand_is_slc() which in turn interprets
bits_per_cell != 1 as indication for an MLC chip.
The effect is that e.g. a K9F1G08U0F NAND chip is falsely detected as
MLC NAND with 4KiB page size rather than SLC with 2KiB page size.

Add a call to nand_get_bits_per_cell() before calling the .detect hook
function in nand_manufacturer_detect(), so that the nand_is_slc()
calls in the manufacturer specific code will return correct results.

Fixes: c51d0ac59f ("mtd: nand: Move Samsung specific init/detection logic in nand_samsung.c")
Cc: <stable@vger.kernel.org>
Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
2017-08-29 18:22:33 +02:00
..
chips mtd: cfi_cmdset_0020: Drop unnecessary static 2017-05-11 11:49:20 -07:00
devices mtd: st_spi_fsm: Handle clk_prepare_enable/clk_disable_unprepare. 2017-08-23 16:49:20 +02:00
lpddr
maps mtd: physmap_of: Drop unnecessary static 2017-05-11 11:49:21 -07:00
nand mtd: nand: make Samsung SLC NAND usable again 2017-08-29 18:22:33 +02:00
onenand
parsers mtd: parsers: trx: fix pr_err format for printing offset 2017-06-23 10:47:54 -07:00
spi-nor mtd: spi-nor: cqspi: remove duplicate const 2017-06-27 21:28:52 +02:00
tests mtd: nand: Rename nand.h into rawnand.h 2017-08-13 10:11:49 +02:00
ubi driver core patches for 4.13-rc1 2017-07-03 20:27:48 -07:00
afs.c
ar7part.c
bcm47xxpart.c mtd: extract TRX parser out of bcm47xxpart into a separated module 2017-06-22 13:13:10 -07:00
bcm63xxpart.c
cmdlinepart.c
ftl.c
inftlcore.c mtd: nand: Rename nand.h into rawnand.h 2017-08-13 10:11:49 +02:00
inftlmount.c
Kconfig mtd: extract TRX parser out of bcm47xxpart into a separated module 2017-06-22 13:13:10 -07:00
Makefile mtd: extract TRX parser out of bcm47xxpart into a separated module 2017-06-22 13:13:10 -07:00
mtd_blkdevs.c block: don't set bounce limit in blk_init_queue 2017-06-27 12:13:45 -06:00
mtdblock_ro.c
mtdblock.c
mtdchar.c mtd: Fix typo: "occured" -> "occurred" 2017-02-08 14:24:57 -08:00
mtdconcat.c
mtdcore.c mtd: Fix check in mtd_unpoint() 2017-07-07 17:57:59 -07:00
mtdcore.h
mtdoops.c
mtdpart.c mtd: partitions: fixup some allocate_partition() whitespace 2017-06-23 10:52:15 -07:00
mtdsuper.c fs: Remove SB_I_DYNBDI flag 2017-04-20 12:09:55 -06:00
mtdswap.c mtd: mtdswap: use MTDSWAP_ECNT_MIN/MAX 2017-04-19 13:12:02 -07:00
nftlcore.c mtd: nand: Rename nand.h into rawnand.h 2017-08-13 10:11:49 +02:00
nftlmount.c mtd: nand: Rename nand.h into rawnand.h 2017-08-13 10:11:49 +02:00
ofpart.c drivers/mtd: Convert remaining uses of pr_warning to pr_warn 2017-04-19 13:10:54 -07:00
redboot.c
rfd_ftl.c
sm_ftl.c
sm_ftl.h
ssfdc.c mtd: nand: Rename nand.h into rawnand.h 2017-08-13 10:11:49 +02:00