diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mlx5/device.h | 13 | ||||
| -rw-r--r-- | include/linux/mlx5/driver.h | 18 |
2 files changed, 27 insertions, 4 deletions
diff --git a/include/linux/mlx5/device.h b/include/linux/mlx5/device.h index 5eb4e31af22b..da78875807fc 100644 --- a/include/linux/mlx5/device.h +++ b/include/linux/mlx5/device.h | |||
| @@ -230,6 +230,15 @@ enum { | |||
| 230 | MLX5_MAX_PAGE_SHIFT = 31 | 230 | MLX5_MAX_PAGE_SHIFT = 31 |
| 231 | }; | 231 | }; |
| 232 | 232 | ||
| 233 | enum { | ||
| 234 | MLX5_ADAPTER_PAGE_SHIFT = 12 | ||
| 235 | }; | ||
| 236 | |||
| 237 | enum { | ||
| 238 | MLX5_CAP_OFF_DCT = 41, | ||
| 239 | MLX5_CAP_OFF_CMDIF_CSUM = 46, | ||
| 240 | }; | ||
| 241 | |||
| 233 | struct mlx5_inbox_hdr { | 242 | struct mlx5_inbox_hdr { |
| 234 | __be16 opcode; | 243 | __be16 opcode; |
| 235 | u8 rsvd[4]; | 244 | u8 rsvd[4]; |
| @@ -319,9 +328,9 @@ struct mlx5_hca_cap { | |||
| 319 | u8 rsvd25[42]; | 328 | u8 rsvd25[42]; |
| 320 | __be16 log_uar_page_sz; | 329 | __be16 log_uar_page_sz; |
| 321 | u8 rsvd26[28]; | 330 | u8 rsvd26[28]; |
| 322 | u8 log_msx_atomic_size_qp; | 331 | u8 log_max_atomic_size_qp; |
| 323 | u8 rsvd27[2]; | 332 | u8 rsvd27[2]; |
| 324 | u8 log_msx_atomic_size_dc; | 333 | u8 log_max_atomic_size_dc; |
| 325 | u8 rsvd28[76]; | 334 | u8 rsvd28[76]; |
| 326 | }; | 335 | }; |
| 327 | 336 | ||
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h index 6b8c496572c8..554548cd3dd4 100644 --- a/include/linux/mlx5/driver.h +++ b/include/linux/mlx5/driver.h | |||
| @@ -483,6 +483,7 @@ struct mlx5_priv { | |||
| 483 | struct rb_root page_root; | 483 | struct rb_root page_root; |
| 484 | int fw_pages; | 484 | int fw_pages; |
| 485 | int reg_pages; | 485 | int reg_pages; |
| 486 | struct list_head free_list; | ||
| 486 | 487 | ||
| 487 | struct mlx5_core_health health; | 488 | struct mlx5_core_health health; |
| 488 | 489 | ||
| @@ -557,9 +558,11 @@ typedef void (*mlx5_cmd_cbk_t)(int status, void *context); | |||
| 557 | struct mlx5_cmd_work_ent { | 558 | struct mlx5_cmd_work_ent { |
| 558 | struct mlx5_cmd_msg *in; | 559 | struct mlx5_cmd_msg *in; |
| 559 | struct mlx5_cmd_msg *out; | 560 | struct mlx5_cmd_msg *out; |
| 561 | void *uout; | ||
| 562 | int uout_size; | ||
| 560 | mlx5_cmd_cbk_t callback; | 563 | mlx5_cmd_cbk_t callback; |
| 561 | void *context; | 564 | void *context; |
| 562 | int idx; | 565 | int idx; |
| 563 | struct completion done; | 566 | struct completion done; |
| 564 | struct mlx5_cmd *cmd; | 567 | struct mlx5_cmd *cmd; |
| 565 | struct work_struct work; | 568 | struct work_struct work; |
| @@ -570,6 +573,7 @@ struct mlx5_cmd_work_ent { | |||
| 570 | u8 token; | 573 | u8 token; |
| 571 | struct timespec ts1; | 574 | struct timespec ts1; |
| 572 | struct timespec ts2; | 575 | struct timespec ts2; |
| 576 | u16 op; | ||
| 573 | }; | 577 | }; |
| 574 | 578 | ||
| 575 | struct mlx5_pas { | 579 | struct mlx5_pas { |
| @@ -653,6 +657,9 @@ void mlx5_cmd_use_polling(struct mlx5_core_dev *dev); | |||
| 653 | int mlx5_cmd_status_to_err(struct mlx5_outbox_hdr *hdr); | 657 | int mlx5_cmd_status_to_err(struct mlx5_outbox_hdr *hdr); |
| 654 | int mlx5_cmd_exec(struct mlx5_core_dev *dev, void *in, int in_size, void *out, | 658 | int mlx5_cmd_exec(struct mlx5_core_dev *dev, void *in, int in_size, void *out, |
| 655 | int out_size); | 659 | int out_size); |
| 660 | int mlx5_cmd_exec_cb(struct mlx5_core_dev *dev, void *in, int in_size, | ||
| 661 | void *out, int out_size, mlx5_cmd_cbk_t callback, | ||
| 662 | void *context); | ||
| 656 | int mlx5_cmd_alloc_uar(struct mlx5_core_dev *dev, u32 *uarn); | 663 | int mlx5_cmd_alloc_uar(struct mlx5_core_dev *dev, u32 *uarn); |
| 657 | int mlx5_cmd_free_uar(struct mlx5_core_dev *dev, u32 uarn); | 664 | int mlx5_cmd_free_uar(struct mlx5_core_dev *dev, u32 uarn); |
| 658 | int mlx5_alloc_uuars(struct mlx5_core_dev *dev, struct mlx5_uuar_info *uuari); | 665 | int mlx5_alloc_uuars(struct mlx5_core_dev *dev, struct mlx5_uuar_info *uuari); |
| @@ -676,7 +683,9 @@ int mlx5_core_query_srq(struct mlx5_core_dev *dev, struct mlx5_core_srq *srq, | |||
| 676 | int mlx5_core_arm_srq(struct mlx5_core_dev *dev, struct mlx5_core_srq *srq, | 683 | int mlx5_core_arm_srq(struct mlx5_core_dev *dev, struct mlx5_core_srq *srq, |
| 677 | u16 lwm, int is_srq); | 684 | u16 lwm, int is_srq); |
| 678 | int mlx5_core_create_mkey(struct mlx5_core_dev *dev, struct mlx5_core_mr *mr, | 685 | int mlx5_core_create_mkey(struct mlx5_core_dev *dev, struct mlx5_core_mr *mr, |
| 679 | struct mlx5_create_mkey_mbox_in *in, int inlen); | 686 | struct mlx5_create_mkey_mbox_in *in, int inlen, |
| 687 | mlx5_cmd_cbk_t callback, void *context, | ||
| 688 | struct mlx5_create_mkey_mbox_out *out); | ||
| 680 | int mlx5_core_destroy_mkey(struct mlx5_core_dev *dev, struct mlx5_core_mr *mr); | 689 | int mlx5_core_destroy_mkey(struct mlx5_core_dev *dev, struct mlx5_core_mr *mr); |
| 681 | int mlx5_core_query_mkey(struct mlx5_core_dev *dev, struct mlx5_core_mr *mr, | 690 | int mlx5_core_query_mkey(struct mlx5_core_dev *dev, struct mlx5_core_mr *mr, |
| 682 | struct mlx5_query_mkey_mbox_out *out, int outlen); | 691 | struct mlx5_query_mkey_mbox_out *out, int outlen); |
| @@ -745,6 +754,11 @@ static inline u32 mlx5_idx_to_mkey(u32 mkey_idx) | |||
| 745 | return mkey_idx << 8; | 754 | return mkey_idx << 8; |
| 746 | } | 755 | } |
| 747 | 756 | ||
| 757 | static inline u8 mlx5_mkey_variant(u32 mkey) | ||
| 758 | { | ||
| 759 | return mkey & 0xff; | ||
| 760 | } | ||
| 761 | |||
| 748 | enum { | 762 | enum { |
| 749 | MLX5_PROF_MASK_QP_SIZE = (u64)1 << 0, | 763 | MLX5_PROF_MASK_QP_SIZE = (u64)1 << 0, |
| 750 | MLX5_PROF_MASK_MR_CACHE = (u64)1 << 1, | 764 | MLX5_PROF_MASK_MR_CACHE = (u64)1 << 1, |
