From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ozlabs.ru (ozlabs.ru [107.173.13.209]) by dpdk.org (Postfix) with ESMTP id B7CB37EC0 for ; Wed, 26 Apr 2017 10:08:36 +0200 (CEST) Received: from vpl2.ozlabs.ibm.com (localhost [IPv6:::1]) by ozlabs.ru (Postfix) with ESMTP id 397F13A60026; Wed, 26 Apr 2017 04:08:53 -0400 (EDT) From: Alexey Kardashevskiy To: dev@dpdk.org Cc: Alexey Kardashevskiy Date: Wed, 26 Apr 2017 18:08:33 +1000 Message-Id: <20170426080833.23944-1-aik@ozlabs.ru> X-Mailer: git-send-email 2.11.0 Subject: [dpdk-dev] [PATCH dpdk v2] bnx2x: Update firmware versions 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: , X-List-Received-Date: Wed, 26 Apr 2017 08:08:37 -0000 Recent kernels/distros have updated firmware images, use them. In order to keep support of older distros (such as Fedora 19 or Ubuntu 14.04), this also tries fallback to an order firmware version. Signed-off-by: Alexey Kardashevskiy --- Changes: v2: * in addition to the very new firmware images, this adds fallback to some older firmware present in 3yo distros --- drivers/net/bnx2x/bnx2x.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c index 1a7e1c8e1..355bb117f 100644 --- a/drivers/net/bnx2x/bnx2x.c +++ b/drivers/net/bnx2x/bnx2x.c @@ -9535,8 +9535,11 @@ static void bnx2x_init_rte(struct bnx2x_softc *sc) } #define FW_HEADER_LEN 104 -#define FW_NAME_57711 "/lib/firmware/bnx2x/bnx2x-e1h-7.2.51.0.fw" -#define FW_NAME_57810 "/lib/firmware/bnx2x/bnx2x-e2-7.2.51.0.fw" +#define FW_NAME_57711_MIN "/lib/firmware/bnx2x/bnx2x-e1h-7.8.17.0.fw" +#define FW_NAME_57810_MIN "/lib/firmware/bnx2x/bnx2x-e2-7.8.17.0.fw" +#define FW_NAME_57711 "/lib/firmware/bnx2x/bnx2x-e1h-7.13.1.0.fw" +#define FW_NAME_57810 "/lib/firmware/bnx2x/bnx2x-e2-7.13.1.0.fw" + void bnx2x_load_firmware(struct bnx2x_softc *sc) { @@ -9548,6 +9551,11 @@ void bnx2x_load_firmware(struct bnx2x_softc *sc) ? FW_NAME_57711 : FW_NAME_57810; f = open(fwname, O_RDONLY); if (f < 0) { + fwname = sc->devinfo.device_id == CHIP_NUM_57711 + ? FW_NAME_57711_MIN : FW_NAME_57810_MIN; + f = open(fwname, O_RDONLY); + } + if (f < 0) { PMD_DRV_LOG(NOTICE, "Can't open firmware file"); return; } -- 2.11.0