Skip to content
Commit 86f24c10 authored by Quanyang Wang's avatar Quanyang Wang Committed by Liwei Song
Browse files

axxia: don't set dev->dma_ops for dma-coherent device

commit 91226334 from
https://github.com/axxia/linux-yocto.git v5.10/standard/axxia-dev/base.

Axm55xx which supports LPAE has a physical memory range that is larger
than 4G. And the USB controller only supports 32-bit DMA mask. This
means if block subsystem passes an address beyond 4G to USB for a DMA
operation, it will result failure unless calling swiotlb to provide the
bounce buffering functionality.

Since from the commit ad3c7b18

 ("arm: use swiotlb for bounce buffering
on LPAE configs"), arm can use swiotlb to handle the case above. In arm's
arch_setup_dma_ops, a NULL pointer will be assigned to dev->dma_ops when
CONFIG_LPAE is enabled and all DMA operations will call dma_direct_map_page
which will call swiotlb_map by checking the return value of dma_capable().

But in axxia code, axxia_bus_notifier set dma-coherent device's dma_ops to
be the function arm_coherent_dma_ops forcely and this will result swiotlb
to be ineffective. Remove axxia_buf_notifier and let swiotlb take over
control.

Signed-off-by: default avatarQuanyang Wang <quanyang.wang@windriver.com>
Signed-off-by: default avatarBruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: default avatarLiwei Song <liwei.song@windriver.com>
parent 083ab265
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