]> git.baikalelectronics.ru Git - kernel.git/commitdiff
qed: Correct rdma params configuration
authorRam Amrani <Ram.Amrani@cavium.com>
Wed, 9 Nov 2016 20:48:44 +0000 (22:48 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 Nov 2016 17:55:20 +0000 (12:55 -0500)
Previous fix has broken RoCE support as the rdma_pf_params are now
being set into the parameters only after the params are alrady assigned
into the hw-function.

Fixes: 5d24e1526b38 ("qed*: Fix Kconfig dependencies with INFINIBAND_QEDR")
Signed-off-by: Ram Amrani <Ram.Amrani@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qed/qed_main.c

index c418360ba02af18b1013ceec4e893af70a44c763..333c7442e48af451f28c37e14826d9782fa2d76a 100644 (file)
@@ -839,20 +839,19 @@ static void qed_update_pf_params(struct qed_dev *cdev,
 {
        int i;
 
+       if (IS_ENABLED(CONFIG_QED_RDMA)) {
+               params->rdma_pf_params.num_qps = QED_ROCE_QPS;
+               params->rdma_pf_params.min_dpis = QED_ROCE_DPIS;
+               /* divide by 3 the MRs to avoid MF ILT overflow */
+               params->rdma_pf_params.num_mrs = RDMA_MAX_TIDS;
+               params->rdma_pf_params.gl_pi = QED_ROCE_PROTOCOL_INDEX;
+       }
+
        for (i = 0; i < cdev->num_hwfns; i++) {
                struct qed_hwfn *p_hwfn = &cdev->hwfns[i];
 
                p_hwfn->pf_params = *params;
        }
-
-       if (!IS_ENABLED(CONFIG_QED_RDMA))
-               return;
-
-       params->rdma_pf_params.num_qps = QED_ROCE_QPS;
-       params->rdma_pf_params.min_dpis = QED_ROCE_DPIS;
-       /* divide by 3 the MRs to avoid MF ILT overflow */
-       params->rdma_pf_params.num_mrs = RDMA_MAX_TIDS;
-       params->rdma_pf_params.gl_pi = QED_ROCE_PROTOCOL_INDEX;
 }
 
 static int qed_slowpath_start(struct qed_dev *cdev,