]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: sdio: fix alignment issue in struct sdio_func
authorHeiner Kallweit <hkallweit1@gmail.com>
Wed, 29 Mar 2017 18:54:37 +0000 (20:54 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 18 Apr 2017 17:18:07 +0000 (19:18 +0200)
commit90a40a1378a0185a33f7ac1344c7913fa78254c0
tree5548e6d502bbb2b22a9cac9c9b07da93da286fc8
parent5f0766d3a7dd914034557335b16e0f9debd5769b
mmc: sdio: fix alignment issue in struct sdio_func

Certain 64-bit systems (e.g. Amlogic Meson GX) require buffers to be
used for DMA to be 8-byte-aligned. struct sdio_func has an embedded
small DMA buffer not meeting this requirement.
When testing switching to descriptor chain mode in meson-gx driver
SDIO is broken therefore. Fix this by allocating the small DMA buffer
separately as kmalloc ensures that the returned memory area is
properly aligned for every basic data type.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Tested-by: Helmut Klein <hgkr.klein@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/sdio_bus.c
include/linux/mmc/sdio_func.h