diff options
| -rw-r--r-- | drivers/infiniband/hw/mlx5/cq.c | 9 | ||||
| -rw-r--r-- | drivers/infiniband/hw/mlx5/mlx5_ib.h | 3 |
2 files changed, 3 insertions, 9 deletions
diff --git a/drivers/infiniband/hw/mlx5/cq.c b/drivers/infiniband/hw/mlx5/cq.c index b14316603e44..7ddc790b1819 100644 --- a/drivers/infiniband/hw/mlx5/cq.c +++ b/drivers/infiniband/hw/mlx5/cq.c | |||
| @@ -757,10 +757,6 @@ static void destroy_cq_kernel(struct mlx5_ib_dev *dev, struct mlx5_ib_cq *cq) | |||
| 757 | mlx5_db_free(dev->mdev, &cq->db); | 757 | mlx5_db_free(dev->mdev, &cq->db); |
| 758 | } | 758 | } |
| 759 | 759 | ||
| 760 | enum { | ||
| 761 | CQ_CREATE_FLAGS_SUPPORTED = IB_CQ_FLAGS_TIMESTAMP_COMPLETION | ||
| 762 | }; | ||
| 763 | |||
| 764 | struct ib_cq *mlx5_ib_create_cq(struct ib_device *ibdev, | 760 | struct ib_cq *mlx5_ib_create_cq(struct ib_device *ibdev, |
| 765 | const struct ib_cq_init_attr *attr, | 761 | const struct ib_cq_init_attr *attr, |
| 766 | struct ib_ucontext *context, | 762 | struct ib_ucontext *context, |
| @@ -778,13 +774,10 @@ struct ib_cq *mlx5_ib_create_cq(struct ib_device *ibdev, | |||
| 778 | int eqn; | 774 | int eqn; |
| 779 | int err; | 775 | int err; |
| 780 | 776 | ||
| 781 | if (check_cq_create_flags(attr->flags)) | ||
| 782 | return ERR_PTR(-EINVAL); | ||
| 783 | |||
| 784 | if (entries < 0) | 777 | if (entries < 0) |
| 785 | return ERR_PTR(-EINVAL); | 778 | return ERR_PTR(-EINVAL); |
| 786 | 779 | ||
| 787 | if (attr->flags & ~CQ_CREATE_FLAGS_SUPPORTED) | 780 | if (check_cq_create_flags(attr->flags)) |
| 788 | return ERR_PTR(-EOPNOTSUPP); | 781 | return ERR_PTR(-EOPNOTSUPP); |
| 789 | 782 | ||
| 790 | entries = roundup_pow_of_two(entries + 1); | 783 | entries = roundup_pow_of_two(entries + 1); |
diff --git a/drivers/infiniband/hw/mlx5/mlx5_ib.h b/drivers/infiniband/hw/mlx5/mlx5_ib.h index 726e31de59d5..d475f83c295b 100644 --- a/drivers/infiniband/hw/mlx5/mlx5_ib.h +++ b/drivers/infiniband/hw/mlx5/mlx5_ib.h | |||
| @@ -739,7 +739,8 @@ static inline u32 check_cq_create_flags(u32 flags) | |||
| 739 | * It returns non-zero value for unsupported CQ | 739 | * It returns non-zero value for unsupported CQ |
| 740 | * create flags, otherwise it returns zero. | 740 | * create flags, otherwise it returns zero. |
| 741 | */ | 741 | */ |
| 742 | return (flags & ~IB_CQ_FLAGS_IGNORE_OVERRUN); | 742 | return (flags & ~(IB_CQ_FLAGS_IGNORE_OVERRUN | |
| 743 | IB_CQ_FLAGS_TIMESTAMP_COMPLETION)); | ||
| 743 | } | 744 | } |
| 744 | 745 | ||
| 745 | static inline int verify_assign_uidx(u8 cqe_version, u32 cmd_uidx, | 746 | static inline int verify_assign_uidx(u8 cqe_version, u32 cmd_uidx, |
