qed: Add iWARP enablement support
authorMichal Kalderon <Michal.Kalderon@cavium.com>
Sun, 24 Sep 2017 09:09:42 +0000 (12:09 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Sep 2017 18:22:03 +0000 (11:22 -0700)
This patch is the last of the initial iWARP patch series. It
adds the possiblity to actually detect iWARP from the device and enable
it in the critical locations which basically make iWARP available.

It wasn't submitted until now as iWARP hadn't been accepted into
the rdma tree.

Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: Ariel Elior <Ariel.Elior@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qed/qed_cxt.c
drivers/net/ethernet/qlogic/qed/qed_mcp.c
drivers/net/ethernet/qlogic/qed/qed_rdma.c
drivers/net/ethernet/qlogic/qed/qed_sp_commands.c

index af106be8cc080bcd57986e4bbbb14bc2c09cc547..afd07ad916314bffdf3b35238ef89fef8eae8591 100644 (file)
@@ -2069,6 +2069,12 @@ static void qed_rdma_set_pf_params(struct qed_hwfn *p_hwfn,
 
        num_srqs = min_t(u32, 32 * 1024, p_params->num_srqs);
 
+       if (p_hwfn->mcp_info->func_info.protocol == QED_PCI_ETH_RDMA) {
+               DP_NOTICE(p_hwfn,
+                         "Current day drivers don't support RoCE & iWARP simultaneously on the same PF. Default to RoCE-only\n");
+               p_hwfn->hw_info.personality = QED_PCI_ETH_ROCE;
+       }
+
        switch (p_hwfn->hw_info.personality) {
        case QED_PCI_ETH_IWARP:
                /* Each QP requires one connection */
index 376485d99357dc0ca18dde626300da1327e35721..8b99c7d26f3415b5819cc6099e3852e81eb269a7 100644 (file)
@@ -1691,12 +1691,12 @@ qed_mcp_get_shmem_proto_mfw(struct qed_hwfn *p_hwfn,
        case FW_MB_PARAM_GET_PF_RDMA_ROCE:
                *p_proto = QED_PCI_ETH_ROCE;
                break;
+       case FW_MB_PARAM_GET_PF_RDMA_IWARP:
+               *p_proto = QED_PCI_ETH_IWARP;
+               break;
        case FW_MB_PARAM_GET_PF_RDMA_BOTH:
-               DP_NOTICE(p_hwfn,
-                         "Current day drivers don't support RoCE & iWARP. Default to RoCE-only\n");
-               *p_proto = QED_PCI_ETH_ROCE;
+               *p_proto = QED_PCI_ETH_RDMA;
                break;
-       case FW_MB_PARAM_GET_PF_RDMA_IWARP:
        default:
                DP_NOTICE(p_hwfn,
                          "MFW answers GET_PF_RDMA_PROTOCOL but param is %08x\n",
index 6fb99518a61fdef22b42b61ad1b93946257beec4..06715f7403efae94816e07c7db2bf54137481cb7 100644 (file)
@@ -156,7 +156,10 @@ static int qed_rdma_alloc(struct qed_hwfn *p_hwfn,
                return rc;
 
        p_hwfn->p_rdma_info = p_rdma_info;
-       p_rdma_info->proto = PROTOCOLID_ROCE;
+       if (QED_IS_IWARP_PERSONALITY(p_hwfn))
+               p_rdma_info->proto = PROTOCOLID_IWARP;
+       else
+               p_rdma_info->proto = PROTOCOLID_ROCE;
 
        num_cons = qed_cxt_get_proto_cid_count(p_hwfn, p_rdma_info->proto,
                                               NULL);
index 46d0c3cb83a56287ea3223277a18832c229df919..a1d33f35aad3abb98442bb1a96e85c5072e38e01 100644 (file)
@@ -377,6 +377,7 @@ int qed_sp_pf_start(struct qed_hwfn *p_hwfn,
                p_ramrod->personality = PERSONALITY_ISCSI;
                break;
        case QED_PCI_ETH_ROCE:
+       case QED_PCI_ETH_IWARP:
                p_ramrod->personality = PERSONALITY_RDMA_AND_ETH;
                break;
        default: