From: 黄涛 Date: Thu, 30 Dec 2010 12:14:16 +0000 (+0800) Subject: rk29_sdmmc: fix hotplug problem X-Git-Tag: firefly_0821_release~10855 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6024eea9a7748f871926d8c4dafeb42080bde5a9;p=firefly-linux-kernel-4.4.55.git rk29_sdmmc: fix hotplug problem --- diff --git a/drivers/mmc/host/rk29_sdmmc.c b/drivers/mmc/host/rk29_sdmmc.c index 627a15d0668f..6f4c3bf083c1 100755 --- a/drivers/mmc/host/rk29_sdmmc.c +++ b/drivers/mmc/host/rk29_sdmmc.c @@ -46,7 +46,7 @@ #define RK29_SDMMC_ERROR_FLAGS (RK29_SDMMC_DATA_ERROR_FLAGS | RK29_SDMMC_CMD_ERROR_FLAGS | SDMMC_INT_HLE) #define RK29_SDMMC_SEND_STATUS 1 #define RK29_SDMMC_RECV_STATUS 2 -#define RK29_SDMMC_DMA_THRESHOLD 16 +#define RK29_SDMMC_DMA_THRESHOLD 512 enum { EVENT_CMD_COMPLETE = 0, @@ -455,10 +455,9 @@ static int rk29_sdmmc_submit_data_dma(struct rk29_sdmmc *host, struct mmc_data * * non-word-aligned buffers or lengths. Also, we don't bother * with all the DMA setup overhead for short transfers. */ -#if 0 if (data->blocks * data->blksz < RK29_SDMMC_DMA_THRESHOLD) return -EINVAL; -#endif + if (data->blksz & 3) return -EINVAL; for_each_sg(data->sg, sg, data->sg_len, i) {