[Linux-stm32] [PATCH v2 1/5] mmc: mmci: do not count a data CRC error as a complete transfer
Linus Walleij
linusw at kernel.org
Thu Nov 5 13:57:43 CET 2026
On Wed, Nov 4, 2026 at 4:27 PM Mateusz Nowicki
<mateusz.nowicki at posteo.net> 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 at vger.kernel.org
> Signed-off-by: Mateusz Nowicki <mateusz.nowicki at posteo.net>
Reviewed-by: Linus Walleij <linusw at kernel.org>
Yours,
Linus Walleij
More information about the Linux-stm32
mailing list