Linux-mtd Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael Walle" <mwalle@kernel.org>
To: "Russell Senior" <russell@personaltelco.net>
Cc: "Pratyush Yadav" <pratyush@kernel.org>,
	"Michael Walle" <mwalle@kernel.org>,
	"Takahiro Kuwano" <takahiro.kuwano@infineon.com>,
	"Miquel Raynal" <miquel.raynal@bootlin.com>,
	"Richard Weinberger" <richard@nod.at>,
	"Vignesh Raghavendra" <vigneshr@ti.com>,
	<linux-mtd@lists.infradead.org>,
	"Cheng Ming Lin" <linchengming884@gmail.com>,
	<linux-kernel@vger.kernel.org>
Subject: Re: Regression: mx25l12845e stops working on my device after commit 947c86e481a
Date: Tue, 18 Aug 2026 08:43:55 +0200	[thread overview]
Message-ID: <DKRV6XPSSU73.1VF5FG13NPGWE@kernel.org> (raw)
In-Reply-To: <CAHP3WfMMK8GU3jpwxv4=C=Pc_9H4ZkmqAJqxZ0gN_rYqPDU3XQ@mail.gmail.com>

Hi Russell,

Thanks for testing and reporting! Did you know

 ./scripts/get_maintainer.pl -f drivers/mtd/spi-nor/macronix.c

That way you get all mail addresses of the maintainers you can add
to your mail. Not everyone is subscribed to the mailinglist.

On Sat Aug 15, 2026 at 12:48 PM CEST, Russell Senior wrote:
> I am running OpenWrt (master branch) on a Buffalo WZR600DHP. This
> particular instance has MX25L12845E SPI NOR chips (I have another
> WZR600DHP with Winbond W25Q128BVFG, but haven't tested there, just to
> say they don't all necessarily use the same flash).

Did you actually look at the chip or do you just know because linux
is printing the name? FWIW, the name linux is printing isn't always
correct due to flash ID reuse. I'm just curious.

> I just built a new firmware version last night, and it started
> unhappily boot looping. The most recent previous build I had done was
> from June. Boot looping messages look like this:
>
> [...]
> [    0.752843] printk: legacy bootconsole [early0] disabled
> [    0.778756] spi-nor spi0.0: supply vcc not found, using dummy regulator
> [    0.785909] spi-nor spi0.0: BFPT parsing failed. Please consider
> using SPI_NOR_SKIP_SFDP when declaring the flash
> [    0.796238] spi-nor spi0.0: probe with driver spi-nor failed with error -22
> [    0.804457] spi-nor spi0.1: supply vcc not found, using dummy regulator
> [    0.824085] i2c_dev: i2c /dev entries driver
> [    0.830852] NET: Registered PF_INET6 protocol family
> [    0.872875] Segment Routing with IPv6
> [    0.876671] In-situ OAM (IOAM) with IPv6
> [    0.880798] NET: Registered PF_PACKET protocol family
> [    0.886278] 8021q: 802.1Q VLAN Support v1.8
> [    0.921429] clk: Disabling unused clocks
> [    0.925661] check access for rdinit=/init failed: -2, ignoring
> [    0.932181] MTD: Couldn't look up '': -22
> [    0.936335] /dev/root: Can't open blockdev
> [    0.940520] VFS: Cannot open root device "" or unknown-block(0,0): error -6
> [    0.947472] Please append a correct "root=" boot option; here are
> the available partitions:
> [    0.955831] 1f00           16384 mtdblock0
> [    0.955843]  (driver?)
> [    0.962379] List of all bdev filesystems:
> [    0.966374]  squashfs
> [    0.966379]
> [    0.970139] Kernel panic - not syncing: VFS: Unable to mount root
> fs on unknown-block(0,0)
> [    0.978392] Rebooting in 1 seconds..
>
> Between June and last night, OpenWrt had switched their kernel from a
> 6.12.x to a 6.18.x, so I immediately suspected something in that
> transition was the culprit and demonstrated that by building the last
> commit before the change to the 6.18.x kernel, and it worked. Then
> tested the commit of the change to the 6.18.x kernel and it
> bootlooped.
>
> Then I started looking through the mtd changes between 6.12.x and
> 6.18.x and spotted 947c86e481a.
>
>   commit 947c86e481a027ed5948434096e506f307bd7114
>   Author: Cheng Ming Lin <chengminglin@mxic.com.tw>
>   Date:   Mon Apr 7 15:53:58 2025 +0800
>
>       mtd: spi-nor: macronix: Drop the redundant flash info fields
>
> The following revert of just the part that affected my chip made the
> bootloop vanish:
>
> diff --git a/drivers/mtd/spi-nor/macronix.c b/drivers/mtd/spi-nor/macronix.c
> index e97f5cbd9aad2..3524ed08ff85d 100644
> --- a/drivers/mtd/spi-nor/macronix.c
> +++ b/drivers/mtd/spi-nor/macronix.c
> @@ -132,7 +132,10 @@ static const struct flash_info macronix_nor_parts[] = {
>         }, {
>                 /* MX25L12805D */
>                 .id = SNOR_ID(0xc2, 0x20, 0x18),
> +               .name = "mx25l12805d",
> +               .size = SZ_16M,
>                 .flags = SPI_NOR_HAS_LOCK | SPI_NOR_4BIT_BP,
> +               .no_sfdp_flags = SECT_4K,
>         }, {
>                 /* MX25L25635E, MX25L25645G */
>                 .id = SNOR_ID(0xc2, 0x20, 0x19),

Yeah, that commit removed the size assuming there will only be parts
with SFDP for that ID.

There is already a patch series which addresses that issue, but it
wasn't picked up yet.

  https://lore.kernel.org/all/20260605084837.1875896-1-linchengming884@gmail.com/

Russell, could you try to apply that series to your tree and try
again? If it works, give that series a Tested-by tag?

If you didn't know, there is a tool called b4
(https://b4.docs.kernel.org/en/latest/), which can be used to fetch
the patches from the mailingist (b4 am). Also, if you want to reply
to that patches, you can import the thread into your mailbox using
the "lei" (https://korg.docs.kernel.org/lore-lei.html).

Thanks,
-michael

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

      parent reply	other threads:[~2026-08-18  6:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-15 10:48 Regression: mx25l12845e stops working on my device after commit 947c86e481a Russell Senior
2026-08-18  5:29 ` Cheng Ming Lin
2026-08-18  6:43 ` Michael Walle [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=DKRV6XPSSU73.1VF5FG13NPGWE@kernel.org \
    --to=mwalle@kernel.org \
    --cc=linchengming884@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=pratyush@kernel.org \
    --cc=richard@nod.at \
    --cc=russell@personaltelco.net \
    --cc=takahiro.kuwano@infineon.com \
    --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