1 From 6e84ab604bdedaa16239bd1c6e5fcb5660309f02 Mon Sep 17 00:00:00 2001
2 From: Heiner Kallweit <hkallweit1@gmail.com>
3 Date: Wed, 5 Apr 2017 20:33:26 +0200
4 Subject: [PATCH] brcmfmac: properly align buffers on certain platforms with 64
7 Systems with 64 bit DMA at least partially require buffers to be used
8 for DMA to be 8-byte-aligned. One example is Amlogic Meson GX.
9 Switching the MMC/SDIO driver for this platform to SG DMA mode
10 resulted in problems due to unaligned buffers.
12 Fortunately the brcmfmac driver has a global define for the alignment.
13 Changing it to 8 fixed the issues with Meson GX.
15 Suggested-by: Helmut Klein <hgkr.klein@gmail.com>
16 Tested-by: Helmut Klein <hgkr.klein@gmail.com>
17 Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
18 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
20 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 4 ++++
21 1 file changed, 4 insertions(+)
23 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
24 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
25 @@ -539,7 +539,11 @@ static int qcount[NUMPRIO];
26 /* Limit on rounding up frames */
27 static const uint max_roundup = 512;
29 +#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
35 enum brcmf_sdio_frmtype {