We have a board with PCI device driver that calls for pci_dma_sync_single_for_device.<br>This driver used to work for Linux kernel 2.6.25.<br><br>We ported to the driver to Linux kernel 2.6.32. The PCI device driver doesn't work anymore.<br>
The following call trace shows why the PCI driver won't work in kernel 2.6.32. <br>1. In pci_include/asm-generic/pci-dma-compat.h<br>    pci_dma_sync_single_for_device calls for dma_sync_single_for_cpu<br>2. In include/asm-generic/dma-mapping-common.h<br>
    dma_sync_single_for_cpu calls for ops->sync_single_for_cpu<br>3. In arch/powerpc/kernel/dma.c<br>struct dma_map_ops dma_direct_ops = {<br>        .alloc_coherent = dma_direct_alloc_coherent,<br>        .free_coherent  = dma_direct_free_coherent,<br>
        .map_sg         = dma_direct_map_sg,<br>        .unmap_sg       = dma_direct_unmap_sg,<br>        .dma_supported  = dma_direct_dma_supported,<br>        .map_page       = dma_direct_map_page,<br>        .unmap_page     = dma_direct_unmap_page,<br>
#ifdef CONFIG_NOT_COHERENT_CACHE<br>        .sync_single_range_for_cpu      = dma_direct_sync_single_range,<br>        .sync_single_range_for_device   = dma_direct_sync_single_range,<br>        .sync_sg_for_cpu                = dma_direct_sync_sg,<br>
        .sync_sg_for_device             = dma_direct_sync_sg,<br>#endif<br>};<br>There is no ops defined for sync_single_for_cpu.<br>The pci_dma_sync_single_for_device is a no-op.<br><br>However Linux kernel 2.6.35.1 from <a href="http://kernel.org">kernel.org</a> has the  .sync_single_for_cpu for dma_direct_ops.<br>
in arch/powerpc/kernel/dma.c<br>#ifdef CONFIG_NOT_COHERENT_CACHE<br>        .sync_single_for_cpu            = dma_direct_sync_single,<br>        .sync_single_for_device         = dma_direct_sync_single,<br>        .sync_sg_for_cpu                = dma_direct_sync_sg,<br>
        .sync_sg_for_device             = dma_direct_sync_sg,<br>#endif<br><br><br>We won't move to Linux kernel 2.6.35 anytime soon.<br>My questions:<br>1. Is there any side effect for adding .sync_single_for_cpu to dma_direct_ops in 2.6.32?<br>
2. What will be the future development here?<br><br><br>Best regards & Thanks,<br>Fushen<br><br><br><br><br>