[ewg] [PATCH ofed-1.3] ehca: Fix dma_map_page() call for rhel-4.5 backport
Stefan Roscher
ossrosch at linux.vnet.ibm.com
Mon Nov 19 06:29:43 PST 2007
This patch fixes a wrong function call in backport file for rhel-4.5. Because rhel-4.5 is not supporting dma_map_page()
for ibmebus devices we have to call ibmebus_map_single() explicitly.
regards Stefan
Signed-off-by: Stefan Roscher <stefan.roscher at de.ibm.com>
---
backport_ehca_4_rhel45_dma_fix.patch | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff -Nurp ofa_kernel-1.3_old/kernel_patches/backport/2.6.9_U5/backport_ehca_4_rhel45_dma_fix.patch ofa_kernel-1.3_new/kernel_patches/backport/2.6.9_U5/backport_ehca_4_rhel45_dma_fix.patch
--- ofa_kernel-1.3_old/kernel_patches/backport/2.6.9_U5/backport_ehca_4_rhel45_dma_fix.patch 1970-01-01 01:00:00.000000000 +0100
+++ ofa_kernel-1.3_new/kernel_patches/backport/2.6.9_U5/backport_ehca_4_rhel45_dma_fix.patch 2007-11-19 14:29:12.000000000 +0100
@@ -0,0 +1,21 @@
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_dma.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_dma.c
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_dma.c 2007-11-19 14:15:01.000000000 +0100
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_dma.c 2007-11-19 14:20:09.000000000 +0100
+@@ -131,14 +131,15 @@ static u64 ehca_dma_map_page(struct ib_d
+ size_t size,
+ enum dma_data_direction direction)
+ {
+- return dma_map_page(dev->dma_device, page, offset, size, direction);
++ return ibmebus_map_single(dev, (page_address(page) + offset),
++ size, direction);
+ }
+
+ static void ehca_dma_unmap_page(struct ib_device *dev,
+ u64 addr, size_t size,
+ enum dma_data_direction direction)
+ {
+- dma_unmap_page(dev->dma_device, addr, size, direction);
++ ibmebus_unmap_single(dev, addr, size, direction);
+ }
+
+ int ehca_map_sg(struct ib_device *dev, struct scatterlist *sg, int nents,
More information about the ewg
mailing list