Tuesday, September 6, 2016

LSI SAS Firmware Downgrade

LSI SAS Firmware Downgrade

Have you ever needed to downgrade the firmware, at times it's more trickier than to upgrade the firmware.

Let's try this on LSI SAS2 firmware. We plan to download LSI SAS2 firmware from Phase 20 to Phase 19. 

When I attempted the downgrade I initially get errors.

I get this exception when attempting downgrading

C:\hcs\lsi\sas2flash.exe operation failed. Last exit code: 1. Output: LSI Corporation SAS2 Flash Utility
Version 16.00.00.00 (2013.03.01)
Copyright (c) 2008-2013 LSI Corporation. All rights reserved
    Adapter Selected is a LSI SAS: SAS2308_2(D1)
    Executing Operation: Flash Firmware Image
        Firmware Image has a Valid Checksum.
        Firmware Version 19.00.00.00
        Firmware Image compatible with Controller.
        Valid NVDATA Image found.
        NVDATA Version 11.00.00.00
        Checking for a compatible NVData image...
        NVDATA Device ID and Chip Revision match verified.
        ERROR: Cannot downgrade NVDATA version 0x1401d105 to 0x1100d104.
        ERROR: Failed to get valid NVDATA image from File!
        Firmware Image Validation Failed!
    Due to error remaining commands will not be executed.
    Unable to Process Commands.
    Exiting SAS2Flash.

 What does this error mean?
ERROR: Cannot downgrade NVDATA version 0x1401d105 to 0x1100d104.
The downgrade process failed due to incompatible NVDATA file between these two phases.

Well, it's not that easy and it's not straightforward to "just" download the older firmware. The downgrade process simply does not work that way.

The flash needs to be erased before the downgrade can attempted. So one has to use the sas2flash tool provided by LSI to erase the flash.
sas2flsh -o -e 6
Here we use region code 6, the region code means "cleaning Flash". During the process of cleaning Flash it erases all regions except the manufacturing area.

This erase has to successfully complete, if the process of erase does not succeed then you can not run the firmware download process.
sas2flsh -f <firmware.fw>

This time you can use the lower phase firmware in order to downgrade the firmware.

I don't have to explicitly mention that firmware change need to attempt on in maintenance mode when there is absolutely no traffic flowing on the SAS bus.

There is always a catch, hence you need system engineers to do this.

PS C:\hcs\lsi> .\sas2flash.exe -o -e 6
LSI Corporation SAS2 Flash Utility
Version 16.00.00.00 (2013.03.01)
Copyright (c) 2008-2013 LSI Corporation. All rights reserved
 
        Advanced Mode Set
 
        Adapter Selected is a LSI SAS: SAS2308_2(D1)
 
        Executing Operation: Erase Flash
 
        Erasing Flash Region...
 
                Erase Flash Command not Supported on this platform.
 
        Resetting Adapter...
        Reset Successful!
 
        Due to Exception Command not Executed. IOCStatus=0x1, IOCLogInfo=0x0
        Finished Processing Commands Successfully.
        Exiting SAS2Flash.
PS C:\hcs\lsi>

The erase did not took place. You can not erase the flash from Windows. One has to load the DOS version of the bootable image, and then use the DOS version of the sas2flash tool.

So finally after lading the DOS and we need to use the sas2flsh (see the spelling). In DOS one has to abide by the 8.3 file naming convension.

I hope I explained the process well, happy programming...


No comments:

Post a Comment