android_kernel_samsung_univ.../drivers
Sascha Hauer 197190bc5c mtd: nand: gpmi: Fix failure when a erased page has a bitflip at BBM
[ Upstream commit fdf2e821052958a114618a95ab18a300d0b080cb ]

When erased subpages are read then the BCH decoder returns STATUS_ERASED
if they are all empty, or STATUS_UNCORRECTABLE if there are bitflips.
When there are bitflips, we have to set these bits again to show the
upper layers a completely erased page. When a bitflip happens in the
exact byte where the bad block marker is, then this byte is swapped
with another byte in block_mark_swapping(). The correction code then
detects a bitflip in another subpage and no longer corrects the bitflip
where it really happens.

Correct this behaviour by calling block_mark_swapping() after the
bitflips have been corrected.

In our case UBIFS failed with this bug because it expects erased
pages to be really empty:

UBIFS error (pid 187): ubifs_scan: corrupt empty space at LEB 36:118735
UBIFS error (pid 187): ubifs_scanned_corruption: corruption at LEB 36:118735
UBIFS error (pid 187): ubifs_scanned_corruption: first 8192 bytes from LEB 36:118735
UBIFS error (pid 187): ubifs_scan: LEB 36 scanning failed
UBIFS error (pid 187): do_commit: commit failed, error -117

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Richard Weinberger <richard@nod.at>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-03 10:19:41 +01:00
..
accessibility
acpi ACPI: sbshc: remove raw pointer from printk() message 2018-02-16 20:09:47 +01:00
amba
android binder: add missing binder_unlock() 2018-02-28 10:17:23 +01:00
ata ahci: Add Intel Cannon Lake PCH-H PCI ID 2018-02-16 20:09:42 +01:00
atm atm: horizon: Fix irq release error 2017-12-16 10:33:55 +01:00
auxdisplay
base drivers: base: cacheinfo: fix boot error message when acpi is enabled 2018-01-31 12:06:08 +01:00
bcma
block pktcdvd: Fix pkt_setup_dev() error path 2018-02-16 20:09:47 +01:00
bluetooth Bluetooth: btusb: Restore QCA Rome suspend/resume fix with a "rewritten" version 2018-02-16 20:09:46 +01:00
bus sunxi-rsb: Include OF based modalias in device uevent 2018-01-10 09:27:09 +01:00
cdrom
char hwrng: exynos - use __maybe_unused to hide pm functions 2018-02-25 11:03:47 +01:00
clk clk: tegra: Fix cclk_lp divisor register 2017-12-20 10:04:59 +01:00
clocksource clockevents/drivers/cs5535: Improve resilience to spurious interrupts 2017-10-27 10:23:17 +02:00
connector
cpufreq cpufreq: Add Loongson machine dependencies 2018-02-03 17:04:27 +01:00
cpuidle cpuidle: fix broadcast control when broadcast can not be entered 2017-12-25 14:22:15 +01:00
crypto crypto: s5p-sss - Fix kernel Oops in AES-ECB mode 2018-02-25 11:03:55 +01:00
dca
devfreq PM / devfreq: Propagate error from devfreq_add_device() 2018-02-22 15:44:58 +01:00
dio
dma dmaengine: zx: fix build warning 2018-02-25 11:03:50 +01:00
dma-buf
edac EDAC, octeon: Fix an uninitialized variable warning 2018-02-16 20:09:47 +01:00
eisa
extcon extcon: palmas: Check the parent instance to prevent the NULL 2017-11-21 09:21:18 +01:00
firewire
firmware efi/esrt: Cleanup bad memory map log messages 2017-12-20 10:04:56 +01:00
fmc
fpga
gpio gpio: xgene: mark PM functions as __maybe_unused 2018-02-25 11:03:50 +01:00
gpu drm/amdgpu: Avoid leaking PM domain on driver unbind (v2) 2018-02-28 10:17:23 +01:00
hid usb: ldusb: add PIDs for new CASSY devices supported by this driver 2018-02-28 10:17:23 +01:00
hsi
hv Drivers: hv: vmbus: fix build warning 2018-02-25 11:03:46 +01:00
hwmon hwmon: (pmbus) Use 64bit math for DIRECT format values 2018-02-03 17:04:28 +01:00
hwspinlock
hwtracing intel_th: pci: Add Gemini Lake support 2017-12-20 10:04:54 +01:00
i2c i2c: remove __init from i2c_register_board_info() 2018-02-25 11:03:48 +01:00
ide
idle idle: i7300: add PCI dependency 2018-02-25 11:03:51 +01:00
iio iio: adis_lib: Initialize trigger before requesting interrupt 2018-02-28 10:17:22 +01:00
infiniband infiniband: cxgb4: use %pR format string for printing resources 2018-02-25 11:03:48 +01:00
input Input: tca8418_keypad - hide gcc-4.9 -Wmaybe-uninitialized warning 2018-02-25 11:03:49 +01:00
iommu iommu/arm-smmu-v3: Don't free page table ops twice 2018-01-17 09:35:25 +01:00
ipack
irqchip irqchip/gic-v3: Use wmb() instead of smb_wmb() in gic_raise_softirq() 2018-02-28 10:17:22 +01:00
isdn isdn: sc: work around type mismatch warning 2018-02-25 11:03:51 +01:00
leds
lguest
lightnvm
macintosh
mailbox
mcb
md md: avoid warning for 32-bit sector_t 2018-02-25 11:03:44 +01:00
media v4l: remove MEDIA_TUNER dependency for VIDEO_TUNER 2018-02-25 11:03:50 +01:00
memory ARM: OMAP2+: gpmc-onenand: propagate error on initialization failure 2017-12-16 10:33:51 +01:00
memstick
message mptfusion: hide unused seq_mpt_print_ioc_summary function 2018-02-25 11:03:45 +01:00
mfd mfd: twl6040: Fix child-node lookup 2018-01-02 20:33:20 +01:00
misc cxl: Check if vphb exists before iterating over AFU devices 2017-12-25 14:22:08 +01:00
mmc mmc: sdhci-of-esdhc: add/remove some quirks according to vendor version 2018-01-31 12:06:09 +01:00
mtd mtd: nand: gpmi: Fix failure when a erased page has a bitflip at BBM 2018-03-03 10:19:41 +01:00
net net: hp100: remove unnecessary #ifdefs 2018-02-25 11:03:50 +01:00
nfc
ntb
nubus
nvdimm libnvdimm, namespace: make 'resource' attribute only readable by root 2017-11-30 08:37:23 +00:00
nvme nvme: Fix managing degraded controllers 2018-02-16 20:09:47 +01:00
nvmem
of
oprofile
parisc parisc: Hide Diva-built-in serial aux and graphics card 2018-01-02 20:33:20 +01:00
parport
pci PCI: keystone: Fix interrupt-controller-node lookup 2018-02-28 10:17:21 +01:00
pcmcia
perf
phy phy: work around 'phys' references to usb-nop-xceiv devices 2018-01-23 19:50:16 +01:00
pinctrl pinctrl: sunxi: Fix A80 interrupt pin bank 2018-02-25 11:03:39 +01:00
platform dell-wmi, dell-laptop: depends DMI 2018-02-25 11:03:51 +01:00
pnp
power power: bq27xxx_battery: mark some symbols __maybe_unused 2018-02-25 11:03:50 +01:00
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator regulator: fan53555: fix I2C device ids 2017-11-02 09:40:50 +01:00
remoteproc
reset
rpmsg
rtc rtc-opal: Fix handling of firmware error codes, prevent busy loops 2018-02-22 15:44:59 +01:00
s390 s390/dasd: prevent prefix I/O error 2018-02-25 11:03:40 +01:00
sbus
scsi scsi: ibmvfc: fix misdefined reserved field in ibmvfc_fcp_rsp_info 2018-02-28 10:17:22 +01:00
sfi
sh
sn
soc
spi spi: sun4i: disable clocks in the remove function 2018-02-25 11:03:41 +01:00
spmi
ssb ssb: mark ssb_bus_register as __maybe_unused 2018-02-25 11:03:44 +01:00
staging staging: unisys: visorinput depends on INPUT 2018-02-25 11:03:48 +01:00
target target/user: Fix cast from pointer to phys_addr_t 2018-02-25 11:03:46 +01:00
tc
thermal thermal: spear: use __maybe_unused for PM functions 2018-02-25 11:03:44 +01:00
thunderbolt
tty serial: 8250_mid: fix broken DMA dependency 2018-02-25 11:03:49 +01:00
uio
usb usb: renesas_usbhs: missed the "running" flag in usb_dmac with rx path 2018-02-28 10:17:23 +01:00
uwb uwb: ensure that endpoint is interrupt 2017-10-12 11:27:35 +02:00
vfio
vhost vhost_net: stop device during reset owner 2018-02-16 20:09:38 +01:00
video fbdev: sm712fb: avoid unused function warnings 2018-02-25 11:03:47 +01:00
virt
virtio virtio_balloon: prevent uninitialized variable use 2018-02-25 11:03:42 +01:00
vlynq
vme
w1
watchdog watchdog: imx2_wdt: restore previous timeout after suspend+resume 2018-02-16 20:09:45 +01:00
xen xen: XEN_ACPI_PROCESSOR is Dom0-only 2018-02-25 11:03:41 +01:00
zorro
Kconfig
Makefile usb: build drivers/usb/common/ when USB_SUPPORT is set 2018-02-25 11:03:38 +01:00