[07/89] intel-iommu: Use coherent DMA mask when requested

From: Greg KH
Date: Thu Jun 16 2011 - 03:42:08 EST

2.6.39-stable review patch. If anyone has any objections, please let us know.


From: Mike Travis <travis@xxxxxxx>

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

Signed-off-by: Mike Travis <travis@xxxxxxx>
Acked-by: Chris Wright <chrisw@xxxxxxxxxxxx>
Reviewed-by: Mike Habeck <habeck@xxxxxxx>
Signed-off-by: David Woodhouse <David.Woodhouse@xxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

drivers/pci/intel-iommu.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -2606,8 +2606,7 @@ static dma_addr_t __intel_map_single(str
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;

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/