be2net: add speed reporting for 40G/KR interface
authorKalesh AP <kalesh.purayil@emulex.com>
Fri, 19 Sep 2014 10:16:53 +0000 (15:46 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Sep 2014 19:01:07 +0000 (15:01 -0400)
This patch adds speed reporting via ethtool for 40Gbps KR4 interface
on the Skyhawk-R chip.

Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be_ethtool.c

index 43b559570632dd4133b73035c96b9c41a5f7f25b..8297824af4f7bc89dba79cb879a773c533bfee98 100644 (file)
@@ -538,6 +538,13 @@ static u32 convert_to_et_setting(struct be_adapter *adapter, u32 if_speeds)
                val |= SUPPORTED_Backplane |
                                SUPPORTED_10000baseKR_Full;
                break;
+       case PHY_TYPE_KR4_40GB:
+               val |= SUPPORTED_Backplane;
+               if (if_speeds & BE_SUPPORTED_SPEED_10GBPS)
+                       val |= SUPPORTED_10000baseKR_Full;
+               if (if_speeds & BE_SUPPORTED_SPEED_40GBPS)
+                       val |= SUPPORTED_40000baseKR4_Full;
+               break;
        case PHY_TYPE_QSFP:
                if (if_speeds & BE_SUPPORTED_SPEED_40GBPS) {
                        switch (adapter->phy.cable_type) {