u-boot-2016/drivers
Abhishek Sahu 3813ce677b ubi: fix data aborts in case of NAND bit flips during block read
The UBI layer generates the following data aborts if any of the
NAND block contains bit flips

    ubi0: attaching mtd2
    ubi0: fixable bit-flip detected at PEB 149
    ubi0: scanning is finished
    ubi0: fixable bit-flip detected at PEB 149
    data abort
    pc : [<4a934cc8>]          lr : [<4a933aec>]
    reloc pc : [<4a934cc8>]    lr : [<4a933aec>]
    sp : 4a77f2e0  ip : 00000095     fp : 00000075
    r10: 000001b7  r9 : 4a77fea0     r8 : 00000001
    r7 : 0001f000  r6 : 0001f000     r5 : 4a785e40  r4 : 4a7c4180
    r3 : 00000000  r2 : 00000075     r1 : 4a7860b8  r0 : 4a7c49c0
    Flags: nzcv  IRQs off  FIQs off  Mode SVC_32
    Resetting CPU ...

UBI layer will move the data from original block to some other
block in case of bit flips in the function ubi_eba_copy_leb. This
function uses volume EBA table vol->eba_tbl. The current UBI code
calls ubi_wl_init followed by ubi_eba_init but the ubi_eba_init
only initializes the volume EBA table. In case of bit failure,
the ubi_wl_init calls function __schedule_ubi_work which will
call ubi_eba_copy_leb and triggers data abort.

ubi_attach() {
    ubi_wl_init ->  __schedule_ubi_work -> ubi_eba_copy_leb
    ubi_eba_init
}

The UBI code has been written for Linux kernel and it has been
ported to UBOOT. Since UBOOT does not support threads so all the
thread functions are being called in uboot synchronously.
In Linux kernel, the UBI background thread starts
after the initialization, which is being controlled by
thread_enabled variable which will be set to true after all
initialization.

Now this patch checks for thread_enabled variable and call the
do_work only if the thread is enabled.

Change-Id: I4b2b40031dbd5f16ceefef541248973ca326cd9c
Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
2017-09-05 16:52:06 +05:30
..
adc sandbox: add ADC driver 2015-11-02 10:38:00 +09:00
bios_emulator Various Makefiles: Add SPDX-License-Identifier tags 2015-11-10 09:19:52 -05:00
block Fix typo: firstly -> first. 2015-12-05 18:22:23 -05:00
bootcount bootcount: Correct #endif comment to match, other aesthetics 2016-01-08 10:15:43 -05:00
clk qca: move ARM specific files to another sublevel 2017-01-06 12:33:30 +05:30
core dm: core: Fix Kconfig text to mention SPL in SPL_OF_TRANSLATE 2015-12-10 20:41:56 -07:00
cpu x86: Move MP initialization codes into a common place 2015-07-14 18:03:16 -06:00
crypto drivers/crypto/fsl: fix endianness issue in RNG 2015-12-15 08:57:35 +08:00
ddr move erratum a008336 and a008514 to soc specific file 2015-12-15 08:57:32 +08:00
demo drivers: hierarchize drivers Kconfig menu 2015-08-12 20:47:44 -04:00
dfu dfu: dfu_sf: Pass duplicate devstr to parse_dev 2015-11-03 17:29:33 +01:00
dma qca: move ARM specific files to another sublevel 2017-01-06 12:33:30 +05:30
fpga Move console definitions into a new console.h file 2015-11-19 20:27:50 -07:00
gpio ipq807x: Deinit pcie before loading kernel 2017-06-29 08:53:06 -07:00
hwmon Fix bad return value checks (detected with Coccinelle) 2015-10-24 13:50:30 -04:00
i2c qca: move ARM specific files to another sublevel 2017-01-06 12:33:30 +05:30
input Move console definitions into a new console.h file 2015-11-19 20:27:50 -07:00
led dm: led: Tidy up SPL options for the led and led-gpio 2015-09-02 21:28:22 -06:00
memory Various Makefiles: Add SPDX-License-Identifier tags 2015-11-10 09:19:52 -05:00
misc Move console definitions into a new console.h file 2015-11-19 20:27:50 -07:00
mmc mmc: eMMC add Secured Trim command support 2017-04-11 23:55:40 -07:00
mtd ubi: fix data aborts in case of NAND bit flips during block read 2017-09-05 16:52:06 +05:30
net ipq807x : Enabling MDIO C45 and Uniphy3 support 2017-08-22 15:00:18 +05:30
pci ipq807x: Fixed the PCIE linkup failure leads to crash 2017-06-02 14:47:25 -07:00
pcmcia powerpc: mpc824x: remove MPC824X cpu support 2015-01-05 12:08:55 -05:00
pinctrl rockchip: rk3036: Add pinctrl driver 2015-12-01 08:07:22 -07:00
power sunxi: power: axp818: add support for axp818 driver 2015-12-10 11:14:22 +01:00
pwm pwm: imx: Remove unreachable code 2015-05-26 14:13:12 +02:00
qe driver/qe: use strncpy instead of strcpy 2015-08-03 12:06:36 -07:00
ram ram: rename CONFIG_SPL_RAM_SUPPORT to CONFIG_SPL_RAM 2015-08-18 13:46:02 -04:00
remoteproc drivers: remoteproc: rproc-uclass: Fix check for NULL pointers 2015-12-05 18:22:32 -05:00
rtc rtc: Add MCP79411 support to DS1307 rtc driver 2015-11-04 15:19:12 -08:00
serial ipq807x: Added the baud rates support 2017-07-06 23:57:02 -07:00
soc Various Makefiles: Add SPDX-License-Identifier tags 2015-11-10 09:19:52 -05:00
sound of: clean up OF_CONTROL ifdef conditionals 2015-08-18 13:46:05 -04:00
spi spi: qcom: Fix spi probe issue 2017-06-15 15:34:37 +05:30
thermal imx: mx7: fix the temperature checking for Rev1.1 2016-01-07 17:53:11 +01:00
timer x86: Move i8254_init() to x86_cpu_init_f() 2015-12-09 17:44:44 +08:00
tpm dm: tpm: Drop CONFIG_DM_TPM 2015-10-23 09:42:28 -06:00
twserial drivers: convert makefiles to Kbuild style 2013-10-31 13:26:01 -04:00
usb qca: ipq: USB support is now DM model 2016-07-24 17:03:05 +05:30
video Merge branch 'master' of git://www.denx.de/git/u-boot-imx 2015-12-04 08:21:28 -05:00
watchdog imx_watchdog: always set minimal timeout in reset_cpu 2016-01-07 17:54:53 +01:00
Kconfig dm: adc: add simple ADC uclass implementation 2015-11-02 10:38:00 +09:00
Makefile Fix compilation errors in clk driver 2016-09-29 21:03:49 +05:30