From patchwork Tue Sep 25 02:34:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qi Zhang X-Patchwork-Id: 45272 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 C18211B207; Tue, 25 Sep 2018 04:34:34 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 0F5981B14F; Tue, 25 Sep 2018 04:34:11 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Sep 2018 19:34:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,300,1534834800"; d="scan'208";a="259958534" Received: from dpdk51.sh.intel.com ([10.67.110.190]) by orsmga005.jf.intel.com with ESMTP; 24 Sep 2018 19:33:57 -0700 From: Qi Zhang To: beilei.xing@intel.com Cc: dev@dpdk.org, ferruh.yigit@intel.com, helin.zhang@intel.com, Qi Zhang , stable@dpdk.org Date: Tue, 25 Sep 2018 10:34:33 +0800 Message-Id: <20180925023442.134705-12-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180925023442.134705-1-qi.z.zhang@intel.com> References: <20180925023442.134705-1-qi.z.zhang@intel.com> Subject: [dpdk-dev] [PATCH 11/20] net/i40e/base: correct global reset timeout calculation 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" The wait time for Global Reset Ready steady state is calculated based on the GLGEN_RSTCTL.GRSTDEL value. However, current impelementation multiplied that value by 20 as a workaround for an issue in SOC platforms. This resulted in the maximum GLGEN_RSTCTL.GRSTDEL timeout of 6.5 seconds becoming 130 seconds, which is so long that the VMkernel watchdog thinks the kernel is frozen and triggers a PSOD. Cc: stable@dpdk.org Signed-off-by: Qi Zhang --- drivers/net/i40e/base/i40e_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index 0affa98ac..0eb369ff6 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -1342,7 +1342,7 @@ enum i40e_status_code i40e_pf_reset(struct i40e_hw *hw) I40E_GLGEN_RSTCTL_GRSTDEL_MASK) >> I40E_GLGEN_RSTCTL_GRSTDEL_SHIFT; - grst_del = grst_del * 20; + grst_del = min(grst_del * 20, 160U); for (cnt = 0; cnt < grst_del; cnt++) { reg = rd32(hw, I40E_GLGEN_RSTAT);