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:Quanyang Wang <quanyang.wang@windriver.com> Signed-off-by:
Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by:
Liwei Song <liwei.song@windriver.com>
parent
083ab265
Please register or sign in to comment