From: Huang Shijie <shijie8@gmail.com>
To: Brian Norris <computersforpeace@gmail.com>
Cc: Huang Shijie <b32955@freescale.com>, linux-mtd@lists.infradead.org
Subject: Re: [PATCH v2 3/4] mtd: nand: support Micron READ RETRY
Date: Wed, 11 Dec 2013 21:54:54 +0800 [thread overview]
Message-ID: <20131211135451.GB1284@gmail.com> (raw)
In-Reply-To: <1386619753-27613-3-git-send-email-computersforpeace@gmail.com>
On Mon, Dec 09, 2013 at 12:09:12PM -0800, Brian Norris wrote:
> + * nand_set_read_retry - [INTERN] Set the READ RETRY mode
> + * @mtd: MTD device structure
> + * @retry_mode: the retry mode to use
> + *
> + * Some vendors supply a special command to shift the Vt threshold, to be used
> + * when there are too many bitflips in a page (i.e., ECC error). After setting
> + * a new threshold, the host should retry reading the page.
> + */
> +static int nand_set_read_retry(struct mtd_info *mtd, int retry_mode)
> +{
> + struct nand_chip *chip = mtd->priv;
> + uint8_t feature[ONFI_SUBFEATURE_PARAM_LEN] = {retry_mode};
> +
This can cause a DMA warning.
> + if (retry_mode >= chip->read_retries)
> + return -EINVAL;
> +
> + if (chip->onfi_params.jedec_id == NAND_MFR_MICRON)
> + return chip->onfi_set_features(mtd, chip,
> + ONFI_FEATURE_ADDR_READ_RETRY, feature);
I suggest to add a hook such as for nand_chip{}:
chip->read_retry(..)
Different nand chips fill different hook.
For Micron, fill it with micron_read_retry();
for Toshiba, fill it with a toshiab_read_retry();
For Hynix, fill it with hynix_read_retry().
I am wondar if we should add a file for the read-retry in the
drivers/mtd/nand folder.
thanks
Huang Shijie
next prev parent reply other threads:[~2013-12-11 13:55 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-09 20:09 [PATCH v2 1/4] mtd: nand: localize ECC failures per page Brian Norris
2013-12-09 20:09 ` [PATCH v2 2/4] mtd: nand: add ONFI vendor block for Micron Brian Norris
2013-12-09 20:09 ` [PATCH v2 3/4] mtd: nand: support Micron READ RETRY Brian Norris
2013-12-11 13:54 ` Huang Shijie [this message]
2013-12-11 19:03 ` Brian Norris
2013-12-11 20:31 ` Ezequiel Garcia
2013-12-12 3:49 ` Huang Shijie
2013-12-12 3:47 ` Huang Shijie
2013-12-17 4:43 ` Brian Norris
2013-12-17 4:23 ` Huang Shijie
2013-12-17 5:06 ` Brian Norris
2013-12-17 5:11 ` Huang Shijie
2013-12-17 7:01 ` Brian Norris
2013-12-17 7:12 ` Huang Shijie
2013-12-09 20:09 ` [PATCH v2 4/4] mtd: nand: use __packed shorthand Brian Norris
[not found] <20980858CB6D3A4BAE95CA194937D5E73EA53CF1@DBDE04.ent.ti.com>
2013-12-11 18:37 ` [PATCH v2 3/4] mtd: nand: support Micron READ RETRY Brian Norris
2013-12-11 20:54 ` Gupta, Pekon
2013-12-17 5:22 ` Brian Norris
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=20131211135451.GB1284@gmail.com \
--to=shijie8@gmail.com \
--cc=b32955@freescale.com \
--cc=computersforpeace@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 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).