aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/mmc_block.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/mmc_block.c')
-rw-r--r--drivers/mmc/mmc_block.c38
1 files changed, 20 insertions, 18 deletions
diff --git a/drivers/mmc/mmc_block.c b/drivers/mmc/mmc_block.c
index 8d18b87bfd34..db0e8ad439a5 100644
--- a/drivers/mmc/mmc_block.c
+++ b/drivers/mmc/mmc_block.c
@@ -231,27 +231,29 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req)
231 goto cmd_err; 231 goto cmd_err;
232 } 232 }
233 233
234 do { 234 if (rq_data_dir(req) != READ) {
235 int err; 235 do {
236 236 int err;
237 cmd.opcode = MMC_SEND_STATUS; 237
238 cmd.arg = card->rca << 16; 238 cmd.opcode = MMC_SEND_STATUS;
239 cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; 239 cmd.arg = card->rca << 16;
240 err = mmc_wait_for_cmd(card->host, &cmd, 5); 240 cmd.flags = MMC_RSP_R1 | MMC_CMD_AC;
241 if (err) { 241 err = mmc_wait_for_cmd(card->host, &cmd, 5);
242 printk(KERN_ERR "%s: error %d requesting status\n", 242 if (err) {
243 req->rq_disk->disk_name, err); 243 printk(KERN_ERR "%s: error %d requesting status\n",
244 goto cmd_err; 244 req->rq_disk->disk_name, err);
245 } 245 goto cmd_err;
246 } while (!(cmd.resp[0] & R1_READY_FOR_DATA)); 246 }
247 } while (!(cmd.resp[0] & R1_READY_FOR_DATA));
247 248
248#if 0 249#if 0
249 if (cmd.resp[0] & ~0x00000900) 250 if (cmd.resp[0] & ~0x00000900)
250 printk(KERN_ERR "%s: status = %08x\n", 251 printk(KERN_ERR "%s: status = %08x\n",
251 req->rq_disk->disk_name, cmd.resp[0]); 252 req->rq_disk->disk_name, cmd.resp[0]);
252 if (mmc_decode_status(cmd.resp)) 253 if (mmc_decode_status(cmd.resp))
253 goto cmd_err; 254 goto cmd_err;
254#endif 255#endif
256 }
255 257
256 /* 258 /*
257 * A block was successfully transferred. 259 * A block was successfully transferred.