]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ixgbe: report correct media type for KR, KX and KX4 interfaces
authorVeola Nazareth <veola.nazareth@intel.com>
Sun, 21 Aug 2016 02:35:37 +0000 (19:35 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Sat, 25 Feb 2017 05:47:56 +0000 (21:47 -0800)
Orabug: 24568240

ethtool reports backplane type interfaces as 1000/10000baseT link modes.
This has been corrected to report the media as KR, KX or KX4 based on the backplane interface present.

Signed-off-by: Veola Nazareth <veola.nazareth@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit 27b23f96f3cf6ffd680e28bf569d8ddd71842590)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c

index 2f5da8d0ab23f55076e72076162add3d8ca872ab..734e47fcb43da49d207b65b2761c780e1dcffffe 100644 (file)
@@ -193,7 +193,9 @@ static int ixgbe_get_settings(struct net_device *netdev,
        if (supported_link & IXGBE_LINK_SPEED_10GB_FULL)
                ecmd->supported |= ixgbe_get_supported_10gtypes(hw);
        if (supported_link & IXGBE_LINK_SPEED_1GB_FULL)
-               ecmd->supported |= SUPPORTED_1000baseT_Full;
+               ecmd->supported |= (ixgbe_isbackplane(hw->phy.media_type)) ?
+                                  SUPPORTED_1000baseKX_Full :
+                                  SUPPORTED_1000baseT_Full;
        if (supported_link & IXGBE_LINK_SPEED_100_FULL)
                ecmd->supported |= ixgbe_isbackplane(hw->phy.media_type) ?
                                   SUPPORTED_1000baseKX_Full :