diff options
Diffstat (limited to 'arch/sparc/kernel/ioport.c')
-rw-r--r-- | arch/sparc/kernel/ioport.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c index 2344103414d1..6ffaec44931a 100644 --- a/arch/sparc/kernel/ioport.c +++ b/arch/sparc/kernel/ioport.c | |||
@@ -527,7 +527,7 @@ static dma_addr_t pci32_map_page(struct device *dev, struct page *page, | |||
527 | static void pci32_unmap_page(struct device *dev, dma_addr_t ba, size_t size, | 527 | static void pci32_unmap_page(struct device *dev, dma_addr_t ba, size_t size, |
528 | enum dma_data_direction dir, unsigned long attrs) | 528 | enum dma_data_direction dir, unsigned long attrs) |
529 | { | 529 | { |
530 | if (dir != PCI_DMA_TODEVICE) | 530 | if (dir != PCI_DMA_TODEVICE && !(attrs & DMA_ATTR_SKIP_CPU_SYNC)) |
531 | dma_make_coherent(ba, PAGE_ALIGN(size)); | 531 | dma_make_coherent(ba, PAGE_ALIGN(size)); |
532 | } | 532 | } |
533 | 533 | ||
@@ -572,7 +572,7 @@ static void pci32_unmap_sg(struct device *dev, struct scatterlist *sgl, | |||
572 | struct scatterlist *sg; | 572 | struct scatterlist *sg; |
573 | int n; | 573 | int n; |
574 | 574 | ||
575 | if (dir != PCI_DMA_TODEVICE) { | 575 | if (dir != PCI_DMA_TODEVICE && !(attrs & DMA_ATTR_SKIP_CPU_SYNC)) { |
576 | for_each_sg(sgl, sg, nents, n) { | 576 | for_each_sg(sgl, sg, nents, n) { |
577 | dma_make_coherent(sg_phys(sg), PAGE_ALIGN(sg->length)); | 577 | dma_make_coherent(sg_phys(sg), PAGE_ALIGN(sg->length)); |
578 | } | 578 | } |