ia64/xen-unstable

changeset 5791:35b74976f598

Relax the bounce-buffer copying constraints in dma_sync_single_for_*
functions. This fixes certain drivers (e.g., ivtv).
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Fri Jul 15 12:52:02 2005 +0000 (2005-07-15)
parents ebfde26a769a
children a83ac0806d6b
files linux-2.6-xen-sparse/arch/xen/i386/kernel/pci-dma.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/pci-dma.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/pci-dma.c	Fri Jul 15 09:24:29 2005 +0000
     1.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/pci-dma.c	Fri Jul 15 12:52:02 2005 +0000
     1.3 @@ -248,7 +248,7 @@ dma_sync_single_for_cpu(struct device *d
     1.4  		if (&ent->list != &dma_map_head) {
     1.5  			off = dma_handle - ent->dma;
     1.6  			BUG_ON((off + size) > ent->size);
     1.7 -			if (direction != DMA_TO_DEVICE)
     1.8 +			/*if (direction != DMA_TO_DEVICE)*/
     1.9  				memcpy(ent->host+off, ent->bounce+off, size);
    1.10  		}
    1.11  	}
    1.12 @@ -272,7 +272,7 @@ dma_sync_single_for_device(struct device
    1.13  		if (&ent->list != &dma_map_head) {
    1.14  			off = dma_handle - ent->dma;
    1.15  			BUG_ON((off + size) > ent->size);
    1.16 -			if (direction != DMA_FROM_DEVICE)
    1.17 +			/*if (direction != DMA_FROM_DEVICE)*/
    1.18  				memcpy(ent->bounce+off, ent->host+off, size);
    1.19  		}
    1.20  	}
     2.1 --- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/pci-dma.c	Fri Jul 15 09:24:29 2005 +0000
     2.2 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/pci-dma.c	Fri Jul 15 12:52:02 2005 +0000
     2.3 @@ -302,7 +302,7 @@ dma_sync_single_for_cpu(struct device *d
     2.4  		if (&ent->list != &dma_map_head) {
     2.5  			off = dma_handle - ent->dma;
     2.6  			BUG_ON((off + size) > ent->size);
     2.7 -			if (direction != DMA_TO_DEVICE)
     2.8 +			/*if (direction != DMA_TO_DEVICE)*/
     2.9  				memcpy(ent->host+off, ent->bounce+off, size);
    2.10  		}
    2.11  	}
    2.12 @@ -326,7 +326,7 @@ dma_sync_single_for_device(struct device
    2.13  		if (&ent->list != &dma_map_head) {
    2.14  			off = dma_handle - ent->dma;
    2.15  			BUG_ON((off + size) > ent->size);
    2.16 -			if (direction != DMA_FROM_DEVICE)
    2.17 +			/*if (direction != DMA_FROM_DEVICE)*/
    2.18  				memcpy(ent->bounce+off, ent->host+off, size);
    2.19  		}
    2.20  	}