]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: meson-gx: limit segments to 1 when dram-access-quirk is needed
authorNeil Armstrong <narmstrong@baylibre.com>
Mon, 8 Jun 2020 08:44:58 +0000 (10:44 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 16 Jun 2020 10:15:06 +0000 (12:15 +0200)
commitaa3c82699a8c42128d99c49b4659dbefdeffbf0c
tree60d4008cc0fde65eb35a4d546a9c0af38a66544b
parent2e0873da09585b8a2daf9ca8c2facd15f454ec3f
mmc: meson-gx: limit segments to 1 when dram-access-quirk is needed

The actual max_segs computation leads to failure while using the broadcom
sdio brcmfmac/bcmsdh driver, since the driver tries to make usage of
scatter gather.

But with the dram-access-quirk we use a 1,5K SRAM bounce buffer, and the
max_segs current value of 3 leads to max transfers to 4,5k, which doesn't
work.

This patch sets max_segs to 1 to better describe the hardware limitation,
and fix the SDIO functionality with the brcmfmac/bcmsdh driver on Amlogic
G12A/G12B SoCs on boards like SEI510 or Khadas VIM3.

Reported-by: Art Nikpal <art@khadas.com>
Reported-by: Christian Hewitt <christianshewitt@gmail.com>
Fixes: 8d017a434cb8 ("mmc: meson-gx: add dram-access-quirk")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20200608084458.32014-1-narmstrong@baylibre.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/meson-gx-mmc.c