]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
cxgb4/cxgb4vf: support for XLAUI Port Type
authorGanesh Goudar <ganeshgr@chelsio.com>
Thu, 28 Dec 2017 06:37:15 +0000 (12:07 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 28 Dec 2017 17:09:08 +0000 (12:09 -0500)
Add support for new Backplane XLAUI port type.

Signed-off-by: Casey Leedom <leedom@chelsio.com>
Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h
drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c

index 541419b084ac6bbb0dea512e71008df6d6525e14..7852d98bad75810d357d4155bbf129149cf88621 100644 (file)
@@ -517,7 +517,8 @@ static int from_fw_port_mod_type(enum fw_port_type port_type,
                else
                        return PORT_OTHER;
        } else if (port_type == FW_PORT_TYPE_KR4_100G ||
-                  port_type == FW_PORT_TYPE_KR_SFP28) {
+                  port_type == FW_PORT_TYPE_KR_SFP28 ||
+                  port_type == FW_PORT_TYPE_KR_XLAUI) {
                return PORT_NONE;
        }
 
@@ -645,6 +646,13 @@ static void fw_caps_to_lmm(enum fw_port_type port_type,
                FW_CAPS_TO_LMM(SPEED_25G, 25000baseKR_Full);
                break;
 
+       case FW_PORT_TYPE_KR_XLAUI:
+               SET_LMM(Backplane);
+               FW_CAPS_TO_LMM(SPEED_1G, 1000baseKX_Full);
+               FW_CAPS_TO_LMM(SPEED_10G, 10000baseKR_Full);
+               FW_CAPS_TO_LMM(SPEED_40G, 40000baseKR4_Full);
+               break;
+
        case FW_PORT_TYPE_CR2_QSFP:
                SET_LMM(FIBRE);
                SET_LMM(50000baseSR2_Full);
index 44930ca06c4bd1860609fb69da04224739b59e19..f2a60e01d56301a9930f358e3dbc8be520ed5c28 100644 (file)
@@ -6084,6 +6084,7 @@ const char *t4_get_port_type_description(enum fw_port_type port_type)
                "CR2_QSFP",
                "SFP28",
                "KR_SFP28",
+               "KR_XLAUI"
        };
 
        if (port_type < ARRAY_SIZE(port_type_description))
index 01f5a5ec16fadda1a9eb66bf74410c4967c01577..427f252a9087d001f7dc0f5d0b06730d1d48ac22 100644 (file)
@@ -2829,6 +2829,7 @@ enum fw_port_type {
        FW_PORT_TYPE_CR2_QSFP,
        FW_PORT_TYPE_SFP28,
        FW_PORT_TYPE_KR_SFP28,
+       FW_PORT_TYPE_KR_XLAUI,
 
        FW_PORT_TYPE_NONE = FW_PORT_CMD_PTYPE_M
 };
index b48361cfdc78f98f4b4159ba8f76cbcaf1cedcc7..96f69f80dc99a2bc4597cd5bd98ecf369306c711 100644 (file)
@@ -1229,7 +1229,8 @@ static int from_fw_port_mod_type(enum fw_port_type port_type,
                else
                        return PORT_OTHER;
        } else if (port_type == FW_PORT_TYPE_KR4_100G ||
-                  port_type == FW_PORT_TYPE_KR_SFP28) {
+                  port_type == FW_PORT_TYPE_KR_SFP28 ||
+                  port_type == FW_PORT_TYPE_KR_XLAUI) {
                return PORT_NONE;
        }
 
@@ -1323,6 +1324,13 @@ static void fw_caps_to_lmm(enum fw_port_type port_type,
                SET_LMM(25000baseKR_Full);
                break;
 
+       case FW_PORT_TYPE_KR_XLAUI:
+               SET_LMM(Backplane);
+               FW_CAPS_TO_LMM(SPEED_1G, 1000baseKX_Full);
+               FW_CAPS_TO_LMM(SPEED_10G, 10000baseKR_Full);
+               FW_CAPS_TO_LMM(SPEED_40G, 40000baseKR4_Full);
+               break;
+
        case FW_PORT_TYPE_CR2_QSFP:
                SET_LMM(FIBRE);
                SET_LMM(50000baseSR2_Full);