From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Stefan Agner <stefan@agner.ch>
Cc: miquel.raynal@free-electrons.com, computersforpeace@gmail.com,
dwmw2@infradead.org, marek.vasut@gmail.com,
cyrille.pitchen@wedev4u.fr, richard@nod.at,
linux-mtd@lists.infradead.org
Subject: Re: [RFC PATCH 2/2] mtd: nand: always request data transfer for parameter page
Date: Fri, 12 Jan 2018 11:42:31 +0100 [thread overview]
Message-ID: <20180112114231.51960fd3@bbrezillon> (raw)
In-Reply-To: <20180111235037.10912-2-stefan@agner.ch>
On Fri, 12 Jan 2018 00:50:37 +0100
Stefan Agner <stefan@agner.ch> wrote:
> To make sure the controller actually transfers data add a
> DATA_IN op even if len is 0.
Nope, this is wrong. You should patch the caller of
nand_read_param_page_op() to always pass a valid buffer and
len != 0 instead.
>
> Signed-off-by: Stefan Agner <stefan@agner.ch>
> ---
> drivers/mtd/nand/nand_base.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
> index 96c97588e1ba..26bbf54e125b 100644
> --- a/drivers/mtd/nand/nand_base.c
> +++ b/drivers/mtd/nand/nand_base.c
> @@ -1510,10 +1510,6 @@ static int nand_read_param_page_op(struct nand_chip *chip, u8 page, void *buf,
> };
> struct nand_operation op = NAND_OPERATION(instrs);
>
> - /* Drop the DATA_IN instruction if len is set to 0. */
> - if (!len)
> - op.ninstrs--;
> -
> return nand_exec_op(chip, &op);
> }
>
next prev parent reply other threads:[~2018-01-12 10:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-11 23:50 [RFC PATCH 1/2] mtd: nand: vf610_nfc: make use of ->exec_op() Stefan Agner
2018-01-11 23:50 ` [RFC PATCH 2/2] mtd: nand: always request data transfer for parameter page Stefan Agner
2018-01-12 10:42 ` Boris Brezillon [this message]
2018-01-12 10:59 ` [RFC PATCH 1/2] mtd: nand: vf610_nfc: make use of ->exec_op() Boris Brezillon
2018-01-12 12:58 ` Stefan Agner
2018-01-12 13:18 ` Boris Brezillon
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=20180112114231.51960fd3@bbrezillon \
--to=boris.brezillon@free-electrons.com \
--cc=computersforpeace@gmail.com \
--cc=cyrille.pitchen@wedev4u.fr \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=miquel.raynal@free-electrons.com \
--cc=richard@nod.at \
--cc=stefan@agner.ch \
/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.