summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2010-05-17 10:00:51 +0200
committerStefan Roese <sr@denx.de>2010-05-19 10:57:19 +0200
commit1b1f9a9d00447d9eab32ae5633f60a106196b75f (patch)
treebbcb0b67493a3356b49d7d29a581274802871554 /drivers/mtd
parenta2a0a7171303de5d8ce099344efde2e29ee36eb0 (diff)
downloadu-boot-imx-1b1f9a9d00447d9eab32ae5633f60a106196b75f.zip
u-boot-imx-1b1f9a9d00447d9eab32ae5633f60a106196b75f.tar.gz
u-boot-imx-1b1f9a9d00447d9eab32ae5633f60a106196b75f.tar.bz2
UBI: Ensure that "background thread" operations are really executed
The current U-Boot UBI implementation is copied from Linux. In this porting the UBI background thread was not handled correctly. Upon write operations ubi_wl_flush() makes sure, that all queued operations, like page-erase, are completed. But this is missing for read operations. This patch now makes sure that such operations (like scrubbing upon bit-flip errors) are not queued, but executed directly. Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/ubi/wl.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c
index 2f9a5e3..88b867a 100644
--- a/drivers/mtd/ubi/wl.c
+++ b/drivers/mtd/ubi/wl.c
@@ -696,8 +696,13 @@ static void schedule_ubi_work(struct ubi_device *ubi, struct ubi_work *wrk)
list_add_tail(&wrk->list, &ubi->works);
ubi_assert(ubi->works_count >= 0);
ubi->works_count += 1;
- if (ubi->thread_enabled)
- wake_up_process(ubi->bgt_thread);
+
+ /*
+ * U-Boot special: We have no bgt_thread in U-Boot!
+ * So just call do_work() here directly.
+ */
+ do_work(ubi);
+
spin_unlock(&ubi->wl_lock);
}