cxgb4: distinguish between 1-lane KR/KX and 4-lane KR/KX/KX4 ports
authorDimitris Michailidis <dm@chelsio.com>
Tue, 14 Dec 2010 21:36:47 +0000 (21:36 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 16 Dec 2010 21:16:00 +0000 (13:16 -0800)
And fix the supported flags ethtool reports for the two cases.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/cxgb4/cxgb4_main.c
drivers/net/cxgb4/t4fw_api.h

index 3012a8aeff454e8a7a65cec391e09e5880478e50..3f33d515f62e9f4a8eb46ba06809b488e6ae2efd 100644 (file)
@@ -1375,7 +1375,12 @@ static unsigned int from_fw_linkcaps(unsigned int type, unsigned int caps)
        } else if (type == FW_PORT_TYPE_KR)
                v |= SUPPORTED_Backplane | SUPPORTED_10000baseKR_Full;
        else if (type == FW_PORT_TYPE_BP_AP)
-               v |= SUPPORTED_Backplane | SUPPORTED_10000baseR_FEC;
+               v |= SUPPORTED_Backplane | SUPPORTED_10000baseR_FEC |
+                    SUPPORTED_10000baseKR_Full | SUPPORTED_1000baseKX_Full;
+       else if (type == FW_PORT_TYPE_BP4_AP)
+               v |= SUPPORTED_Backplane | SUPPORTED_10000baseR_FEC |
+                    SUPPORTED_10000baseKR_Full | SUPPORTED_1000baseKX_Full |
+                    SUPPORTED_10000baseKX4_Full;
        else if (type == FW_PORT_TYPE_FIBER_XFI ||
                 type == FW_PORT_TYPE_FIBER_XAUI || type == FW_PORT_TYPE_SFP)
                v |= SUPPORTED_FIBRE;
@@ -3489,7 +3494,7 @@ static void __devinit print_port_info(struct adapter *adap)
 {
        static const char *base[] = {
                "R XFI", "R XAUI", "T SGMII", "T XFI", "T XAUI", "KX4", "CX4",
-               "KX", "KR", "KR SFP+", "KR FEC"
+               "KX", "KR", "R SFP+", "KR/KX", "KR/KX/KX4"
        };
 
        int i;
index 940584a8a640b077374e5caf1319341773f08fd3..edcfd7ec7802a1d0723acac4f58bd85ade03294d 100644 (file)
@@ -1239,6 +1239,7 @@ enum fw_port_type {
        FW_PORT_TYPE_KR,
        FW_PORT_TYPE_SFP,
        FW_PORT_TYPE_BP_AP,
+       FW_PORT_TYPE_BP4_AP,
 
        FW_PORT_TYPE_NONE = FW_PORT_CMD_PTYPE_MASK
 };