]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sif: qp: Fix modify_qp_hw from SQE to RTS
authorWei Lin Guay <wei.lin.guay@oracle.com>
Fri, 7 Oct 2016 08:07:11 +0000 (10:07 +0200)
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>
Mon, 24 Oct 2016 16:06:01 +0000 (09:06 -0700)
Orabug: 24810237

Fix an issue in modify_qp_hw from SQE to RTS returns
EPSC_MODIFY_CANNOT_CHANGE_QP_ATTR. In sif, qp transition
from SQE to RTS must explicitly set the req_access_error
to 0.

Signed-off-by: Wei Lin Guay <wei.lin.guay@oracle.com>
Reviewed-by: Knut Omang <knut.omang@oracle.com>
drivers/infiniband/hw/sif/sif_qp.c

index aa4d70361ca759b73675659b99f4eab12d2b7d5e..aed171cc9f2f951e860cfdd4d920f56cfd33a4e4 100644 (file)
@@ -1429,6 +1429,14 @@ static int modify_qp_hw(struct sif_dev *sdev, struct sif_qp *qp,
        }
 
 ok_modify_qp_sw:
+       /* The QP mask for QP transition is checked in sif_modify_qp_is_ok.
+        * No check for qp_type because only UC/UD and MANSP1 can be transitioned
+        * to SQE.
+        */
+       if ((qp_attr->qp_state == IB_QPS_RTS) && (qp_attr->cur_qp_state == IB_QPS_SQE)) {
+               ctrl_attr->req_access_error = 1;
+               mct->data.req_access_error = 0;
+       }
 
        /*
         * On modify to RTR, we set the TSU SL (tsl), because we have