diff options
author | Per Forlin <per.forlin@linaro.org> | 2011-08-19 14:52:37 +0200 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2011-10-26 15:43:34 -0400 |
commit | 1b676f70c108cda90cf9d114d16c677584400efc (patch) | |
tree | 7f4a18ade6db764ba3c882e294040a91adc2911e /include/linux/mmc | |
parent | df87ecbf19109bab04a92df047a9949838206abc (diff) | |
download | op-kernel-dev-1b676f70c108cda90cf9d114d16c677584400efc.zip op-kernel-dev-1b676f70c108cda90cf9d114d16c677584400efc.tar.gz |
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>
Diffstat (limited to 'include/linux/mmc')
-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 1d09562..4c4bddf 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> @@ -302,6 +303,10 @@ struct mmc_host { struct mmc_async_req *areq; /* active async req */ +#ifdef CONFIG_FAIL_MMC_REQUEST + struct fault_attr fail_mmc_request; +#endif + unsigned long private[0] ____cacheline_aligned; }; |