******************************************************************************
                                 mptflash.txt
******************************************************************************

This document provides the information required to update the LSI Logic
Fusion MPT(TM) firmware for LSIFC909, LSIFC919, LSIFC929 Fibre Channel
and the LSI53C1020 and LSI53C1030 SCSI chips when running from a
Linux(TM) operating system.

Adapter boards: LSI40909, LSI40919, LSI44929, LSIXXXX

This text file is divided into these sections:
   MPT Flash Utility Description
   Updating the Firmware
   Troubleshooting

*********************** MPT Flash Utility Description ************************

The MPT flash utility is used to update the Fusion MPT firmware on LSIFC909,
LSIFC919, and LSIFC929 Fibre Channel and the firmware on the 
LSI53C1020 and LSI53C1030 SCSI chips / HABs.

This utility uses the MPI FwDownload command to update the firmware image in
flash, while the current firmare is running.  The firmware update becomes
effective after a subsequent reboot or diagnostic reset.

IMPORTANT NOTES:
 o  Dual channel devices will appear as two separate IO controllers, from
    the system point of view.  You only need to perform this update 
    procedure to one of the two visible IO controllers.
    Chips:  LSIFC929, LSI53C1030
 o  Typically, each chip and each revisionl requires a unique firmware image. 
    That is, the firmware for the LSIFC909 is different that that for the 
    LSIFC929 or the LSI53C1030.  Likewise, the firmware for the LSI53C1030 
    A0 revision and LSI53C1030 B0 revision is different.

    Exceptions:  
       o The LSIFC929 and the LSIFC919 can use the same firmware image.

    WARNING! There are currently no checks to ensure that you are
             using the proper firmware image for a given IO Controller.

             USE EXTREME CAUTION WHEN USING THIS UTILITY!
 o  The /proc filesystem MUST be enabled for this utility to be able
    to verify the adapter.

*************************** Updating the Firmware ****************************

The following examples show procedures for updating a single LCIFC929 when
a single LSIFC919, a single LSIFC929 and a single LSI53C1030 are present 
in a system.

To update the Fusion MPT firmware, complete the following steps:

1. Make sure that the LSI Fibre Channel and SCSI adapters 
   are properly installed in a system PCI slot, boot the system 
   into Linux, and then log in as root.

2. Verify that the Fusion MPT base driver is properly installed.
      # insmod mptbase
        Fusion MPT base driver 2.02.01
        mptbase: Initiating ioc0 bringup
        ioc0: FC919: Capabilities={Initiator,Target,LAN}
        mptbase: Initiating ioc1 bringup
        ioc1: FC929: Capabilities={Initiator,Target,LAN}
        mptbase: Initiating ioc2 bringup
        ioc2: FC929: Capabilities={Initiator,Target,LAN}
        mptbase: Initiating ioc3 bringup
        ioc3: C1030: Capabilities={Initiator}
        mptbase: Initiating ioc4 bringup
        ioc4: C1030: Capabilities={Initiator}
        mptbase: 5 MPT adapters found, 5 installed.

3. Verify and the current layout and version of existing MPT I/O controllers.
      # cat /proc/mpt/summary
        ioc0: LSIFC919, FwRev=01000000h, Ports=1, MaxQ=256, \
                                        LanAddr=00:A0:B8:04:78:55, IRQ=9
        ioc1: LSIFC929, FwRev=00090000h, Ports=1, MaxQ=256, \
                                        LanAddr=00:A0:B8:04:0B:32, IRQ=10
        ioc2: LSIFC929, FwRev=00090000h, Ports=1, MaxQ=256, \
                                        LanAddr=00:A0:B8:04:0B:33, IRQ=5
        ioc3: LSI53C1030, FwRev=00000700h, Ports=1, MaxQ=256, IRQ=17
        ioc4: LSI53C1030, FwRev=00000700h, Ports=1, MaxQ=256, IRQ=19

   NOTE: The ioc1 and ioc2 entries in the listing above represent a 
   single LSIFC929, ioc3 and ioc4 entries represent a single LSI53C1030.

4. Verify that the Fusion MPT misc device (ioctl) driver is loaded.
      # insmod mptctl
        Fusion MPT misc device (ioctl) driver 2.02.01
        mptctl: Registered with Fusion MPT base driver
        mptctl: /dev/mptctl @ (major,minor=10,220)

5. Make sure that a proper /dev/mptctl character special device node exists.
   It should look something like this:
      # ls -l /dev/mptctl
        crw-r--r--   1 root     root      10, 220 Dec 27 16:32 /dev/mptctl

   If you don't have one, create it with this command:
      # mknod /dev/mptctl c 10 220

6. Create the mptflash utility program, by changing to the
   drivers/message/fusion/utils subdirectory:
      # cd /usr/src/linux/drivers/message/fusion/utils

   and then execute this command:
      # make mptflash
        gcc -g -O -Wall -I. -I.. -I../../../../include   -c mptflash.c \
                                        -o mptflash.o
        gcc   mptflash.o   -o mptflash

   Now move the resulting mptflash program to a useful place:
      # mv mptflash /sbin

7. Find the appropriate IOC firmware image file you want to update to,
   for example:
      # cd /tmp
      # ls -l fc929-100.rom
        -rw-rw-r--   1 fibre    fibre      195876 Jul 19 01:00 fc929-100.rom

8. Now execute the mptflash utility program, specifying which IOC you will
   be updating.  For our example we want to update the single LSIFC929
   which is represented as ioc1 (and ioc2) for this example:
      # mptflash fc929-100.rom 1
          step1: Cmd line check: Ok
          step2: get_oldver() results: "LSIFC9x9-0.09.00"
          step3: open("fc929-100.rom"): Ok, fwfd=3
          step4: stat("fc929-100.rom"): Ok, size=195876 bytes
          step5: malloc(195876): Ok
          step6: read(3,,195876): Ok
                 Current F/W Version = "LSIFC9x9-0.09.00"
                     New F/W Version = "LSIFC929-1.00.00  (2001.07.19)"
          step7: open("/dev/mptctl"): Ok, ctlfd=4
          pre-step8: ioctl(4,MPTFWDOWNLOAD,)

          Okay, this is like, a *really* DANGEROUS procedure.

          You are at irreversible step 8 of 8 in this process.
          Are you absolutely sure you want to do this? (y/[n]) _

   Press "y" followed by <Enter> to begin the process.
   It should only take about 10-25 seconds and you should see:

          !!! MPT firmware transfer to ioc1 SUCCEEDED !!!
          (8 of 8 f/w update steps were successful)

          CHANGE EFFECTIVE ONLY AFTER NEXT RESET / POWER CYCLE!

9. Reboot your system!

****************************** Troubleshooting *******************************

If firmware download using mptflash fails, the only recourse is to reinstall
the firmware using the DOS-based utility. 
    Chip Name         Utility
    --------------------------
    FC909               FcProm
    FC919               FcUtil
    FC929               FcUtil
    53C1020             flsh1030
    53C1030             flsh1030

These utilities are available from:  XXXX


******************************************************************************

Fusion MPT is a trademark of LSI Logic Corporation
Linux is a registered trademark of Linus Torvalds

*****************************************************************************

