From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by dpdk.org (Postfix) with ESMTP id E4C4F1DBA for ; Mon, 30 Apr 2018 16:54:46 +0200 (CEST) Received: by mail-wm0-f68.google.com with SMTP id a137so10367280wme.1 for ; Mon, 30 Apr 2018 07:54:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4dPrV6gY5ZjGhAnQnAscEVxDjuYQBycGuYDST7dpqBo=; b=Z9McJDmYRb7JVHl6bn+OlqGoG3j/5p+C6xC1mfRfwXQms+ZaMo03dimFMmjI84jvyA 0sO/5/yZWPs78tWQCAtHwNgys2CrTe+zySIImwq209rH2N1WurRc9XnXuR09PqbdpYz5 1m5OILMlm4qXC+w8UMYG6GtSBEALJY/Y5ymjpqXZss66+C0zFR4OOZbNtStVmhxpsOvt XjHdxIw08KZDmbmQ1fD4kkCCt7ZRG4P1QJ2FSVGmJTwTF8/gKQ+h85z/+18sE3rpTatv Gxv9MNqcNnBXodeG5s4uNTlvyWFRbaYNEtcNMjRN6IdZxpC0PlWsmwljdtskbenzpnK/ RdIA== 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:in-reply-to :references; bh=4dPrV6gY5ZjGhAnQnAscEVxDjuYQBycGuYDST7dpqBo=; b=pCm5j5uegDMHDfYbMd5E0c8F5WLR584swiI0sogF21xhAoKqDd2sQsxPwXPVeqxWZz RCjTsVLgChAL5aXJ/JUPCro/ToxFEWyu1lvLMTuUrZAwfgVAWOMsrqX4jsVpz5PXrI+7 vdVE8VKxDjYeyAz7VfvQGz8ye9gCdrkf6Q9n5J22WTkI3Hcz01U1csGoAaU2LK7sdirP kDy/tmmoRVCsNxZ66FRxwXGGkIYW0itoHHgA/jlxdR2/rVHxaka1JPRbmEWWI0rF+XoC 2r86gOrK6wyWZSxxWCCGKSOgMPGxZSJp+Qh7MPMjaV72u+Yw04abjXs+ySfhqDaOaWE3 FmmA== X-Gm-Message-State: ALQs6tDHjldCfTIYvrR7/dKL6UIgfj1PTsYSxcg5C6K/ezc/eqTa+sU2 yM/5+BPhkg5FD1EUVs5N0oE= X-Google-Smtp-Source: AB8JxZoiy6PdSCfa1gh+wWSZfAp/+3pckR+MpirLrd3TZeB0tqnT+ABXHtHaGmGn2vqcJZKsxNFwnA== X-Received: by 10.28.227.212 with SMTP id a203mr7467165wmh.151.1525100086423; Mon, 30 Apr 2018 07:54:46 -0700 (PDT) Received: from localhost ([2a00:23c5:be9a:5200:ce4c:82c0:d567:ecbb]) by smtp.gmail.com with ESMTPSA id 123sm6434632wmt.19.2018.04.30.07.54.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Apr 2018 07:54:45 -0700 (PDT) From: luca.boccassi@gmail.com To: Rasesh Mody Cc: dpdk stable Date: Mon, 30 Apr 2018 15:53:46 +0100 Message-Id: <20180430145402.23057-27-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180430145402.23057-1-luca.boccassi@gmail.com> References: <20180430144223.18657-85-luca.boccassi@gmail.com> <20180430145402.23057-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'net/bnx2x: fix for PCI FLR after ungraceful exit' has been queued to stable release 18.02.2 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: Mon, 30 Apr 2018 14:54:47 -0000 Hi, FYI, your patch has been queued to stable release 18.02.2 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/02/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From b2d514595c495b7c3cff4cd050631808773a6cdc 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 fb02d0f35..7a3b7ff5d 100644 --- a/drivers/net/bnx2x/bnx2x.c +++ b/drivers/net/bnx2x/bnx2x.c @@ -8285,16 +8285,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 */ @@ -9671,7 +9661,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; @@ -9680,7 +9680,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.14.2