Skip to content
Commit 0738b499 authored by Carl Huang's avatar Carl Huang Committed by Kalle Valo
Browse files

ath10k: allocate small size dma memory in ath10k_pci_diag_write_mem



ath10k_pci_diag_write_mem may allocate big size of the dma memory
based on the parameter nbytes. Take firmware diag download as
example, the biggest size is about 500K. In some systems, the
allocation is likely to fail because it can't acquire such a large
contiguous dma memory.

The fix is to allocate a small size dma memory. In the loop,
driver copies the data to the allocated dma memory and writes to
the destination until all the data is written.

Tested with QCA6174 PCI with
firmware-6.bin_WLAN.RM.4.4.1-00119-QCARMSWP-1, this also affects
QCA9377 PCI.

Signed-off-by: default avatarCarl Huang <cjhuang@codeaurora.org>
Reviewed-by: default avatarBrian Norris <briannorris@chomium.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 9de4162f
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