From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Boris Brezillon <boris.brezillon@free-electrons.com>,
Richard Weinberger <richard@nod.at>,
linux-mtd@lists.infradead.org
Cc: David Woodhouse <dwmw2@infradead.org>,
Brian Norris <computersforpeace@gmail.com>,
Marek Vasut <marek.vasut@gmail.com>,
Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>,
Han Xu <han.xu@nxp.com>,
Miquel Raynal <miquel.raynal@free-electrons.com>
Subject: Re: [PATCH] mtd: nand: gpmi: Add missing nand_read_page_op() in gpmi_ecc_read_subpage()
Date: Mon, 22 Jan 2018 23:48:42 +0100 [thread overview]
Message-ID: <20180122234842.42949308@bbrezillon> (raw)
In-Reply-To: <20180122215148.4502-1-boris.brezillon@free-electrons.com>
On Mon, 22 Jan 2018 22:51:48 +0100
Boris Brezillon <boris.brezillon@free-electrons.com> wrote:
> When a subpage read request accesses the ECC block containing the BBM,
> a full page read is required. Commit 25f815f66a14 ("mtd: nand: force
> drivers to explicitly send READ/PROG commands") changed the default
> behavior by forcing drivers to manually issue the READ0 command.
> Unfortunately, the full page read case in gpmi_ecc_read_subpage() has
> been omitted and the nand_read_page_op() call has been moved too far
> in the function leading to a situation where gpmi_ecc_read_page() is
> called without a READ0 command.
>
> Fix that by adding a call to nand_read_page_op() just before calling
> gpmi_ecc_read_page() in the "access ECC block containing the BBM" case.
>
> Fixes: 25f815f66a14 ("mtd: nand: force drivers to explicitly send READ/PROG commands")
> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> ---
> drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
> index b51db8c85405..3198f5f79a82 100644
> --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
> +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
> @@ -1215,6 +1215,7 @@ static int gpmi_ecc_read_subpage(struct mtd_info *mtd, struct nand_chip *chip,
> dev_dbg(this->dev,
> "page:%d, first:%d, last:%d, marker at:%d\n",
> page, first, last, marker_pos);
> + nand_read_page_op(chip, page, 0, NULL, 0);
> return gpmi_ecc_read_page(mtd, chip, buf, 0, page);
Please ignore this patch: nand_read_page_op() is already called from
gpmi_ecc_read_page().
> }
> }
prev parent reply other threads:[~2018-01-22 22:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-22 21:51 [PATCH] mtd: nand: gpmi: Add missing nand_read_page_op() in gpmi_ecc_read_subpage() Boris Brezillon
2018-01-22 22:48 ` Boris Brezillon [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=20180122234842.42949308@bbrezillon \
--to=boris.brezillon@free-electrons.com \
--cc=computersforpeace@gmail.com \
--cc=cyrille.pitchen@wedev4u.fr \
--cc=dwmw2@infradead.org \
--cc=han.xu@nxp.com \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=miquel.raynal@free-electrons.com \
--cc=richard@nod.at \
/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