diff options
author | Pierre Ossman <drzeus@drzeus.cx> | 2007-07-24 15:46:49 -0400 |
---|---|---|
committer | Pierre Ossman <drzeus@drzeus.cx> | 2007-07-25 20:05:30 -0400 |
commit | e4d217087458914a6d5d9fd034d7237e6530c619 (patch) | |
tree | 42e3b1c36490f9a1d6b7d7a2cf56d837b2e20cab /drivers/mmc | |
parent | 109b5bed18441599b5ab0e1f3623efa5715a4703 (diff) |
mmc: proper debugging output in core
Make sure that the debugging output in the core is complete.
This should allow us to clean up all the extra debug output
that each and every other host driver seems to contain.
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/core/core.c | 48 |
1 files changed, 40 insertions, 8 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 3208890b10b..d08968470c4 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; |