All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] mtd, ubi: errormessage handling
@ 2014-10-31 10:03 Heiko Schocher
  0 siblings, 0 replies; only message in thread
From: Heiko Schocher @ 2014-10-31 10:03 UTC (permalink / raw)
  To: u-boot

Hello all,

as I just debugged a problem with ubi on cfi flashes [1], the question
raised, if it would be a good idea to enable ubi error messages
by default? I think, if we enable them by default, the error
Andrew had, would be visible immediately:

with ubi errormessages [3]:
=> ubi part misc
UBI error: ubi_attach_mtd_dev: More than 64 PEBs are needed for fastmap, sorry.
UBI: default fastmap pool size: 8
UBI: default fastmap WL pool size: 25
UBI: attaching mtd1 to ubi0
UBI error: io_init: bad write buffer size 0 for 1 min. I/O unit
UBI error: ubi_init: cannot attach mtd1
=>

without ubi errormessages:
=> ubi part misc
UBI: default fastmap pool size: 8
UBI: default fastmap WL pool size: 25
UBI: attaching mtd1 to ubi0
=>

The big con is the space needed for it. I tested on the tqm5200s board
(current mainline).

without pr_err() enabled in "include/linux/mtd/mtd.h"
$ ls -al u-boot.bin
-rwxrwxr-x 1 hs hs 469264 31. Okt 10:21 u-boot.bin

with pr_err() enabled:
$ ls -al u-boot.bin
-rwxrwxr-x 1 hs hs 525584 31. Okt 10:23 u-boot.bin

-> 55k more space needed!!

So there are 2 questions:

a) Do we want to make "pr_err()" configurable seperately?
    (I vote for yes, proposal CONFIG_UBI_PRINT_ERRORS)

b) how would/should be the default setting?
    (I vote for disabled)

bye,
Heiko

[1] ubi regression
http://lists.denx.de/pipermail/u-boot/2014-October/193098.html

[2] bugfix
Patchwork [U-Boot] mtd, cfi, ubi: add missing writebufsize initialization
http://patchwork.ozlabs.org/patch/405245/

[3] enabled ubi error messages patch
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 8666413..156016f 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -458,8 +458,8 @@ static inline void mtd_erase_callback(struct erase_info *instr)
  #endif /* CONFIG_MTD_DEBUG */
  #define pr_info(args...)       MTDDEBUG(MTD_DEBUG_LEVEL0, args)
  #define pr_warn(args...)       MTDDEBUG(MTD_DEBUG_LEVEL0, args)
-#define pr_err(args...)                MTDDEBUG(MTD_DEBUG_LEVEL0, args)
-#define pr_crit(args...)       MTDDEBUG(MTD_DEBUG_LEVEL0, args)
+#define pr_err(args...)                printk(KERN_INFO args)
+#define pr_crit(args...)       printk(KERN_INFO args)
  #define pr_cont(args...)       MTDDEBUG(MTD_DEBUG_LEVEL0, args)
  #define pr_notice(args...)     MTDDEBUG(MTD_DEBUG_LEVEL0, args)
  #endif
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-10-31 10:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-31 10:03 [U-Boot] mtd, ubi: errormessage handling Heiko Schocher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.