]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
mmc: core: align max segment size with logical block size
authorMing Lei <ming.lei@redhat.com>
Wed, 27 Feb 2019 16:02:11 +0000 (00:02 +0800)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Fri, 17 Jan 2020 17:21:57 +0000 (14:21 -0300)
commit981ef8d17b8d4d6c0420d8f0c8545a3a5b129a7f
tree5abe77feb12151f4f3d5cbcda67feded6cbeff1f
parent32cdda56a86ae10c0daf4061e2370e5dd2b1cc99
mmc: core: align max segment size with logical block size

BugLink: https://bugs.launchpad.net/bugs/1855787
[ Upstream commit c53336c8f5f29043fded57912cc06c24e12613d7 ]

Logical block size is the lowest possible block size that the storage
device can address. Max segment size is often related with controller's
DMA capability. And it is reasonable to align max segment size with
logical block size.

SDHCI sets un-aligned max segment size, and causes ADMA error, so
fix it by aligning max segment size with logical block size.

Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Naresh Kamboju <naresh.kamboju@linaro.org>
Cc: Faiz Abbas <faiz_abbas@ti.com>
Cc: linux-block@vger.kernel.org
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/mmc/core/block.c
drivers/mmc/core/queue.c