Home » Linux»Updating Your Emulex HBA Firmware

As I've recently written, I've been updating HBA firmware quite a lot recently. Previously, I covered updates on Windows, using the elxflash utility. On Linux, you don't have that utility available.

HbaCmd

On Linux, you must use the hbacmd utility. This will probably live in /usr/sbin/hbanyware. You'll be using this firstly to determine which model of HBA you have, and then to apply the firmware image to them.

Determining the HBA Model

The first step is to run /usr/sbin/hbanyware/hbacmd listhbas, which will give you a list of all HBAs installed. This will tell you the HBA's port world wide name (port WWN) for each adapter:

londondb07:ORA9 ../hbanyware # hbacmd listhbas

Manageable HBA List

Port WWN   : 10:00:00:00:c9:ff:ff:1a
Node WWN   : 20:00:00:00:c9:ff:ff:1a
Fabric Name: 10:00:00:05:1e:ff:ff:fb
Flags      : 8000f0e5
Host Name  : londondb07
Mfg        : Emulex Corporation

Port WWN   : 10:00:00:00:c9:ff:ff:1b
Node WWN   : 20:00:00:00:c9:ff:ff:1b
Fabric Name: 10:00:00:05:1e:ff:ff:ed
Flags      : 8000f0e5
Host Name  : londondb07
Mfg        : Emulex Corporation

Now we know our port WWN, we can run hbacmd hbaattributes <port WWN> to get more information, including the model:

londondb07:ORA9 ../hbanyware # hbacmd hbaattributes 10:00:00:00:c9:ff:ff:1a

HBA Attributes for 10:00:00:00:c9:ff:ff:1a

Host Name      : londondb07
Manufacturer   : Emulex Corporation
Serial Number  : MY108238HP
Model          : A8002A
Model Desc     : HP FC2142SR 4Gb PCI-e, SC, Fibre Channel Adapter
Node WWN       : 20 00 00 00 c9 ff ff 1a
Node Symname   : Emulex A8002A FV2.82 DV8.0.16.40
HW Version     : 2057706d
Opt ROM Version:
FW Version     : 2.82 (W2F2.82X4)
Vendor Spec ID : 10DF
Number of Ports: 1
Driver Name    : lpfc
Device ID      : F0E5
HBA Type       : A8002A
Operational FW : SLI-2 Overlay
SLI1 FW        : SLI-1 Overlay 2.82x1
SLI2 FW        : SLI-2 Overlay 2.82x4
SLI3 FW        : SLI-3 Overlay 2.82x4
IEEE Address   : 00 00 c9 ff ff 1a
Boot BIOS      : 5.02a1
Driver Version : 8.0.16.40; HBAAPI(I) v2.1.g, 12-07-07
Kernel Version : 1.21a0
HBA Temperature: Not Available

The Model Desc field shows us that this is actually an HP FC2142SR card, so we need to go and find the right firmware image for this kind of adapter. The file is actually wf282x4.all and is available from HP's support website. For other adapters, check the Emulex download site first.

Applying the update

So, you've downloaded the firmware file to the server, and you're ready to go. Let's say you have copied the file to /tmp/wf282x4.all. In order to apply the update to the adapter, the magic words you are looking for are hbacmd download port WWN /tmp/wf282x4.all.

This will apply the firmware update. Don't forget that you need to do this for each port WWN that you got in the output of hbacmd listhbas. And don't forget that you will need to reboot.

Driver/libdfc Compatibility

If you find that hbacmd returns something like this:

Driver lpfcdfc is incompatable with libdfc. The driver must be at least at DFC Rev 80.164
Driver lpfcdfc is incompatable with libdfc. The driver must be at least at DFC Rev 80.164

Then you are probably going to have to update your Emulex utils software. The above was seen on a Red Hat AS 4 machine, which was using HBAnyware 3. Running rpm -qa | grep -i hbany should tell you which version/package you are currently using, eg HBAnyware-3.4a14-1.i386

[root@lonweb143 tmp]# rpm -qa | grep -i hbany
HBAnyware-3.4a14-1.i386
[root@lonweb143 tmp]# rpm -e HBAnyware-3.4a14-1.i386
Stopping HBAnyware HBA Management Server

HBAnyware Web Launch package is already uninstalled.

Stopping HBAnyware Discovery Server
Removing /usr/sbin/hbanyware/rm.log
warning: /etc/emulexRMConfig saved as /etc/emulexRMConfig.rpmsave
warning: /etc/emulexDiscConfig saved as /etc/emulexDiscConfig.rpmsave

You can now proceed to install a (slightly) later version of the application. Here, on Red Hat 4, we'll be installing HBAnyware 4.0a38. The instructions for the package say to install it with rpm -Uhv, which is technically an upgrade, rather than a new installation.

[root@lonweb143 i386]# rpm -Uhv elxlinuxcorekit-4.0a38-1.i386.rpm
Preparing...                ########################################### [100%]
Stopping HBAnyware HBA Management Server
Stopping HBAnyware Discovery Server
   1:elxlinuxcorekit        ########################################### [100%]
Starting helper module lpfcdfc
Starting Emulex DFC driver:  [  OK  ]
Starting HBAnyware HBA Management Server

And now, we are able to run ./hbacmd listhbas successfully!.