Regression: mx25l12845e stops working on my device after commit 947c86e481a

Michael Walle mwalle at kernel.org
Mon Aug 17 23:43:55 PDT 2026


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 at 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



More information about the linux-mtd mailing list