aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/mmc_block.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2006-05-02 12:24:59 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-05-02 12:24:59 -0400
commit37be4e7809e0581db85387e126ae4da68c3d6286 (patch)
treea3543202fa066bc930e09b9e36d32ab74fd38967 /drivers/mmc/mmc_block.c
parent81d38428df26377c91e7e193aa4d2fdfdcda300a (diff)
[MMC] extend data timeout for writes
The CSD contains a "read2write factor" which determines the multiplier to be applied to the read timeout to obtain the write timeout. We were ignoring this parameter, resulting in the possibility for writes being timed out too early. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/mmc/mmc_block.c')
-rw-r--r--drivers/mmc/mmc_block.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mmc/mmc_block.c b/drivers/mmc/mmc_block.c
index 8eb2a2ede64b..06bd1f4cb9b1 100644
--- a/drivers/mmc/mmc_block.c
+++ b/drivers/mmc/mmc_block.c
@@ -187,6 +187,12 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req)
187 brq.cmd.opcode = MMC_WRITE_BLOCK; 187 brq.cmd.opcode = MMC_WRITE_BLOCK;
188 brq.data.flags |= MMC_DATA_WRITE; 188 brq.data.flags |= MMC_DATA_WRITE;
189 brq.data.blocks = 1; 189 brq.data.blocks = 1;
190
191 /*
192 * Scale up the timeout by the r2w factor
193 */
194 brq.data.timeout_ns <<= card->csd.r2w_factor;
195 brq.data.timeout_clks <<= card->csd.r2w_factor;
190 } 196 }
191 197
192 if (brq.data.blocks > 1) { 198 if (brq.data.blocks > 1) {