OSDN Git Service

mmc: sdhci: avoid sync'ing the SG if there's no misalignment
authorRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 25 Apr 2014 11:58:29 +0000 (12:58 +0100)
committerChris Ball <chris@printf.net>
Thu, 22 May 2014 11:26:29 +0000 (07:26 -0400)
commitde0b65a786ae83c8f6dfb712f65b9a36af70a981
tree5e806a20e51bafdb7a42e209239b98ab0620ceb6
parent0718e59ae259f7c48155b4e852d8b0632d59028e
mmc: sdhci: avoid sync'ing the SG if there's no misalignment

On read, we don't need to sync the whole scatterlist and then check
whether any segments need copying - if we check first, we avoid
potentially expensive cache handling.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-by: Markus Pargmann <mpa@pengutronix.de>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <chris@printf.net>
drivers/mmc/host/sdhci.c