]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: atmel-mci: fix bad logic of sg_copy_{from,to}_buffer conversion
authorLudovic Desroches <ludovic.desroches@microchip.com>
Mon, 20 Aug 2018 08:54:44 +0000 (10:54 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 21 Aug 2018 14:06:17 +0000 (16:06 +0200)
commit109dd7408a05acc1d6533bb30bd564a95c6d21d2
tree11211d8374fb9cac4d58394dbe2d2ea6edd3715a
parent8a24936bfff419c2c61bd3f79d69e6ac1ecb62ee
mmc: atmel-mci: fix bad logic of sg_copy_{from,to}_buffer conversion

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(buf + offset, &value, remaining) where buf is
the virtual address of the SG. Same for sg_copy_to_buffer but in the
opposite way.

Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Suggested-by: Douglas Gilbert <dgilbert@interlog.com>
Fixes: eac9cb9a7c35 ("mmc: atmel-mci: use sg_copy_{from,to}_buffer")
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/atmel-mci.c