Commit 5b876618 authored by Roland Vossen's avatar Roland Vossen Committed by Greg Kroah-Hartman

staging: brcm80211: added clarification on softmac dma alignment

Descriptor ring can only start at 8KB alignment, this requirement
is dictated by DMA hardware.
Reported-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarRoland Vossen <rvossen@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 7d9e0b9a
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
#include "dma.h" #include "dma.h"
/* /*
* Each descriptor ring must be 8kB aligned, and fit within a * DMA hardware requires each descriptor ring to be 8kB aligned, and fit within
* contiguous 8kB physical address. * a contiguous 8kB physical address.
*/ */
#define D64RINGALIGN_BITS 13 #define D64RINGALIGN_BITS 13
#define D64MAXRINGSZ (1 << D64RINGALIGN_BITS) #define D64MAXRINGSZ (1 << D64RINGALIGN_BITS)
...@@ -440,6 +440,10 @@ static bool _dma_descriptor_align(struct dma_info *di) ...@@ -440,6 +440,10 @@ static bool _dma_descriptor_align(struct dma_info *di)
return true; return true;
} }
/*
* Descriptor table must start at the DMA hardware dictated alignment, so
* allocated memory must be large enough to support this requirement.
*/
static void *dma_alloc_consistent(struct pci_dev *pdev, uint size, static void *dma_alloc_consistent(struct pci_dev *pdev, uint size,
u16 align_bits, uint *alloced, u16 align_bits, uint *alloced,
dma_addr_t *pap) dma_addr_t *pap)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment