[dpdk-dev] [PATCH dpdk v2] bnx2x: Update firmware versions

Alexey Kardashevskiy aik at ozlabs.ru
Wed Apr 26 10:08:33 CEST 2017


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 <aik at ozlabs.ru>
---
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



More information about the dev mailing list