Subhash Jadavani d380443cd0 mmc: block: fix the data timeout issue with ACMD22
If multi block write operation fails for SD card, during
error handling we send the SD_APP_SEND_NUM_WR_BLKS (ACMD22)
to know how many blocks were already programmed by card.

But mmc_sd_num_wr_blocks() function which sends the ACMD22
calculates the data timeout value from csd.tacc_ns and
csd.tacc_clks parameters which will be 0 for block addressed
(>2GB cards) SD card. This would result in timeout_ns and
timeout_clks being 0 in the mmc_request passed to host driver.
This means host controller would program its data timeout timer
value with 0 which could result in DATA TIMEOUT errors from
controller.

To fix this issue, mmc_sd_num_wr_blocks() should instead
just call the mmc_set_data_timeout() to calculate the
data timeout value. mmc_set_data_timeout() function
ensures that non zero timeout value is set even for
block addressed SD cards.

Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Reviewed-by: Venkatraman S <svenkatr@ti.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-06-26 16:10:29 -04:00
..
2012-05-26 12:22:27 -07:00
2012-06-20 14:39:36 -07:00
2012-05-24 16:22:53 -04:00
2012-05-31 08:46:50 +02:00
2012-06-20 14:39:36 -07:00
2012-05-08 12:35:06 +02:00
2012-05-26 12:42:29 -07:00
2012-05-23 14:07:06 -07:00
2012-05-22 16:02:13 -07:00
2012-06-21 13:40:40 -07:00
2012-06-06 09:49:28 -07:00
2012-06-20 14:39:36 -07:00
2012-06-24 11:03:52 -07:00
2012-05-22 16:02:13 -07:00
2012-05-07 09:56:39 +08:00
2012-06-15 17:39:32 -07:00
2012-05-16 12:46:37 -04:00
2012-06-20 15:13:13 -07:00
2012-06-16 16:59:05 -07:00
2012-05-26 12:42:29 -07:00
2012-06-20 14:39:36 -07:00
2012-06-15 17:17:15 -07:00
2012-05-22 16:34:21 -07:00
2012-05-26 12:22:27 -07:00