Click to Rate and Give Feedback
MSDN
MSDN Library
Windows Driver Kit
Design Guide
 Identifiers Generated by USBSTOR.SY...

  Switch on low bandwidth view
Windows Driver Kit: Device Installation
Identifiers Generated by USBSTOR.SYS

Microsoft Windows 2000 and later versions of Windows, as well as Windows Millennium Edition (Windows Me), contain native support for a large number of USB mass storage devices. The usbstor.inf installation file contains device IDs for those devices that are explicitly supported. If the USB hub driver enumerates one of these devices, the operating system will automatically load the USB storage port driver, usbstor.sys.

The device IDs for USB mass storage devices listed in usbstor.inf take the usual form for USB device IDs composed using information in the USB device's device descriptor:

USB\VID_v(4)&PID_d(4)&REV_r(4)

where v(4) is the 4-digit vendor code that the USB committee assigns to the vendor, d(4) is the 4-digit product code that the vendor assigns to the device, and r(4) is the revision code.

In addition to these device IDs, usbstor.inf contains compatible IDs for class 8 ATAPI CD-ROM and removable media devices that support bulk-only transport:

USB\CLASS_08&SUBCLASS_02&PROT_50

USB\CLASS_08&SUBCLASS_05&PROT_50

USB\CLASS_08&SUBCLASS_06&PROT_50

where

class 08h = mass storage devices

subclass 02h = SFF-8020i ATAPI CD-ROM devices

subclass 05h = SFF-8070i ATAPI removable media

subclass 06h = generic SCSI media, and

protocol 50h = the bulk-only transport protocol.

If the data retrieved from the device's device descriptor matches any of these compatible IDs, the operating system will load usbstor.sys.

Once loaded, the USB storage port driver creates a new PDO for each of the device's logical units. For more information, see the example device stack created by usbstor.sys illustrated in Device Object Example for a USB Mass Storage Device.

When the PnP manager queries for the device identification strings of the newly created PDOs, the USB storage port driver fabricates a new set of device, hardware and compatible IDs derived from the device's SCSI inquiry data. The device ID format is:

USBSTOR\v(8)p(16)r(4)

where v(8) is an 8-character vendor identifier, p(16) is a 16-character product identifier, and r(4) is a 4-character revision level value.

An example of a device ID for a disk drive would be:

USBSTOR\SEAGATE_ST39102LW_______0004

The hardware IDs that the USB storage port driver generates are as follows:

USBSTOR\t*v(8)p(16)r(4)

USBSTOR\t*v(8)p(16)

USBSTOR\t*v(8)

USBSTOR\v(8)p(16)r(1)

v(8)p(16)r(1)

USBSTOR\GenericTypeString

GenericTypeString

where t* is a SCSI device type code of variable length, v(8) is an 8-character vendor identifier, p(16) is a 16-character product identifier, and r(4) is a 4-character revision level value, and in the fourth and fifth of these additional identifiers, r(1) represents just the first character of the revision identifier.

The following table contains the SCSI device type codes used by the USB storage port driver to generate identifier strings:

SCSI Type CodeDevice TypeGeneric Type
DIRECT_ACCESS_DEVICE (0)Disk or SFloppyGenDisk or GenSFloppy
SEQUENTIAL_ACCESS_DEVICE (1)SequentialGenSequential
WRITE_ONCE_READ_MULTIPLE_DEVICE (4)WormGenWorm
READ_ONLY_DIRECT_ACCESS_DEVICE (5)CdRomGenCdRom
OPTICAL_DEVICE (7)OpticalGenOptical
MEDIUM_CHANGER (8)ChangerGenChanger
Default Type (all values not listed above)OtherUsbstorOther

These examples illustrate the hardware IDs generated by the USB storage port driver:

USBSTOR\DiskSEAGATE_ST39102LW_______0004

USBSTOR\DiskSEAGATE_ST39102LW_______

USBSTOR\DiskSEAGATE_

USBSTOR\SEAGATE_ST39102LW_______0

SEAGATE_ST39102LW_______0

USBSTOR\GenDisk

GenDisk

The USB storage port driver generates two compatible IDs.

USBSTOR\t*

USBSTOR\RAW

where t* is a SCSI device type code of variable length.

The compatible IDs generated by the USB storage port driver are illustrated by the following examples:

USBSTOR\Disk

USBSTOR\RAW


Send feedback on this topic
Built on May 20, 2009
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker