aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/infiniband/hw/hfi1/file_ops.c4
-rw-r--r--drivers/infiniband/hw/mlx5/qp.c7
-rw-r--r--drivers/infiniband/ulp/isert/ib_isert.c1
3 files changed, 6 insertions, 6 deletions
diff --git a/drivers/infiniband/hw/hfi1/file_ops.c b/drivers/infiniband/hw/hfi1/file_ops.c
index 7750a9c38b06..1df7da47f431 100644
--- a/drivers/infiniband/hw/hfi1/file_ops.c
+++ b/drivers/infiniband/hw/hfi1/file_ops.c
@@ -763,11 +763,11 @@ static int complete_subctxt(struct hfi1_filedata *fd)
763 } 763 }
764 764
765 if (ret) { 765 if (ret) {
766 hfi1_rcd_put(fd->uctxt);
767 fd->uctxt = NULL;
768 spin_lock_irqsave(&fd->dd->uctxt_lock, flags); 766 spin_lock_irqsave(&fd->dd->uctxt_lock, flags);
769 __clear_bit(fd->subctxt, fd->uctxt->in_use_ctxts); 767 __clear_bit(fd->subctxt, fd->uctxt->in_use_ctxts);
770 spin_unlock_irqrestore(&fd->dd->uctxt_lock, flags); 768 spin_unlock_irqrestore(&fd->dd->uctxt_lock, flags);
769 hfi1_rcd_put(fd->uctxt);
770 fd->uctxt = NULL;
771 } 771 }
772 772
773 return ret; 773 return ret;
diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
index 31ad28853efa..cffe5966aef9 100644
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -4362,12 +4362,11 @@ static void to_rdma_ah_attr(struct mlx5_ib_dev *ibdev,
4362 4362
4363 memset(ah_attr, 0, sizeof(*ah_attr)); 4363 memset(ah_attr, 0, sizeof(*ah_attr));
4364 4364
4365 ah_attr->type = rdma_ah_find_type(&ibdev->ib_dev, path->port); 4365 if (!path->port || path->port > MLX5_CAP_GEN(dev, num_ports))
4366 rdma_ah_set_port_num(ah_attr, path->port);
4367 if (rdma_ah_get_port_num(ah_attr) == 0 ||
4368 rdma_ah_get_port_num(ah_attr) > MLX5_CAP_GEN(dev, num_ports))
4369 return; 4366 return;
4370 4367
4368 ah_attr->type = rdma_ah_find_type(&ibdev->ib_dev, path->port);
4369
4371 rdma_ah_set_port_num(ah_attr, path->port); 4370 rdma_ah_set_port_num(ah_attr, path->port);
4372 rdma_ah_set_sl(ah_attr, path->dci_cfi_prio_sl & 0xf); 4371 rdma_ah_set_sl(ah_attr, path->dci_cfi_prio_sl & 0xf);
4373 4372
diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c
index 720dfb3a1ac2..1b02283ce20e 100644
--- a/drivers/infiniband/ulp/isert/ib_isert.c
+++ b/drivers/infiniband/ulp/isert/ib_isert.c
@@ -741,6 +741,7 @@ isert_connect_error(struct rdma_cm_id *cma_id)
741{ 741{
742 struct isert_conn *isert_conn = cma_id->qp->qp_context; 742 struct isert_conn *isert_conn = cma_id->qp->qp_context;
743 743
744 ib_drain_qp(isert_conn->qp);
744 list_del_init(&isert_conn->node); 745 list_del_init(&isert_conn->node);
745 isert_conn->cm_id = NULL; 746 isert_conn->cm_id = NULL;
746 isert_put_conn(isert_conn); 747 isert_put_conn(isert_conn);