Flashing IT Firmware to the LSI SAS9211-8i HBA

In the process of upgrading my storage server, I wanted to upgrade the firmware on my recently acquired LSI SAS9211-8i SAS/SATA 6Gb/s PCI Express card to the latest IT version rather than the IR version it ships with. Apparently this process is a little bit easier on older 3Gb/s cards but not quite as simple on the 6Gb/s models. In addition, things get complicated with newer motherboards as well. Here are the steps to switch from IR to IT firmware.

For those of you that have not read up on the two firmware types, the IR Firmware is the Integrated RAID firmware. This is the typical hardware RAID firmware that the internal cards ship with. The IT firmware, on the other hand, is the Initiator Target firmware which is designed to allow an SAS HBA to connect to up to 256 devices uses SAS Expanders. The IT firmware is typically shipped on external cards. The IT firmware does not have any RAID capabilities and simply acts as an HBA. The reason I wanted the IT firmware was so that I would have no IR firmware to worry about since I was going to be using Linux md software RAID anyway.

Before you do anything else, I would recommend that you remove any other HBAs from the system, especially LSI HBAs. It is possible to specify which controller you want to flash but it is safer to just have a single controller in the system.

The first step in this process is to download the appropriate files from LSI Logic's web site. These are located in the support downloads section for the SAS9211-8i. It would be nice if the needed files were clearly explained but, sadly, that is not the case. Although Windows will never touch this system, you first need to download the Windows and MSDOS package because that is where the actual firmware files are available. I am downloading the latest Phase 12 firmware in order to have future support for larger than 2TB hard drives. LSI knowledge base article 16399 lists what versions are required for larger than 2TB support. The name of this package is:

9211_8i_Package_P12_IR_IT_Firmware_BIOS_for_MSDOS_Windows.zip

Now that we have the actual firmware, we need a way to install it. I initially downloaded the Installer P12 for Linux package. The included sas2flash utility was easily able to upgrade the firmware on the SAS9211-8i to the latest IR version but threw an error when I tried to flash with IT firmware.

Some searching ensued which led me to several LSI knowledge base articles. The first, number 16266, is entitled Flashing IT firmware over IR firmware (and vice versa) for SAS HBAs. In summary, the article suggests that I need to create a DOS bootable USB flash drive or similar, copy the appropriate firmware and sas2flsh DOS utility to the drive and update that way. The important information is the command sequence needed for a 6Gb/s HBA.

sas2flsh -o -e 6

This command puts the sas2flsh command into advanced mode (-o) and then erases the flash (-e 6) firmware and BIOS. Apparently rebooting at this point would cause the HBA to cease functioning as the article warns:

DO NOT REBOOT. If you do reboot, or if you attempt to flash the firmware and/or BIOS image and it does not flash correctly, you will have to RMA the controller.

After erasing the flash, you need both the IT firmware and the BIOS file. These are both in the previously mentioned archive for Windows and MSDOS. The relevant files are 2118it.bin and mptsas2.rom. The next command actually does the flashing.

sas2flsh -o -f 2118it.bin -b mptsas2.rom

After flashing is complete you can verify that version 12 firmware is loaded with the command:

sas2flsh -listall

This process seemed simple enough. I reasoned that perhaps the article uses a DOS bootable USB drive since that is the way most people will do the flashing but the Linux sas2flash program should work fine as well. This was not the case. Every time I attempted to erase the flash I would get back an error that the erase had failed.

Perhaps using DOS was important and so I proceeded with those instructions. I created the DOS bootable USB drive according to the recommendations in article 16266. Using bootflashdos as suggested apparently requires a 2GB or less USB drive probably due to FAT limitations. I simply used a 2GB SD card in a USB SD card reader. Once bootflashdos was done I copied sas2flsh, 2118it.bin, and mptsas2.rom to the SD card.

I booted from the SD card and attempted to run sas2flsh but was met with an error: "ERROR: Failed to initialize PAL. Exiting program." Fortunately, article 16266 mentions the error at the end and directs you to article 15807. The gist of article 15807 is that Intel 3000 or 5000-based boards have optionROM limitations which cause the above error. The easiest solution is to use a different system. Alternately, you can use the UEFI installer.

At this point, I have already tried using Linux sas2flash and DOS sas2flsh and and now I have to get another version for UEFI. I went back to the LSI site and downloaded the Installer P12 for UEFI archive. This provided the sas2flash.efi program. I copied this program to the same DOS bootable USB drive and proceeded to reboot my system.

For some reason on my board, the SuperMicro X9SCL+-F, the video output seems to come on a little late in the boot process so I can never seem to see the key commands for getting into the BIOS or bringing up the Boot Menu. This is worse when an HBA is installed that also has its own BIOS messages. Through a little bit of trial and error I figured out that F11 brings up the Boot Menu. I selected the option for UEFI Shell and was dropped into an unfamiliar command line interface.

Through more trial and error and prodigious use of the help command, I figured out that the map command lists the device tree. The names are a little complex but it looked to me like the device aliased to fs1: was the USB flash drive. I guessed correctly. In order to access fs1:, I first had to mount it.

mount fs1:

...seemed to do the trick. I then used the command...

fs1:

...rather than the more logical use of the cd fs1: command which, of course, failed. Using the _ls_ command gave me a listing of the files in the directory of the USB drive. The command I needed was sas2flash.efi. Running through the same series of commands from above...

sas2flash.efi -o -e 6
sas2flash.efi -o -f 2118it.bin -b mptsas2.rom

...resulted in a successful flash of the HBA. Finally this process was complete. I rebooted the system and accessed the BIOS interface with Ctrl-C. This confirmed that the IT firmware was loaded.

This process was much more complex than I had anticipated. Although I recognize that every scenario cannot be documented clearly and in order, it would have been nice if the LSI site had made this process a little simpler. In particular, it was very irritating that the downloads page does not list files by date under their respective sections. It would seem logical to have all the latest versions of the installer at the top of the list and then older versions in order going down. Instead the files are arranged haphazardly in no particular order but loosely grouped by intended system.

The documentation provided with the various installer files was fairly complete but should have had better examples of a simple flash operation. There are a myriad of flags to the various versions of the flashing program but only a few are needed in normal operation. I had to resort to searching the knowledge base to get a clear idea of what flags were needed.

Once it was clear what flags and that the UEFI version of the installer was needed, it was a painless process. Getting to that point was a much longer process that it should have been.

Update: I have also written another post detailing other similar controllers that are also capable of being used with IT firmware.