From: Mike Travis Date: Sat, 28 May 2011 18:15:05 +0000 (-0500) Subject: intel-iommu: Use coherent DMA mask when requested X-Git-Tag: v2.6.39.2~83 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80ebe0ace73cb376f66bdeeb92f4e7b5d4a3f8fb;p=thirdparty%2Fkernel%2Fstable.git intel-iommu: Use coherent DMA mask when requested commit c681d0ba1252954208220ad32248a3e8e2fc98e4 upstream. The __intel_map_single function is not honoring the passed in DMA mask. This results in not using the coherent DMA mask when called from intel_alloc_coherent(). Signed-off-by: Mike Travis Acked-by: Chris Wright Reviewed-by: Mike Habeck Signed-off-by: David Woodhouse Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index fc30b0f9ce654..006a169d28d3c 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c @@ -2606,8 +2606,7 @@ static dma_addr_t __intel_map_single(struct device *hwdev, phys_addr_t paddr, iommu = domain_get_iommu(domain); size = aligned_nrpages(paddr, size); - iova = intel_alloc_iova(hwdev, domain, dma_to_mm_pfn(size), - pdev->dma_mask); + iova = intel_alloc_iova(hwdev, domain, dma_to_mm_pfn(size), dma_mask); if (!iova) goto error;