aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/mmc.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.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.c')
-rw-r--r--drivers/mmc/mmc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index da6ddd910fc5..05aa4d6b4f24 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -549,6 +549,7 @@ static void mmc_decode_csd(struct mmc_card *card)
549 csd->read_partial = UNSTUFF_BITS(resp, 79, 1); 549 csd->read_partial = UNSTUFF_BITS(resp, 79, 1);
550 csd->write_misalign = UNSTUFF_BITS(resp, 78, 1); 550 csd->write_misalign = UNSTUFF_BITS(resp, 78, 1);
551 csd->read_misalign = UNSTUFF_BITS(resp, 77, 1); 551 csd->read_misalign = UNSTUFF_BITS(resp, 77, 1);
552 csd->r2w_factor = UNSTUFF_BITS(resp, 26, 3);
552 csd->write_blkbits = UNSTUFF_BITS(resp, 22, 4); 553 csd->write_blkbits = UNSTUFF_BITS(resp, 22, 4);
553 csd->write_partial = UNSTUFF_BITS(resp, 21, 1); 554 csd->write_partial = UNSTUFF_BITS(resp, 21, 1);
554 } else { 555 } else {
@@ -583,6 +584,7 @@ static void mmc_decode_csd(struct mmc_card *card)
583 csd->read_partial = UNSTUFF_BITS(resp, 79, 1); 584 csd->read_partial = UNSTUFF_BITS(resp, 79, 1);
584 csd->write_misalign = UNSTUFF_BITS(resp, 78, 1); 585 csd->write_misalign = UNSTUFF_BITS(resp, 78, 1);
585 csd->read_misalign = UNSTUFF_BITS(resp, 77, 1); 586 csd->read_misalign = UNSTUFF_BITS(resp, 77, 1);
587 csd->r2w_factor = UNSTUFF_BITS(resp, 26, 3);
586 csd->write_blkbits = UNSTUFF_BITS(resp, 22, 4); 588 csd->write_blkbits = UNSTUFF_BITS(resp, 22, 4);
587 csd->write_partial = UNSTUFF_BITS(resp, 21, 1); 589 csd->write_partial = UNSTUFF_BITS(resp, 21, 1);
588 } 590 }