Commit 2ed6d22c authored by Russell King's avatar Russell King Committed by Russell King
Browse files

[MMC] Don't check READY_FOR_DATA when reading



There's no point checking to see if the card is ready to accept
data when we're reading from it - sending the command only wastes
precious bus bandwidth.
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 42431acb
...@@ -231,27 +231,29 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) ...@@ -231,27 +231,29 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req)
goto cmd_err; goto cmd_err;
} }
do { if (rq_data_dir(req) != READ) {
int err; do {
int err;
cmd.opcode = MMC_SEND_STATUS;
cmd.arg = card->rca << 16; cmd.opcode = MMC_SEND_STATUS;
cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; cmd.arg = card->rca << 16;
err = mmc_wait_for_cmd(card->host, &cmd, 5); cmd.flags = MMC_RSP_R1 | MMC_CMD_AC;
if (err) { err = mmc_wait_for_cmd(card->host, &cmd, 5);
printk(KERN_ERR "%s: error %d requesting status\n", if (err) {
req->rq_disk->disk_name, err); printk(KERN_ERR "%s: error %d requesting status\n",
goto cmd_err; req->rq_disk->disk_name, err);
} goto cmd_err;
} while (!(cmd.resp[0] & R1_READY_FOR_DATA)); }
} while (!(cmd.resp[0] & R1_READY_FOR_DATA));
#if 0 #if 0
if (cmd.resp[0] & ~0x00000900) if (cmd.resp[0] & ~0x00000900)
printk(KERN_ERR "%s: status = %08x\n", printk(KERN_ERR "%s: status = %08x\n",
req->rq_disk->disk_name, cmd.resp[0]); req->rq_disk->disk_name, cmd.resp[0]);
if (mmc_decode_status(cmd.resp)) if (mmc_decode_status(cmd.resp))
goto cmd_err; goto cmd_err;
#endif #endif
}
/* /*
* A block was successfully transferred. * A block was successfully transferred.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment