i40e: Replace X722 mac check in ethtool get_settings
authorCatherine Sullivan <catherine.sullivan@intel.com>
Wed, 9 Dec 2015 23:50:25 +0000 (15:50 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 4 Feb 2016 04:17:15 +0000 (20:17 -0800)
100M SGMII is only supported on X722.  Replace the mac check with
a feature flag check that is only set for the X722 device.

Change-ID: I53452d9af6af8cd9dca8500215fbc6ce93418f52
Signed-off-by: Catherine Sullivan <catherine.sullivan@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.h
drivers/net/ethernet/intel/i40e/i40e_ethtool.c

index 68f2204..47f6c0a 100644 (file)
@@ -339,6 +339,7 @@ struct i40e_pf {
 #define I40E_FLAG_VEB_MODE_ENABLED             BIT_ULL(40)
 #define I40E_FLAG_GENEVE_OFFLOAD_CAPABLE       BIT_ULL(41)
 #define I40E_FLAG_NO_PCI_LINK_CHECK            BIT_ULL(42)
+#define I40E_FLAG_100M_SGMII_CAPABLE           BIT_ULL(43)
 #define I40E_FLAG_PF_MAC                       BIT_ULL(50)
 
        /* tracks features that get auto disabled by errors */
index c8b9dca..252a9dd 100644 (file)
@@ -340,7 +340,7 @@ static void i40e_get_settings_link_up(struct i40e_hw *hw,
                                  SUPPORTED_1000baseT_Full;
                if (hw_link_info->requested_speeds & I40E_LINK_SPEED_1GB)
                        ecmd->advertising |= ADVERTISED_1000baseT_Full;
-               if (pf->hw.mac.type == I40E_MAC_X722) {
+               if (pf->flags & I40E_FLAG_100M_SGMII_CAPABLE) {
                        ecmd->supported |= SUPPORTED_100baseT_Full;
                        if (hw_link_info->requested_speeds &
                            I40E_LINK_SPEED_100MB)