]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
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)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 10 Mar 2016 16:36:48 +0000 (08:36 -0800)
Orabug: 22342532

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>
(cherry picked from commit 48b1804ee3cdad7bf115666eb35edf12a734710f)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Conflicts:
drivers/net/ethernet/intel/i40e/i40e.h

drivers/net/ethernet/intel/i40e/i40e.h
drivers/net/ethernet/intel/i40e/i40e_ethtool.c

index 4e0453c305d49518fe2ce4f643e981fe225fa0e1..9c12aa89b5f268b4711ea559fa006e072e31216c 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)
 
        /* tracks features that get auto disabled by errors */
        u64 auto_disable_flags;
index 869298ee3d8d46988d57fb92e5f730d16a44a143..e8d431a28a7eb396a964ec9a289d17e11388c79e 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)