linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: dedekind1@gmail.com (Artem Bityutskiy)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v10 3/3] MTD: at91: atmel_nand: Update driver to support Programmable Multibit ECC controller
Date: Tue, 05 Jun 2012 16:04:17 +0300	[thread overview]
Message-ID: <1338901457.2507.53.camel@sauron.fi.intel.com> (raw)
In-Reply-To: <1338545594-18483-4-git-send-email-josh.wu@atmel.com>

On Fri, 2012-06-01 at 18:13 +0800, Josh Wu wrote:
> +       end_time = jiffies + msecs_to_jiffies(PMECC_MAX_TIMEOUT_MS);
> +       while ((pmecc_readl_relaxed(host->ecc, SR) & PMECC_SR_BUSY)) {
> +               if (unlikely(time_after(jiffies, end_time))) {
> +                       dev_err(host->dev, "PMECC: Timeout to get ECC
> value.\n");
> +                       BUG();
> +               }
> +               cpu_relax();
> +       } 

Sorry, but crashing the kernel is the worst thing to do. You should make
'->write_page()' allow to return an error code, just like
'->read_page()' does.

-- 
Best Regards,
Artem Bityutskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120605/64e19bed/attachment.sig>

  reply	other threads:[~2012-06-05 13:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-01 10:13 [PATCH v10 0/3] MTD: at91: Add PMECC support for at91 nand flash driver Josh Wu
2012-06-01 10:13 ` [PATCH v10 1/3] MTD: at91: extract hw ecc initialization to one function Josh Wu
2012-06-01 10:13 ` [PATCH v10 2/3] MTD: at91: add dt parameters for PMECC Josh Wu
2012-06-01 10:13 ` [PATCH v10 3/3] MTD: at91: atmel_nand: Update driver to support Programmable Multibit ECC controller Josh Wu
2012-06-05 13:04   ` Artem Bityutskiy [this message]
2012-06-06  3:32     ` Wu, Josh
2012-06-06 10:58       ` 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=1338901457.2507.53.camel@sauron.fi.intel.com \
    --to=dedekind1@gmail.com \
    --cc=linux-arm-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).