be2net: add speed reporting for 20G-KR interface
authorVasundhara Volam <vasundhara.volam@emulex.com>
Fri, 19 Sep 2014 10:16:54 +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 20G KR2 interface on the
Skyhawk-R chip.

Signed-off-by: Vasundhara Volam <vasundhara.volam@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_cmds.h
drivers/net/ethernet/emulex/benet/be_ethtool.c

index b064c502287e216480d7926e1a4584f165e89c0e..eb5085d6794fde8b4635d82bd0427d0fde084844 100644 (file)
@@ -1374,6 +1374,7 @@ enum {
 #define BE_SUPPORTED_SPEED_100MBPS     2
 #define BE_SUPPORTED_SPEED_1GBPS       4
 #define BE_SUPPORTED_SPEED_10GBPS      8
+#define BE_SUPPORTED_SPEED_20GBPS      0x10
 #define BE_SUPPORTED_SPEED_40GBPS      0x20
 
 #define BE_AN_EN                       0x2
index 8297824af4f7bc89dba79cb879a773c533bfee98..ec66f64bd045c2d0c8d80a74de0c9a0bfa02a2bf 100644 (file)
@@ -534,6 +534,13 @@ static u32 convert_to_et_setting(struct be_adapter *adapter, u32 if_speeds)
                if (if_speeds & BE_SUPPORTED_SPEED_10GBPS)
                        val |= SUPPORTED_10000baseKX4_Full;
                break;
+       case PHY_TYPE_KR2_20GB:
+               val |= SUPPORTED_Backplane;
+               if (if_speeds & BE_SUPPORTED_SPEED_10GBPS)
+                       val |= SUPPORTED_10000baseKR_Full;
+               if (if_speeds & BE_SUPPORTED_SPEED_20GBPS)
+                       val |= SUPPORTED_20000baseKR2_Full;
+               break;
        case PHY_TYPE_KR_10GB:
                val |= SUPPORTED_Backplane |
                                SUPPORTED_10000baseKR_Full;