public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] UBI: Fix problem in UBI/Linux "compatibility layer"
@ 2010-05-17  8:01 Stefan Roese
  2010-05-19  8:56 ` Stefan Roese
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Roese @ 2010-05-17  8:01 UTC (permalink / raw)
  To: u-boot

"down_write_trylock" needs to return 1 instead of 0 for success.
Otherwise copying a block with a read error (e.g. bit-flip on read)
won't work correctly.

Signed-off-by: Stefan Roese <sr@denx.de>
---
 include/ubi_uboot.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/ubi_uboot.h b/include/ubi_uboot.h
index 60f6a5f..d2c90a6 100644
--- a/include/ubi_uboot.h
+++ b/include/ubi_uboot.h
@@ -123,7 +123,7 @@ typedef int	wait_queue_head_t;
 #define init_rwsem(...)			do { } while (0)
 #define down_read(...)			do { } while (0)
 #define down_write(...)			do { } while (0)
-#define down_write_trylock(...)		0
+#define down_write_trylock(...)		1
 #define up_read(...)			do { } while (0)
 #define up_write(...)			do { } while (0)
 
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH] UBI: Fix problem in UBI/Linux "compatibility layer"
  2010-05-17  8:01 [U-Boot] [PATCH] UBI: Fix problem in UBI/Linux "compatibility layer" 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:01:05 Stefan Roese wrote:
> "down_write_trylock" needs to return 1 instead of 0 for success.
> Otherwise copying a block with a read error (e.g. bit-flip on read)
> won't work correctly.

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:01 [U-Boot] [PATCH] UBI: Fix problem in UBI/Linux "compatibility layer" 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