mmc: rk_sdmmc: fix SW-IOMMU memory leak
authorShawn Lin <shawn.lin@rock-chips.com>
Wed, 12 Aug 2015 08:25:27 +0000 (16:25 +0800)
committerShawn Lin <shawn.lin@rock-chips.com>
Thu, 20 Aug 2015 08:05:06 +0000 (16:05 +0800)
commita433ed2a53830824fbb34ef70bbca8994e0e7d11
treeb221765aad27aff98a9f38645a0bcc16921aca8c
parent6dbf90de24e659fc31d874c7f88f83416d286db9
mmc: rk_sdmmc: fix SW-IOMMU memory leak

We could quickly reproduce this bug by decrease IO_TLB_DEFAULT_SIZE
and manually disable mmc DTO interrupt which can make driver fall into
post_tmo all the time.

So, some of these dump for swiotlb we can get here due to no enough
IO_TLB can be used to map page for kernel space:

DMA: Out of SW-IOMMU space for 128 bytes at device ff0f0000.rksdmmc
DMA: Out of SW-IOMMU space for 128 bytes at device ff0f0000.rksdmmc
...
DMA: Out of SW-IOMMU space for 128 bytes at device ff0f0000.rksdmmc
DMA: Out of SW-IOMMU space for 128 bytes at device ff0f0000.rksdmmc

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Reported-and-tested-by: Jianhong Chen <chenjh@rock-chips.com>
Cc: Yao Xiao <xy@rock-chips.com>
drivers/mmc/host/rk_sdmmc.c