diff mbox

RDMA/ocrdma: fix traffic class shift

Message ID 8b417e9b-fb15-4585-aba3-e9be06b7b12a@CMEXHTCAS2.ad.emulex.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Devesh Sharma Feb. 10, 2014, 8:18 a.m. UTC
Use correct value for obtaining traffic class from device
response for Query QP request.

Signed-off-by: Devesh Sharma <devesh.sharma@emulex.com>
---
 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Dan Carpenter Feb. 10, 2014, 9:28 a.m. UTC | #1
On Mon, Feb 10, 2014 at 01:48:58PM +0530, Devesh Sharma wrote:
> 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>

regards,
dan carpenter

> ---
>  drivers/infiniband/hw/ocrdma/ocrdma_verbs.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
> index 7686dce..998f0de 100644
> --- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
> +++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
> @@ -1415,7 +1415,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;
> -- 
> 1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
index 7686dce..998f0de 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
@@ -1415,7 +1415,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;