diff options
author | Per Forlin <per.forlin@linaro.org> | 2011-08-19 14:52:37 +0200 |
---|---|---|
committer | Ulf HANSSON <ulf.hansson@stericsson.com> | 2011-10-10 12:00:07 +0200 |
commit | 99d61fbb21506248b9fcafd77f2ac97b8e73b5af (patch) | |
tree | dbe6fee8f641ce0ab19e6d8a3656a08ff6537fff /include | |
parent | 59cf8f08c6065aea5592546734c79abc3f101961 (diff) |
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 <per.forlin@linaro.org>
Acked-by: Akinobu Mita <akinobu.mita@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Change-Id: Id26447a00f055c7cde48ff941188f18bf8eb9cad
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33379
Reviewed-by: Ulf HANSSON <ulf.hansson@stericsson.com>
Tested-by: Ulf HANSSON <ulf.hansson@stericsson.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mmc/host.h | 5 |
1 files changed, 5 insertions, 0 deletions
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 <linux/leds.h> #include <linux/sched.h> +#include <linux/fault-inject.h> #include <linux/mmc/core.h> #include <linux/mmc/pm.h> @@ -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; |