All of lore.kernel.org
 help / color / mirror / Atom feed
From: Troy Kisky <troy.kisky@boundarydevices.com>
To: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Cc: linux-mtd@lists.infradead.org, David Woodhouse <dwmw2@infradead.org>
Subject: Re: [RESUBMIT] [PATCH] [MTD] NAND nand_ecc.c: rewrite for improved performance
Date: Mon, 18 Aug 2008 15:10:14 -0700	[thread overview]
Message-ID: <48A9F346.7020706@boundarydevices.com> (raw)
In-Reply-To: <48A9E99E.7070302@boundarydevices.com>

Troy Kisky wrote:
> Frans Meulenbroeks wrote:
> (ignoring inversions)
> Example: You have a block of all zeros.
> 
> The ecc stored in the spare bytes of this is also 0.
> Now, upon reading this block of zeroes, a two bit ecc occurs. The bits that happen to be
> read incorrectly are bit # 0 & bit # 0x3f of the block
> The hardware calculated ecc will be
> 0:0 ^ 0:fff = 0:fff after bit 0
> 0:fff ^ 3f:fc00 = 3f:3f after bit 3f
> 
> Now, when your algorithm counts bits you get 12, and decide
> it is a single bit ecc error.
> 
> The old way however will xor the high and low 12 bits 3f ^ 3f = 0, 0 != fff and
> decide it is multi bit ecc error and give an error.
> 
> Note, that both approaches would have decide it was a single bit error, if the second
> error wouldn't have happened.
> 
> 
> So, try a block of zeroes and flip bits 0 and 0x3f.
> 
> Troy
> 

Whoops, that's a 512 bytes ecc example (as that's what I'm used to).

The 256 byte ecc may be harder. How about
bit 0, 0x3f, and the 1st bit of the ecc

 0:0 ^ 0:7ff = 0:7ff after bit 0
 0:7ff ^ 3f:7c00 = 3f:3f after bit 3f
 3f:3f ^ 0:1 = 3f:3e



This is 11 bits but 3f^3e = 1, 1 !=7ff and the old algorithm will refuse to correct.
So the new behavior is different.

Any extra detection is worth it to me.

Troy

  parent reply	other threads:[~2008-08-18 22:10 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-31  8:35 [RESUBMIT] [PATCH] [MTD] NAND nand_ecc.c: rewrite for improved performance frans
2008-08-11 11:35 ` Frans Meulenbroeks
2008-08-11 16:30 ` David Woodhouse
     [not found]   ` <ac9c93b10808120153m7435424ci3e49a70d3599cc06@mail.gmail.com>
     [not found]     ` <1218535872.2977.133.camel@pmac.infradead.org>
2008-08-14 18:07       ` frans
2008-08-14 19:10         ` Troy Kisky
2008-08-15  8:41           ` Frans Meulenbroeks
2008-08-15  8:46             ` David Woodhouse
2008-08-15  9:23               ` Frans Meulenbroeks
2008-08-15  9:41                 ` David Woodhouse
2008-08-15 10:04                   ` Frans Meulenbroeks
2008-08-15 10:12                     ` David Woodhouse
2008-08-15 18:56                       ` Troy Kisky
2008-08-15 21:14                         ` frans
2008-08-16 10:04                           ` David Woodhouse
2008-08-17 21:09                           ` Troy Kisky
2008-08-18  6:33                             ` Frans Meulenbroeks
2008-08-18 17:20                               ` Troy Kisky
2008-08-18 21:09                                 ` Frans Meulenbroeks
2008-08-18 21:29                                   ` Troy Kisky
2008-08-18 21:31                                     ` David Woodhouse
2008-08-18 22:14                                       ` Troy Kisky
2008-08-18 22:10                                     ` Troy Kisky [this message]
2008-08-19  6:00                                       ` Frans Meulenbroeks
2008-08-17 23:30                           ` Troy Kisky
2008-08-18  6:40                             ` Frans Meulenbroeks
2008-08-18 17:08                               ` Troy Kisky
  -- strict thread matches above, loose matches on Subject: below --
2008-07-29 17:58 Frans Meulenbroeks
2008-07-29 20:04 ` Ricard Wanderlof
2008-07-30  6:17 ` Artem Bityutskiy

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=48A9F346.7020706@boundarydevices.com \
    --to=troy.kisky@boundarydevices.com \
    --cc=dwmw2@infradead.org \
    --cc=fransmeulenbroeks@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.