From 0ea8726250cae3defa0c1065801017f26a269c93 Mon Sep 17 00:00:00 2001 From: Devesh Sharma Date: Wed, 2 Jul 2014 11:36:04 +0530 Subject: RDMA/ocrdma: Obtain SL from device structure Currently, driver obtains service level value from ah_attr->sl field. However, this field is set to zero all the times from rdma-cm. This patch allows create_ah to obtain service level from dev->sl. Signed-off-by: Devesh Sharma Signed-off-by: Roland Dreier --- drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/infiniband/hw/ocrdma/ocrdma_hw.c') diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c index a4d27c70528f..df68782b32d1 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c @@ -2314,10 +2314,8 @@ static int ocrdma_set_av_params(struct ocrdma_qp *qp, cmd->params.vlan_dmac_b4_to_b5 |= vlan_id << OCRDMA_QP_PARAMS_VLAN_SHIFT; cmd->flags |= OCRDMA_QP_PARA_VLAN_EN_VALID; - /* override the sl with default priority if 0 */ cmd->params.rnt_rc_sl_fl |= - (ah_attr->sl ? ah_attr->sl : - qp->dev->sl) << OCRDMA_QP_PARAMS_SL_SHIFT; + (qp->dev->sl & 0x07) << OCRDMA_QP_PARAMS_SL_SHIFT; } return 0; } -- cgit v1.2.3