README.txt for Taped09.zip
   Tapedrv.exe -- IBM Tape Device Firmware Utility - v0.9

Files
-----
   README.txt    This file
   Tapedrv.txt   Tapedrv documentation
   Tapedrv.exe   Tapedrv executable
   Tapedrv.msg   Tapedrv message file
   Tapedrv.ini   Tapedrv initialization file
   Makefile      Nmake script for building tapedrv.exe
   devioctl.h    NT header file
   ntddscsi.h    NT header file
   Tapedrv.c     Tapedrv source


History
-------
Version 0  - Initial pass
Version 1  - Second pass
Version 2  - Add DOS mode memory usage logging
     - Hide cursor after status and prompt line update
     - Item: command line option character case insensitivity
Version 3  - Reduce maximum DOS mode memory requirement by about 12K.
Version 4  - Reduce maximum DOS mode memory requirement an additional 15K.
Version 5  - Fix "Invalid device request reading drive c" errors during 
       DOS mode program initialization.
Version 6  - Fixes for 3502 and 3600 Libraries and the IBM Ultrium-1
Version 7  - Add support for device access via NT port driver
Version 8  - Fix for HP half-high and Win9x 3600 Library w/ 126I firmware
Version 8a - Fix 'tapedrv status /r' broken in Version 8
Version 9  - Fix 'tapedrv status /o' broken in Version 8; 5K DOS memory reduction

Items incorporated in Tapedrv version 9
---------------------------------------

I have regression tested under DOS, Windows 98SE, NT 4, and
2000 using Seagate TR-4 ATAPI, Seagate NS20, Scorpion-24,
Scorpion-40, IBM 3600 Library with 2 Ultrium drives,
and IBM 3502 with a DLT 700ersion 


Item: For the command 'Tapedrv status /o <file>', the /o option
     fails to work in version 8a.

   The reason for the bug was the deletion of a single
   'o' character passed to the options parser.

   For version 9, the 'o' character is now passed.


Item: With certain Server RAID configurations,
     DOS mode Travan update may fail with Tapedrv version 6 through version 8a

   During DOS mode update of a Seagate Travan drive on
   certain Server with RAID driver configurations, Tapedrv version 6
   through version 8a may run out of memory and display the following
   error:
      TAPEDRV8201 error: Insufficient memory for 282K transfer
      buffer (additional <N>K needed).
   <N>, in the above message, will likely be around 3.

   The additional 6K of memory consumed by the tapedrv program
   was due to program development with a failure to account for
   the DOS mode memory constraint.

   Changes to verison 9 reduce the memory consumed by about 5K include:
   - Unused code was deleted.
   - A static 2K memory buffer which is only needed during the
     Tapedrv status is now allocated, only when needed, during
     runtime.
   - A function that reports additional tape device information
     during 'Tapedrv scan' is conditionally compiled so that
     it is only present in Windows (where memory is not an issue).

   Tapedrv version 8a uses about 6K more of memory than version 5.
   Tapedrv version 9 uses about 1K more of memory than version 5.
   Even though version 9 is about 1K larger than version 5, there should
   be about 2K of headroom for the worst case known RAID server
   configuration. 

Fixes incorporated in Tapedrv v0.8
----------------------------------
Item: Tapedrv fails to update HP Ultrium Half-high firmware 

   The HP Ultrium rejects firmware showing the following error:

      TAPEDRV8570 error: Image offset 0x8e4a0: Writebuffer(Mode=5, 
      addr=0x0008e4a0, length=0) error: Host adapter status 0x11: 
      Select timeout
      An error occurred while downloading firmware.  
      Firmware update failed.
         [Note: This seems to be inappropriate behaviour for an 
         invalid firmare image.  Instead of _not_ responding, the HP 
         should return  CHECK CONDITION, ASC/ASCQ 0x26/0x00: INVALID 
         FIELD IN PARAMETER LIST.]

   This results from incorrect data sent to the tape drive as the 
   because of Tapedrv's failure to skip the 1088 byte header at the 
   beginning of the .FRM firmware file.  

   The solution was to add support for a new "hp_ultrium" update 
   algorithm in Tapedrv.exe.  In addition, the configuration 
   parameter: Tapedrv.ini [HP_Ultrium-1_SCSI_Half_High] 
   UpdateAlgorithm = "standard" was changed to 
   UpdateAlgorithm = "hp_ultrium".
   The hp_ultrium algorithm validates then skips the .FRM file 
   header before transferring the firmware image to the drive.
   If the firmware filename ends with other than the suffix .FRM, 
   the file is treated as a raw binary image.


Item: When updating IBM 3600 Library firmware on Windows 95/98/ME, 
     the Library becomes an  "HP      DOWNLOAD" device.

   When running Tapedrv v0.7 or earlier to update an IBM 3600 
   Library's firmware from version 126I on a Windows 95/98/ME 
   system, the update process terminates in the middle of the 
   update procedure with a message siminar to the following:
   This
      TAPEDRV8570 error: Image offset 0x000bd000: WriteBuffer(mode=4, 
         adrs=0x10000000, length=32768) error:
      Host Adapter error 0x12: DMA overrun/underrun
      An error occurred while downloading firmware.
      Firmware update failed.

   Where, words of significance are "DMA overrun/underrun".

   As a result, of the abnormal update termination, the Library 
   hangs in the middle of the update procedure.  When power 
   cycled, the Library's LCD screen is blank and, at the SCSI 
   BUS interface changes its Inquiry string 
   from: "HP      C7200           126I"
   to:   "HP      DOWNLOAD        B.13"

   [While in this DOWNLOAD state, Library firmware can still 
   be updated using a special version of Tapedrv.ini.]

   This is NOT an issue with 130I firmware.

   To resolve this Item, Tapedrv v0.8 is modified to ignore 
   the "DMA overrun/underrun" error when version 126I, or earlier,
   firmware is present in the device while running on Windows 
   95/98/ME.


Item: For a 3600 Library, only 1 of 2 Tape Drives are shown when 
     updating firmare under Windows 2000.

   Under Windows 2000, with _no_ IBM Ultrium tape (class) driver 
   installed, only 1 of the 2 IBM Ultrium drives is found by the 
   Tapedrv v0.7 (and earlier) firmware update program.

   For example, there should actually be two Ultrium tape drives 
   listed on the following screen:

      -------------------------------------------------
      tapedrv -- IBM Tape Device Firmware Utility - v0.7
      Copyright (c) 2000-2001 IBM Corporation
      Press Enter key to end without updating.
      Update pending.                    Update will start in 25 seconds.

      Device Address: Port_Number.Bus_Number/SCSI_Device_ID

                                            Current            Update
      Device                             Ver-               Version
      Address  Device Inquiry            sion  State        Old,New  Status
      -------  ------------------------  ----------------  -----------------
      2.0/2    IBM     ULTRIUM-TD1       0BN1 Out of date  0BN1,16E0 Waiting
      2.0/0    HP      C7200             126I Out of date  126I,130I Waiting
      -------------------------------------------------
      
   Since the second Ultrium drive is not seen, its firmware is 
   not be updated.

   Because of a Windows 2000 device enumeration anomily, one of 
   the Ultriums is not listed in the registry when a IBM Ultrium 
   (class) driver is _not_ installed.  Tapedrv v0.7 and earlier 
   finds all tape devices by scanning the registry.

   To resolve this issue, Tapedrv v0.8 now scans SCSI port drivers 
   for all "unclamed" and "claimed" tape devices.  Thus both tape 
   drives are displayed and updated if out-of-date.



Fixes incorporated in Tapedrv v0.7
-----------------------------------
Item: When running under Windows NT/2000, Tapedrv reports 
      "Device inaccessible" 
   and fails to update either a tape drive or medium changer 
   when no Class driver is installed.  The "Unknown Medium 
   Changer Device" is not a Class driver.

   To resolve this issue Tapedrv v0.7 uses the SCSI Port driver 
   to access and update tape drives or medium changers for 
   which no Class driver can be found.


Fixes incorporated in Tapedrv v0.6
-----------------------------------
Item: Failure to update firmware for an IBM 3600 Library

   The Library rejected firmware image download as it sees 
   incorrect data.  The incorrect data was the result 
   of Tapedrv's failure to skip the 1088 byte header at the 
   beginning of the .FRM firmware file.  In addition, the 
   Library requires that firmware be transferred in 32K blocks 
   (except for the final block which may be shorter).  Lastly, 
   Tapedrv was incorrectly issuing a final Write Buffer with a 
   zero transfer length (appropriate for other devices but not 
   not the 3600 Library).

   The solution was to add support for a new "hp_library" update 
   algorithm in Tapedrv.exe.  In addition, the configuration 
   parameter Tapedrv.ini [3600_library] UpdateAlgorithm = "standard"
   was changed to UpdateAlgorithm = "hp_library".
   The hp_library algorithm validates then skips the .FRM file 
   header, then transfers the firmware image to the library using 
   a block size of 32K.  The final non-zero image transfer is 
   assumed to be the end of firmware download.

   IMPORTANT: Because of firmware issues it is necessary to both 
   power cycle the Library and reboot the host system after firmware 
   update.  HP supplied new C7200_130I.frm (a replacement for 
   the original 3600l_30.frm).

Item: Failure to update firmware for an IBM Ultrium Drive

   Tapedrv was incorrectly issuing a final Write Buffer with a 
   zero transfer length (appropriate for other devices but not 
   not the 3600 Library).

   The solution was to add support for a new "ibm_ultrium" update 
   algorithm in Tapedrv.exe.  In addition, the configuration 
   parameter Tapedrv.ini [IBM_Ultrium-TD1_SCSI] 
   UpdateAlgorithm = "standard" was changed to UpdateAlgorithm = 
   "ibm_ultrium".  The "ibm_ultrium" algorithm differs from the 
   "standard" in that the image size is verified to be 1MB and 
   the final Write Buffer command transfers data.  That is, the 
   addition Write Buffer with zero length transfer has been 
   removed.

Failure to update firmware for a DLT7000 with an OML personality 
   within a IBM 3502-R14 (ATL L500) Library

   The DLT7000 rejected the D7L_v105.img (OEM) firmware because 
   it was not OML.  Tapedrv had no way to distinguish whether 
   a Quantum DLT has the OEM (stand alone) or OML (library 
   connected) Firmware Personalities installed. The Firmware 
   Personality is reported in byte 41 of standard Inquiry data
   as a binary value.  Tapedrv v0.5 and earlier have no way to 
   recognize byte 41 of Inquiry data.

   Tapedrv v0.6 has added capability for recognition of binary data in 
   an standard Inquiry data.  This is implemented in Tapedrv.ini by 
   adding a InquiryStdHex parameter to the appropriate 
   [<device_section>].  To tell Tapedrv to recognize the Quantum DLT 
   Firmware Personalities: 
      OEM, use InquiryStdHex = "41:04*"
      OML, use InquiryStdHex = "41:0f*"
      OMX, use InquiryStdHex = "41:12*"

   Since both DLT7000 OEM and OML Firmware Personalities need to be 
   updated, a new [Quantum_DLT7000_OML] section is added to Tapedrv.ini.
   The old [Quantum_DLT7000] section still specifies an OEM personality.
   The new [Quantum_DLT7000_OML] section specifies the OML personality.

   IMPORTANT: You may want examine the following Tapedrv.ini sections 
   and determine whether they need an added InquiryStdHex = "41:04*"
   parameter for detection of the OEM Firmware Personality:
      [Benchmark_DLT1], [Quantum_DLT4000], [Quantum_DLT8000], and
      [Quantum_SuperDLT_SCSI].


Library reboot
--------------
Both the 3600 and 8502 libraries need to be rebooted if the 
Library firmware is updated.
For autoupdate, Library devices are moved to the end of the 
list of devices displayed on the screen.  This reordering 
may reduce the requirement to reboot between Drive and 
Library update for the 3502. However, whenever Library 
firmware is updated, a Library power cycle as well as a 
host system reboot is recommended.

Known Issues
------------
- Firmware update fails for DLT7000 Drive in an 3502-R14 Library
  when a tape is present in the drive.  Customers need to be 
  instructed to eject any tapes, if present in tape drives, into 
  storage slots.
- If the message 
    "TAPEDRV8360 error: Timeout waiting device to become stable"
  is seen, try inserting a tape in the left most storage slot.


Tapedrv.ini changes
-------------------
The following list shows changes made to Tapedrv.ini.
UpdateAlgorithm has 2 new values: ibm_ultrium, hp_library 
ibm_ultrium and hp_library replace the "standard" algorithm 

InquiryStdHex is a new parameter used to identify different 
Quantum DLT Firmware Personalities.  

[tapedrv] In device list: 1)Enabled ATL_L200; 2) Inserted Quantum_DLT7000_OML
    OLD: ;devices00 = ATL_L200_Quantum_DLT7000
    NEW: devices00 = ATL_L200_Quantum_DLT7000

    OLD: devices25 = Quantum_DLT8000
         devices26 = Quantum_SuperDLT_SCSI
    NEW: devices25 = Quantum_DLT7000_OML
         devices26 = Quantum_DLT8000
         devices27 = Quantum_SuperDLT_SCSI

Device Section Comments
    Added description of InquiryStdHex parameter
    Added examples to description of InquiryCFR_OEM parameter
    Added two algorithms to UpdateAlgorithm:
    ;       "ibm_ultrium"        IBM Ultrium
    ;       "hp_library"         HP Library/Autoloader

[ATL_L200_Quantum_DLT7000]
    OLD: AutoFileVersion = "??34"
    NEW: AutoFileVersion = "0022"

[ATL_L500_Quantum_DLT7000]
    OLD: AutoFileVersion = "??34"
    NEW: AutoFileVersion = "0022"

[3600_Autoloader] Changed UpdateAlgorithm
    OLD: UpdateAlgorithm = "standard"
    NEW: UpdateAlgorithm = "hp_library"

[3600_Library] Changed UpdateAlgorithm
    OLD: UpdateAlgorithm = "standard"
    NEW: UpdateAlgorithm = "hp_library"

[IBM_Ultrium-TD1_SCSI] Changed UpdateAlgorithm
    OLD: UpdateAlgorithm = "standard"
    NEW: UpdateAlgorithm = "ibm_ultrium"

[Quantum_DLT7000] Added the InquiryStdHex parameter for OEM personality
    NEW: InquiryStdHex   = "41:04*"

[Quantum_DLT7000_OML] Added new section for DLT7000 with OML personality
    NEW: [Quantum_DLT7000_OML]
         Description     = "Quantum DLT7000 (Library Personality)"
         InquiryStd      = "Tape:QUANTUM DLT7000         ????"
         InquiryStdHex   = "41:0f*"
         AutoFileName    = "D7L_v105.img"
         AutoFileVersion = "2769"
         CompareControl  = "0123"
         UpdateAlgorithm = "quantum_dlt"
         UpdateSeconds   = 200
    NOTE: The file D7L_v105.img is a copy of DLT7000_V105_OML-1.img


DOS Memory Requirement
----------------------
   Tapedrv Version6 has the following DOS mode memory requirement:
   363K for Seagate Travan drives,
   337K for Seagate DDS-1 and DDS-2 with 256K EEPROM, and
    97K for all other drives.


Installation
------------
   To install copy the files Tapedrv.exe, Tapedrv.msg, and Tapedrv.ini, 
   from the .zip file to a test directory.  For example:
      \tapedrv\Tapedrv.exe
      \tapedrv\Tapedrv.msg
      \tapedrv\Tapedrv.ini


Usage Hints
-----------
   To run the status simulation, use a command similar to: 
      \tapedrv\tapedrv statussim [/r] [/o outfile]

   To run the autoupdate simulation, use a command similar to: 
      \tapedrv\tapedrv autosim

   For any of the commands status, statussim, autoupdate, autosim, ÿa 
   log file may optionally be created by adding a /l <logfile> 
   parameter.

   Once firmware files are accumulated in a directory (e.g., 
   \FIRMWARE), re-run the autoupdate commands, using a commands 
   similar to: 
      \tapedrv\tapedrv autosim /p \FIRMWARE
      \tapedrv\tapedrv autoupdate /p \FIRMWARE


