diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-26 14:41:08 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-26 14:41:08 -0500 |
commit | 70a3a06d01ed9ca887316a881813cdefb8a20170 (patch) | |
tree | fbdb7982040ba77818e4b738d76eef8bb06fb47f /drivers/net/ethernet/mellanox/mlx4/mlx4.h | |
parent | f6c0ffa8f0b0781f4954cb06f0a81d6c10c1b434 (diff) | |
parent | ef4e359d9b9e2dc022f79840fd207796b524a893 (diff) |
Merge tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
Pull infiniband update from Roland Dreier:
"Main batch of InfiniBand/RDMA changes for 3.9:
- SRP error handling fixes from Bart Van Assche
- Implementation of memory windows for mlx4 from Shani Michaeli
- Lots of cxgb4 HW driver fixes from Vipul Pandya
- Make iSER work for virtual functions, other fixes from Or Gerlitz
- Fix for bug in qib HW driver from Mike Marciniszyn
- IPoIB fixes from me, Itai Garbi, Shlomo Pongratz, Yan Burman
- Various cleanups and warning fixes from Julia Lawall, Paul Bolle,
Wei Yongjun"
* tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (41 commits)
IB/mlx4: Advertise MW support
IB/mlx4: Support memory window binding
mlx4: Implement memory windows allocation and deallocation
mlx4_core: Enable memory windows in {INIT, QUERY}_HCA
mlx4_core: Disable memory windows for virtual functions
IPoIB: Free ipoib neigh on path record failure so path rec queries are retried
IB/srp: Fail I/O requests if the transport is offline
IB/srp: Avoid endless SCSI error handling loop
IB/srp: Avoid sending a task management function needlessly
IB/srp: Track connection state properly
IB/mlx4: Remove redundant NULL check before kfree
IB/mlx4: Fix compiler warning about uninitialized 'vlan' variable
IB/mlx4: Convert is_xxx variables in build_mlx_header() to bool
IB/iser: Enable iser when FMRs are not supported
IB/iser: Avoid error prints on EAGAIN registration failures
IB/iser: Use proper define for the commands per LUN value advertised to SCSI ML
IB/uverbs: Implement memory windows support in uverbs
IB/core: Add "type 2" memory windows support
mlx4_core: Propagate MR deregistration failures to caller
mlx4_core: Rename MPT-related functions to have mpt_ prefix
...
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/mlx4.h')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/mlx4.h | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4.h b/drivers/net/ethernet/mellanox/mlx4/mlx4.h index ed4a6959e828..cf883345af88 100644 --- a/drivers/net/ethernet/mellanox/mlx4/mlx4.h +++ b/drivers/net/ethernet/mellanox/mlx4/mlx4.h | |||
@@ -60,6 +60,8 @@ | |||
60 | #define MLX4_FS_MGM_LOG_ENTRY_SIZE 7 | 60 | #define MLX4_FS_MGM_LOG_ENTRY_SIZE 7 |
61 | #define MLX4_FS_NUM_MCG (1 << 17) | 61 | #define MLX4_FS_NUM_MCG (1 << 17) |
62 | 62 | ||
63 | #define INIT_HCA_TPT_MW_ENABLE (1 << 7) | ||
64 | |||
63 | #define MLX4_NUM_UP 8 | 65 | #define MLX4_NUM_UP 8 |
64 | #define MLX4_NUM_TC 8 | 66 | #define MLX4_NUM_TC 8 |
65 | #define MLX4_RATELIMIT_UNITS 3 /* 100 Mbps */ | 67 | #define MLX4_RATELIMIT_UNITS 3 /* 100 Mbps */ |
@@ -113,10 +115,10 @@ enum { | |||
113 | MLX4_NUM_CMPTS = MLX4_CMPT_NUM_TYPE << MLX4_CMPT_SHIFT | 115 | MLX4_NUM_CMPTS = MLX4_CMPT_NUM_TYPE << MLX4_CMPT_SHIFT |
114 | }; | 116 | }; |
115 | 117 | ||
116 | enum mlx4_mr_state { | 118 | enum mlx4_mpt_state { |
117 | MLX4_MR_DISABLED = 0, | 119 | MLX4_MPT_DISABLED = 0, |
118 | MLX4_MR_EN_HW, | 120 | MLX4_MPT_EN_HW, |
119 | MLX4_MR_EN_SW | 121 | MLX4_MPT_EN_SW |
120 | }; | 122 | }; |
121 | 123 | ||
122 | #define MLX4_COMM_TIME 10000 | 124 | #define MLX4_COMM_TIME 10000 |
@@ -263,6 +265,22 @@ struct mlx4_icm_table { | |||
263 | struct mlx4_icm **icm; | 265 | struct mlx4_icm **icm; |
264 | }; | 266 | }; |
265 | 267 | ||
268 | #define MLX4_MPT_FLAG_SW_OWNS (0xfUL << 28) | ||
269 | #define MLX4_MPT_FLAG_FREE (0x3UL << 28) | ||
270 | #define MLX4_MPT_FLAG_MIO (1 << 17) | ||
271 | #define MLX4_MPT_FLAG_BIND_ENABLE (1 << 15) | ||
272 | #define MLX4_MPT_FLAG_PHYSICAL (1 << 9) | ||
273 | #define MLX4_MPT_FLAG_REGION (1 << 8) | ||
274 | |||
275 | #define MLX4_MPT_PD_FLAG_FAST_REG (1 << 27) | ||
276 | #define MLX4_MPT_PD_FLAG_RAE (1 << 28) | ||
277 | #define MLX4_MPT_PD_FLAG_EN_INV (3 << 24) | ||
278 | |||
279 | #define MLX4_MPT_QP_FLAG_BOUND_QP (1 << 7) | ||
280 | |||
281 | #define MLX4_MPT_STATUS_SW 0xF0 | ||
282 | #define MLX4_MPT_STATUS_HW 0x00 | ||
283 | |||
266 | /* | 284 | /* |
267 | * Must be packed because mtt_seg is 64 bits but only aligned to 32 bits. | 285 | * Must be packed because mtt_seg is 64 bits but only aligned to 32 bits. |
268 | */ | 286 | */ |
@@ -863,10 +881,10 @@ int __mlx4_cq_alloc_icm(struct mlx4_dev *dev, int *cqn); | |||
863 | void __mlx4_cq_free_icm(struct mlx4_dev *dev, int cqn); | 881 | void __mlx4_cq_free_icm(struct mlx4_dev *dev, int cqn); |
864 | int __mlx4_srq_alloc_icm(struct mlx4_dev *dev, int *srqn); | 882 | int __mlx4_srq_alloc_icm(struct mlx4_dev *dev, int *srqn); |
865 | void __mlx4_srq_free_icm(struct mlx4_dev *dev, int srqn); | 883 | void __mlx4_srq_free_icm(struct mlx4_dev *dev, int srqn); |
866 | int __mlx4_mr_reserve(struct mlx4_dev *dev); | 884 | int __mlx4_mpt_reserve(struct mlx4_dev *dev); |
867 | void __mlx4_mr_release(struct mlx4_dev *dev, u32 index); | 885 | void __mlx4_mpt_release(struct mlx4_dev *dev, u32 index); |
868 | int __mlx4_mr_alloc_icm(struct mlx4_dev *dev, u32 index); | 886 | int __mlx4_mpt_alloc_icm(struct mlx4_dev *dev, u32 index); |
869 | void __mlx4_mr_free_icm(struct mlx4_dev *dev, u32 index); | 887 | void __mlx4_mpt_free_icm(struct mlx4_dev *dev, u32 index); |
870 | u32 __mlx4_alloc_mtt_range(struct mlx4_dev *dev, int order); | 888 | u32 __mlx4_alloc_mtt_range(struct mlx4_dev *dev, int order); |
871 | void __mlx4_free_mtt_range(struct mlx4_dev *dev, u32 first_seg, int order); | 889 | void __mlx4_free_mtt_range(struct mlx4_dev *dev, u32 first_seg, int order); |
872 | 890 | ||