All of lore.kernel.org
 help / color / mirror / Atom feed
From: Huang Shijie <shijie8@gmail.com>
To: Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: Mike Voytovich <mvoytovich@paypal.com>,
	linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org,
	Roy Lee <roylee@paypal.com>,
	Brian Norris <computersforpeace@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v4 1/4] mtd: nand: provide detailed description for raw read/write page methods
Date: Sat, 25 Oct 2014 11:55:27 +0800	[thread overview]
Message-ID: <20141025035524.GA3579@localhost.localdomain> (raw)
In-Reply-To: <1413794777-32220-2-git-send-email-boris.brezillon@free-electrons.com>

On Mon, Oct 20, 2014 at 10:46:14AM +0200, Boris Brezillon wrote:
> read_page_raw and write_page_raw method description is not clear enough.
> It clearly specifies that ECC correction should not be involved but does
> not talk about specific layout (by layout I mean where in-band and
> out-of-band data are stored on the NAND media) used by NAND/ECC
> controllers.
> 
> Those specific layouts might impact MTD users and thus should be hidden (as
> already done in the standard NAND_ECC_HW_SYNDROME implementation).
> 
> Clearly state this constraint in the nand_ecc_ctrl struct documentation.
> 
> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> ---
>  include/linux/mtd/nand.h | 17 +++++++++++++++--
>  1 file changed, 15 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
> index e4d451e..b14d190 100644
> --- a/include/linux/mtd/nand.h
> +++ b/include/linux/mtd/nand.h
> @@ -455,8 +455,21 @@ struct nand_hw_control {
>   *		be provided if an hardware ECC is available
>   * @calculate:	function for ECC calculation or readback from ECC hardware
>   * @correct:	function for ECC correction, matching to ECC generator (sw/hw)
> - * @read_page_raw:	function to read a raw page without ECC
> - * @write_page_raw:	function to write a raw page without ECC
> + * @read_page_raw:	function to read a raw page without ECC. This function
> + *			should hide the specific layout used by the ECC
> + *			controller and always return contiguous in-band and
> + *			out-of-band data even if they're not stored
> + *			contiguously on the NAND chip (e.g.
> + *			NAND_ECC_HW_SYNDROME interleaves in-band and
> + *			out-of-band data).
> + * @write_page_raw:	function to write a raw page without ECC. This function
> + *			should hide the specific layout used by the ECC
> + *			controller and consider the passed data as contiguous
> + *			in-band and out-of-band data. ECC controller is
> + *			responsible for doing the appropriate transformations
> + *			to adapt to its specific layout (e.g.
> + *			NAND_ECC_HW_SYNDROME interleaves in-band and
> + *			out-of-band data).
>   * @read_page:	function to read a page according to the ECC generator
>   *		requirements; returns maximum number of bitflips corrected in
>   *		any single ECC step, 0 if bitflips uncorrectable, -EIO hw error
> -- 
> 1.9.1
> 
thanks for this patch. 

hi Brian, what's your opinion about this patch?

thanks
Huang Shijie

WARNING: multiple messages have this Message-ID (diff)
From: shijie8@gmail.com (Huang Shijie)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 1/4] mtd: nand: provide detailed description for raw read/write page methods
Date: Sat, 25 Oct 2014 11:55:27 +0800	[thread overview]
Message-ID: <20141025035524.GA3579@localhost.localdomain> (raw)
In-Reply-To: <1413794777-32220-2-git-send-email-boris.brezillon@free-electrons.com>

On Mon, Oct 20, 2014 at 10:46:14AM +0200, Boris Brezillon wrote:
> read_page_raw and write_page_raw method description is not clear enough.
> It clearly specifies that ECC correction should not be involved but does
> not talk about specific layout (by layout I mean where in-band and
> out-of-band data are stored on the NAND media) used by NAND/ECC
> controllers.
> 
> Those specific layouts might impact MTD users and thus should be hidden (as
> already done in the standard NAND_ECC_HW_SYNDROME implementation).
> 
> Clearly state this constraint in the nand_ecc_ctrl struct documentation.
> 
> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> ---
>  include/linux/mtd/nand.h | 17 +++++++++++++++--
>  1 file changed, 15 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
> index e4d451e..b14d190 100644
> --- a/include/linux/mtd/nand.h
> +++ b/include/linux/mtd/nand.h
> @@ -455,8 +455,21 @@ struct nand_hw_control {
>   *		be provided if an hardware ECC is available
>   * @calculate:	function for ECC calculation or readback from ECC hardware
>   * @correct:	function for ECC correction, matching to ECC generator (sw/hw)
> - * @read_page_raw:	function to read a raw page without ECC
> - * @write_page_raw:	function to write a raw page without ECC
> + * @read_page_raw:	function to read a raw page without ECC. This function
> + *			should hide the specific layout used by the ECC
> + *			controller and always return contiguous in-band and
> + *			out-of-band data even if they're not stored
> + *			contiguously on the NAND chip (e.g.
> + *			NAND_ECC_HW_SYNDROME interleaves in-band and
> + *			out-of-band data).
> + * @write_page_raw:	function to write a raw page without ECC. This function
> + *			should hide the specific layout used by the ECC
> + *			controller and consider the passed data as contiguous
> + *			in-band and out-of-band data. ECC controller is
> + *			responsible for doing the appropriate transformations
> + *			to adapt to its specific layout (e.g.
> + *			NAND_ECC_HW_SYNDROME interleaves in-band and
> + *			out-of-band data).
>   * @read_page:	function to read a page according to the ECC generator
>   *		requirements; returns maximum number of bitflips corrected in
>   *		any single ECC step, 0 if bitflips uncorrectable, -EIO hw error
> -- 
> 1.9.1
> 
thanks for this patch. 

hi Brian, what's your opinion about this patch?

thanks
Huang Shijie

WARNING: multiple messages have this Message-ID (diff)
From: Huang Shijie <shijie8@gmail.com>
To: Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
	Brian Norris <computersforpeace@gmail.com>,
	linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Mike Voytovich <mvoytovich@paypal.com>,
	Roy Lee <roylee@paypal.com>
Subject: Re: [PATCH v4 1/4] mtd: nand: provide detailed description for raw read/write page methods
Date: Sat, 25 Oct 2014 11:55:27 +0800	[thread overview]
Message-ID: <20141025035524.GA3579@localhost.localdomain> (raw)
In-Reply-To: <1413794777-32220-2-git-send-email-boris.brezillon@free-electrons.com>

On Mon, Oct 20, 2014 at 10:46:14AM +0200, Boris Brezillon wrote:
> read_page_raw and write_page_raw method description is not clear enough.
> It clearly specifies that ECC correction should not be involved but does
> not talk about specific layout (by layout I mean where in-band and
> out-of-band data are stored on the NAND media) used by NAND/ECC
> controllers.
> 
> Those specific layouts might impact MTD users and thus should be hidden (as
> already done in the standard NAND_ECC_HW_SYNDROME implementation).
> 
> Clearly state this constraint in the nand_ecc_ctrl struct documentation.
> 
> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> ---
>  include/linux/mtd/nand.h | 17 +++++++++++++++--
>  1 file changed, 15 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
> index e4d451e..b14d190 100644
> --- a/include/linux/mtd/nand.h
> +++ b/include/linux/mtd/nand.h
> @@ -455,8 +455,21 @@ struct nand_hw_control {
>   *		be provided if an hardware ECC is available
>   * @calculate:	function for ECC calculation or readback from ECC hardware
>   * @correct:	function for ECC correction, matching to ECC generator (sw/hw)
> - * @read_page_raw:	function to read a raw page without ECC
> - * @write_page_raw:	function to write a raw page without ECC
> + * @read_page_raw:	function to read a raw page without ECC. This function
> + *			should hide the specific layout used by the ECC
> + *			controller and always return contiguous in-band and
> + *			out-of-band data even if they're not stored
> + *			contiguously on the NAND chip (e.g.
> + *			NAND_ECC_HW_SYNDROME interleaves in-band and
> + *			out-of-band data).
> + * @write_page_raw:	function to write a raw page without ECC. This function
> + *			should hide the specific layout used by the ECC
> + *			controller and consider the passed data as contiguous
> + *			in-band and out-of-band data. ECC controller is
> + *			responsible for doing the appropriate transformations
> + *			to adapt to its specific layout (e.g.
> + *			NAND_ECC_HW_SYNDROME interleaves in-band and
> + *			out-of-band data).
>   * @read_page:	function to read a page according to the ECC generator
>   *		requirements; returns maximum number of bitflips corrected in
>   *		any single ECC step, 0 if bitflips uncorrectable, -EIO hw error
> -- 
> 1.9.1
> 
thanks for this patch. 

hi Brian, what's your opinion about this patch?

thanks
Huang Shijie

  reply	other threads:[~2014-10-25  3:55 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-20  8:46 [PATCH v4 0/4] mtd: nand: gpmi: add proper raw access support Boris Brezillon
2014-10-20  8:46 ` Boris Brezillon
2014-10-20  8:46 ` Boris Brezillon
2014-10-20  8:46 ` [PATCH v4 1/4] mtd: nand: provide detailed description for raw read/write page methods Boris Brezillon
2014-10-20  8:46   ` Boris Brezillon
2014-10-20  8:46   ` Boris Brezillon
2014-10-25  3:55   ` Huang Shijie [this message]
2014-10-25  3:55     ` Huang Shijie
2014-10-25  3:55     ` Huang Shijie
2014-11-05 11:40     ` Brian Norris
2014-11-05 11:40       ` Brian Norris
2014-11-05 11:40       ` Brian Norris
2014-11-20  8:06   ` Brian Norris
2014-11-20  8:06     ` Brian Norris
2014-11-20  8:06     ` Brian Norris
2014-11-21  1:13     ` Huang Shijie
2014-11-21  1:13       ` Huang Shijie
2014-11-21  1:13       ` Huang Shijie
2014-10-20  8:46 ` [PATCH v4 2/4] mtd: nand: gpmi: add gpmi_move_bits function Boris Brezillon
2014-10-20  8:46   ` Boris Brezillon
2014-10-20  8:46   ` Boris Brezillon
2014-11-20  9:22   ` Brian Norris
2014-11-20  9:22     ` Brian Norris
2014-11-20  9:22     ` Brian Norris
2014-11-20  9:42     ` Boris Brezillon
2014-11-20  9:42       ` Boris Brezillon
2014-11-20  9:42       ` Boris Brezillon
2014-11-20 18:14       ` Brian Norris
2014-11-20 18:14         ` Brian Norris
2014-11-20 18:14         ` Brian Norris
2014-10-20  8:46 ` [PATCH v4 3/4] mtd: nand: gpmi: add proper raw access support Boris Brezillon
2014-10-20  8:46   ` Boris Brezillon
2014-10-20  8:46   ` Boris Brezillon
2014-11-20  9:08   ` Brian Norris
2014-11-20  9:08     ` Brian Norris
2014-11-20  9:08     ` Brian Norris
2014-11-20  9:35     ` Boris Brezillon
2014-11-20  9:35       ` Boris Brezillon
2014-11-20  9:35       ` Boris Brezillon
2014-10-20  8:46 ` [PATCH v4 4/4] mtd: nand: gpmi: add raw oob access functions Boris Brezillon
2014-10-20  8:46   ` Boris Brezillon
2014-10-20  8:46   ` Boris Brezillon
2014-11-20  9:23 ` [PATCH v4 0/4] mtd: nand: gpmi: add proper raw access support Brian Norris
2014-11-20  9:23   ` Brian Norris
2014-11-20  9:23   ` Brian Norris
2014-11-21  1:19   ` Huang Shijie
2014-11-21  1:19     ` Huang Shijie
2014-11-21  1:19     ` Huang Shijie

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=20141025035524.GA3579@localhost.localdomain \
    --to=shijie8@gmail.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=mvoytovich@paypal.com \
    --cc=roylee@paypal.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 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.