aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/sw/rdmavt/mcast.c
diff options
context:
space:
mode:
authorAlex Estrin <alex.estrin@intel.com>2017-10-09 12:38:33 -0700
committerDoug Ledford <dledford@redhat.com>2017-10-18 10:13:00 -0400
commitf9586abfa333143d67e3362dfb2a19ae45d82441 (patch)
tree6e6fe5990dff922feea6c4ba9360392d8e591329 /drivers/infiniband/sw/rdmavt/mcast.c
parentIB/hfi1: Set hdr_type when tx req is allocated (diff)
downloadlinux-dev-f9586abfa333143d67e3362dfb2a19ae45d82441.tar.xz
linux-dev-f9586abfa333143d67e3362dfb2a19ae45d82441.zip
IB/rdmavt: Don't wait for resources in QP reset
Per the IBTA spec, QP destroy shall fail if the QP is attached to multicast groups, although the spec is silent on modify_qp to reset state. It implies that ULP must deregister QP from all mcast groups for destroy to succeed. The faulty patch "IB/ipoib: Update broadcast object if PKey value was changed in index 0" exposed two issues in rdmavt: 1. Rvt QP reset waits for qp references to go to zero. This will hang if QP is attached to multicast groups. 2. The mcast group detach will fail for a QP in reset state therefore preventing ULP from correcting the issue. This patch moves the reference count wait to the the destroy QP path and allows a QP mcast detach to work in the reset state. Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Alex Estrin <alex.estrin@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/sw/rdmavt/mcast.c')
-rw-r--r--drivers/infiniband/sw/rdmavt/mcast.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/sw/rdmavt/mcast.c b/drivers/infiniband/sw/rdmavt/mcast.c
index 1f12b69a0d07..b3a38c5e4cad 100644
--- a/drivers/infiniband/sw/rdmavt/mcast.c
+++ b/drivers/infiniband/sw/rdmavt/mcast.c
@@ -351,7 +351,7 @@ int rvt_detach_mcast(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
int last = 0;
int ret = 0;
- if (ibqp->qp_num <= 1 || qp->state == IB_QPS_RESET)
+ if (ibqp->qp_num <= 1)
return -EINVAL;
spin_lock_irq(&ibp->lock);