mmc: dw_mmc: Add data CRC error injection
authorVincent Whitchurch <vincent.whitchurch@axis.com>
Thu, 1 Jul 2021 08:05:34 +0000 (10:05 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 24 Aug 2021 08:15:31 +0000 (10:15 +0200)
commit2b8ac062f33781edbefb482c6abebfde6b373eed
treec6b64f3437ffb8d9fb3234567653e2f232c6b30b
parent696068470e38e4bd710c1dea5f0a2a835daf9388
mmc: dw_mmc: Add data CRC error injection

This driver has had problems when handling data errors.  Add fault
injection support so that the abort handling can be easily triggered and
regression-tested.  A hrtimer is used to indicate a data CRC error at
various points during the data transfer.

Note that for the recent problem with hangs in the case of some data CRC
errors, a udelay(10) inserted at the start of send_stop_abort() greatly
helped in triggering the error, but I've not included this as part of
the fault injection support since it seemed too specific.

Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Link: https://lore.kernel.org/r/20210701080534.23138-1-vincent.whitchurch@axis.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/dw_mmc.c
drivers/mmc/host/dw_mmc.h