Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c59a3da1342ff456e5123361739bc331446cda21
Commit:     c59a3da1342ff456e5123361739bc331446cda21
Parent:     d1998ef38a13c4e74c69df55ccd38b0440c429b2
Author:     Roland Dreier <[EMAIL PROTECTED]>
AuthorDate: Fri Dec 15 13:57:26 2006 -0800
Committer:  Roland Dreier <[EMAIL PROTECTED]>
CommitDate: Fri Dec 15 13:57:26 2006 -0800

    IB: Fix ib_dma_alloc_coherent() wrapper
    
    The ib_dma_alloc_coherent() wrapper uses a u64* for the dma_handle
    parameter, unlike dma_alloc_coherent, which uses dma_addr_t*.  This
    means that we need a temporary variable to handle the case when
    ib_dma_alloc_coherent() just falls through directly to
    dma_alloc_coherent() on architectures where sizeof u64 != sizeof
    dma_addr_t.
    
    Signed-off-by: Roland Dreier <[EMAIL PROTECTED]>
---
 include/rdma/ib_verbs.h |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 3c2e105..0bfa332 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -1639,7 +1639,14 @@ static inline void *ib_dma_alloc_coherent(struct 
ib_device *dev,
 {
        if (dev->dma_ops)
                return dev->dma_ops->alloc_coherent(dev, size, dma_handle, 
flag);
-       return dma_alloc_coherent(dev->dma_device, size, dma_handle, flag);
+       else {
+               dma_addr_t handle;
+               void *ret;
+
+               ret = dma_alloc_coherent(dev->dma_device, size, &handle, flag);
+               *dma_handle = handle;
+               return ret;
+       }
 }
 
 /**
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to