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 /include/linux | |
| 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 'include/linux')
| -rw-r--r-- | include/linux/mlx4/device.h | 22 | ||||
| -rw-r--r-- | include/linux/mlx4/qp.h | 19 |
2 files changed, 31 insertions, 10 deletions
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index 6d48fce06b4a..811f91cf5e8c 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
| @@ -171,6 +171,7 @@ enum { | |||
| 171 | #define MLX4_ATTR_EXTENDED_PORT_INFO cpu_to_be16(0xff90) | 171 | #define MLX4_ATTR_EXTENDED_PORT_INFO cpu_to_be16(0xff90) |
| 172 | 172 | ||
| 173 | enum { | 173 | enum { |
| 174 | MLX4_BMME_FLAG_WIN_TYPE_2B = 1 << 1, | ||
| 174 | MLX4_BMME_FLAG_LOCAL_INV = 1 << 6, | 175 | MLX4_BMME_FLAG_LOCAL_INV = 1 << 6, |
| 175 | MLX4_BMME_FLAG_REMOTE_INV = 1 << 7, | 176 | MLX4_BMME_FLAG_REMOTE_INV = 1 << 7, |
| 176 | MLX4_BMME_FLAG_TYPE_2_WIN = 1 << 9, | 177 | MLX4_BMME_FLAG_TYPE_2_WIN = 1 << 9, |
| @@ -238,7 +239,8 @@ enum { | |||
| 238 | MLX4_PERM_LOCAL_WRITE = 1 << 11, | 239 | MLX4_PERM_LOCAL_WRITE = 1 << 11, |
| 239 | MLX4_PERM_REMOTE_READ = 1 << 12, | 240 | MLX4_PERM_REMOTE_READ = 1 << 12, |
| 240 | MLX4_PERM_REMOTE_WRITE = 1 << 13, | 241 | MLX4_PERM_REMOTE_WRITE = 1 << 13, |
| 241 | MLX4_PERM_ATOMIC = 1 << 14 | 242 | MLX4_PERM_ATOMIC = 1 << 14, |
| 243 | MLX4_PERM_BIND_MW = 1 << 15, | ||
| 242 | }; | 244 | }; |
| 243 | 245 | ||
| 244 | enum { | 246 | enum { |
| @@ -504,6 +506,18 @@ struct mlx4_mr { | |||
| 504 | int enabled; | 506 | int enabled; |
| 505 | }; | 507 | }; |
| 506 | 508 | ||
| 509 | enum mlx4_mw_type { | ||
| 510 | MLX4_MW_TYPE_1 = 1, | ||
| 511 | MLX4_MW_TYPE_2 = 2, | ||
| 512 | }; | ||
| 513 | |||
| 514 | struct mlx4_mw { | ||
| 515 | u32 key; | ||
| 516 | u32 pd; | ||
| 517 | enum mlx4_mw_type type; | ||
| 518 | int enabled; | ||
| 519 | }; | ||
| 520 | |||
| 507 | struct mlx4_fmr { | 521 | struct mlx4_fmr { |
| 508 | struct mlx4_mr mr; | 522 | struct mlx4_mr mr; |
| 509 | struct mlx4_mpt_entry *mpt; | 523 | struct mlx4_mpt_entry *mpt; |
| @@ -802,8 +816,12 @@ u64 mlx4_mtt_addr(struct mlx4_dev *dev, struct mlx4_mtt *mtt); | |||
| 802 | 816 | ||
| 803 | int mlx4_mr_alloc(struct mlx4_dev *dev, u32 pd, u64 iova, u64 size, u32 access, | 817 | int mlx4_mr_alloc(struct mlx4_dev *dev, u32 pd, u64 iova, u64 size, u32 access, |
| 804 | int npages, int page_shift, struct mlx4_mr *mr); | 818 | int npages, int page_shift, struct mlx4_mr *mr); |
| 805 | void mlx4_mr_free(struct mlx4_dev *dev, struct mlx4_mr *mr); | 819 | int mlx4_mr_free(struct mlx4_dev *dev, struct mlx4_mr *mr); |
| 806 | int mlx4_mr_enable(struct mlx4_dev *dev, struct mlx4_mr *mr); | 820 | int mlx4_mr_enable(struct mlx4_dev *dev, struct mlx4_mr *mr); |
| 821 | int mlx4_mw_alloc(struct mlx4_dev *dev, u32 pd, enum mlx4_mw_type type, | ||
| 822 | struct mlx4_mw *mw); | ||
| 823 | void mlx4_mw_free(struct mlx4_dev *dev, struct mlx4_mw *mw); | ||
| 824 | int mlx4_mw_enable(struct mlx4_dev *dev, struct mlx4_mw *mw); | ||
| 807 | int mlx4_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt, | 825 | int mlx4_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt, |
| 808 | int start_index, int npages, u64 *page_list); | 826 | int start_index, int npages, u64 *page_list); |
| 809 | int mlx4_buf_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt, | 827 | int mlx4_buf_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt, |
diff --git a/include/linux/mlx4/qp.h b/include/linux/mlx4/qp.h index 4b4ad6ffef92..67f46ad6920a 100644 --- a/include/linux/mlx4/qp.h +++ b/include/linux/mlx4/qp.h | |||
| @@ -265,6 +265,11 @@ struct mlx4_wqe_lso_seg { | |||
| 265 | __be32 header[0]; | 265 | __be32 header[0]; |
| 266 | }; | 266 | }; |
| 267 | 267 | ||
| 268 | enum mlx4_wqe_bind_seg_flags2 { | ||
| 269 | MLX4_WQE_BIND_ZERO_BASED = (1 << 30), | ||
| 270 | MLX4_WQE_BIND_TYPE_2 = (1 << 31), | ||
| 271 | }; | ||
| 272 | |||
| 268 | struct mlx4_wqe_bind_seg { | 273 | struct mlx4_wqe_bind_seg { |
| 269 | __be32 flags1; | 274 | __be32 flags1; |
| 270 | __be32 flags2; | 275 | __be32 flags2; |
| @@ -277,9 +282,9 @@ struct mlx4_wqe_bind_seg { | |||
| 277 | enum { | 282 | enum { |
| 278 | MLX4_WQE_FMR_PERM_LOCAL_READ = 1 << 27, | 283 | MLX4_WQE_FMR_PERM_LOCAL_READ = 1 << 27, |
| 279 | MLX4_WQE_FMR_PERM_LOCAL_WRITE = 1 << 28, | 284 | MLX4_WQE_FMR_PERM_LOCAL_WRITE = 1 << 28, |
| 280 | MLX4_WQE_FMR_PERM_REMOTE_READ = 1 << 29, | 285 | MLX4_WQE_FMR_AND_BIND_PERM_REMOTE_READ = 1 << 29, |
| 281 | MLX4_WQE_FMR_PERM_REMOTE_WRITE = 1 << 30, | 286 | MLX4_WQE_FMR_AND_BIND_PERM_REMOTE_WRITE = 1 << 30, |
| 282 | MLX4_WQE_FMR_PERM_ATOMIC = 1 << 31 | 287 | MLX4_WQE_FMR_AND_BIND_PERM_ATOMIC = 1 << 31 |
| 283 | }; | 288 | }; |
| 284 | 289 | ||
| 285 | struct mlx4_wqe_fmr_seg { | 290 | struct mlx4_wqe_fmr_seg { |
| @@ -304,12 +309,10 @@ struct mlx4_wqe_fmr_ext_seg { | |||
| 304 | }; | 309 | }; |
| 305 | 310 | ||
| 306 | struct mlx4_wqe_local_inval_seg { | 311 | struct mlx4_wqe_local_inval_seg { |
| 307 | __be32 flags; | 312 | u64 reserved1; |
| 308 | u32 reserved1; | ||
| 309 | __be32 mem_key; | 313 | __be32 mem_key; |
| 310 | u32 reserved2[2]; | 314 | u32 reserved2; |
| 311 | __be32 guest_id; | 315 | u64 reserved3[2]; |
| 312 | __be64 pa; | ||
| 313 | }; | 316 | }; |
| 314 | 317 | ||
| 315 | struct mlx4_wqe_raddr_seg { | 318 | struct mlx4_wqe_raddr_seg { |
