|
@@ -1584,6 +1584,7 @@ static int create_qp_common(struct mlx5_ib_dev *dev, struct ib_pd *pd,
|
|
u32 uidx = MLX5_IB_DEFAULT_UIDX;
|
|
u32 uidx = MLX5_IB_DEFAULT_UIDX;
|
|
struct mlx5_ib_create_qp ucmd;
|
|
struct mlx5_ib_create_qp ucmd;
|
|
struct mlx5_ib_qp_base *base;
|
|
struct mlx5_ib_qp_base *base;
|
|
|
|
+ int mlx5_st;
|
|
void *qpc;
|
|
void *qpc;
|
|
u32 *in;
|
|
u32 *in;
|
|
int err;
|
|
int err;
|
|
@@ -1592,6 +1593,10 @@ static int create_qp_common(struct mlx5_ib_dev *dev, struct ib_pd *pd,
|
|
spin_lock_init(&qp->sq.lock);
|
|
spin_lock_init(&qp->sq.lock);
|
|
spin_lock_init(&qp->rq.lock);
|
|
spin_lock_init(&qp->rq.lock);
|
|
|
|
|
|
|
|
+ mlx5_st = to_mlx5_st(init_attr->qp_type);
|
|
|
|
+ if (mlx5_st < 0)
|
|
|
|
+ return -EINVAL;
|
|
|
|
+
|
|
if (init_attr->rwq_ind_tbl) {
|
|
if (init_attr->rwq_ind_tbl) {
|
|
if (!udata)
|
|
if (!udata)
|
|
return -ENOSYS;
|
|
return -ENOSYS;
|
|
@@ -1753,7 +1758,7 @@ static int create_qp_common(struct mlx5_ib_dev *dev, struct ib_pd *pd,
|
|
|
|
|
|
qpc = MLX5_ADDR_OF(create_qp_in, in, qpc);
|
|
qpc = MLX5_ADDR_OF(create_qp_in, in, qpc);
|
|
|
|
|
|
- MLX5_SET(qpc, qpc, st, to_mlx5_st(init_attr->qp_type));
|
|
|
|
|
|
+ MLX5_SET(qpc, qpc, st, mlx5_st);
|
|
MLX5_SET(qpc, qpc, pm_state, MLX5_QP_PM_MIGRATED);
|
|
MLX5_SET(qpc, qpc, pm_state, MLX5_QP_PM_MIGRATED);
|
|
|
|
|
|
if (init_attr->qp_type != MLX5_IB_QPT_REG_UMR)
|
|
if (init_attr->qp_type != MLX5_IB_QPT_REG_UMR)
|