public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Holger Brunck <holger.brunck@keymile.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] UBI problems on current u-boot
Date: Mon, 12 Sep 2011 19:16:33 +0200	[thread overview]
Message-ID: <4E6E3E71.8030105@keymile.com> (raw)
In-Reply-To: <4E64F177.90001@keymile.com>

Hi,

On 09/05/2011 05:57 PM, Holger Brunck wrote:
> On 09/05/2011 04:37 PM, Stefan Roese wrote:
>> BTW: Is this problem reproducible on one of your systems?
>>
> 
> yes we find a way to reproduce the bug on one of our boards. We need a special
> bit pattern in one UBI PEB, force a bitflip and afterwards the problem is present.
> 

I have done some further investigations. It's not true that we need a special
bit pattern in one UBI peb. We only need a situation where the UBI layer in
u-boot finds a fixable bitflip in NAND and u-boot gets stuck.

The loop in which u-boot gets stuck is in driver/mtd/ubi/wlc.:

schedule_erase  <--------
       |                |
erase_worker            |
       |                |
ensure_wear_leveling    |
       |                |
wear_leveling_worker  --|

And from this loop we will never return.

I have seen in mainline kernel this fix in the ubi layer:

commit b86a2c56e512f46d140a4bcb4e35e8a7d4a99a4b
Author: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Date:   Sun May 24 14:13:34 2009 +0300

    UBI: do not switch to R/O mode on read errors

    This patch improves UBI errors handling. ATM UBI switches to
    R/O mode when the WL worker fails to read the source PEB.
    This means that the upper layers (e.g., UBIFS) has no
    chances to unmap the erroneous PEB and fix the error.
    This patch changes this behaviour and makes UBI put PEBs
    like this into a separate RB-tree, thus preventing the
    WL worker from hitting the same read errors again and
    again.

[...]

And this sounds like the problem I see in u-boot. But this patch is not easy to
port onto u-boot because previously undergoing changes in the kernels ubi layer...

Best regards
Holger Brunck

  reply	other threads:[~2011-09-12 17:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-02 13:32 [U-Boot] UBI problems on current u-bo Holger Brunck
2011-09-05 14:37 ` Stefan Roese
2011-09-05 15:46   ` Holger Brunck
2011-09-05 15:57   ` [U-Boot] UBI problems on current u-boot Holger Brunck
2011-09-12 17:16     ` Holger Brunck [this message]
2011-09-13  7:39       ` Stefan Roese
2011-09-13  8:32         ` Holger Brunck
2011-09-13  8:37           ` Stefan Roese
2011-09-13 15:31             ` Holger Brunck
2011-09-21  9:06               ` Holger Brunck
2012-09-28 16:50                 ` Charles Hardin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E6E3E71.8030105@keymile.com \
    --to=holger.brunck@keymile.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox