diff options
Diffstat (limited to 'drivers/mmc/mmc.c')
-rw-r--r-- | drivers/mmc/mmc.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 4a73e8b2428d..e8f896c61b34 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c | |||
@@ -99,6 +99,10 @@ EXPORT_SYMBOL(mmc_request_done); | |||
99 | void | 99 | void |
100 | mmc_start_request(struct mmc_host *host, struct mmc_request *mrq) | 100 | mmc_start_request(struct mmc_host *host, struct mmc_request *mrq) |
101 | { | 101 | { |
102 | #ifdef CONFIG_MMC_DEBUG | ||
103 | unsigned int i, sz; | ||
104 | #endif | ||
105 | |||
102 | pr_debug("%s: starting CMD%u arg %08x flags %08x\n", | 106 | pr_debug("%s: starting CMD%u arg %08x flags %08x\n", |
103 | mmc_hostname(host), mrq->cmd->opcode, | 107 | mmc_hostname(host), mrq->cmd->opcode, |
104 | mrq->cmd->arg, mrq->cmd->flags); | 108 | mrq->cmd->arg, mrq->cmd->flags); |
@@ -113,6 +117,13 @@ mmc_start_request(struct mmc_host *host, struct mmc_request *mrq) | |||
113 | BUG_ON(mrq->data->blocks * mrq->data->blksz > | 117 | BUG_ON(mrq->data->blocks * mrq->data->blksz > |
114 | host->max_req_size); | 118 | host->max_req_size); |
115 | 119 | ||
120 | #ifdef CONFIG_MMC_DEBUG | ||
121 | sz = 0; | ||
122 | for (i = 0;i < mrq->data->sg_len;i++) | ||
123 | sz += mrq->data->sg[i].length; | ||
124 | BUG_ON(sz != mrq->data->blocks * mrq->data->blksz); | ||
125 | #endif | ||
126 | |||
116 | mrq->cmd->data = mrq->data; | 127 | mrq->cmd->data = mrq->data; |
117 | mrq->data->error = 0; | 128 | mrq->data->error = 0; |
118 | mrq->data->mrq = mrq; | 129 | mrq->data->mrq = mrq; |