All of lore.kernel.org
 help / color / mirror / Atom feed
From: Holger Brunck <holger.brunck@keymile.com>
To: "dedekind1@gmail.com" <dedekind1@gmail.com>
Cc: "Walter, Axel" <Axel.Walter@keymile.com>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Subject: Re: UBI: corrupted PEB detection for Numonyx P30
Date: Tue, 25 Jan 2011 12:31:51 +0100	[thread overview]
Message-ID: <4D3EB4A7.1010202@keymile.com> (raw)
In-Reply-To: <1295953914.7118.11.camel@localhost>

Artem Bityutskiy wrote:
> On Mon, 2011-01-24 at 14:12 +0100, Holger Brunck wrote:
>>         err1 = ubi_io_read_vid_hdr(ubi, pnum, &vid_hdr, 0);
>> -       if (err1 == UBI_IO_BAD_HDR_EBADMSG || err1 == UBI_IO_BAD_HDR) {
>> +       if (err1 == UBI_IO_BAD_HDR_EBADMSG || err1 == UBI_IO_BAD_HDR ||
>> +           err1 == UBI_IO_FF || err1 == UBI_IO_FF_BITFLIPS) {
>>                 struct ubi_ec_hdr ec_hdr;
>>
>>                 err1 = ubi_io_read_ec_hdr(ubi, pnum, &ec_hdr, 0);
>> -               if (err1 == UBI_IO_BAD_HDR_EBADMSG || err1 == UBI_IO_BAD_HDR)
>> +               if (err1 == UBI_IO_BAD_HDR_EBADMSG || err1 == UBI_IO_BAD_HDR ||
>> +                   err1 == UBI_IO_FF || err1 == UBI_IO_FF_BITFLIPS) {
>>                         /*
>>                          * Both VID and EC headers are corrupted, so we can
>>                          * safely erase this PEB and not afraid that it will be
>>
>> Does anyone see a problem with this patch? If not I can post it as a git patch
>> on the mailing list.
> 
> Hi, I agree with checking for UBI_IO_FF, but not for UBI_IO_FF_BITFLIPS,
> because (a) NOR should not have them and (b) bit-flip means the the
> header is correct, but there was a correctable bit-blip. But we want to
> find the headers corrupted in this piece of code. 
> 

Ok.

> I've prepared and pushed almost the same patch, made you the author:
> http://git.infradead.org/ubi-2.6.git/commit/4782254b5f76c22726d270ea753816cefa088ae9
> 
> Please, take a look and check. If you do not like it, let me know or
> just send the patch you like.
> 

Yes this is ok for me.

Thanks.

Best regards
Holger Brunck

      reply	other threads:[~2011-01-25 11:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-24 13:12 UBI: corrupted PEB detection for Numonyx P30 Holger Brunck
2011-01-25 11:11 ` Artem Bityutskiy
2011-01-25 11:31   ` Holger Brunck [this message]

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=4D3EB4A7.1010202@keymile.com \
    --to=holger.brunck@keymile.com \
    --cc=Axel.Walter@keymile.com \
    --cc=dedekind1@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    /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 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.