From patchwork Mon Jul 16 16:36:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Smith X-Patchwork-Id: 43119 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9A2DD255; Mon, 16 Jul 2018 18:37:05 +0200 (CEST) Received: from mail-oi0-f67.google.com (mail-oi0-f67.google.com [209.85.218.67]) by dpdk.org (Postfix) with ESMTP id 9D3B9235 for ; Mon, 16 Jul 2018 18:37:03 +0200 (CEST) Received: by mail-oi0-f67.google.com with SMTP id v8-v6so76000386oie.5 for ; Mon, 16 Jul 2018 09:37:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netgate.com; s=google; h=from:to:cc:subject:date:message-id; bh=B9MuOUlTMPF6MxSKV0WDOy47DTQSEFcZ7NVluuxcYpo=; b=XO570EBCWZ6X1cAxzIr3urmAYZi+tGaUgQu7pKqfwxLygZCzg8N9Hmv3EfgyPssHxl 9SfgYTi31+0ZYKxW5sXZ/tIMzZy9XnrWC5GSc5IUeBtAY1npUICe8ujRGpQT25PelXTR B9/2daJIyq8YNU6VVuWVwnqTa1EL4VrfdY8co= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=B9MuOUlTMPF6MxSKV0WDOy47DTQSEFcZ7NVluuxcYpo=; b=qy2rx+oYzrndrrI5o9RopIbOWdjozZfyrkNY/6CvnIrqfxw99Ozy7i+jrk5X9uSKZ1 YzymgHCcXwZ2EcQc1gYKkgQLPICo9Wv0xdGemOxUjqgOi+9blE1s5ciEqEqIkc4BMAhD F5xgqRDPLU3ILFfwuDsq0+N0PIAM5X5RCqiLuSHVkj2OcYjxGiHuiOgGI6C4XtJQT6jf Gxhb6jnu1D3z9BaoWr0ErXw+fmEXVDppqLOsLlJXfOz2ri6Nr6SD9FlJV962vLpyM2na bq+H3qNNXuGGXJTFhHHTec79T02QGuZIXu4Ot72Q2UB8lLab88uI/Qj4IMfywNt7NPPP v+bw== X-Gm-Message-State: AOUpUlGw9HM5+UXLAPCgrSk1YGXvONbqBEGVQJ/Yv+y9JODzTI6iXnL4 XC+t7Z/mXCsXn+k/OLObINhUgA== X-Google-Smtp-Source: AAOMgpfa8U8dJtZIeLp9e78zDxaTccPp0MSWdzzyJcFO+rFLe5JAigb0RbstUNd3fcXL+ZixBhJTLg== X-Received: by 2002:aca:bcc1:: with SMTP id m184-v6mr46926oif.19.1531759022844; Mon, 16 Jul 2018 09:37:02 -0700 (PDT) Received: from localhost.localdomain ([136.62.52.127]) by smtp.googlemail.com with ESMTPSA id e19-v6sm16301933oii.56.2018.07.16.09.37.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 16 Jul 2018 09:37:01 -0700 (PDT) From: Matthew Smith To: wenzhuo.lu@intel.com, konstantin.ananyev@intel.com Cc: dev@dpdk.org, stable@dpdk.org, Matthew Smith Date: Mon, 16 Jul 2018 11:36:04 -0500 Message-Id: <20180716163604.31896-1-mgsmith@netgate.com> X-Mailer: git-send-email 2.15.2 (Apple Git-101.1) Subject: [dpdk-dev] [PATCH] ixgbe: wait longer for link after fiber MAC setup X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" After setting up the link on a fiber port, the maximum wait time for the link to come up is 500 ms in ixgbe_setup_mac_link_multispeed_fiber(). On an x550 SFP+ port, this is often not sufficiently long for the link to come up. This can result in never being able to retrieve accurate link status for the port using rte_eth_link_get_nowait(). Increase the maximum wait time in ixgbe_setup_mac_link_multispeed_fiber() to 1 s. Bugzilla ID: 69 Fixes: f3430431abaf ("ixgbe/base: add SFP+ dual-speed support") Cc: stable@dpdk.org Signed-off-by: Matthew Smith Acked-by: Qi Zhang --- drivers/net/ixgbe/base/ixgbe_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ixgbe/base/ixgbe_common.c b/drivers/net/ixgbe/base/ixgbe_common.c index e7e9256e5..2fb0a072c 100644 --- a/drivers/net/ixgbe/base/ixgbe_common.c +++ b/drivers/net/ixgbe/base/ixgbe_common.c @@ -5296,7 +5296,7 @@ s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw, * Section 73.10.2, we may have to wait up to 500ms if KR is * attempted. 82599 uses the same timing for 10g SFI. */ - for (i = 0; i < 5; i++) { + for (i = 0; i < 10; i++) { /* Wait for the link partner to also set speed */ msec_delay(100);