aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mmc/core/core.c48
1 files changed, 40 insertions, 8 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 3208890b10b3..d08968470c41 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -68,18 +68,35 @@ void mmc_request_done(struct mmc_host *host, struct mmc_request *mrq)
68 struct mmc_command *cmd = mrq->cmd; 68 struct mmc_command *cmd = mrq->cmd;
69 int err = cmd->error; 69 int err = cmd->error;
70 70
71 pr_debug("%s: req done (CMD%u): %d/%d/%d: %08x %08x %08x %08x\n",
72 mmc_hostname(host), cmd->opcode, err,
73 mrq->data ? mrq->data->error : 0,
74 mrq->stop ? mrq->stop->error : 0,
75 cmd->resp[0], cmd->resp[1], cmd->resp[2], cmd->resp[3]);
76
77 if (err && cmd->retries) { 71 if (err && cmd->retries) {
72 pr_debug("%s: req failed (CMD%u): %d, retrying...\n",
73 mmc_hostname(host), cmd->opcode, err);
74
78 cmd->retries--; 75 cmd->retries--;
79 cmd->error = 0; 76 cmd->error = 0;
80 host->ops->request(host, mrq); 77 host->ops->request(host, mrq);
81 } else if (mrq->done) { 78 } else {
82 mrq->done(mrq); 79 pr_debug("%s: req done (CMD%u): %d: %08x %08x %08x %08x\n",
80 mmc_hostname(host), cmd->opcode, err,
81 cmd->resp[0], cmd->resp[1],
82 cmd->resp[2], cmd->resp[3]);
83
84 if (mrq->data) {
85 pr_debug("%s: %d bytes transferred: %d\n",
86 mmc_hostname(host),
87 mrq->data->bytes_xfered, mrq->data->error);
88 }
89
90 if (mrq->stop) {
91 pr_debug("%s: (CMD%u): %d: %08x %08x %08x %08x\n",
92 mmc_hostname(host), mrq->stop->opcode,
93 mrq->stop->error,
94 mrq->stop->resp[0], mrq->stop->resp[1],
95 mrq->stop->resp[2], mrq->stop->resp[3]);
96 }
97
98 if (mrq->done)
99 mrq->done(mrq);
83 } 100 }
84} 101}
85 102
@@ -104,6 +121,21 @@ mmc_start_request(struct mmc_host *host, struct mmc_request *mrq)
104 mmc_hostname(host), mrq->cmd->opcode, 121 mmc_hostname(host), mrq->cmd->opcode,
105 mrq->cmd->arg, mrq->cmd->flags); 122 mrq->cmd->arg, mrq->cmd->flags);
106 123
124 if (mrq->data) {
125 pr_debug("%s: blksz %d blocks %d flags %08x "
126 "tsac %d ms nsac %d\n",
127 mmc_hostname(host), mrq->data->blksz,
128 mrq->data->blocks, mrq->data->flags,
129 mrq->data->timeout_ns / 10000000,
130 mrq->data->timeout_clks);
131 }
132
133 if (mrq->stop) {
134 pr_debug("%s: CMD%u arg %08x flags %08x\n",
135 mmc_hostname(host), mrq->stop->opcode,
136 mrq->stop->arg, mrq->stop->flags);
137 }
138
107 WARN_ON(!host->claimed); 139 WARN_ON(!host->claimed);
108 140
109 mrq->cmd->error = 0; 141 mrq->cmd->error = 0;