                 Release Note for b57ldiag
==============================================================

Version 1.33:

    Problem: (CQ# 23932)
      NVRAM corruption during bootcode and PXE upgrade.
    Cause:
      When firmware is running NVRAM can be corrupted when 
      diagnostic upgrades the content of NVRAM.
    Fix:
      Disable any firmware from running when updating NVRAM. 

Version 1.32:

    Problem: (CQ# 23717)
      Can not program the latest version of UMP firmware.
    Cause:
      When porting DOS UMP code did not remove an extraneous check.
    Fix:
      Removed DOS UMP checking code that is unnecessary in Linux.

    Problem: (CQ# 23770)
      The "setwol" command does not work on selfboot 5787 devices.
    Cause:
      Coding of selfboot is still in progress and this function
      was not complete yet.
    Fix:
      Coded selfboot "setwol" command.

    Problem: (CQ# 23800)
      ASF Option "Send Ready SMBUS Msg" not available.
    Cause:
      The option was new in DOS diagnostic and was not ported to Linux.
    Fix:
      Ported "Send Ready SMBUS Msg" option.

Version 1.31:

    Problem: (CQ# 23724 & 23802)
      The VPD checksum stored in NVRAM was incorrect according to the
      PCI 2.3 specification.
    Cause:
      Code bug.
    Fix:
      Updated the VPD checksum calculation algorithm to be correct.
    Impact:
      The present version of diagnostic will accept both types of 
      checksums in order to be backward compatible. 
      All new checksums stored in NVRAM will be PCI 2.3 compliant.
      This issue showed up because as of release v9.05 of DOS diagnostic 
      the new checksum method is being used, so any device programmed 
      with v9.05 of DOS diagnostic or newer will be seen as having a
      checksum error with Linux diagnostic versions older than 1.31.

Version 1.30:

    Problem: (CQ# 23702)
      Diagnostic incorrectly flags a device/image-file mismatch when
      programming bootcode to NVRAM.
    Cause:
      The routines for identifying new devices and image files had 
      bugs the caused the incorrect identification.
    Fix:
      Updated the device and image file identification routines.

Version 1.29:

    Enhancement:
      Updated the readme.txt with more details.
      No code changes except for version number 1.29.

    Enhancement:
      Updated the cpu05.bin file, with the version used by DOS
      diagnostics, which has better support for the 5752.

Version 1.28:

    Problem: (CQ# 23011)
      Intermittently unable to program the PT code to the NVRAM.
    Cause:
      When PT code is running a resource conflict occurs with 
      diagnostics and access to the NVRAM is corrupted.
    Fix:
      Disable PT code from running before programming NVRAM. 
      The same modification was also made for UMP programming.

Version 1.27:

    Enhancement: (CQ# 23266)
      Enhanced the "seprg" command to handle UMP programming.

    Enhancement: (CQ# 23269)
      Added the "setump" command for UMP enable/disable.


    Enhancement:
      Preliminary support for 5787 selfboot NVRAM images added.

Version 1.26:

    Enhancement:
      Preliminary support for 5754/5787 added.
      Use the new Linux driver based of v8.3.17 of bcm5700.
      The new driver is bcm57diag v9.0.0.
      Eventually bcm5700 will be replaced by bcm57diag.
      Also bcm57diag will be stripped down and optimized for
      diagnostics and will not be a full/functional network driver.
      The release directory for bcm57diag is b57linuxDiagDrvr.
      For the v9.0.0 release of bcm57diag most of the files in the
      release directory are the same as v8.3.17 of bcm5700 but these
      files will be updated over the next few releases.
      
Version 1.25:

    Enhancement: (CQ# 14483)
      Enhanced the "-l0" option of the "sedump" command so that
      all data from NVRAM is copied to the file specified (original
      only boot code was copied to the file specified).

Version 1.24:

    Problem: (CQ# 14483)
      Unable to program IPMI firmware on a PPC with a 5704.
    Cause:
      A Byte swapping bug introduced in v1.22 makes an invalid 
      memory reference when checking for IPMI in NVRAM.
    Fix:
      Fixed byte swapping bug. 

    Problem: (CQ# 14364)
      Once "nictest" is run on a 5752 subsequent runs, run slow.
    Cause:
      During "nictest" the memory test destroys the bootcode stored
      in memory. This causes the driver to run slow after a reset
      because the driver takes time to time-out when waiting for the
      bootcode handshaking which does not happen with corrupt bootcode.
      This only happens when the 5752 operates in the default fast boot
      mode where after the reset the boot code is run from the chip 
      memory. In "slow" boot mode the boot code is re-loaded from NVRAM
      to chip memory before it is executed.
    Fix:
      Force the 5752 to "slow" boot when the memory is tested. 

ersion 1.23:

    Problem: (CQ# 14292)
      The "seprg -a" failed on a 5752A2.
    Cause:
      The "seprg -a" algorithm misidentified the 5752 as a 5705.
    Fix:
      Fixed the incorrect identification specified above.

Version 1.22:

    Problem: (CQ# 13692)
      The "seprg -a" command printed out incorrect version information.
    Cause:
      The algorithm for calculating the present version in the NVRAM
      was incorrect.
    Fix:
      Corrected the algorithm that calculates the present version.

Version 1.21:

    Problem: (CQ# 14003)
      In "asfcfg" option 12 "Getway IP" is incorrect.
    Cause:
      Typo.
    Fix:
      Replaced "Getway" with "Gateway".

    Problem: (CQ# 13886)
      The "secfg" command on a PPC system causes a crash.
    Cause:
      There was an invalid memory reference in the code.
    Fix:
      Modified code not to make the invalid memory reference.

Version 1.20:

    Problem: (CQ# 13187)
      The "secfg" option 21 selection 3 and 4 were swapped.
    Cause:
      Code error swapped selection 3 and 4.
    Fix:
      Fixed "secfg" code error and made some text modifications.

    Problem:
      The "sedump" command incorrectly truncated the bootcode 
      image when the "-l" option was used.
    Cause:
      Code error incorrectly sizes the bootcode.
    Fix:
      Fixed bootcode sizing function error.
    Impact:
      This fix is a temporary fix because eventually the "-l" option
      functionality will be modified so that it is consistent with
      the DOS diagnostics version. In DOS the "-l" option dumps the
      complete NVRAM contents not just the bootcode.

    Enhancement:
      Improved the "sechksum" function for 575x device family.

Version 1.19:

    Problem: (CQ# 13187)
      Some "secfg" text (display only) fields had errors.
    Cause:
      Typos.
    Fix:
      Fixed "secfg" typos and made some text modifications to ease
      automated parsing of the text.

    Problem: (CQ# 13431)
      An error in the driver caused diagnostic to hang with the 5714
      fiber card.
    Cause:
      Diagnostics waited for the driver to return, which it never did.
    Fix:
      Modified the code so that diagnostic will time out and print
      an error even if the driver hangs.
    Impact:
      The Linux driver v8.2.13 or newer is required for testing the
      5714 family of chips.

    Problem: (CQ# 13482)
      The "secfg" mac mode options does not work for 5704 and 5714.
    Cause:
      The mac mode configuration was not being stored in two NVRAM
      locations as required by boot code for proper operation.
    Fix:
      Modified the code to store the mac mode information in the two
      NVRAM locations required by boot code.

Version 1.18:

    Problem: (CQ# 13269)
      Could not enter two smbus addresses in "secfg".
    Cause:
      Original release of diagnostic did not support dual smbus 
      addresses.
    Fix:
      Modified code accept two smbus addresses via "secfg".

Version 1.17:

    Problem:
      Incorrectly identifies the Shasta and 5705 family of devices as
      a 5752.
    Cause:
      The above bug was introduced in v1.16 by a coding typo.
    Fix:
      Fixed the coding typo to eliminate the incorrect identification.

    Problem: (CQ# 13254)
      Could not enable IPMI on two ports.
    Cause:
      Code was written intentionally to limit the enabling of IPMI
      on two ports
    Fix:
      Allow IPMI to be enabled on two ports by removing the limitation 
      stated above, from the code.

    Enhancement: (CQ# 13218)
      Removed the ASF enable/disable display from the "asfcfg" menu to
      make it consistent with the DOS diagnostics.

    Enhancement: (CQ# 13219)
      Added the "setipmi" command to enable IPMI operation.
      
Version 1.16:

    Enhancement: (CQ# 13187)
      Text changes to "secfg" to ease automated parsing.

    Enhancement: (CQ# 13243 & 13244)
      Improved 5714/5705 chip family support.
      
    Enhancement:
      Improved firmware string display of the "device" command on
      Power PC systems.
      
    Problem: (CQ# 12867)
      The boot code was incorrectly programmed to a 5751 board with a
      SaiFun flash device.
    Cause:
      Diagnostic assumed that all device have a flash paging structure
      of the ATMEL device which is not the case for Saifun.
    Fix:
      For ATMEL flash devices convert the logical address to a physical
      addresses and for the SaiFun or ST part no conversion is required.
      
    Problem: (CQ# 13221)
      Could not program a 5714 SERDES device with IPMI firmware.
    Cause:
      Incorrectly identifying the SERDES device as a copper devices.
    Fix:
      Correctly differentiated between 5714 SERDES/copper devices.
      
Version 1.15:

    Enhancement:
      Added ASF programming support for 5705/51/21/52/53/14.

    Enhancement:
      Minor text changes to "secfg" to ease automated parsing.

    Enhancement:
      Fixed text display issues seen with the "dir" command.

Version 1.14:

    Enhancement:
      Added support for 5705/51/21/52/53/14 (alpha stage).

    Problem:
      The "MBUF SRAM via DMA" test fails on Fedora Core 2 & 3.
    Cause:
      The mechanism used to access physics memory has changed 
      for FC2&3 (kernel change).
    Fix:
      This test is removed until a work around is operational.
      For test coverage removing this test is not an issue
      because the MBUF SRAM is tested by "nictest b3" and indirectly
      via "nictest d1/2/3". The DMA is tested in "nictest d1/2/3".

Version 1.13:

    Problem: (CQ# 10980)
      On SOME PPC systems diagnostic failed the DMA test after
      multiple iterations.
    Cause:
      Never received a failing system and could not debug.
      The fix noted in the "Fix:" point below was sent to the 
      customer and was reported to solve the problem.
    Fix:
      Increased the wait time for the DMA test to complete.

Version 1.12:

    Problem:
      On PPC systems diagnostic would hang after running many hours.
    Cause:
      A timer routine did not account for one rollover condition.
    Fix:
      Added code to account for the missing rollover condition.

Version 1.11:

    Enhancement:
      Added the driver returned error number to the end of the 
      "Driver returned error status" message.

Version 1.10:

    Problem:
      On PPC systems the loopback test fails (i.e. nictest d1).
    Cause:
      The setsockopt() PPC call does not complete due to compatibly issues.
    Fix:
      Remove the above call. Nictest d1 will work without it.

Version 1.09:

  1. Fixed failure of "MBUF SRAM via DMA" test on the PPC system.
  
    Problem (CQ# 9876):
      When the "MBUF SRAM via DMA" test is run it fails (test B5).
      
    Cause:
      On the new PPC system the compile environment changed.
      Diagnostic use of u64 is problematic under the new compile
      environment.
    Fix:
      The code was modified to work with u32 instead of u64.

Version 1.08:

  1. Added a new verify option to the "seprg" command.
  
    Problem:
      Command "seprg" can cause diagnostics to crash (CQ9411)
      Command "seprg" accepts firmware files with bad CRCs (CQ9412).
      
    Cause:
      When "seprg" is used to program the flash the from a file the 
      validity of the file is not checked.
      
    Fix:
      Added the -v option to the "seprg" command.
      The -v option verifies the contents of the file being used.
      
   
  2. Support new ASF file format.
  
    Enhancement:
      ASF code is now released as a single binary image.
      Modified diagnostics so it can program the NVRAM with the 
      ASF images using the "seprg -a -f<filename>" command.

Version 1.07: 

  1. Make filename not case sensitive
  
    Problem:
      For formal ASF code releases, the filename was in upper case
      where some of the engineering releases are in lower case.
      This made the operation very inconvinient. 
      
    Cause:
      The ASF code generating utility does unify the filename to
      either upper case or lower case.
      
    Fix:
      Changed the code find the name in 3 steps.
      
      1. Search for the file with giving name as it. This allows
         upper and lower case mixed filenames.
      2. If not found, then convert all letters to lower case.
      3. If not found, then convert all letters to upper case.
      
      If the file cannot be found at this point, it will give up
      the search.
   
Version 1.06:

  1. Fixed DMA overnight SRAM testing failure
  
    Problem:
       After running overnight, from time to time DMA SRAM test 
       was failing.
    
    Cause:
       It was racing between DMA speed and CPU speed. It does not
       happen often, but, once a while, CPU will go and check data
       before DMA complete transfer the whole block.
       
    Fix:
       Put 1 millisecond delay before checking data to allow the DMA
       to complete.     

Version 1.05:

  1. ASF configuration format changed from format 5 to format 6.
   
     Problem:
       The ASF code has been changed to configuration format 6. 
     
     Cause:
       Since b57ldiag asf code is shared with ASF code, after the ASF code
       update, now b57ldiag is using configuration format 6.
       
  2. Fixed Memory test intermittent failure problem
  
     Problem:
       Running test B in loop, intermittently the test would fail.
       
     Cause:
       We had a known chip errata that when doing indirect access to memory
       or registers, the address write does not completes correctly. To
       workaround this, we need to perform an extra read right after the address
       write. 
     
     Fix:
       Added the code to read back the address right after the address write.
       
  3. Restored test group B and A3
  
    Problem:
      Test group B and A3 was temporary removed in Version 1.04
      
    Cause:                  
      We needed an immediate stable version release; thus we had to disable
      test A3 and group B for the previous version.
    
    Fix:
      Restored the tests
      
Version 1.04: 

  1. Added suspend feature upon error for debugging
  
    Problem:
      When test fails, after aborting the test, the driver is 
      resumed and everything back to running. In this case, 
      All debugging information has been lost.
    
    Cause:
      After resume driver, driver will issue reset to the device
      which will reinitialize everything. This will wipe out all
      information about the test failure. 
      
    Fix:
      Added one more option "suspend" upon detecting error. With
      this option, b57ldiag will not resume driver and left driver
      state as suspended.
      
    Note:
      After user select this option, a command "resume" must be
      issued before the port can be back to operational state. 
      
   2. Removed A3 and Group B tests
   
    Problem:
      The test was intermittently failing in version 1.03. We needed
      a stable version in version 1.04. 
      
    Change:
      The test is temporary disabled in this version. Those tests will
      be enabled back in version 1.05.
      
Version 1.03: 

  1. Removed phy_id configuration from NVRAM
  
    Problem:
      Phy_id is not a valid configuration. Should not allow user
      to configure it.
      
    Cause: 
      Order version of configuration had this field; however the
      phy_id is now no longer a configuration field. The id is
      read directly from phy register.
      
    Fix:
      Removed option 24 in secfg.
      
  2. Fixed secfg command problem
   
     Problem: 
       Cannot get into secfg command
       
     Cause: 
       Bootstrap CRC checksum was in little endian format. It needed to be
       converted for comparison.
       
     Fix:
       swapped bootstrap CRC from little endian to big endian.    
       
  3. Checks for valid bootcode for command dir, semap, sechksum,
   
     Problem:
       When bootcode image was invalid, it will behave incorrectly.
       
     Cause:
       Since the bootcode code offset and directory was invalid. The length
       and offset calculation was unpredictable. As result, it may get invalid
       length for memory allocation.
       
     Fix:
       Added image validation check before executing the command. If it is
       invalid, it aborts the command. 
       
  4. Added valid bootcode image check for sedump command.
  
    Problem:
      When bootcode image is invalid, it gets incorrect size for dumping.
      
    Cause:
      When user did not specify the length to dump, the program was trying
      to determine the bootcode length (default) to dump by looking at the boot
      strap and directory. Since the bootcode image was invalid, it get invalid
      length. After the computation, it get negative length if the length field
      was 0xffffffff. As result, it could not allocation memory and cause failure.
      
    Fix:
      When user did not specify the length to dump and the bootcode was invalid,
      force dump length to be 0x2000 (as default) for the size to dump. 
      In addition, it turns off physical-logical translation since the offset is
      invalid. If user wants to use secomp command to compare the content, -a
      option will be needed in secomp command to turn off the address translation
      also.
      
  5. Display firmware version for CPU test
  
    Problem:
      When running CPU test, user cannot tell what version of firmware it was
      testing with. 
      
    Cause:
      Code does not display the version number and order firmware does not have
      version string also. 
      
    Fix:
      Updated firmware to contain version string and modified the program to
      display the version string when testing.
      
    Side effect:
      This function will work only if newer firmware is used. 

version 1.02: 

  1. Added new error codes for CPU Test
  
    Problem:
      When CPU test (test C2) fails it displays "CPU test failed" only.
      It would help if it displayed more information about how it failed.
      This is also true for DOS version of b57diag.
      
    Enhancement:
      1. Changed cpu.bin/cpu05.bin to encode the error
      2. Changed b57ldiag to decode the error message to text format.
      
    New possible error messages:
      1. CPU failed on %s bit access to address %08X
      2. CPU failed on memory pattern %08X at address %08X
      3. CPU Instruction test failed
    
    This requires new cpu.bin/cpu05.bin firmware released in version 
    1.02 or later. 
    
  2. Fixed secomp failure on offset 0x10 
  
    Problem:
      When using secomp command to compare the NVRAM data against file, 
      offset 0x10 was always incorrect. This problem was only seen in 
      PPC, RedHat (i86 systems) was okay. 
   
    Cause:   
      When reading bootcode image from NVRAM, the bootstrap checksum is 
      reversed in PPC. The CRC was stored in little-endian format. It 
      needed to be converted to big-endian before comparison.
      
    Fix:
      Converted checksum to big-endian format.
      
  3. Fixed secomp failure on offset 0x100
  
    Problem:
      When program bootcode image with seprg with restoring serial number,
      Offset 0x100 data will be corrupted. 
      
    Cause:
      The bug was in seprg command. When programming bootcode and try to 
      restore the serial number in VPD data. The vpd data needed to be 
      re-organized due to the serial number restoration. Offset 0x101-0x102 
      is the region length 16 bit field. In PPC, the field needed to be 
      converted to big-endian. There was a bug using 32 bit conversion to 
      convert 16 bit data. As result, the length as stored as zero and 
      caused the data corruption. 
      
    Fix:
      Changed the 32 bit conversion to 16 bit conversion.   
      
  4. Added new option -m and -v for secomp command
  
    Problem:
      When Mac address or serial number was preserved while using command
      seprg, the comparison will fail on mac address, manufacturing block
      checksum, and vpd data.
      
    Cause: 
      The Mac address and serial number will not be the same as original default value
      in file.
      
    Fix:
      Added two new options:
      -m to ignore mac address and manufacturing CRC comparison.
      -v to ignore VPD data comparison.
      
Version 1.01: 

  1. Added -unlock command line option
  
    Problem:
      If the process was killed by other process, the exclusive 
      semaphore is locked forever. When we run the program, it will
      say "An instance is already running" and simply exit program.
      
    Cause:
      The purpose if the semaphore implemented was because we needed
      this program to run exclusively. However, since we cannot trap
      kill signal, we could not unlock the semaphore when the program
      is terminated. 
      
    Fix:
      Added -unlock command line option to take over the locked semaphore.
      
    Side effect:
      As a hardware diagnostics, this program must be running exclusively.
      With this option, however, user is able to override the exclusive
      operation and cause the diagnostics to fail. It is user's responsibility
      and understanding the purpose of the semaphore. 
      
  2. Changed ASF configuration bits
  
    Problem:
      ASF configuration, command "asfcfg" option 7, "ASF Misc. Info", data
      was stored in incorrect location. 
      
    Cause:
      There was big-endian and little-endian issue where bit 24 information
      was stored in bit 0. 
      
    Fix:
      Changed the bit ordering
      
  3. Fixed secfg in PPC system
  
    Problem:
      In Power PC systems, secfg command will return bootstrap checksum error
      and cannot go to configuration routine. 
      
    Cause:
      The checksum check routine was swapping checksum to little endian format
      for comparison.
      
    Fix:
      Changed the checksum to big endian format.
      
  4. Added NVRAM programming status display
  
    Problem:
      When program large block of NVRAM image, it takes long time. Especially 
      when if the device was SEEPROM. In this case, user may mistakenly think
      of program hang.
      
    Fix:
      Changed the code to show programming progress status.
  
  5. Added new command for ASF debugging capabilities
  
    Enhancement:
      We need more commands to support ASF debugging. 
      
    Changes:
      a. Added new command 'halt' to halt CPUs.
      b. Added new command 'u'/'disasm' to disassemble MIP instructions
      c. Added new command 'step' for stepping MIP instruction
      d. Added new command 'go' to jump cpu PC.
      e. Added new command 'asf' for debug version of ASF code. 
      
Version 1.00: 
    Initial Release
 

