public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: "Sudhakar Rajashekhara" <sudhakar.raj@ti.com>
To: "'David Woodhouse'" <dwmw2@infradead.org>, <akpm@linux-foundation.org>
Cc: nsnehaprabha@ti.com, linux-mtd@lists.infradead.org
Subject: RE: [patch 1/4] mtd-nand: davinci: Correct 4-bit error correction
Date: Wed, 2 Dec 2009 13:59:53 +0530	[thread overview]
Message-ID: <00de01ca7329$9f092330$dd1b6990$@raj@ti.com> (raw)
In-Reply-To: <1259581084.19465.381.camel@macbook.infradead.org>

On Mon, Nov 30, 2009 at 17:08:04, David Woodhouse wrote:
> On Tue, 2009-11-17 at 14:45 -0800, akpm@linux-foundation.org wrote:
> > +       /*
> > +        * ECC_STATE field reads 0x3 (Error correction complete) immediately
> > +        * after setting the 4BITECC_ADD_CALC_START bit. So if you immediately
> > +        * begin trying to poll for the state, you may fall right out of your
> > +        * loop without any of the correction calculations having taken place.
> > +        * The recommendation from the hardware team is to wait till ECC_STATE
> > +        * reads less than 4, which means ECC HW has entered correction state.
> > +        */
> > +       do {
> > +               ecc_state = (davinci_nand_readl(info,
> > +                               NANDFSR_OFFSET) >> 8) & 0x0f;
> > +               cpu_relax();
> > +       } while (ecc_state < 4); 
> 
> Please can this have a timeout. Infinite loops waiting for hardware are
> generally a bad idea.
> 

David,

I'll add the timeout and re-submit this patch.

Thanks,
Sudhakar

      reply	other threads:[~2009-12-02  8:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-17 22:45 [patch 1/4] mtd-nand: davinci: Correct 4-bit error correction akpm
2009-11-30 11:38 ` David Woodhouse
2009-12-02  8:29   ` Sudhakar Rajashekhara [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='00de01ca7329$9f092330$dd1b6990$@raj@ti.com' \
    --to=sudhakar.raj@ti.com \
    --cc=akpm@linux-foundation.org \
    --cc=dwmw2@infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=nsnehaprabha@ti.com \
    /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