OpenCloudOS-Kernel/drivers/net/wireless/ath
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
..
ar5523 wireless: Set NL80211_EXT_FEATURE_CQM_RSSI_LIST in multiple drivers 2017-03-06 09:21:39 +01:00
ath5k Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git 2017-05-19 11:47:44 +03:00
ath6kl Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git 2017-05-19 11:47:44 +03:00
ath9k Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git 2017-05-19 11:47:44 +03:00
ath10k ath10k: go back to using dma_alloc_coherent() for firmware scratch memory 2017-05-31 14:13:54 +03:00
carl9170 mac80211: separate encoding/bandwidth from flags 2017-04-28 10:41:45 +02:00
wcn36xx mac80211: clean up rate encoding bits in RX status 2017-04-28 10:41:38 +02:00
wil6210 wil6210: support devices with different PCIe bar size 2017-05-23 18:29:45 +03:00
Kconfig ath: unify Kconfig with other vendors 2015-11-18 14:28:31 +02:00
Makefile Makefile: drop -D__CHECK_ENDIAN__ from cflags 2016-12-16 00:13:43 +02:00
ath.h ath9k: add a helper to get the string representation of ath_bus_type 2016-11-15 16:55:37 +02:00
debug.c ath: Make ath_opmode_to_string understand OCB mode 2015-08-10 22:21:15 +03:00
dfs_pattern_detector.c ath: constify local structures 2016-09-14 20:01:39 +03:00
dfs_pattern_detector.h ath: use PRI value given by spec for fixed PRI 2015-09-27 15:50:30 +03:00
dfs_pri_detector.c ath: use PRI value given by spec for fixed PRI 2015-09-27 15:50:30 +03:00
dfs_pri_detector.h
hw.c
key.c
main.c ath9k: add a helper to get the string representation of ath_bus_type 2016-11-15 16:55:37 +02:00
reg.h
regd.c ath: Fix updating radar flags for coutry code India 2017-04-19 17:09:26 +03:00
regd.h ath: export alpha2 helper 2016-10-04 18:01:48 +03:00
regd_common.h
spectral_common.h
trace.c
trace.h