diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-09 19:30:03 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-09 19:30:03 -0400 |
| commit | 1fde76f173e4d9aa205432c2ed5eff978d00deee (patch) | |
| tree | ae8c0400944bffd7cc1ce9a883784f9482f7a680 /include | |
| parent | b66484cd74706fa8681d051840fe4b18a3da40ff (diff) | |
| parent | e404f945a6101a6f0f2a29aade6dc32015471daa (diff) | |
Merge tag 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma
Pull more rdma updates from Doug Ledford:
"Minor updates for rxe driver"
[ Starting to do merge window pulls again - the current -git tree does
appear to have some netfilter use-after-free issues, but I've sent
off the report to the proper channels, and I don't want to delay merge
window activity any more ]
* tag 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma:
IB/rxe: improved debug prints & code cleanup
rdma_rxe: Ensure rdma_rxe init occurs at correct time
IB/rxe: Properly honor max IRD value for rd/atomic.
IB/{rxe,core,rdmavt}: Fix kernel crash for reg MR
IB/rxe: Fix sending out loopback packet on netdev interface.
IB/rxe: Avoid scheduling tasklet for userspace QP
Diffstat (limited to 'include')
| -rw-r--r-- | include/rdma/ib_verbs.h | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index e1f96737c2a1..9e935655fccb 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h | |||
| @@ -1739,6 +1739,14 @@ struct ib_dma_mapping_ops { | |||
| 1739 | void (*unmap_sg)(struct ib_device *dev, | 1739 | void (*unmap_sg)(struct ib_device *dev, |
| 1740 | struct scatterlist *sg, int nents, | 1740 | struct scatterlist *sg, int nents, |
| 1741 | enum dma_data_direction direction); | 1741 | enum dma_data_direction direction); |
| 1742 | int (*map_sg_attrs)(struct ib_device *dev, | ||
| 1743 | struct scatterlist *sg, int nents, | ||
| 1744 | enum dma_data_direction direction, | ||
| 1745 | unsigned long attrs); | ||
| 1746 | void (*unmap_sg_attrs)(struct ib_device *dev, | ||
| 1747 | struct scatterlist *sg, int nents, | ||
| 1748 | enum dma_data_direction direction, | ||
| 1749 | unsigned long attrs); | ||
| 1742 | void (*sync_single_for_cpu)(struct ib_device *dev, | 1750 | void (*sync_single_for_cpu)(struct ib_device *dev, |
| 1743 | u64 dma_handle, | 1751 | u64 dma_handle, |
| 1744 | size_t size, | 1752 | size_t size, |
| @@ -3000,8 +3008,12 @@ static inline int ib_dma_map_sg_attrs(struct ib_device *dev, | |||
| 3000 | enum dma_data_direction direction, | 3008 | enum dma_data_direction direction, |
| 3001 | unsigned long dma_attrs) | 3009 | unsigned long dma_attrs) |
| 3002 | { | 3010 | { |
| 3003 | return dma_map_sg_attrs(dev->dma_device, sg, nents, direction, | 3011 | if (dev->dma_ops) |
| 3004 | dma_attrs); | 3012 | return dev->dma_ops->map_sg_attrs(dev, sg, nents, direction, |
| 3013 | dma_attrs); | ||
| 3014 | else | ||
| 3015 | return dma_map_sg_attrs(dev->dma_device, sg, nents, direction, | ||
| 3016 | dma_attrs); | ||
| 3005 | } | 3017 | } |
| 3006 | 3018 | ||
| 3007 | static inline void ib_dma_unmap_sg_attrs(struct ib_device *dev, | 3019 | static inline void ib_dma_unmap_sg_attrs(struct ib_device *dev, |
| @@ -3009,7 +3021,12 @@ static inline void ib_dma_unmap_sg_attrs(struct ib_device *dev, | |||
| 3009 | enum dma_data_direction direction, | 3021 | enum dma_data_direction direction, |
| 3010 | unsigned long dma_attrs) | 3022 | unsigned long dma_attrs) |
| 3011 | { | 3023 | { |
| 3012 | dma_unmap_sg_attrs(dev->dma_device, sg, nents, direction, dma_attrs); | 3024 | if (dev->dma_ops) |
| 3025 | return dev->dma_ops->unmap_sg_attrs(dev, sg, nents, direction, | ||
| 3026 | dma_attrs); | ||
| 3027 | else | ||
| 3028 | dma_unmap_sg_attrs(dev->dma_device, sg, nents, direction, | ||
| 3029 | dma_attrs); | ||
| 3013 | } | 3030 | } |
| 3014 | /** | 3031 | /** |
| 3015 | * ib_sg_dma_address - Return the DMA address from a scatter/gather entry | 3032 | * ib_sg_dma_address - Return the DMA address from a scatter/gather entry |
