ath10k: wmi-alloc-chunk should use DMA_BIDIRECTIONAL.

Kalle Valo kvalo at qca.qualcomm.com
Thu Dec 1 03:16:49 PST 2016


Ben Greear <greearb at candelatech.com> wrote:
> From: Ben Greear <greearb at candelatech.com>
> 
> These memory chunks are often used as 'swap' by the NIC,
> so it will be both reading and writing to these areas.
> 
> This seems to fix errors like this on my x86-64 machine:
> 
> kernel: DMAR: DMAR:[DMA Write] Request device [05:00.0] fault addr ff5de000
>         DMAR:[fault reason 05] PTE Write access is not set
> 
> Tested-by: Marek Behun <kabel at blackhole.sk>
> Signed-off-by: Ben Greear <greearb at candelatech.com>
> 
> diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
> index 9fcb249..c68278a 100644
> --- a/drivers/net/wireless/ath/ath10k/wmi.c
> +++ b/drivers/net/wireless/ath/ath10k/wmi.c
> @@ -4558,7 +4558,7 @@ static int ath10k_wmi_alloc_chunk(struct ath10k *ar, u32 req_id,
>  	if (!num_units)
>  		return -ENOMEM;
>  
> -	paddr = dma_map_single(ar->dev, vaddr, pool_size, DMA_TO_DEVICE);
> +	paddr = dma_map_single(ar->dev, vaddr, pool_size, DMA_BIDIRECTIONAL);
>  	if (dma_mapping_error(ar->dev, paddr)) {
>  		kfree(vaddr);
>  		return -ENOMEM;

Patch applied to ath-next branch of ath.git, thanks.

43ca92d380a8 ath10k: wmi-alloc-chunk should use DMA_BIDIRECTIONAL

-- 
https://patchwork.kernel.org/patch/9453173/

Documentation about submitting wireless patches and checking status
from patchwork:

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches




More information about the ath10k mailing list