From: Mike Marciniszyn Date: Tue, 6 Sep 2016 11:37:07 +0000 (-0700) Subject: IB/rdmavt: Move reset calldown to reset path X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=30a345cc01363032826d48406dff3a6cee1cdb16;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git IB/rdmavt: Move reset calldown to reset path The reset calldown is misplaced. It should only be called in the code that actually transitions the QP to reset. Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford --- diff --git a/drivers/infiniband/sw/rdmavt/qp.c b/drivers/infiniband/sw/rdmavt/qp.c index 80d2c50f96a3..0a2981559c88 100644 --- a/drivers/infiniband/sw/rdmavt/qp.c +++ b/drivers/infiniband/sw/rdmavt/qp.c @@ -530,14 +530,13 @@ static void rvt_reset_qp(struct rvt_dev_info *rdi, struct rvt_qp *qp, spin_lock(&qp->s_lock); rvt_clear_mr_refs(qp, 1); + /* + * Let the driver do any tear down it needs to for a qp + * that has been reset + */ + rdi->driver_f.notify_qp_reset(qp); } - /* - * Let the driver do any tear down it needs to for a qp - * that has been reset - */ - rdi->driver_f.notify_qp_reset(qp); - qp->remote_qpn = 0; qp->qkey = 0; qp->qp_access_flags = 0;