ixgbe: list X553 backplane speeds correctly
authorDon Skidmore <donald.c.skidmore@intel.com>
Sat, 31 Dec 2016 02:13:18 +0000 (21:13 -0500)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 18 Apr 2017 20:08:48 +0000 (13:08 -0700)
We forgot to indicate some of the supported speed on the X553
backplane.  This patch attempts to correct for that.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c

index 22869aaec3d4812a5a85e6c768d65ef7fba0f2d8..f5fdd9b17de2ccf3d359f0fe4291f9e01d951aec 100644 (file)
@@ -3775,6 +3775,11 @@ struct ixgbe_info {
 
 #define IXGBE_NW_MNG_IF_SEL            0x00011178
 #define IXGBE_NW_MNG_IF_SEL_MDIO_ACT           BIT(1)
+#define IXGBE_NW_MNG_IF_SEL_PHY_SPEED_10M      BIT(17)
+#define IXGBE_NW_MNG_IF_SEL_PHY_SPEED_100M     BIT(18)
+#define IXGBE_NW_MNG_IF_SEL_PHY_SPEED_1G       BIT(19)
+#define IXGBE_NW_MNG_IF_SEL_PHY_SPEED_2_5G     BIT(20)
+#define IXGBE_NW_MNG_IF_SEL_PHY_SPEED_10G      BIT(21)
 #define IXGBE_NW_MNG_IF_SEL_ENABLE_10_100M     BIT(23)
 #define IXGBE_NW_MNG_IF_SEL_INT_PHY_MODE       BIT(24)
 #define IXGBE_NW_MNG_IF_SEL_MDIO_PHY_ADD_SHIFT 3
index 5127e5e759f2d3dee4e952c32b287b4e45763b6d..af579c21e57f0978a4e9ce65b64e59eba8f0f76c 100644 (file)
@@ -2241,6 +2241,20 @@ static s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw,
                case ixgbe_phy_sgmii:
                        *speed = IXGBE_LINK_SPEED_1GB_FULL;
                        break;
+               case ixgbe_phy_x550em_kr:
+                       if (hw->mac.type == ixgbe_mac_x550em_a) {
+                               /* check different backplane modes */
+                               if (hw->phy.nw_mng_if_sel &
+                                   IXGBE_NW_MNG_IF_SEL_PHY_SPEED_2_5G) {
+                                       *speed = IXGBE_LINK_SPEED_2_5GB_FULL;
+                                       break;
+                               } else if (hw->device_id ==
+                                          IXGBE_DEV_ID_X550EM_A_KR_L) {
+                                       *speed = IXGBE_LINK_SPEED_1GB_FULL;
+                                       break;
+                               }
+                       }
+                       /* fall through */
                default:
                        *speed = IXGBE_LINK_SPEED_10GB_FULL |
                                 IXGBE_LINK_SPEED_1GB_FULL;