[PATCH v2 0/2] mtd/nvmem: don't defer forever on absent NVMEM suppliers
From: Manikandan Muralidharan
Date: Mon Nov 30 2026 - 02:45:21 EST
A consumer that gets its MAC address from an NVMEM cell can be deferred
forever when the cell will never appear, instead of falling back to
another address source. These came up while testing the SFDP EUI-48
series [1], where macb reads its MAC address from a cell exposed by the
QSPI flash, but both are generic:
- 1/2: when the SPI NOR flash is not populated or not reachable, nothing
below its node is ever registered, yet fw_devlink keeps the consumer
from probing. Drop the fw_devlink links below a flash that failed to
probe.
- 2/2: the NVMEM lookup keeps returning -EPROBE_DEFER for a provider
that never shows up, or for a cell that a bound layout did not add,
e.g. when the data it describes is not programmed on the device. Once
the deferred probe timeout has expired, return -ENOENT instead.
In both cases the consumer then falls back once the deferred probe
timeout has expired (10 seconds by default),
e.g. macb uses the address left by the bootloader or a random one.
This series depends on the SFDP EUI-48 series [1] and applies on top of it.
Changes in v2:
- 1/2 - Drop the FWNODE_FLAG_NOT_DEVICE check in of_nvmem_cell_get():
The patch now only touches the SPI NOR core.
- 2/2 - Replace the "layout is bound" check with a fallback once the
deferred probe timeout has expired. This covers both the absent
flash and the missing cell without touching the layout device,
so it no longer races with the layout probe or removal.
Renamed from "nvmem: core: don't defer for a missing cell once
the layout is bound".
v1: https://lore.kernel.org/all/cover.1794391847.git.manikandan.m@xxxxxxxxxxxxx/
[1] https://lore.kernel.org/all/cover.1796023049.git.manikandan.m@xxxxxxxxxxxxx/
Manikandan Muralidharan (2):
mtd: spi-nor: drop fw_devlink suppliers below a flash that failed to
probe
nvmem: core: stop deferring for a cell after the deferred probe
timeout
drivers/mtd/spi-nor/core.c | 26 +++++++++++++++++++++++++-
drivers/nvmem/core.c | 9 +++++++++
2 files changed, 34 insertions(+), 1 deletion(-)
base-commit: fe6ff8d5d675c01793b9f051d16055dd4aa75244
prerequisite-patch-id: 76d8b1168f88c3e7912ac2ce01a705f7e69d8a3b
prerequisite-patch-id: b360d0d00ac1a6feb76d4b3f9412b6f1741f6161
prerequisite-patch-id: 659801d6f415ba79ce51f21b3a4f5e132348c150
prerequisite-patch-id: 902c67d8bcfad07fc6424ee551557eeab87efaa4
prerequisite-patch-id: 94ede38b6c2480cb1e0e102e9bbeb6ffd5b276ef
prerequisite-patch-id: ae3977b6c56c5bd4f352d77bd8a7883a69d390af
prerequisite-patch-id: 58d0ad25e81f16f60864d624eed7ff481607e960
prerequisite-patch-id: ba140b71fdbfc992861ae4c34b6acc737d4e4528
--
2.43.0