Information Technology Reference
In-Depth Information
Interface Descriptor
The interface descriptor is where a device specifies the mass-storage func-
tion. A configuration can have multiple interfaces that are active at the same
time. Each interface has its own interface descriptor and subordinate
descriptors. Table 3-3 shows the fields in the interface descriptor. Here are
more details about the fields and how they're used in a mass-storage device:
bLength. The number of bytes in the descriptor. Always 09h.
bDescriptorType. The constant INTERFACE (04h).
bInterfaceNumber. Identifies the interface. Each interface must have a
descriptor with a unique value in this field.
bAlternateSetting. A single interface number can have alternate settings.
Each setting has its own interface descriptor with the same value in bInter-
faceNumber and a unique value in bAlternateSetting. Each setting also has
its own endpoint descriptors. Only one setting is active at a time. The
default interface setting (bAlternateSetting = 00h) is active immediately after
the host has enumerated the device and selected a configuration. Mass-stor-
age host drivers typically support only the default setting.
bNumEndpoints. The number of endpoints an interface supports in addi-
tion to endpoint zero. Set to 02h for a bulk-only mass-storage device.
bInterfaceClass. Set to 08h to specify the mass-storage class.
bInterfaceSubClass. In mass-storage devices, the bInterfaceSubClass field
specifies either an industry-standard command-block set or the SCSI trans-
parent command set (06h). Each device also specifies a peripheral device
type (PDT) in response to a SCSI INQUIRY command. Each PDT corre-
sponds to a document that specifies a command set. Virtually all new
mass-storage designs should set bInterfaceSubClass = 06h. The device then
declares its command set in a single location, in the PDT value in the
response to an INQUIRY command. Devices that use other values for
bInterfaceSubClass should be sure that the value is compatible with the
PDT returned in the INQUIRY response. Chapter 6 has more about the
INQUIRY command.
The mass-storage overview specification is somewhat confusing when it says
that the contents of bInterfaceSubclass specify “transport protocols and
Search WWH ::




Custom Search