u-boot/drivers/mtd/ubi
Richard Weinberger f82290afc8 mtd: ubi: Fix worker handling
Fixes a bug found on thuban boards, which were for 2 years in
a long-term test with varying temperatures. They showed
problems in u-boot when attaching the ubi partition:

U-Boot# run flash_self_test
Booting from nand
set A...
UBI: attaching mtd1 to ubi0
UBI: scanning is finished
data abort
pc : [<87f97c3c>]          lr : [<87f97c28>]
reloc pc : [<8012cc3c>]    lr : [<8012cc28>]
sp : 85f686e8  ip : 00000020     fp : 000001f7
r10: 8605ce40  r9 : 85f68ef8     r8 : 0001f000
r7 : 00000001  r6 : 00000006     r5 : 0001f000  r4 : 85f6ecc0
r3 : 00000000  r2 : 44e35000     r1 : 87fcbcd4  r0 : 87fc755b
Flags: nZCv  IRQs off  FIQs on  Mode SVC_32
Resetting CPU ...

Reason is, that accidentially the U-Boot implementation
from __schedule_ubi_work() did not check the flag
ubi->thread_enabled and started with wearleveling work,
but ubi did not have setup all structures at this point
and crashes.

Solve this problem by splitting work scheduling and processing.

Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Heiko Schocher <hs@denx.de>
2018-02-19 08:22:58 +01:00
..
attach.c ubi: no NULL check needed before kmem_cache_destroy 2017-11-20 10:13:42 +01:00
build.c mtd: ubi: Fix worker handling 2018-02-19 08:22:58 +01:00
crc32.c kbuild: force to define __UBOOT__ in all the C sources 2014-09-16 12:23:56 -04:00
crc32defs.h
crc32table.h mtd, ubi, ubifs: resync with Linux-3.14 2014-08-25 19:25:55 -04:00
debug.c ubi,ubifs: sync with linux v4.2 2015-10-26 09:22:36 +01:00
debug.h ubi,ubifs: sync with linux v4.2 2015-10-26 09:22:36 +01:00
eba.c ubi,ubifs: sync with linux v4.2 2015-10-26 09:22:36 +01:00
fastmap-wl.c ubi: Ensure no fastmap flush after uif_close 2018-02-06 07:05:57 +01:00
fastmap.c UBI: Fastmap: Fix PEB array type 2015-10-26 09:22:50 +01:00
io.c UBI: Fix compile error when CONFIG_UBI_SILENCE_MSG defined 2016-01-04 09:11:10 +01:00
kapi.c ubi,ubifs: sync with linux v4.2 2015-10-26 09:22:36 +01:00
Kconfig ubi: Kconfig: Make MTD_UBI select MTD_PARTITIONS 2017-07-24 07:33:34 -04:00
Makefile mtd, ubi, ubifs: resync with Linux-3.14 2014-08-25 19:25:55 -04:00
misc.c ubi,ubifs: sync with linux v4.2 2015-10-26 09:22:36 +01:00
ubi-media.h ubi,ubifs: sync with linux v4.2 2015-10-26 09:22:36 +01:00
ubi.h mtd: ubi: Fix worker handling 2018-02-19 08:22:58 +01:00
upd.c ubi,ubifs: sync with linux v4.2 2015-10-26 09:22:36 +01:00
vmt.c ubi,ubifs: sync with linux v4.2 2015-10-26 09:22:36 +01:00
vtbl.c ubi,ubifs: sync with linux v4.2 2015-10-26 09:22:36 +01:00
wl.c mtd: ubi: Fix worker handling 2018-02-19 08:22:58 +01:00
wl.h ubi,ubifs: sync with linux v4.2 2015-10-26 09:22:36 +01:00