Skip to content

mtd/nvmem: don't defer forever on absent NVMEM suppliers

Manikandan Muralidharan linux-mtd lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2mtd: spi-nor: drop fw_devlink suppliers below a flash that failed to probedrivers/mtd/spi-nor/core.c drivers/nvmem/core.c+37 -20 replies
2/2nvmem: core: don't defer for a missing cell once the layout is bounddrivers/nvmem/core.c+26 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] mtd/nvmem: don't defer forever on absent NVMEM suppliers

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 waiting on it and the NVMEM lookup keeps returning -EPROBE_DEFER. Drop the fw_devlink links below a flash that failed to probe, and return -ENOENT for a cell on a node fw_devlink has marked as never becoming a device.

- 2/2: a layout adds its cells from its probe and may add none, e.g. when the data the cell describes is not programmed on the device. Only defer while the layout is not bound yet, and return -ENOENT once it is.

In both cases the consumer then falls back, 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.

[1] https://lore.kernel.org/all/[email protected]/

Manikandan Muralidharan (2):
mtd: spi-nor: drop fw_devlink suppliers below a flash that failed to
probe
nvmem: core: don't defer for a missing cell once the layout is bound

 drivers/mtd/spi-nor/core.c | 26 ++++++++++++++++++++++++-
 drivers/nvmem/core.c       | 40 ++++++++++++++++++++++++++++++++++++--
 2 files changed, 63 insertions(+), 3 deletions(-)

base-commit: 05441d697f7f9a927264f4058cbbc6a03dfcac9d
prerequisite-patch-id: 76d8b1168f88c3e7912ac2ce01a705f7e69d8a3b
prerequisite-patch-id: b360d0d00ac1a6feb76d4b3f9412b6f1741f6161
prerequisite-patch-id: 659801d6f415ba79ce51f21b3a4f5e132348c150
prerequisite-patch-id: bd1a5a10983aa3cfd99c93ee58fdeb04cdd87b76
prerequisite-patch-id: 94ede38b6c2480cb1e0e102e9bbeb6ffd5b276ef
prerequisite-patch-id: ae3977b6c56c5bd4f352d77bd8a7883a69d390af
prerequisite-patch-id: 58d0ad25e81f16f60864d624eed7ff481607e960
prerequisite-patch-id: ba140b71fdbfc992861ae4c34b6acc737d4e4528

Signature · 1 line
2.43.0