Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-12400 lnet: Infiniband sg_dma changes for linux 5.1
[fs/lustre-release.git]
/
lnet
/
klnds
/
o2iblnd
/
o2iblnd.h
diff --git
a/lnet/klnds/o2iblnd/o2iblnd.h
b/lnet/klnds/o2iblnd/o2iblnd.h
index
111133c
..
fd6f97c
100644
(file)
--- a/
lnet/klnds/o2iblnd/o2iblnd.h
+++ b/
lnet/klnds/o2iblnd/o2iblnd.h
@@
-1122,6
+1122,12
@@
static inline void kiblnd_dma_unmap_sg(struct ib_device *dev,
ib_dma_unmap_sg(dev, sg, nents, direction);
}
ib_dma_unmap_sg(dev, sg, nents, direction);
}
+#ifndef HAVE_IB_SG_DMA_ADDRESS
+#include <linux/scatterlist.h>
+#define ib_sg_dma_address(dev, sg) sg_dma_address((dev), (sg))
+#define ib_sg_dma_len(dev, sg) sg_dma_len((dev), (sg))
+#endif
+
static inline __u64 kiblnd_sg_dma_address(struct ib_device *dev,
struct scatterlist *sg)
{
static inline __u64 kiblnd_sg_dma_address(struct ib_device *dev,
struct scatterlist *sg)
{