Re: [PATCH RESEND v5 3/3] mtd: spinand: repeat reading in regular mode if continuous reading fails
From: Miquel Raynal
Date: Thu Oct 29 2026 - 11:58:41 EST
Hi Mikhail,
On 18/09/2025 at 00:54:01 +03, Mikhail Kshevetskiy <mikhail.kshevetskiy@xxxxxxxxx> wrote:
> Continuous reading may result in multiple flash pages reading in one
> operation. Unfortunately, not all spinand controllers support such
> large reading. They will read less data. Unfortunately, the operation
> can't be continued.
>
> In this case:
> * disable continuous reading on this (not good enough) spi controller
> * repeat reading in regular mode.
>
> Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@xxxxxxxxx>
This patch unfortunately breaks continuous reads on my boards without
dirmap support. The fact that they do not have dirmap support does not
mean they are not capable of keeping CS asserted, these are two
orthogonal hardware capabilities and it seems that we cannot easily
discover it at run time.
I recently had a similar issue with a "powerful" controller
(cadence-qspi) with dirmap support. The fact that controllers will or
will not spuriously assert their chip select is not discoverable
either. As a result I created a spi-mem capability to flag this
impossibility, which disables continuous reads. I will send a patch to
revert this commit (keeping the previous ones) and another one to flag
the Airoha controller as not having full control over its CS.
Thanks,
Miquèl