diff options
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_qp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_qp.c b/drivers/infiniband/hw/mthca/mthca_qp.c index 16c387d8170c..490fc783bb0c 100644 --- a/drivers/infiniband/hw/mthca/mthca_qp.c +++ b/drivers/infiniband/hw/mthca/mthca_qp.c | |||
@@ -224,7 +224,7 @@ static void *get_send_wqe(struct mthca_qp *qp, int n) | |||
224 | 224 | ||
225 | static void mthca_wq_init(struct mthca_wq *wq) | 225 | static void mthca_wq_init(struct mthca_wq *wq) |
226 | { | 226 | { |
227 | spin_lock_init(&wq->lock); | 227 | /* mthca_alloc_qp_common() initializes the locks */ |
228 | wq->next_ind = 0; | 228 | wq->next_ind = 0; |
229 | wq->last_comp = wq->max - 1; | 229 | wq->last_comp = wq->max - 1; |
230 | wq->head = 0; | 230 | wq->head = 0; |
@@ -1114,6 +1114,9 @@ static int mthca_alloc_qp_common(struct mthca_dev *dev, | |||
1114 | qp->sq_policy = send_policy; | 1114 | qp->sq_policy = send_policy; |
1115 | mthca_wq_init(&qp->sq); | 1115 | mthca_wq_init(&qp->sq); |
1116 | mthca_wq_init(&qp->rq); | 1116 | mthca_wq_init(&qp->rq); |
1117 | /* these are initialized separately so lockdep can tell them apart */ | ||
1118 | spin_lock_init(&qp->sq.lock); | ||
1119 | spin_lock_init(&qp->rq.lock); | ||
1117 | 1120 | ||
1118 | ret = mthca_map_memfree(dev, qp); | 1121 | ret = mthca_map_memfree(dev, qp); |
1119 | if (ret) | 1122 | if (ret) |