mmc: host: rk_sdmmc: add data-over-int timeout for data_busy

If devices fall in bad state make data_busy be hold too long,
dto interrupt will not be present, which leading  mmc-core wait for it forever.

 [<c06d42e4>] (__schedule+0x48c/0x554) from [<c06d275c>] (schedule_timeout+0x1c/0x260)
 [<c06d275c>] (schedule_timeout+0x1c/0x260) from [<c06d3c10>] (wait_for_common+0xd0/0x164)
 [<c06d3c10>] (wait_for_common+0xd0/0x164) from [<c044a4bc>] (mmc_wait_for_req_done+0x1c/0xe0)
 [<c044a4bc>] (mmc_wait_for_req_done+0x1c/0xe0) from [<c0453730>] (mmc_io_rw_extended+0x218/0x294)
 [<c0453730>] (mmc_io_rw_extended+0x218/0x294) from [<c0454590>] (sdio_io_rw_ext_helper+0xc8/0x194)
 [<c0454590>] (sdio_io_rw_ext_helper+0xc8/0x194) from [<c04546b0>] (sdio_memcpy_toio+0x1c/0x20)
 [<c04546b0>] (sdio_memcpy_toio+0x1c/0x20) from [<c032e96c>] (sdioh_request_packet+0x664/0x7e8)
 [<c032e96c>] (sdioh_request_packet+0x664/0x7e8) from [<c032fc78>] (sdioh_request_buffer+0x1a8/0x210)
This commit is contained in:
lintao
2014-06-24 17:20:42 +08:00
parent 42573d84b2
commit fbfdff1f46
2 changed files with 117 additions and 28 deletions

View File

@@ -16,6 +16,7 @@
#include <linux/scatterlist.h>
#include <linux/mmc/core.h>
#include <linux/timer.h>
#define MAX_MCI_SLOTS 2
@@ -177,6 +178,7 @@ struct dw_mci {
struct mmc_command *pre_cmd;
unsigned int hold_reg_flag;//to fix the hold_reg value
struct timer_list dto_timer; //the timer for INT_DTO
/* FIFO push and pull */
int fifo_depth;
int data_shift;