]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: mmci: stm32: use a buffer for unaligned DMA requests
authorYann Gautier <yann.gautier@foss.st.com>
Mon, 28 Mar 2022 14:51:14 +0000 (16:51 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 26 Apr 2022 12:05:18 +0000 (14:05 +0200)
commitcb8654424fe35145d50278a9ab24b4f239262705
tree96ca797e1d0118c8325dbd3f81f39e8925386558
parent866a0bfb3bf9b7a832c634d2f78eefacc19d2920
mmc: mmci: stm32: use a buffer for unaligned DMA requests

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: Yann Gautier <yann.gautier@foss.st.com>
Link: https://lore.kernel.org/r/20220328145114.334577-1-yann.gautier@foss.st.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/mmci_stm32_sdmmc.c