From: Boris Brezillon <bbrezillon@kernel.org>
To: Emil Lenngren <emil.lenngren@gmail.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: mtd: spinand: wait on erase success in spinand_markbad?
Date: Wed, 19 Dec 2018 19:56:38 +0100 [thread overview]
Message-ID: <20181219195619.64f62b8e@bbrezillon> (raw)
In-Reply-To: <CAO1O6sd-JZBfGnAB7tOnsJeJSLXTguLHGdSEokOYq9n=bY5jPA@mail.gmail.com>
On Wed, 19 Dec 2018 14:27:51 +0100
Emil Lenngren <emil.lenngren@gmail.com> wrote:
> Hi,
>
> I was just reading the spinand driver and found this piece of code:
> static int spinand_markbad(struct nand_device *nand, const struct nand_pos *pos)
> {
> struct spinand_device *spinand = nand_to_spinand(nand);
> struct nand_page_io_req req = {
> .pos = *pos,
> .ooboffs = 0,
> .ooblen = 2,
> .oobbuf.out = spinand->oobbuf,
> };
> int ret;
>
> /* Erase block before marking it bad. */
> ret = spinand_select_target(spinand, pos->target);
> if (ret)
> return ret;
>
> ret = spinand_write_enable_op(spinand);
> if (ret)
> return ret;
>
> spinand_erase_op(spinand, pos);
>
> memset(spinand->oobbuf, 0, 2);
> return spinand_write_page(spinand, &req);
> }
>
> Shouldn't there be spinand_wait call after spinand_erase_op and before
> spinand_write_page?
>
Absolutely. Can you send a patch to fix that?
Thanks,
Boris
next prev parent reply other threads:[~2018-12-19 18:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-19 13:27 mtd: spinand: wait on erase success in spinand_markbad? Emil Lenngren
2018-12-19 18:56 ` Boris Brezillon [this message]
2018-12-19 19:54 ` Emil Lenngren
2018-12-20 10:30 ` 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=20181219195619.64f62b8e@bbrezillon \
--to=bbrezillon@kernel.org \
--cc=emil.lenngren@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).