Re: [PATCH v2 1/5] mmc: mmci: do not count a data CRC error as a complete transfer

From: Linus Walleij

Date: Thu Nov 05 2026 - 08:17:46 EST


On Wed, Nov 4, 2026 at 4:27 PM Mateusz Nowicki
<mateusz.nowicki@xxxxxxxxxx> wrote:

> With datacnt_useless (STM32 variants) success is 0 on a data error and
> a CRC error subtracts one from it. bytes_xfered becomes 0xfffffe00 and
> mmc_blk completes the whole request as successful, although the
> controller stopped at the failing block. Reads return stale data and
> writes are lost without any error.
>
> Tested on the STM32MP257F-DK eMMC in HS200 with a forced bad tuning:
> without this change 5 of 14 reads returned zeros, with it all 10 reads
> were correct.
>
> Fixes: b79220b3e0af ("mmc: mmci: add variant property to not read datacnt")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Mateusz Nowicki <mateusz.nowicki@xxxxxxxxxx>

Reviewed-by: Linus Walleij <linusw@xxxxxxxxxx>

Yours,
Linus Walleij