Skip to content

Commit

Permalink
swiotlb-xen: call xen_dma_sync_single_for_device when appropriate
Browse files Browse the repository at this point in the history
In xen_swiotlb_sync_single we always call xen_dma_sync_single_for_cpu,
even when we should call xen_dma_sync_single_for_device. Fix that.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CC: stable@vger.kernel.org
  • Loading branch information
Stefano Stabellini authored and David Vrabel committed Dec 4, 2014
1 parent c884227 commit 9490c6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/xen/swiotlb-xen.c
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ xen_swiotlb_sync_single(struct device *hwdev, dma_addr_t dev_addr,
swiotlb_tbl_sync_single(hwdev, paddr, size, dir, target);

if (target == SYNC_FOR_DEVICE)
xen_dma_sync_single_for_cpu(hwdev, dev_addr, size, dir);
xen_dma_sync_single_for_device(hwdev, dev_addr, size, dir);

if (dir != DMA_FROM_DEVICE)
return;
Expand Down

0 comments on commit 9490c6c

Please sign in to comment.