Identifiers Generated by USBSTOR.SYS

Starting with Windows 2000, the operating system provides native support for many 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 in Usbstor.inf take the usual form for USB device IDs composed by 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.

  • 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.

  • 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.

As soon as it is 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 creates a new set of device, hardware and compatible IDs derived from the device's SCSI inquiry data. The device ID format is as follows:

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

Where:

  • v(8) is an 8-character vendor identifier.

  • p(16) is a 16-character product identifier.

  • r(4) is a 4-character revision level value.

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

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.

  • r(4) is a 4-character revision level value. In 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 code Device type Generic type

DIRECT_ACCESS_DEVICE (0)

Disk or SFloppy

GenDisk or GenSFloppy

SEQUENTIAL_ACCESS_DEVICE (1)

Sequential

GenSequential

WRITE_ONCE_READ_MULTIPLE_DEVICE (4)

Worm

GenWorm

READ_ONLY_DIRECT_ACCESS_DEVICE (5)

CdRom

GenCdRom

OPTICAL_DEVICE (7)

Optical

GenOptical

MEDIUM_CHANGER (8)

Changer

GenChanger

Default Type (all values not listed previously)

Other

UsbstorOther

These examples show the hardware IDs that are 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