]> 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)
commitd3d12e479f09279acee1514481f5bd7d92eca4d6
tree5548e6d502bbb2b22a9cac9c9b07da93da286fc8
parent4a46f7ef1255fece6f2525bf6b6c51a29186e498
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