From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 48861324B for ; Sun, 6 May 2018 08:37:59 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id EC7C42244B; Sun, 6 May 2018 02:37:58 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sun, 06 May 2018 02:37:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=Rl+38dz9N151471gn 5oWzG+8aZPPkiTZisA2YSK1u3g=; b=EJqTrIlzHQnaqA5Saqc/h6lp3AkBo7DDl 9Gx08gVCcT+AGY2N5gdr3TWA5Zc6xiKsz01yDOia8PqBJ1PzYoMwphM0P4kIdBZN s5Lq2A/a+GrLr7mCJKuTG3BlTmd7q7vrvov+abnh9kGmla1ZQa5yVrvaOqc+Upq5 Npst+stH6wioUWALa2jS8DqNpDv3ZZXUgBMbCire3s1F/NnSuiAIY7ZbC78uUgXp ZxAAaTl23Aj1cqlws82sMElreMni25bhNIw3MOVIApErxU6lZbR9gkeA8cF8S4gM T5eGUFUYwDReJqjOcUBQO3/qSTjii7R6VXYewLB5DARaTtYV0IdmA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=Rl+38dz9N151471gn5oWzG+8aZPPkiTZisA2YSK1u3g=; b=lZZo9mBL H9VnMfpBwpz1s22iF+GTUNwyT3H4Cn3hUMVMl52pJRp6BGPfpnUkRpcXl7qpbo/8 mkT1rcJeNxLGpKR2hRzaXTnW/X6R2ta6mpUkEYNR7rHgFxHQ8PsUPD/RhTT6xhAE JESmjOtsR2hfoNLiKjTot38T0Ya0duitIUpgSM9mzRyTHzgXdAMxDtQVywh5M3yZ V8WX0pHBk+mEOpwSunaxOldaqMdn2/M6PQg6FAgRlDBtnZ5UL+Flr01kyRDc6KmJ Qneh9+NJ8bbPoImjtQtDErLgK9jP7XPz0OE6Tz3qOcE14nXPo/l0jlS46oh2BKvh i8v4qsTzPxeuFw== X-ME-Sender: Received: from yuanhanliu-NB0.tencent.com (unknown [223.74.148.102]) by mail.messagingengine.com (Postfix) with ESMTPA id 8E3E610253; Sun, 6 May 2018 02:37:57 -0400 (EDT) From: Yuanhan Liu To: Rasesh Mody Cc: dpdk stable Date: Sun, 6 May 2018 14:36:32 +0800 Message-Id: <20180506063639.23196-19-yliu@fridaylinux.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180506063639.23196-1-yliu@fridaylinux.org> References: <20180506063639.23196-1-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'net/bnx2x: fix for PCI FLR after ungraceful exit' has been queued to LTS release 17.11.3 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 May 2018 06:37:59 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/09/18. So please shout if anyone has objections. Thanks. --yliu --- >>From 9e492ac6e7b204b97b13aaa102649f143aa54c0b Mon Sep 17 00:00:00 2001 From: Rasesh Mody Date: Wed, 18 Apr 2018 13:15:08 -0700 Subject: [PATCH] net/bnx2x: fix for PCI FLR after ungraceful exit [ upstream commit 66ba596aa6b5750b16549a322ef9a09fa7f0e3f6 ] This patch provides a fix for PCI function level reset after an ungraceful exit from an application. The fix is to enable internal target read as part of device attach before getting device information from device config space, device itself and shared memory. In addition to that, add a 200ms delay for the recovery flow to complete. Fixes: 540a211084a7 ("bnx2x: driver core") Signed-off-by: Rasesh Mody --- drivers/net/bnx2x/bnx2x.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c index 9394f6c50..7927d2a67 100644 --- a/drivers/net/bnx2x/bnx2x.c +++ b/drivers/net/bnx2x/bnx2x.c @@ -8289,16 +8289,6 @@ static int bnx2x_get_device_info(struct bnx2x_softc *sc) REG_WR(sc, PXP2_REG_PGL_ADDR_90_F1, 0); REG_WR(sc, PXP2_REG_PGL_ADDR_94_F1, 0); } - -/* - * Enable internal target-read (in case we are probed after PF - * FLR). Must be done prior to any BAR read access. Only for - * 57712 and up - */ - if (!CHIP_IS_E1x(sc)) { - REG_WR(sc, PGLUE_B_REG_INTERNAL_PFID_ENABLE_TARGET_READ, - 1); - } } /* get the nvram size */ @@ -9675,7 +9665,17 @@ int bnx2x_attach(struct bnx2x_softc *sc) bnx2x_init_rte(sc); if (IS_PF(sc)) { -/* get device info and set params */ + /* Enable internal target-read (in case we are probed after PF + * FLR). Must be done prior to any BAR read access. Only for + * 57712 and up + */ + if (!CHIP_IS_E1x(sc)) { + REG_WR(sc, PGLUE_B_REG_INTERNAL_PFID_ENABLE_TARGET_READ, + 1); + DELAY(200000); + } + + /* get device info and set params */ if (bnx2x_get_device_info(sc) != 0) { PMD_DRV_LOG(NOTICE, "getting device info"); return -ENXIO; @@ -9684,7 +9684,7 @@ int bnx2x_attach(struct bnx2x_softc *sc) /* get phy settings from shmem and 'and' against admin settings */ bnx2x_get_phy_info(sc); } else { -/* Left mac of VF unfilled, PF should set it for VF */ + /* Left mac of VF unfilled, PF should set it for VF */ memset(sc->link_params.mac_addr, 0, ETHER_ADDR_LEN); } -- 2.11.0