Skip to content
Snippets Groups Projects
Commit abda366e authored by Yann Gautier's avatar Yann Gautier Committed by Sasha Levin
Browse files

mmc: mmci: stm32: use a buffer for unaligned DMA requests


[ Upstream commit 970dc9c1 ]

In SDIO mode, the sg list for requests can be unaligned with what the
STM32 SDMMC internal DMA can support. In that case, instead of failing,
use a temporary bounce buffer to copy from/to the sg list.
This buffer is limited to 1MB. But for that we need to also limit
max_req_size to 1MB. It has not shown any throughput penalties for
SD-cards or eMMC.

Signed-off-by: default avatarYann Gautier <yann.gautier@foss.st.com>
Link: https://lore.kernel.org/r/20220328145114.334577-1-yann.gautier@foss.st.com


Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Stable-dep-of: 6b1ba3f9 ("mmc: mmci: stm32: fix DMA API overlapping mappings warning")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 7cfcd0ed
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment