OpenCloudOS-Kernel/drivers/net/wireless
Adrian Chadd 79e6882158 ath10k: go back to using dma_alloc_coherent() for firmware scratch memory
This reverts commit b057886524 ("ath10k: do not use coherent memory for
allocated device memory chunks") in 2015 which converted this allocation from
dma_map_coherent() to kzalloc() / dma_map_single().

The current problem manifests when using later model NICs with larger
(>700KiB) scratch spaces in memory.  Although the kzalloc call
succeeds, the software IOMMU TLB code (via dma_map_single()) panics
because it can't find 700KiB of linear physmem bounce buffers for DMA.
Now, this is a bit of a silly failure mode for the dma map API,
but it's what we currently have to play with.

In these cases, doing kzalloc() works fine, but the dma_map_single()
call fails.

After chatting with Linus briefly about this, it indeed should be
using dma_alloc_coherent() for doing larger device memory allocation
that requires some kind of physical address mapping.

You're not supposed to be using kzalloc and dma_map_* calls for
large memory regions, and I'm guessing not for long-held mappings
either.  Typically dma mappings should be temporary for DMA,
not long held like these.

Now, since hopefully the major annoying underlying problem has also been
addressed (ie, ath10k is no longer tears down all of these allocations
and reallocates them every time the vdevs are brought down) fragmentation
should stop being such a touchy issue.  If it is though, using
dma_alloc_coherent() use gets us access to the CMB APIs too relatively
easily and ideally we would be allocating memory early in boot for
exactly these reasons.

Signed-off-by: Adrian Chadd <adrian@FreeBSD.org>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-05-31 14:13:54 +03:00
..
admtek wireless: Set NL80211_EXT_FEATURE_CQM_RSSI_LIST in multiple drivers 2017-03-06 09:21:39 +01:00
ath ath10k: go back to using dma_alloc_coherent() for firmware scratch memory 2017-05-31 14:13:54 +03:00
atmel My last pull request has been a while, we now have: 2017-04-20 13:54:40 -04:00
broadcom brcmfmac: move scheduled scan wiphy param setting to pno module 2017-05-18 16:36:05 +03:00
cisco Annotate hardware config module parameters in drivers/net/wireless/ 2017-04-20 12:02:32 +01:00
intel mac80211: properly remove RX_ENC_FLAG_40MHZ 2017-05-08 11:11:56 +02:00
intersil Another set of patches for -next: 2017-04-28 14:41:15 -04:00
marvell mwifiex: add missing USB-descriptor endianness conversion 2017-05-19 09:03:04 +03:00
mediatek Another set of patches for -next: 2017-04-28 14:41:15 -04:00
ralink mac80211: separate encoding/bandwidth from flags 2017-04-28 10:41:45 +02:00
realtek rtlwifi: rtl8723ae: fix spelling mistake: "Coexistance" -> "Coexistence" 2017-05-18 17:15:00 +03:00
rsi wireless: Set NL80211_EXT_FEATURE_CQM_RSSI_LIST in multiple drivers 2017-03-06 09:21:39 +01:00
st mac80211: separate encoding/bandwidth from flags 2017-04-28 10:41:45 +02:00
ti wlcore: use memdup_user 2017-05-18 16:41:23 +03:00
zydas My last pull request has been a while, we now have: 2017-04-20 13:54:40 -04:00
Kconfig wireless: deprecate WDS and disable by default 2016-10-27 09:08:43 +02:00
Makefile
mac80211_hwsim.c mac80211: properly remove RX_ENC_FLAG_40MHZ 2017-05-08 11:11:56 +02:00
mac80211_hwsim.h mac80211_hwsim: fix command documentation indentation 2017-03-06 09:21:48 +01:00
ray_cs.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
ray_cs.h
rayctl.h
rndis_wlan.c Another set of patches for -next: 2017-04-28 14:41:15 -04:00
wl3501.h
wl3501_cs.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00