From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: linux-mtd@lists.infradead.org, masahiroy@kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [NAND Question] When oob_required is used?
Date: Tue, 28 Feb 2017 09:02:16 +0100 [thread overview]
Message-ID: <20170228090216.79554017@bbrezillon> (raw)
In-Reply-To: <CAK7LNARAURP5-vbFZUUo1Wm9hudHw5DTuaQHz-TJGjdsXij38g@mail.gmail.com>
On Tue, 28 Feb 2017 16:21:50 +0900
Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
> Hi.
>
>
> I am seeing the reference implementations for the callback
> in drivers/mtd/nand/nand_base.c
>
>
> I see only some of them use the argument "oob_required".
>
>
> - oob_required is used
> nand_read_page_raw()
> nand_write_page_raw()
> nand_write_subpage_hwecc()
>
>
> - oob_required is ignored
> nand_read_page_raw_syndrome()
> nand_read_page_swecc()
> nand_read_page_hwecc()
> nand_read_page_hwecc_oob_first()
> nand_read_page_syndrome()
> nand_write_page_raw_syndrome()
> nand_write_page_swecc()
> nand_write_page_hwecc()
> nand_write_page_syndrome()
>
>
>
> I could not get the logic
> when "oob_required" is used.
>
>
>
> When implementing drivers, the "oob_required"
> should be respected (i.e. oob_poi should be transferred as well),
> or is it OK to ignore it?
>
>
oob_required = true => you must retrieve OOB bytes
oob_required = false => you can optimize the process and ignore OOB
bytes, but you can also retrieve them if you don't care about
optimization. That's usually what's done when you have to retrieve ECC
bytes (retrieving a few extra OOB bytes is not expensive and usually
simplifies the logic, especially when free and ECC bytes are
interleaved in the OOB region).
next prev parent reply other threads:[~2017-02-28 8:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-28 7:21 [NAND Question] When oob_required is used? Masahiro Yamada
2017-02-28 8:02 ` Boris Brezillon [this message]
2017-02-28 8:26 ` Masahiro Yamada
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=20170228090216.79554017@bbrezillon \
--to=boris.brezillon@free-electrons.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=masahiroy@kernel.org \
--cc=yamada.masahiro@socionext.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