lkml.org 
[lkml]   [2011]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[PATCH 1/2] x86 swiotlb: Verify we can perform the remapping requested.

Recently I had a driver try with a peculiar 2G dma memory limit.
It failed in weird and strange ways because my bounce buffers were
being allocated above 2G where the driver could not reach, and
no error was reported when the mappings were setup.

Use the swiotlb_dma_supported to avoid silent problems like this
in the future.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
arch/x86/kernel/pci-swiotlb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/pci-swiotlb.c b/arch/x86/kernel/pci-swiotlb.c
index 8f972cb..6a802fa 100644
--- a/arch/x86/kernel/pci-swiotlb.c
+++ b/arch/x86/kernel/pci-swiotlb.c
@@ -38,7 +38,7 @@ static struct dma_map_ops swiotlb_dma_ops = {
.unmap_sg = swiotlb_unmap_sg_attrs,
.map_page = swiotlb_map_page,
.unmap_page = swiotlb_unmap_page,
- .dma_supported = NULL,
+ .dma_supported = swiotlb_dma_supported,
};

/*
--
1.7.2.5


\
 
 \ /
  Last update: 2011-10-19 23:39    [W:0.075 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site