Thread (6 messages) flat view 6 messages, 4 authors, 2021-08-18

Re: [PATCH] ath10k: Do not call dma_alloc_coherent() for SDIO and USB

From: Fabio Estevam <festevam@gmail.com>
Date: 2021-08-18 21:09:17

Hi Peter,

On Wed, Aug 18, 2021 at 2:35 PM Peter Oh [off-list ref] wrote:
quoted
quoted
Fix the problem by not calling dma_alloc_coherent() when the device
is not DMA capable, such as SDIO and USB.
ath10k calls dma_alloc_coherent multiple places including
ath10k_htt_rx_alloc.

Do SDIO and USB not use such data path function at all?
Now that I look closer:  no, SDIO and USB do not reach the
dma_alloc_coherent() inside
ath10k_htt_rx_alloc.

drivers/net/wireless/ath/ath10k/usb.c and
drivers/net/wireless/ath/ath10k/sdio.c both set:
bus_params.dev_type = ATH10K_DEV_TYPE_HL;

ath10k_htt_rx_alloc() has:

if (ar->bus_param.dev_type == ATH10K_DEV_TYPE_HL)
     return 0;

So it returns early in the USB and SDIO cases and does not call
dma_alloc_coherent().

Thanks
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help