How to downgrade HP Emluex CNA NIC card firmware version

This article will guide you with steps used to perform upgrade as well as downgrade of Emulex Converged Network Adapters firmware version running on HP hardware
For the demonstration of this article I will be using FlexFabric 20Gb 2-port 650FLB Adapter.
Check the NIC adapter type installed in your blade

# dmidecode |grep  'NIC'
HP BIOS NIC PCI and MAC Information
        NIC 1: PCI device 06:00.0, MAC address 00:17:A4:77:00:02
        NIC 2: PCI device 06:00.1, MAC address 00:17:A4:77:00:04
        NIC 3: PCI device 06:00.2, MAC address D0:BF:9C:F0:80:69
        NIC 4: PCI device 06:00.3, MAC address D0:BF:9C:F0:80:71
        NIC 5: PCI device 06:00.4, MAC address D0:BF:9C:F0:80:6A
        NIC 6: PCI device 06:00.5, MAC address D0:BF:9C:F0:80:72
                NIC.FlexLOM.1.1
                HP FlexFabric 20Gb 2-port 650FLB Adapter - NIC
                NIC.FlexLOM.1.2
                HP FlexFabric 20Gb 2-port 650FLB Adapter - NIC
                NIC.FlexLOM.1.3
                HP FlexFabric 20Gb 2-port 650FLB Adapter - NIC
                NIC.FlexLOM.1.4
                HP FlexFabric 20Gb 2-port 650FLB Adapter - NIC
                NIC.FlexLOM.1.5
                HP FlexFabric 20Gb 2-port 650FLB Adapter - NIC
                NIC.FlexLOM.1.6
                HP FlexFabric 20Gb 2-port 650FLB Adapter - NIC

To check the currently installed firmware and driver version on the NIC card

# ethtool -i eth0
driver: be2net
version: 10.7.110.29
firmware-version: 10.7.110.34
bus-info: 0000:06:00.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: no

As you see my firmware version is 10.7.110.34 while the driver version of the NIC card is 10.7.110.29
This set of firmware and driver is from HP SPP 2016.04, so let us first perform a downgrade of the firmware to SPP 2015.04
The CNA firmware version available with SPP 2015.04 is "hp-firmware-cna-emulex-2015.02.02-1.1.x86_64.rpm"
 

Steps to downgrade NIC firmware

On some Linux variant for eg SuSE Enterprise Linux node below Enablement Kit is required to perform a NIC downgrade. This ENablement Kit can be collected from the respective SPP iso image.

NOTE: The HP-CNA-FC-Emulex-Enablement-Kit has a dependency on two extra rpms as seen below

# rpm -Uvh /tmp/libnl-1.1-49.18.x86_64.rpm /tmp/libHBAAPI2-2.2.7-0.7.33.x86_64.rpm /tmp/HP-CNA-FC-Emulex-Enablement-Kit-10.7.110.34-1.sles11.x86_64.rpm
warning: /tmp/HP-CNA-FC-Emulex-Enablement-Kit-10.7.110.34-1.sles11.x86_64.rpm: Header V3 RSA/SHA1 signature: NOKEY, key ID b1275ea3
Preparing...                ########################################### [100%]
   1:libHBAAPI2             ########################################### [ 33%]
   2:libnl                  ########################################### [ 67%]
   3:HP-CNA-FC-Emulex-Enable########################################### [100%]

Next install the CNA firmware rpm

# rpm -Uvh /tmp/hp-firmware-cna-emulex-2015.02.02-1.1.x86_64.rpm
Preparing...                ########################################### [100%]
   1:hp-firmware-cna-emulex ########################################### [100%]

Unlike any other rpm the above command doesnot exactly installs the firmware, instead it will just extract the rpm content to it's respective location.
Content of the firmware rpm is as below

# rpm -ql hp-firmware-cna-emulex-2015.02.02-1.1
/usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2015.02.02-1.1
/usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2015.02.02-1.1/.cpq_package.inc
/usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2015.02.02-1.1/.hpsetup
/usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2015.02.02-1.1/CP025738.xml
/usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2015.02.02-1.1/elxflashStandalone-linux-10.2.477.23-1.zip
/usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2015.02.02-1.1/fwmatrix.txt
/usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2015.02.02-1.1/installer
/usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2015.02.02-1.1/readme.txt
/usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2015.02.02-1.1/reference.xml
/usr/lib/x86_64-linux-gnu/hp-scexe-compat
/usr/lib/x86_64-linux-gnu/hp-scexe-compat/CP025738.scexe
# cd /usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2015.02.02-1.1
# unzip elxflashStandalone-linux-10.2.477.23-1.zip
# cd elxflashStandalone-linux-10.2.477.23-1/lx

Next execute the below command to start the downgrade

# ./elxflash.sh /ucna /sysfs  /f
Thu Sep 15 23:52:01 2016
HBA=OCe14100-NIC, Port Type=NIC, MAC=00:17:A4:77:00:08,
Update=Firmware, Image=oc14-10.2.477.23.ufi, New=10.2.477.23, Old=10.7.110.34, Status=Success
Thu Sep 15 23:52:01 2016
HBA=OCe14100-NIC, Port Type=NIC, MAC=00:17:A4:77:00:08,
Update=Firmware, Image=oc14-10.2.477.23.ufi, New=10.2.477.23, Old=10.7.110.34, Status=Success
Thu Sep 15 23:52:01 2016
HBA=OCe14100-NIC, Port Type=NIC, MAC=30:8D:99:62:FF:75,
Update=Firmware, Image=oc14-10.2.477.23.ufi, New=10.2.477.23, Old=10.7.110.34, Status=Success
Thu Sep 15 23:52:02 2016
HBA=OCe14100-NIC, Port Type=NIC, MAC=30:8D:99:62:FF:7D,
Update=Firmware, Image=oc14-10.2.477.23.ufi, New=10.2.477.23, Old=10.7.110.34, Status=Success
Thu Sep 15 23:52:02 2016
HBA=OCe14100-NIC, Port Type=NIC, MAC=30:8D:99:62:FF:76,
Update=Firmware, Image=oc14-10.2.477.23.ufi, New=10.2.477.23, Old=10.7.110.34, Status=Success
Thu Sep 15 23:52:02 2016
HBA=OCe14100-NIC, Port Type=NIC, MAC=30:8D:99:62:FF:7E,
Update=Firmware, Image=oc14-10.2.477.23.ufi, New=10.2.477.23, Old=10.7.110.34, Status=Success
elxflash: All required firmware and/or boot code downloads succeeded - Return Code=0

Please reboot system to activate new firmware.
So the script executed successfully with Return Code "0"
The new firmware version is as seen below

# ethtool -i eth0
driver: be2net
version: 10.7.110.29
firmware-version: 10.7.110.34 [10.2.477.23]
bus-info: 0000:06:00.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: no

NOTE:  A reboot is required to activate the new firmware
 

Steps to update NIC firmware

Currently installed firmware

# ethtool -i eth0
driver: be2net
version: 10.2.477.6
firmware-version: 10.2.477.23
bus-info: 0000:06:00.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: no

So the currently installed NIC driver version is 10.2.477.6 and the firmware version is 10.2.477.23 which are from SPP 2015.04
Let us update the NIC card to the firmware version from HP SPP 2016.04 i.e. "hp-firmware-cna-emulex-2016.02.02-1.1.x86_64.rpm"
Install the rpm

# rpm -Uvh /tmp/hp-firmware-cna-emulex-2016.02.02-1.1.x86_64.rpm
warning: /tmp/hp-firmware-cna-emulex-2016.02.02-1.1.x86_64.rpm: Header V3 RSA/SHA1 signature: NOKEY, key ID b1275ea3
Preparing...                ########################################### [100%]
   1:hp-firmware-cna-emulex ########################################### [100%]

Content of the rpm is as below

# rpm -ql hp-firmware-cna-emulex
/usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2016.02.02-1.1
/usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2016.02.02-1.1/.cpq_package.inc
/usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2016.02.02-1.1/.hpsetup
/usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2016.02.02-1.1/CP029026.xml
/usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2016.02.02-1.1/elxflashStandalone-linux-10.7.110.34-1.zip
/usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2016.02.02-1.1/fwmatrix.txt
/usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2016.02.02-1.1/hpsetup
/usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2016.02.02-1.1/readme.txt
/usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2016.02.02-1.1/reference.xml
/usr/lib/x86_64-linux-gnu/hp-scexe-compat
/usr/lib/x86_64-linux-gnu/hp-scexe-compat/CP029026.scexe

Follow the below steps to perform the update

# cd /usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2016.02.02-1.1
# ls -l
total 38932
-r--r--r-- 1 root root    64057 Jan 13  2016 CP029026.xml
-rw-r--r-- 1 root root      271 Jan 13  2016 .cpq_package.inc
drwxr-xr-x 5 root root     4096 Jan  9  2016 elxflashStandalone-linux-10.7.110.34-1
-r--r--r-- 1 root root 38047305 Jan 13  2016 elxflashStandalone-linux-10.7.110.34-1.zip
-r--r--r-- 1 root root      881 Jan 13  2016 fwmatrix.txt
-r-xr-xr-x 1 root root     6737 Jan 13  2016 hpsetup
-r-xr-xr-x 1 root root  1653176 Jan 13  2016 .hpsetup
-r--r--r-- 1 root root      423 Jan 13  2016 readme.txt
-r--r--r-- 1 root root    18222 Jan 13  2016 reference.xml
# ./.hpsetup
---------------------------------------------------
Loading references...done.
Performing discovery...
Preparing the Emulex Kit...done
Performing flash -- DO NOT INTERRUPT!
Executing flash engine: ./elxflashStandalone*/lx/elxflash.sh /ucna /sysfs  /update 1>> /var/cpq/Component.log 2>> /var/cpq/Component.log 3>> /var/cpq/Component.log
Flash Engine exit code: 0
All updates were successful.  Reboot needed.
Flash complete [1]

So the update has completed successful with Exit Code 1 which means a reboot is required to activate the new firmware
OR the update can also be done as we did our downgrade using the below steps

# cd /usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2016.02.02-1.1
# unzip elxflashStandalone-linux-10.7.110.34-1.zip
# cd elxflashStandalone-linux-10.7.110.34-1/lx/
# ./elxflash.sh /ucna /sysfs  /update
Fri Jul  1 13:18:28 2016
HBA=OCe14100-NIC, Port Type=NIC, MAC=00:17:A4:77:00:4A,
Update=Firmware, Image=oc14-10.7.110.34.ufi, New=10.7.110.34, Old=10.2.477.23, Status=Success
Fri Jul  1 13:18:28 2016
HBA=OCe14100-NIC, Port Type=NIC, MAC=00:17:A4:77:00:4A,
Update=Firmware, Image=oc14-10.7.110.34.ufi, New=10.7.110.34, Old=10.2.477.23, Status=Success
Fri Jul  1 13:18:28 2016
HBA=OCe14100-NIC, Port Type=NIC, MAC=70:10:6F:58:3B:B1,
Update=Firmware, Image=oc14-10.7.110.34.ufi, New=10.7.110.34, Old=10.2.477.23, Status=Success
Fri Jul  1 13:18:28 2016
HBA=OCe14100-NIC, Port Type=NIC, MAC=70:10:6F:58:3B:B1,
Update=Firmware, Image=oc14-10.7.110.34.ufi, New=10.7.110.34, Old=10.2.477.23, Status=Success
Fri Jul  1 13:18:28 2016
HBA=OCe14100-NIC, Port Type=NIC, MAC=70:10:6F:58:3B:B2,
Update=Firmware, Image=oc14-10.7.110.34.ufi, New=10.7.110.34, Old=10.2.477.23, Status=Success
Fri Jul  1 13:18:28 2016
HBA=OCe14100-NIC, Port Type=NIC, MAC=70:10:6F:58:3B:B2,
Update=Firmware, Image=oc14-10.7.110.34.ufi, New=10.7.110.34, Old=10.2.477.23, Status=Success
Fri Jul  1 13:18:28 2016
HBA=OCe14100-NIC, Port Type=NIC, MAC=70:10:6F:58:3B:B3,
Update=Firmware, Image=oc14-10.7.110.34.ufi, New=10.7.110.34, Old=10.2.477.23, Status=Success
Fri Jul  1 13:18:28 2016
HBA=OCe14100-NIC, Port Type=NIC, MAC=70:10:6F:58:3B:B3,
Update=Firmware, Image=oc14-10.7.110.34.ufi, New=10.7.110.34, Old=10.2.477.23, Status=Success
elxflash: All required updates succeeded - Return Code=0

Please reboot system to activate new firmware.
Either way you will can perform the NIC firmware update.
Updated NIC firmware version can be seen below.

# ethtool -i eth0
driver: be2net
version: 10.2.477.6
firmware-version: 10.2.477.23 [10.7.110.34]
bus-info: 0000:06:00.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: no

NOTE: The new firmware will be activated after a reboot of the blade
I hope this article was useful.