]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ixgbe: Support 2.5Gb and 5Gb speed
authorTony Nguyen <anthony.l.nguyen@intel.com>
Fri, 11 Nov 2016 00:01:33 +0000 (16:01 -0800)
committerJack Vogel <jack.vogel@oracle.com>
Fri, 16 Jun 2017 06:01:23 +0000 (23:01 -0700)
Though not advertised through ethtool, if the link partner advertises a
2.5Gb or 5Gb connection, and the adapter supports it, allow the speed to be
used.

Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Orabug: 26242766
(cherry picked from commit 1dc0eb75a8f88e37c2aee75fca0313cd6e30a1e1)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
Reviewed-by: Ethan Zhao <ethan.zhao@oracle.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c

index d3b7b2d6160b66bada4aed0a88d8b4f8ce8467b8..f36336a1a54255699eaec9a78bc3d32709ba587b 100644 (file)
@@ -340,6 +340,9 @@ static int ixgbe_get_settings(struct net_device *netdev,
                case IXGBE_LINK_SPEED_10GB_FULL:
                        ethtool_cmd_speed_set(ecmd, SPEED_10000);
                        break;
+               case IXGBE_LINK_SPEED_5GB_FULL:
+                       ethtool_cmd_speed_set(ecmd, SPEED_5000);
+                       break;
                case IXGBE_LINK_SPEED_2_5GB_FULL:
                        ethtool_cmd_speed_set(ecmd, SPEED_2500);
                        break;
index 2fcde8777a2902a94b914d471abf83999492f7cd..e55b2602f37166d7eea6442fa3bc5797e97d470c 100644 (file)
@@ -768,9 +768,7 @@ s32 ixgbe_setup_phy_link_speed_generic(struct ixgbe_hw *hw,
                                       ixgbe_link_speed speed,
                                       bool autoneg_wait_to_complete)
 {
-
-       /*
-        * Clear autoneg_advertised and set new values based on input link
+       /* Clear autoneg_advertised and set new values based on input link
         * speed.
         */
        hw->phy.autoneg_advertised = 0;
@@ -778,6 +776,12 @@ s32 ixgbe_setup_phy_link_speed_generic(struct ixgbe_hw *hw,
        if (speed & IXGBE_LINK_SPEED_10GB_FULL)
                hw->phy.autoneg_advertised |= IXGBE_LINK_SPEED_10GB_FULL;
 
+       if (speed & IXGBE_LINK_SPEED_5GB_FULL)
+               hw->phy.autoneg_advertised |= IXGBE_LINK_SPEED_5GB_FULL;
+
+       if (speed & IXGBE_LINK_SPEED_2_5GB_FULL)
+               hw->phy.autoneg_advertised |= IXGBE_LINK_SPEED_2_5GB_FULL;
+
        if (speed & IXGBE_LINK_SPEED_1GB_FULL)
                hw->phy.autoneg_advertised |= IXGBE_LINK_SPEED_1GB_FULL;