The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Michael Walle" <mwalle@kernel.org>
To: "Maarten Zanders" <maarten@zanders.be>,
	"Pratyush Yadav" <pratyush@kernel.org>
Cc: "Cheng Ming Lin" <linchengming884@gmail.com>,
	"Tudor Ambarus" <tudor.ambarus@linaro.org>,
	"Guenter Roeck" <linux@roeck-us.net>,
	"Cheng Ming Lin" <chengminglin@mxic.com.tw>,
	<miquel.raynal@bootlin.com>, <richard@nod.at>, <vigneshr@ti.com>,
	<linux-mtd@lists.infradead.org>, <linux-kernel@vger.kernel.org>,
	<alvinzhou@mxic.com.tw>, <leoyu@mxic.com.tw>
Subject: Re: [PATCH v2 1/3] mtd: spi-nor: macronix: Drop the redundant flash info fields
Date: Wed, 01 Oct 2025 08:59:31 +0200	[thread overview]
Message-ID: <DD6SI06QNEE4.2YCRTWJHEAAQM@kernel.org> (raw)
In-Reply-To: <CAPB_pE+f7QGNaBgWz6OSOmfBAdCoOgnUhCV=KzUR94vWt_pEYA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2322 bytes --]

On Tue Sep 30, 2025 at 3:15 PM CEST, Maarten Zanders wrote:
> Hi all,
>
> On Tue, Sep 30, 2025 at 2:19 PM Pratyush Yadav <pratyush@kernel.org> wrote:
>> > I agree with reverting this patch. When I initially verified it, the
>> > devices I had on hand all supported SFDP, so I did not catch this issue.
>> > After checking again, I confirm that some older flashes without SFDP are
>> > indeed affected.
>>
>> Do you know if these flashes are used in any devices that are actively
>> used and maintained? If so, we should revert. If it is likely they
>> aren't actively used, then maybe we just keep things as they are?
>> Dunno...
>
> The non-SFDP parts have been obsoleted in 2009-2010 according to
> Macronix's PCN's. So they're pretty ancient.
>
> If we choose to keep the patch in, I think we should make it more
> consistent and drop support for the smaller flashes without SFDP as
> well. The behavior is different in the spi-nor core for SFDP-parsed vs
> non-SFDP-parsed cases.
> In particular ID's 0xc22016 and 0xc22017 could be handled in the same
> way I believe?

Being EOL doesn't mean they aren't used anymore. SPI (NOR) flashes
tend to be used because they are a rather reliable. So I could
imagine that they are still in use somewhere. My main concern is,
that if we just drop them now and thus make newer flashes work (like
the one from Maarten), we might find ourselves in an uncomfortable
situation in the future. What if someone is reporting a regression
with older flashes? We can't just revert this patch then because we
already support newer flashes. Actually we are in this situation
right now, but not *that* much time has passed.

If we decide to drop older flash support just like that, I'd vote
for a grace period where the user is informed about it.

But I still think we have a better solution: always parse SFDP.
Pre-populate the flash parameters with the info from the flashdb and
then just try to parse the SFDP. There was always the concern to
issue the RDSFDP command on flashes which doesn't support it and
cause unknown behavior. But we are already doing that today with
unknown flashes. So far there was no single report and we have that
behavior for years now (commit 773bbe104497 ("mtd: spi-nor: add
generic flash driver")).

-michael

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 297 bytes --]

  reply	other threads:[~2025-10-01  6:59 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-07  7:53 [PATCH v2 0/3] mtd: spi-nor: macronix: Cleanup macronix flash info Cheng Ming Lin
2025-04-07  7:53 ` [PATCH v2 1/3] mtd: spi-nor: macronix: Drop the redundant flash info fields Cheng Ming Lin
2025-06-08  1:04   ` Guenter Roeck
2025-06-08 12:53     ` Pratyush Yadav
2025-06-09  1:13       ` Guenter Roeck
2025-06-10  0:14         ` Guenter Roeck
2025-06-10  6:46           ` Tudor Ambarus
2025-06-10  7:29             ` Cheng Ming Lin
2025-06-10  7:43               ` Guenter Roeck
2025-09-24 12:10               ` Michael Walle
2025-09-30  7:36                 ` Cheng Ming Lin
2025-09-30 12:19                   ` Pratyush Yadav
2025-09-30 13:15                     ` Maarten Zanders
2025-10-01  6:59                       ` Michael Walle [this message]
2025-09-30 14:39                     ` Guenter Roeck
2025-06-10  7:41             ` Guenter Roeck
2025-06-22 19:09               ` Pratyush Yadav
2025-10-01  9:35                 ` Cédric Le Goater
2025-04-07  7:53 ` [PATCH v2 2/3] mtd: spi-nor: macronix: Remove duplicate flash info entries Cheng Ming Lin
2025-04-07  7:54 ` [PATCH v2 3/3] mtd: spi-nor: macronix: Add fixups for MX25L3255E Cheng Ming Lin
2025-04-07  8:25   ` Cheng Ming Lin
2025-04-08 14:52   ` Pratyush Yadav
2025-05-06  9:36 ` [PATCH v2 0/3] mtd: spi-nor: macronix: Cleanup macronix flash info Pratyush Yadav

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=DD6SI06QNEE4.2YCRTWJHEAAQM@kernel.org \
    --to=mwalle@kernel.org \
    --cc=alvinzhou@mxic.com.tw \
    --cc=chengminglin@mxic.com.tw \
    --cc=leoyu@mxic.com.tw \
    --cc=linchengming884@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux@roeck-us.net \
    --cc=maarten@zanders.be \
    --cc=miquel.raynal@bootlin.com \
    --cc=pratyush@kernel.org \
    --cc=richard@nod.at \
    --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