]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: alcor: fix DMA reads
authorDaniel Drake <drake@endlessm.com>
Wed, 20 Mar 2019 06:36:53 +0000 (14:36 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Thu, 21 Mar 2019 10:19:06 +0000 (11:19 +0100)
commitaebb45c418fa75d9d549bc63f2c3204eef8d33e4
tree027b2aff667b33417d9c63ba0bf38923b2f0ce2e
parentb0a9bcbc2f103f689819eae81b888395a19fd1ca
mmc: alcor: fix DMA reads

Setting max_blk_count to 1 here was causing the mmc block layer
to always use the MMC_READ_SINGLE_BLOCK command here, which the
driver does not DMA-accelerate.

Drop the max_blk_ settings here. The mmc host defaults suffice,
along with the max_segs and max_seg_size settings, which I have
now documented in more detail.

Now each MMC command reads 4 512-byte blocks, using DMA instead of
PIO. On my SD card, this increases read performance (measured with dd)
from 167kb/sec to 4.6mb/sec.

Link: http://lkml.kernel.org/r/CAD8Lp47L5T3jnAjBiPs1cQ+yFA3L6LJtgFvMETnBrY63-Zdi2g@mail.gmail.com
Signed-off-by: Daniel Drake <drake@endlessm.com>
Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
Fixes: cd9bdde2e666 ("mmc: add new Alcor Micro Cardreader SD/MMC driver")
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/alcor.c