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

Fabio Estevam festevam at gmail.com
Wed Aug 18 14:09:01 PDT 2021

Hi Peter,

On Wed, Aug 18, 2021 at 2:35 PM Peter Oh <peter.oh at eero.com> wrote:
> >> 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

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


More information about the ath10k mailing list