Re: [PATCH] mtd: spinand: confirm ready state on SkyHigh S35ML chips
From: Miquel Raynal
Date: Mon Nov 16 2026 - 09:17:38 EST
Hi Vitaliy,
Thanks for the patch.
On 30/10/2026 at 22:33:42 +02, Vitaliy Sochnev <sochnev.v.74@xxxxxxxxx> wrote:
> On a Nokia XG-040G-MD with a SkyHigh 256 MiB SPI-NAND, UBI reports
> fixable bit-flips during rootfs mount without this workaround:
>
> ubi0: fixable bit-flip detected at PEB 1979
> ubi0: schedule PEB 1979 for scrubbing
> ubi0: scrubbed PEB 1979 (LEB 5:53), data moved to PEB 645
>
> Other reboots also report fixable bit-flips. A tester reports that after
> applying the workaround, sysupgrade, multiple reboots and an active
> workload produced no such warnings. Long-term operation is unverified.
>
> spinand_wait() accepts a single non-busy status sample. On these chips,
> the ready bit can briefly clear before the device is actually ready,
> allowing a premature cache read or a new program/erase command. The
> fallback status read for controllers with poll_status offload does not
> provide a second ready confirmation in the usual case.
>
> Mark the affected SkyHigh parts with a quirk and require a second ready
> status sample after spinand_wait() for those parts. If the chip becomes
> busy again, repeat the wait while the outer timeout has not elapsed.
> Each inner wait has its own timeout, so the quirk can wait up to roughly
> twice as long. Leave other SPI-NAND parts unchanged.
Can you give actual numbers? Can you log (without tracing) on multiple
attempts the state the device is reporting, as well as the read
timestamps? Could increasing RESET_INITIAL_DELAY_US slightly do the
trick?
Thanks,
Miquèl