aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mlx4/qp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/mlx4/qp.c')
-rw-r--r--drivers/infiniband/hw/mlx4/qp.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c
index 91590e7fba0c..89eb6cbe592e 100644
--- a/drivers/infiniband/hw/mlx4/qp.c
+++ b/drivers/infiniband/hw/mlx4/qp.c
@@ -454,19 +454,8 @@ static int create_qp_common(struct mlx4_ib_dev *dev, struct ib_pd *pd,
454 spin_lock_init(&qp->rq.lock); 454 spin_lock_init(&qp->rq.lock);
455 455
456 qp->state = IB_QPS_RESET; 456 qp->state = IB_QPS_RESET;
457 qp->atomic_rd_en = 0;
458 qp->resp_depth = 0;
459
460 qp->rq.head = 0;
461 qp->rq.tail = 0;
462 qp->sq.head = 0;
463 qp->sq.tail = 0;
464 qp->sq_next_wqe = 0;
465
466 if (init_attr->sq_sig_type == IB_SIGNAL_ALL_WR) 457 if (init_attr->sq_sig_type == IB_SIGNAL_ALL_WR)
467 qp->sq_signal_bits = cpu_to_be32(MLX4_WQE_CTRL_CQ_UPDATE); 458 qp->sq_signal_bits = cpu_to_be32(MLX4_WQE_CTRL_CQ_UPDATE);
468 else
469 qp->sq_signal_bits = 0;
470 459
471 err = set_rq_size(dev, &init_attr->cap, !!pd->uobject, !!init_attr->srq, qp); 460 err = set_rq_size(dev, &init_attr->cap, !!pd->uobject, !!init_attr->srq, qp);
472 if (err) 461 if (err)
@@ -704,7 +693,7 @@ struct ib_qp *mlx4_ib_create_qp(struct ib_pd *pd,
704 case IB_QPT_UC: 693 case IB_QPT_UC:
705 case IB_QPT_UD: 694 case IB_QPT_UD:
706 { 695 {
707 qp = kmalloc(sizeof *qp, GFP_KERNEL); 696 qp = kzalloc(sizeof *qp, GFP_KERNEL);
708 if (!qp) 697 if (!qp)
709 return ERR_PTR(-ENOMEM); 698 return ERR_PTR(-ENOMEM);
710 699
@@ -725,7 +714,7 @@ struct ib_qp *mlx4_ib_create_qp(struct ib_pd *pd,
725 if (pd->uobject) 714 if (pd->uobject)
726 return ERR_PTR(-EINVAL); 715 return ERR_PTR(-EINVAL);
727 716
728 sqp = kmalloc(sizeof *sqp, GFP_KERNEL); 717 sqp = kzalloc(sizeof *sqp, GFP_KERNEL);
729 if (!sqp) 718 if (!sqp)
730 return ERR_PTR(-ENOMEM); 719 return ERR_PTR(-ENOMEM);
731 720