[PATCH 2/9] mtd: nand: sandbox: forbid sub-page writes
Simon Glass
sjg at chromium.org
Mon Sep 28 08:12:13 PDT 2026
Hi Daniel,
On 2026-08-23T19:12:43, Daniel Golle <daniel at makrotopia.org> wrote:
> mtd: nand: sandbox: forbid sub-page writes
>
> The sandbox NAND model programs each page in a single operation and
> rejects a second write to an already-programmed page. UBI writes the
> EC and VID headers into the first page in two separate sub-page
> operations, which the model fails with -EIO, so UBI cannot attach to a
> sandbox NAND.
>
> Advertise NAND_NO_SUBPAGE_WRITE so callers place each header in its
> own page, matching what the model can actually do. This lets the
> imagemap UBI-volume unit test attach UBI on the sandbox NAND.
>
> Signed-off-by: Daniel Golle <daniel at makrotopia.org>
>
> drivers/mtd/nand/raw/sand_nand.c | 2 ++
> 1 file changed, 2 insertions(+)
Reviewed-by: Simon Glass <sjg at chromium.org>
BTW, longer term it would be nicer for the sandbox model to actually
support sub-page writes so we can exercise the code path UBI uses on
real hardware, but that's a separate improvement.
Regards,
Simon
More information about the openwrt-devel
mailing list