From: Miquel Raynal <miquel.raynal@bootlin.com>
To: dregan@mail.com
Cc: bcm-kernel-feedback-list@broadcom.com,
linux-mtd@lists.infradead.org, f.fainelli@gmail.com,
rafal@milecki.pl, joel.peshkin@broadcom.com,
computersforpeace@gmail.com, dan.beygelman@broadcom.com,
william.zhang@broadcom.com, frieder.schrempf@kontron.de,
linux-kernel@vger.kernel.org, vigneshr@ti.com, richard@nod.at,
bbrezillon@kernel.org, kdasu.kdev@gmail.com
Subject: Re: [PATCH] mtd: rawnand: brcmnand: Initial exec_op implementation
Date: Mon, 2 Oct 2023 14:12:04 +0200 [thread overview]
Message-ID: <20231002141204.167a9cc6@xps-13> (raw)
In-Reply-To: <trinity-ad65aa5d-e930-4f11-ac86-e18f90f5092c-1696016842791@3c-app-mailcom-lxa02>
Hi David,
> > > +
> > > + for (i = 0; i < subop->ninstrs; i++) {
> > > + instr = &subop->instrs[i];
> > > +
> > > + if ((instr->type == NAND_OP_CMD_INSTR) &&
> > > + (instr->ctx.cmd.opcode == NAND_CMD_STATUS))
> > > + status = 1;
> > > + else if (status && (instr->type == NAND_OP_DATA_IN_INSTR)) {
> > > + /*
> > > + * need to fake the nand device write protect because nand_base does a
> > > + * nand_check_wp which calls nand_status_op NAND_CMD_STATUS which checks
> > > + * that the nand is not write protected before an operation starts.
> > > + * The problem with this is it's done outside exec_op so the nand is
> > > + * write protected and this check will fail until the write or erase
> > > + * or write back operation actually happens where we turn off wp.
> > > + */
> >
> > If there is a problem with the core it needs to be handled in the core,
> > not workarounded here. The whole logic with the status property seems
> > really wrong.
> >
>
> I'm trying to change our current code functionality as little as
> possible by having this function in the same way as it always has
> and I do not want to make changes too much outside the scope
> of this exec_op change.
I understand, and this is probably the best first approach, but if
there is really an issue here with the behavior of the core (or one of
its helpers) we need to fix it properly rather than workarounding it.
Thanks,
Miquèl
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2023-10-02 12:12 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-13 2:24 [PATCH] mtd: rawnand: brcmnand: Initial exec_op implementation dregan
2023-09-15 18:45 ` William Zhang
2023-09-15 19:21 ` William Zhang
2023-09-22 14:24 ` Miquel Raynal
2023-09-29 19:47 ` dregan
2023-10-02 12:12 ` Miquel Raynal [this message]
2023-09-30 1:57 ` [PATCH v2] " dregan
2023-10-02 12:35 ` Miquel Raynal
2023-10-02 19:57 ` William Zhang
2023-10-03 9:28 ` Miquel Raynal
2023-10-03 18:46 ` William Zhang
2023-10-03 22:55 ` Miquel Raynal
2023-10-04 4:47 ` William Zhang
2023-10-06 0:42 ` William Zhang
2023-10-06 7:42 ` Miquel Raynal
2023-10-08 23:46 ` William Zhang
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=20231002141204.167a9cc6@xps-13 \
--to=miquel.raynal@bootlin.com \
--cc=bbrezillon@kernel.org \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=computersforpeace@gmail.com \
--cc=dan.beygelman@broadcom.com \
--cc=dregan@mail.com \
--cc=f.fainelli@gmail.com \
--cc=frieder.schrempf@kontron.de \
--cc=joel.peshkin@broadcom.com \
--cc=kdasu.kdev@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=rafal@milecki.pl \
--cc=richard@nod.at \
--cc=vigneshr@ti.com \
--cc=william.zhang@broadcom.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