From: Xiao Wang Date: Sun, 25 Sep 2016 09:00:02 +0000 (+0800) Subject: net/ixgbe/base: set default autoneg speed at reset X-Git-Tag: spdx-start~5782 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=c9bc2f6d2dfe400575110b19441faced2ace0665;p=dpdk.git net/ixgbe/base: set default autoneg speed at reset This patch avoids the situation where we initialize an adapter but have not yet set up phy.autoneg_advertised speeds. In that case we could end up with having no autoneg speeds enabled and therefore get no link until we reset the link and set the autoneg speeds correctly. Signed-off-by: Xiao Wang Acked-by: Wenzhuo Lu --- diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c index 3c1932617b..32759cc8be 100644 --- a/drivers/net/ixgbe/base/ixgbe_x550.c +++ b/drivers/net/ixgbe/base/ixgbe_x550.c @@ -2283,6 +2283,12 @@ STATIC s32 ixgbe_reset_phy_m88(struct ixgbe_hw *hw) hw->mac.ops.release_swfw_sync(hw, mask); + /* In case of first reset set advertised speeds to default value */ + if (!hw->phy.autoneg_advertised) + hw->phy.autoneg_advertised = IXGBE_LINK_SPEED_1GB_FULL | + IXGBE_LINK_SPEED_100_FULL | + IXGBE_LINK_SPEED_10_FULL; + return ixgbe_setup_m88(hw); out: