From 99d61fbb21506248b9fcafd77f2ac97b8e73b5af Mon Sep 17 00:00:00 2001 From: Per Forlin Date: Fri, 19 Aug 2011 14:52:37 +0200 Subject: mmc: core: add random fault injection This adds support to inject data errors after a completed host transfer. The mmc core will return error even though the host transfer is successful. This simple fault injection proved to be very useful to test the non-blocking error handling in the mmc_blk_issue_rw_rq(). Random faults can also test how the host driver handles pre_req() and post_req() in case of errors. Signed-off-by: Per Forlin Acked-by: Akinobu Mita Reviewed-by: Linus Walleij Signed-off-by: Chris Ball Change-Id: Id26447a00f055c7cde48ff941188f18bf8eb9cad Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33379 Reviewed-by: Ulf HANSSON Tested-by: Ulf HANSSON --- include/linux/mmc/host.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index be01707bb4d..d8ede3938e8 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -12,6 +12,7 @@ #include #include +#include #include #include @@ -306,6 +307,10 @@ struct mmc_host { struct mmc_async_req *areq; /* active async req */ +#ifdef CONFIG_FAIL_MMC_REQUEST + struct fault_attr fail_mmc_request; +#endif + #ifdef CONFIG_MMC_EMBEDDED_SDIO struct { struct sdio_cis *cis; -- cgit v1.2.3