net/ixgbe/base: fix x550em 10G NIC link status
authorGuinan Sun <guinanx.sun@intel.com>
Thu, 9 Jul 2020 08:00:30 +0000 (08:00 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Sat, 11 Jul 2020 04:18:53 +0000 (06:18 +0200)
With the NVM image for x550em XFI will not report
the auto-negotiation feature correctly. The auto-negotiation
should be "No" for supports and advertised items.
At the same time update speed makes it support 1G and 10G.

Fixes: 833df43399e7 ("net/ixgbe/base: add SGMII link for X550")
Cc: stable@dpdk.org
Signed-off-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>
drivers/net/ixgbe/base/ixgbe_x550.c

index 3de406f..9fa999e 100644 (file)
@@ -1891,7 +1891,14 @@ s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw,
                else
                        *speed = IXGBE_LINK_SPEED_10GB_FULL;
        } else {
+               *autoneg = true;
+
                switch (hw->phy.type) {
+               case ixgbe_phy_x550em_xfi:
+                       *speed = IXGBE_LINK_SPEED_1GB_FULL |
+                                IXGBE_LINK_SPEED_10GB_FULL;
+                       *autoneg = false;
+                       break;
                case ixgbe_phy_ext_1g_t:
 #ifdef PREBOOT_SUPPORT
                        *speed = IXGBE_LINK_SPEED_1GB_FULL;
@@ -1925,7 +1932,6 @@ s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw,
                                 IXGBE_LINK_SPEED_1GB_FULL;
                        break;
                }
-               *autoneg = true;
        }
 
        return IXGBE_SUCCESS;