public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Christophe Kerello <christophe.kerello@foss.st.com>
Cc: "Richard Weinberger" <richard@nod.at>,
	"Vignesh Raghavendra" <vigneshr@ti.com>,
	"Tudor Ambarus" <tudor.ambarus@linaro.org>,
	"Pratyush Yadav" <pratyush@kernel.org>,
	"Michael Walle" <michael@walle.cc>,
	linux-mtd@lists.infradead.org,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
	"Julien Su" <juliensu@mxic.com.tw>,
	"Jaime Liao" <jaimeliao@mxic.com.tw>,
	"Jaime Liao" <jaimeliao.tw@gmail.com>,
	"Alvin Zhou" <alvinzhou@mxic.com.tw>,
	eagle.alexander923@gmail.com, mans@mansr.com, martin@geanix.com,
	"Sean Nyekjær" <sean@geanix.com>
Subject: Re: [PATCH 0/3] mtd: rawnand: More continuous read fixes
Date: Thu, 7 Mar 2024 12:52:00 +0100	[thread overview]
Message-ID: <20240307125200.0c7fb137@xps-13> (raw)
In-Reply-To: <93098d4e-c3b6-4c61-9ab7-764e18b7cb7d@foss.st.com>

Hi Christophe,

> > I was expecting the ongoing boolean to always be reset at the end of
> > nand_do_read_ops(), I probably missed a scenario. In any case what is
> > probably needed for the sequencer to work is:
> > 
> > +++ b/drivers/mtd/nand/raw/nand_base.c
> > @@ -3726,6 +3726,7 @@ static int nand_do_read_ops(struct nand_chip *chip, loff_t from,
> >                  }
> >          }
> >          nand_deselect_target(chip);
> > +       chip->cont_read.ongoing = false;  
> 
> With this patch, it is OK, the continuous read feature will be disabled
> as expected in all cases.

Thanks to your feedback, I've thought again about this case. The fix
presented here will most likely work but does not sound ideal as we
still enable the continuous read internal flag without using it. So I
am drafting something else that should ensure we are always enabling
continuous read only when we can use it.

As a second step, I will reset the flag like above, but with a
WARN_ON_ONCE(). This way:
- If it happens that we missed another path where this is not disabled,
  there will be no behavioral bug (hopefully).
- We will still be notified by the warning.

Thanks for all your valuable feedback and testing. Let me know what
you think of this new series.

Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

      reply	other threads:[~2024-03-07 11:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-23 11:55 [PATCH 0/3] mtd: rawnand: More continuous read fixes Miquel Raynal
2024-02-23 11:55 ` [PATCH 1/3] mtd: rawnand: Fix and simplify again the continuous read derivations Miquel Raynal
2024-03-01 17:48   ` Christophe Kerello
2024-03-07 17:28   ` Miquel Raynal
2024-02-23 11:55 ` [PATCH 2/3] mtd: rawnand: Add a helper for calculating a page index Miquel Raynal
2024-02-23 11:55 ` [PATCH 3/3] mtd: rawnand: Ensure all continuous terms are always in sync Miquel Raynal
2024-03-07 17:28   ` Miquel Raynal
2024-02-26 14:28 ` [PATCH 0/3] mtd: rawnand: More continuous read fixes Christophe Kerello
2024-02-29 10:46   ` Miquel Raynal
2024-03-04 10:44     ` Christophe Kerello
2024-03-07 11:52       ` Miquel Raynal [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=20240307125200.0c7fb137@xps-13 \
    --to=miquel.raynal@bootlin.com \
    --cc=alvinzhou@mxic.com.tw \
    --cc=christophe.kerello@foss.st.com \
    --cc=eagle.alexander923@gmail.com \
    --cc=jaimeliao.tw@gmail.com \
    --cc=jaimeliao@mxic.com.tw \
    --cc=juliensu@mxic.com.tw \
    --cc=linux-mtd@lists.infradead.org \
    --cc=mans@mansr.com \
    --cc=martin@geanix.com \
    --cc=michael@walle.cc \
    --cc=pratyush@kernel.org \
    --cc=richard@nod.at \
    --cc=sean@geanix.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=tudor.ambarus@linaro.org \
    --cc=vigneshr@ti.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