linux_dsm_epyc7002/drivers/mtd/nand/raw
Boris Brezillon 2301780711 mtd: rawnand: micron: Get the actual number of bitflips
The MT29F2Gxxx chips with 4bits/512byte on-die ECC let us know when
some bitflips were corrected by the on-die ECC, but they do not report
the actual number of bitflips that were present in the data+ECC chunk.

We initially decided to always return ecc->strength to avoid re-reading
the page in raw mode + comparing it to the corrected buffer to extract
the real number of bitflips, but this forces UBI to move data around as
soon as one bitflip is present in a page.

This not only wears the NAND out faster, but also degrades
performances, since reading a full PEB + writing it back to a different
PEB + erasing the old one is much more expensive than re-reading the
faulty page in raw mode and comparing it to the corrected buffer.
In most cases, the actual number of bitflips does not exceed the
bitflips threshold, and UBI won't have to move data around. Otherwise,
we can assume the time spent re-reading the page and doing the
comparison is negligible compared to the time UBI spends moving a full
PEB to another PEB.

Note that this logic is not applied to chips with 8bits/512byte on-die
ECC, because those chips provide fine-grained information (the maximum
error is 1 bit, and it will not force UBI to move blocks around at the
first bitflip).

Suggested-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
2018-07-19 23:15:04 +02:00
..
atmel mtd: rawnand: atmel: Add an __iomem cast on gen_pool_dma_alloc() call 2018-07-18 10:10:16 +02:00
bcm47xxnflash
brcmnand
gpmi-nand mtd: rawnand: gpmi: Switch to SPDX identifier 2018-07-18 10:10:13 +02:00
ams-delta.c
au1550nd.c
cafe_nand.c mtd: rawnand: Kill cafe_nand_bug() 2018-07-18 09:34:20 +02:00
cmx270_nand.c mtd: rawnand: use mtd_device_register() where applicable 2018-07-19 23:14:12 +02:00
cs553x_nand.c mtd: rawnand: use mtd_device_register() where applicable 2018-07-19 23:14:12 +02:00
davinci_nand.c mtd: rawnand: use mtd_device_register() where applicable 2018-07-19 23:14:12 +02:00
denali_dt.c mtd: rawnand: denali: optimize timing parameters for data interface 2018-07-18 09:24:14 +02:00
denali_pci.c mtd: rawnand: denali: optimize timing parameters for data interface 2018-07-18 09:24:14 +02:00
denali.c mtd: rawnand: denali: optimize timing parameters for data interface 2018-07-18 09:24:14 +02:00
denali.h mtd: rawnand: denali: optimize timing parameters for data interface 2018-07-18 09:24:14 +02:00
diskonchip.c mtd: rawnand: Kill the chip->scan_bbt() hook 2018-07-18 10:10:12 +02:00
docg4.c mtd: rawnand: docg4: fix the probe function error path 2018-07-18 09:24:15 +02:00
fsl_elbc_nand.c mtd: rawnand: fsl_elbc: fix probe function error path 2018-04-29 08:56:42 +02:00
fsl_ifc_nand.c mtd: rawnand: fsl_ifc: Add an __iomem specifier on eccstat_regs 2018-07-18 10:10:22 +02:00
fsl_upm.c
fsmc_nand.c mtd: rawnand: fsmc: Stop using chip->read_buf() 2018-07-19 23:14:14 +02:00
gpio.c
hisi504_nand.c mtd: rawnand: hisi504: fix the probe function error path 2018-04-29 08:56:44 +02:00
jz4740_nand.c mtd: rawnand: use mtd_device_register() where applicable 2018-07-19 23:14:12 +02:00
jz4780_bch.c
jz4780_bch.h
jz4780_nand.c
Kconfig mtd: rawnand: MTD_NAND_BCM47XXNFLASH needs CONFIG_BCMA 2018-07-19 23:14:11 +02:00
lpc32xx_mlc.c mtd: rawnand: lpc32xx_mlc: fix the probe function error path 2018-04-29 08:56:45 +02:00
lpc32xx_slc.c mtd: rawnand: lpc32xx_slc: fix the probe function error path 2018-04-29 08:56:46 +02:00
Makefile mtd: rawnand: add NVIDIA Tegra NAND Flash controller driver 2018-07-02 09:02:06 +02:00
marvell_nand.c mtd: rawnand: marvell: set reg_clk to NULL if it can't be obtained 2018-07-18 10:10:15 +02:00
mpc5121_nfc.c
mtk_ecc.c mtd: rawnand: mtk: use of_device_get_match_data() 2018-04-29 08:56:41 +02:00
mtk_ecc.h
mtk_nand.c mtd: rawnand: use mtd_device_register() where applicable 2018-07-19 23:14:12 +02:00
mxc_nand.c mtd: rawnand: mxc: Switch to SPDX identifier 2018-07-18 10:10:13 +02:00
nand_amd.c
nand_base.c mtd: rawnand: Expose _notsupp() helpers for raw page accessors 2018-07-19 23:14:57 +02:00
nand_bbt.c mtd: rawnand: Rename nand_default_bbt() into nand_create_bbt() 2018-07-18 09:34:22 +02:00
nand_bch.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
nand_ecc.c
nand_hynix.c mtd: rawnand: hynix: Use ->exec_op() in hynix_nand_reg_write_op() 2018-07-18 10:10:15 +02:00
nand_ids.c
nand_macronix.c mtd: rawnand: All AC chips have a broken GET_FEATURES(TIMINGS). 2018-06-22 00:31:22 +02:00
nand_micron.c mtd: rawnand: micron: Get the actual number of bitflips 2018-07-19 23:15:04 +02:00
nand_samsung.c
nand_timings.c mtd: rawnand: add default values for dynamic timings 2018-07-19 23:14:13 +02:00
nand_toshiba.c
nandsim.c mtd: rawnand: Kill the chip->scan_bbt() hook 2018-07-18 10:10:12 +02:00
ndfc.c
nuc900_nand.c
omap2.c
omap_elm.c
orion_nand.c mtd: rawnand: orion_nand: Kill orion_nand_data.dev_ready() 2018-07-18 10:10:12 +02:00
oxnas_nand.c
pasemi_nand.c
plat_nand.c mtd: rawnand: plat_nand: Kill pdata->ctrl.{hwcontrol, read_byte}() 2018-07-18 10:10:12 +02:00
qcom_nandc.c mtd: rawnand: qcom: stop using phys_to_dma() 2018-07-19 23:14:13 +02:00
r852.c
r852.h
s3c2410.c mtd: rawnand: use mtd_device_register() where applicable 2018-07-19 23:14:12 +02:00
sh_flctl.c
sharpsl.c mtd: rawnand: sharpsl: Remove inclusion of mach and asm headers 2018-07-18 09:34:16 +02:00
sm_common.c
sm_common.h
socrates_nand.c
sunxi_nand.c mtd: rawnand: sunxi: Make sure ret is initialized in sunxi_nfc_read_byte() 2018-07-18 10:10:19 +02:00
tango_nand.c
tegra_nand.c mtd: rawnand: tegra: check bounds of die_nr properly 2018-07-19 23:14:13 +02:00
tmio_nand.c
txx9ndfmc.c mtd: rawnand: use mtd_device_register() where applicable 2018-07-19 23:14:12 +02:00
vf610_nfc.c
xway_nand.c