* [U-Boot] [PATCH] UBI: Ensure that "background thread" operations are really executed
@ 2010-05-17 8:00 Stefan Roese
2010-05-19 8:56 ` Stefan Roese
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Roese @ 2010-05-17 8:00 UTC (permalink / raw)
To: u-boot
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>
---
drivers/mtd/ubi/wl.c | 9 +++++++--
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);
}
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH] UBI: Ensure that "background thread" operations are really executed
2010-05-17 8:00 [U-Boot] [PATCH] UBI: Ensure that "background thread" operations are really executed Stefan Roese
@ 2010-05-19 8:56 ` Stefan Roese
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Roese @ 2010-05-19 8:56 UTC (permalink / raw)
To: u-boot
On Monday 17 May 2010 10:00:51 Stefan Roese wrote:
> 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.
Applied to u-boot-ubi/master. Thanks.
Cheers,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-05-19 8:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-17 8:00 [U-Boot] [PATCH] UBI: Ensure that "background thread" operations are really executed Stefan Roese
2010-05-19 8:56 ` Stefan Roese
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox