BETA-HOWTO: Controlling SCSI LUN Scanning in Windows NT 5.0

ID: Q182541


The information in this article applies to:


SUMMARY

This document describes the new ScsiPort.sys registry keys that control how small computer system interface (SCSI) logical unit numbers (LUNs) are scanned. This information is preliminary and subject to change.

The Windows NT 5.0 ScsiPort driver supplied by Microsoft has two new registry keys that control how LUNs are scanned:


   OneLUN : REG_DWORD : [0 or 1] 
If set to 1, this registry key sets the ScsiPort driver not to scan beyond LUN 0. Some devices work improperly if non-zero LUNs are accessed.

   SparseLUN : REG_DWORD : [0 or 1] 
If set to 1, this registry key sets the ScsiPort driver to support sparse LUN scanning. By default, the ScsiPort driver stops scanning SCSI LUNs as soon as a particular LUN does not respond. You can use this key to set the ScsiPort driver to continue scanning beyond the unresponsive LUNs.


MORE INFORMATION

The ScsiPort LUN control registry keys can reside in several locations. They are searched in the following order (only the first location is discussed in this article):

  1. In list form under the following key:
    
       HKEY_LOCAL_MACHINE
          System
            CurrentControlSet
              Control
                ScsiPort
                  SpecialTargetList
                    <Hardware ID key described later in this document> 


  2. In list form under the adapter's devnode. Discussion of this location is outside the scope of this article.


  3. As a set of flags under the device's devnode. Discussion of this location is outside the scope of this article.


Within each registry location, the ScsiPort driver looks for the most specific match of the device PnP hardware ID. The search starts at a generic Hardware ID and continues to the specific Hardware ID, with the more specific matches overriding the least specific matches.

Hardware IDs

The hardware IDs are based on the SCSI Inquiry data returned from the device. The device type code from the Inquiry data is mapped to strings as indicated in the following table:

   SCSI Inquiry   Device Type   Generic Type    Device Map
    Device Type     String        String          String
   ---------------------------------------------------------------------

   0x00           "Disk"        "GenDisk"       L"DiskPeripheral"
   0x01           "Sequential"  ""              L"TapePeripheral"
   0x02           "Printer"     "GenPrinter"    L"PrinterPeripheral"
   0x03           "Processor"   ""              L"OtherPeripheral"
   0x04           "Worm"        "GenWorm"       L"WormPeripheral"
   0x05           "CdRom"       "GenCdRom"      L"CdRomPeripheral"
   0x06           "Scanner"     "GenScanner"    L"ScannerPeripheral"
   0x07           "Optical"     "GenOptical"    L"OpticalDiskPeripheral"
   0x08           "Changer"     "ScsiChanger"   L"MediumChangerPeripheral"
   0x09           "Net"         "ScsiNet"       L"CommunicationsPeripheral"
   0x10-0xFF      "Other"       "ScsiOther"     L"OtherPeripheral" 

Blank characters are replaced with the underline character "_". Hardware IDs are constructed and searched in the following order (the search does not stop when a match is made):

  1. Generic type string

    See the table above.


  2. Vendor + Product + Revision[0]

    Vendor length: 8
    Product length: 16
    Revision length: 1


  3. Bus \ Vendor + Product + Revision[0]

    Vendor length: 8
    Product length: 16
    Revision length: 1


  4. Bus + Device Type string + Vendor

    Vendor length: 8


  5. Bus + Device Type string + Vendor + Product

    Vendor length: 8
    Product length: 16
    Revision length: 4


  6. Bus + Device Type string + Vendor + Product + Revision

    Vendor length: 8
    Product length: 16
    Revision length: 4


Example

Seagate disk drive (Model ST11200N). Inquiry data returned from the device:

    Byte : Data
    ----------------------------------------------------------------

    0x00 : 0x00 0x00 0x02 0x02 0x8f 0x00 0x00 0x12   . . . . . . . .
    0x08 : 0x53 0x45 0x41 0x47 0x41 0x54 0x45 0x20   S E A G A T E
    0x10 : 0x53 0x54 0x31 0x31 0x32 0x30 0x30 0x4e   S T 1 1 2 0 0 N
    0x18 : 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20
    0x20 : 0x39 0x33 0x30 0x30 0x30 0x30 0x37 0x31   9 3 0 0 0 0 7 1
    0x28 : 0x36 0x32 0x36 0x37 0x00 0x00 0x00 0x00   6 2 6 7 . . . .
    0x30 : 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00   . . . . . . . .
    0x38 : 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00   . . . . . . . .
    0x40 : 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00   . . . . . . . .
    0x48 : 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00   . . . . . . . .
    0x50 : 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00   . . . . . . . .
    0x58 : 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00   . . . . . . . .
    0x60 : 0x00 0x43 0x6f 0x70 0x79 0x72 0x69 0x67   . C o p y r i g
    0x68 : 0x68 0x74 0x20 0x28 0x63 0x29 0x20 0x31   h t   ( c )   1
    0x70 : 0x39 0x39 0x33 0x20 0x53 0x65 0x61 0x67   9 9 3   S e a g
    0x78 : 0x61 0x74 0x65 0x20 0x41 0x6c 0x6c 0x20   a t e   A l l
    0x80 : 0x72 0x69 0x67 0x68 0x74 0x73 0x20 0x72   r i g h t s   r
    0x88 : 0x65 0x73 0x65 0x72 0x76 0x65 0x64 0x20   e s e r v e d
    0x90 : 0x30 0x30 0x30 0x30                       0 0 0 0 

The PnP Hardware IDs are searched for a registry match in the following order:

  1. GenDisk


  2. SEAGATE_ST11200N________9


  3. SCSI\SEAGATE_ST11200N________9


  4. SCSI\DiskSEAGATE_


  5. SCSI\DiskSEAGATE_ST11200N________


  6. SCSI\DiskSEAGATE_ST11200N________9300


Add the following setting to enable sparse LUN scanning for all disk drives:

   HKEY_LOCAL_MACHINE
      System
        CurrentControlSet
          Control
            ScsiPort
              SpecialTargetList
                GenDisk

                  SparseLUN : DWORD : 1 

To enable sparse LUN scanning for all disk drives, but to disable for a specific manufacturer, keep the previous generic setting and add an additional section for the manufacturer. For example, you can add the following section for a Seagate device:

    HKEY_LOCAL_MACHINE
      System
        CurrentControlSet
          Control
            ScsiPort
              SpecialTargetList
                SEAGATE_ST11200N________9

                  SparseLUN : DWORD : 0 

Note that you can use any of the PnP Hardware IDs (B - F above) on the target list to match the Seagate device.


REFERENCES

See the Windows NT DDK for additional driver information.

Additional query words: beta99


Keywords          : kbcode kbhw ntddkstorage 
Version           : WINNT:5.0
Platform          : winnt 
Issue type        : kbhowto 

Last Reviewed: March 5, 1999