Linux-mtd Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Frieder Schrempf <frieder@fris.de>
Cc: Richard Weinberger <richard@nod.at>,
	 Vignesh Raghavendra <vigneshr@ti.com>,
	 linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
	 Frieder Schrempf <frieder.schrempf@kontron.de>
Subject: Re: [PATCH v2] mtd: spinand: Do not re-enable continuous reads vetoed during variant selection
Date: Mon, 12 Oct 2026 18:56:28 +0200	[thread overview]
Message-ID: <874ieq3lj7.fsf@bootlin.com> (raw)
In-Reply-To: <20261007-spinand-cont-read-supported-v2-1-4c63a0f8828a@kontron.de> (Frieder Schrempf's message of "Wed, 07 Oct 2026 15:06:57 +0200")

Hi Frieder,

> Fixes: 6eb7c193e751 ("mtd: spinand: Use secondary ops for continuous reads")
> Assisted-by: LLM
> Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
> ---
> I was using an LLM to check sync patches for U-Boot and the LLM reported
> a bug in the upstream kernel code. To me it looks like this is indeed a
> bug and the fix also looks correct to me, but I would like to mention, that
> this is purely LLM-generated and theoretical. I didn't verify the bug and
> the fix on actual hardware.
>
> @Miquel: Do you have a hardware setup that would be affected by this?

I do not.

> Do you think there is a better fix?

I agree with your bug analysis and with the proposal, just a few nits below.

> --- a/include/linux/mtd/spinand.h
> +++ b/include/linux/mtd/spinand.h
> @@ -772,6 +772,9 @@ struct spinand_mem_ops {
>   *		suitable to use or not in general with this chip/configuration.
>   *		A per-transfer check must of course be done to ensure it is
>   *		actually relevant to enable this feature.
> + * @has_cont_read_variants: The chip needs dedicated continuous read from
> + *			    cache operations, which must then be available for
> + *			    the bus interface in use

"The chip needs dedicated continuous read from cache variants"

>   * @set_cont_read: Enable/disable the continuous read feature
>   * @priv: manufacturer private data
>   * @fact_otp: SPI NAND factory OTP info.
> @@ -810,6 +813,7 @@ struct spinand_device {
>  	int (*configure_chip)(struct spinand_device *spinand,
>  			      enum spinand_bus_interface iface);
>  	bool cont_read_possible;
> +	bool has_cont_read_variants;

Can we name it needs_cont_read_op?

>  	int (*set_cont_read)(struct spinand_device *spinand,
>  			     bool enable);
>  	int (*set_randomizer)(struct spinand_device *spinand,
>

The rest is good to me.

Thanks,
Miquèl

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

      reply	other threads:[~2026-10-13 17:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-07 13:06 [PATCH v2] mtd: spinand: Do not re-enable continuous reads vetoed during variant selection Frieder Schrempf
2026-10-12 16:56 ` 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=874ieq3lj7.fsf@bootlin.com \
    --to=miquel.raynal@bootlin.com \
    --cc=frieder.schrempf@kontron.de \
    --cc=frieder@fris.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    --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