]> www.infradead.org Git - users/dwmw2/linux.git/commit
mmc: android-goldfish: fix bad logic of sg_copy_{from,to}_buffer conversion
authorLudovic Desroches <ludovic.desroches@microchip.com>
Mon, 20 Aug 2018 08:54:45 +0000 (10:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Oct 2018 23:59:22 +0000 (16:59 -0700)
commitb8f4b96768c08e9273b67e720be0d6287f1ac291
tree1af5fd7a3b66fa562b835ebc6af1a4f8820d4517
parentd02aee5cf4ea78f2343a6bdb298cba47350a05b6
mmc: android-goldfish: fix bad logic of sg_copy_{from,to}_buffer conversion

[ Upstream commit 17e96d8516e31c3cb52cb8e2ee79d1d2e6948c11 ]

The conversion to sg_copy_{from,to}_buffer has been done in the wrong
way. sg_copy_to_buffer is a copy from an SG list to a linear buffer so
it can't replace memcpy(dest, host->virt_base, data->sg->length) where
dest is the virtual address of the SG. Same for sg_copy_from_buffer
but in the opposite way.

Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Suggested-by: Douglas Gilbert <dgilbert@interlog.com>
Fixes: 53d7e098ba08 ("mmc: android-goldfish: use sg_copy_{from,to}_buffer")
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mmc/host/android-goldfish.c