RDMA/ocrdma: Fix traffic class shift
authorDevesh Sharma <devesh.sharma@emulex.com>
Mon, 10 Feb 2014 08:18:58 +0000 (13:48 +0530)
committerRoland Dreier <roland@purestorage.com>
Fri, 14 Feb 2014 17:49:00 +0000 (09:49 -0800)
Use correct value for obtaining traffic class from device
response for Query QP request.

Signed-off-by: Devesh Sharma <devesh.sharma@emulex.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c

index aa92f40c9d50e739a14b0f19fd5e183f63ab964a..77e38ecd634e1262cbaff43bd6bbe8a47ad4f7e1 100644 (file)
@@ -1416,7 +1416,7 @@ int ocrdma_query_qp(struct ib_qp *ibqp,
                                          OCRDMA_QP_PARAMS_HOP_LMT_MASK) >>
                                                OCRDMA_QP_PARAMS_HOP_LMT_SHIFT;
        qp_attr->ah_attr.grh.traffic_class = (params.tclass_sq_psn &
-                                             OCRDMA_QP_PARAMS_SQ_PSN_MASK) >>
+                                             OCRDMA_QP_PARAMS_TCLASS_MASK) >>
                                                OCRDMA_QP_PARAMS_TCLASS_SHIFT;
 
        qp_attr->ah_attr.ah_flags = IB_AH_GRH;