aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/patches/330-ath10k-wmi-alloc-chunk-should-use-DMA_BIDIRECTIONAL.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2016-12-13 12:44:52 +0100
committerFelix Fietkau <nbd@nbd.name>2016-12-13 12:44:57 +0100
commit66482e179bf463d286419319b33a46ad6a507453 (patch)
tree974c73460ec365ba5d52b7d235ea4d83b12032d5 /package/kernel/mac80211/patches/330-ath10k-wmi-alloc-chunk-should-use-DMA_BIDIRECTIONAL.patch
parent57f7f91f0c2c88a4307fdf859f31946cb03c616d (diff)
downloadupstream-66482e179bf463d286419319b33a46ad6a507453.tar.gz
upstream-66482e179bf463d286419319b33a46ad6a507453.tar.bz2
upstream-66482e179bf463d286419319b33a46ad6a507453.zip
ath10k: fix DMA allocation issues
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/kernel/mac80211/patches/330-ath10k-wmi-alloc-chunk-should-use-DMA_BIDIRECTIONAL.patch')
-rw-r--r--package/kernel/mac80211/patches/330-ath10k-wmi-alloc-chunk-should-use-DMA_BIDIRECTIONAL.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/330-ath10k-wmi-alloc-chunk-should-use-DMA_BIDIRECTIONAL.patch b/package/kernel/mac80211/patches/330-ath10k-wmi-alloc-chunk-should-use-DMA_BIDIRECTIONAL.patch
new file mode 100644
index 0000000000..4ac9bcd7d4
--- /dev/null
+++ b/package/kernel/mac80211/patches/330-ath10k-wmi-alloc-chunk-should-use-DMA_BIDIRECTIONAL.patch
@@ -0,0 +1,27 @@
+From: Ben Greear <greearb@candelatech.com>
+Date: Tue, 29 Nov 2016 14:00:28 -0800
+Subject: [PATCH] ath10k: wmi-alloc-chunk should use DMA_BIDIRECTIONAL.
+
+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@blackhole.sk>
+Signed-off-by: Ben Greear <greearb@candelatech.com>
+---
+
+--- a/drivers/net/wireless/ath/ath10k/wmi.c
++++ b/drivers/net/wireless/ath/ath10k/wmi.c
+@@ -4495,7 +4495,7 @@ static int ath10k_wmi_alloc_chunk(struct
+ 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;