i40e: Save more link abilities when using ethtool
authorHenry Tieman <henry.w.tieman@intel.com>
Fri, 2 Dec 2016 20:33:01 +0000 (12:33 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sun, 12 Feb 2017 04:39:02 +0000 (20:39 -0800)
Ethtool support needs to save more PHY information. The
added information includes FEC capabilities and 25G link
types. Without this change it is possible to lose 25G or
FEC settings by using ethtool.

Change-ID: Ie42255b1e901ffbf9583b8c46466a54894114280
Signed-off-by: Henry Tieman <henry.w.tieman@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_ethtool.c

index c4ab3c1ae02a7f3ca24b9d0b1848c18aae41e40e..a22e26200bccb1a7e79716a7429e0eb7fe700ecc 100644 (file)
@@ -803,9 +803,12 @@ static int i40e_set_settings(struct net_device *netdev,
        if (change || (abilities.link_speed != config.link_speed)) {
                /* copy over the rest of the abilities */
                config.phy_type = abilities.phy_type;
+               config.phy_type_ext = abilities.phy_type_ext;
                config.eee_capability = abilities.eee_capability;
                config.eeer = abilities.eeer_val;
                config.low_power_ctrl = abilities.d3_lpan;
+               config.fec_config = abilities.fec_cfg_curr_mod_ext_info &
+                                   I40E_AQ_PHY_FEC_CONFIG_MASK;
 
                /* save the requested speeds */
                hw->phy.link_info.requested_speeds = config.link_speed;