mmc: core: clarify how to use post_req in case of errors
[pandora-kernel.git] / include / linux / mmc / host.h
index 1d09562..340cc0c 100644 (file)
@@ -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>
@@ -108,6 +109,9 @@ struct mmc_host_ops {
         * It is optional for the host to implement pre_req and post_req in
         * order to support double buffering of requests (prepare one
         * request while another request is active).
+        * pre_req() must always be followed by a post_req().
+        * To undo a call made to pre_req(), call post_req() with
+        * a nonzero err condition.
         */
        void    (*post_req)(struct mmc_host *host, struct mmc_request *req,
                            int err);
@@ -302,6 +306,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;
 };