professional documents
home
Upload
docsters
Upload
Acrobat PDF

usb interface center doc


USB Interface Association Descriptor Device Class Code and Use Model Revision 1.0 July 23, 2003 Copyright © 2003, Intel Corporation THIS DOCUMENT IS PROVIDED "AS IS" WITH NO WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR ANY PARTICULAR PURPOSE, OR ANY WARRANTY OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. Intel disclaims all liability, including liability for infringement of any proprietary rights, relating to use of information in this specification. No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted herein. Intel is a trademark or registered trademark of Intel Corporation or its subsidiaries in the United States and other countries. * Other names and brands may be claimed as the property of others. Contributors John S. Howard Intel Corporation Brad W. Hosler Intel Corporation Abdul R. Ismail Intel Corporation Geert Knapen Philips Table of Contents Rev. [1.0] i Table of Contents 1. OVERVIEW ...................................................................................................... 1 2. IAD USE MODEL EXAMPLE ........................................................................... 2 1. Overview Rev. [1.0] 1 1. Overview From day 1 (of the USB specification) there has been ambiguity with respect to whether multi-function devices should be allowed to use more than one interface per logical function. The core specification did not provide any specific framework support for multiple interfaces per function, but several Device Working Groups (DWG) defined device classes using them, with different methods for identifying how the interfaces should be grouped together. There was a trailing effort in the DWG Common Class group to define a standard method, but it was late in definition and was never adopted and eventually was decommissioned. The recent USB 2.0 ECN Interface Association Descriptor (IAD) solves the problem by defining a standard method in the USB device framework for describing associations of interfaces (and their alternate settings) that should be bound to the same instance of a device driver. There exists a legacy issue for new devices that use the IAD (implying interface level binding to device drivers as opposed to device-level binding) when connected to systems where USB system software does not understand the IAD. Although the IAD will be ignored, the device may not work as expected because the USB system software will not properly bind the interfaces with drivers. The USB core team has allocated a device-level class code that must be included with device implementations that use the IAD. This provides for the easiest detection of IAD-enabled devices during device enumeration that will allow installation of a special-purpose function driver that has the capability of correctly parsing the configuration and locating the appropriate drivers for IAD-enabled devices. Devices that use the IAD must use the device class, subclass and protocol codes as defined in the example device descriptor illustrated in Table 1-1. This set of class codes is defined as the Multi-Interface Function Device Class Codes. Table 1-1. Example Device Descriptor Using Class Codes for IAD Offset Field Size Value Description 0 bLength 1 Number Size of this descriptor in bytes 1 bDescriptorType 1 Constant See Table 9-8, USB Specification, Revision 2.0 2 bcdUSB 2 BCD See Table 9-8, USB Specification, Revision 2.0 4 bDeviceClass 1 EFH Miscellaneous Device Class 5 bDeviceSubClass 1 02H Common Class 6 bDeviceProtocol 1 01H Interface Association Descriptor 7 bMaxPacketSize0 1 Number See Table 9-8, USB Specification, Revision 2.0 8 idVendor 2 ID See Table 9-8, USB Specification, Revision 2.0 10 idProduct 2 ID See Table 9-8, USB Specification, Revision 2.0 12 bcdDevice 2 BCD See Table 9-8, USB Specification, Revision 2.0 14 iManufacturer 1 Index See Table 9-8, USB Specification, Revision 2.0 15 iProduct 1 Index See Table 9-8, USB Specification, Revision 2.0 16 iSerialNumber 1 Index See Table 9-8, USB Specification, Revision 2.0 17 bNumConfigurations 1 Index See Table 9-8, USB Specification, Revision 2.0 Section 2 illustrates how the IAD and Multi-Interface Function Class Codes should be used in the device framework of IAD-enabled devices. 2. IAD Use Model Example 2 2. IAD Use Model Example This section provides an illustrative example of how the IAD should be used in a typical device implementation. The core USB specification does not specify many organizational (positional relationship) requirements on how the set of descriptors that are returned from a GetDescriptor(Configuration) request should be constructed. Figure 2-1 illustrates the recommended layout for organizing these descriptors so that host software can easily parse them and definitively know which descriptors to provide to each function driver. The general methodology for organizing the descriptor sets is to group them ‘by device function’. This basically means that all descriptors for a particular device function should always be located ‘together’ (see Figure 2-1 for an example). Interface CS Interface CS Interface Endpoint CS Endpoint CS Endpoint CS Endpoint Endpoint CS Endpoint CS Endpoint CS Endpoint Device Config IAD Interface CS Interface CS Interface Endpoint CS Endpoint CS Endpoint CS Interface CS Endpoint Endpoint CS Endpoint CS Endpoint CS Endpoint Interface CS Interface CS Interface Endpoint CS Endpoint CS Endpoint CS Endpoint Endpoint CS Endpoint CS Endpoint CS Endpoint Interface CS Interface CS Interface Endpoint CS Endpoint CS Endpoint CS Endpoint Endpoint CS Endpoint CS Endpoint CS Endpoint Interface CS Interface CS Interface Endpoint CS Endpoint CS Endpoint CS Endpoint Endpoint CS Endpoint CS Endpoint CS Endpoint Interface CS Interface CS Interface Endpoint CS Endpoint CS Endpoint CS Endpoint Endpoint CS Endpoint CS Endpoint CS Endpoint Alt Set 0 Alt Set 1 Alt Set 2 Alt Set 0 Alt Set 1 Interface 0 Interface 1 Interface 2 Alt Set 0 Standard Descriptor Class-Specific (CS) Descriptor Interface Association 0 Function Device Driver X Function Device Driver Z Interface CS Interface CS Interface Endpoint CS Endpoint CS Endpoint CS Endpoint Endpoint CS Endpoint CS Endpoint CS Endpoint IAD Interface CS Interface CS Interface Endpoint CS Endpoint CS Endpoint CS Endpoint Endpoint CS Endpoint CS Endpoint CS Endpoint Interface CS Interface CS Interface Endpoint CS Endpoint CS Endpoint CS Endpoint Endpoint CS Endpoint CS Endpoint CS Endpoint Interface CS Interface CS Interface Endpoint CS Endpoint CS Endpoint CS Endpoint Endpoint CS Endpoint CS Endpoint CS Endpoint Alt Set 0 Alt Set 1 Alt Set 0 Alt Set 1 Interface 3 Interface 4 Interface Association 1 General General General Function Device Driver Y bDeviceClass EFH (Misc) bDeviceSubClass 02H (Common Class) bDeviceProtocol 01H (IAD) Multi-Interface Function Class Code bFunctionClass XXH bFunctionSubClass XXH bFunctionProtocol XXH bInterfaceClass XXH bInterfaceSubClass XXH bInterfaceProtocol XXH bFunctionClass XXH bFunctionSubClass XXH bFunctionProtocol XXH CS Interface CS Interface CS Interface CS Interface CS Interface CS Interface CS Interface CS Interface CS Interface Figure 2-1. Example Device Framework Using Interface Association Descriptors 2. IAD Use Model Example Rev. [1.0] 3 Additionally, Figure 2-1illustrates how the sets of descriptors should be bound to device drivers. Note there may be specific (additional) requirements for how class-specific descriptors should be grouped with IAD associations. Those would be specified in specific device class documents. At the top of the framework example, the Device Descriptor includes device class, subclass and protocol codes for a Multi-Interface Function Device Class device. Next is the configuration descriptor set. At a high level, this particular configuration includes three device functions. Any descriptors between the configuration descriptor and the first interface or IAD descriptor should be considered as “global” and be delivered to every function device driver (see example). The first functional association includes two interfaces (including all class-specific descriptors and alternate settings). The second device function is a single-interface function and does not require an IAD. The third device function is similar to the first. For each device function, system software must provide the device driver all of the descriptors in the ‘association’ as well as the ‘global’ descriptors described above. The value in the bInterfaceCount field must include all of the interfaces in the intended set. For example, assume a multi-interface function with interfaces numbered N through M. The bFirstInterface field gets the value of N and bInterfaceCount gets the value of (M-N)+1.1 Note that each interface can have zero or more alternate settings, but alternate settings don’t figure into the calculation for bInterfaceCount. For device functions that use an IAD (like the 1st and 3rd functions in the example), USB system software should construct ‘hardware identifiers’ used to locate and load a device driver using the idVendor and idProduct from the Device Descriptor and the bFirstInterface field from the IAD. Further, system software should construct ‘compatibility identifiers’ using the class code fields (bFunctionClass, bFunctionSubClass, bFunctionProtocol) from the IAD. 1 Recall that all of the interfaces in the association must be number contiguously, so (M-N)+1 arithmetic always works.
flag this doc
229
1
not rated
0
1/23/2008
English
Preview

Designing a Robust USB Interface Engine.

umairhp 8/11/2008 | 16 | 0 | 0 | technology
Preview

USB Interface Association Descriptor Code.

umairhp 8/11/2008 | 20 | 0 | 0 | technology
Preview

designing usb

dkretschmer 1/23/2008 | 68 | 2 | 0 |
Preview

usb bandwidth

dkretschmer 1/23/2008 | 139 | 2 | 0 |
Preview

usb latency

dkretschmer 1/23/2008 | 177 | 2 | 0 |
Preview

Designing a Robust USB Interface Engine

umairhp 4/11/2008 | 117 | 6 | 0 | legal
Preview

USB Interface Association Descriptor Code

umairhp 4/11/2008 | 98 | 2 | 0 | legal
Preview

USB

Jharan 5/24/2008 | 46 | 0 | 0 | technology
Preview

business

ocak 12/29/2007 | 99 | 0 | 0 | business
Preview

USB Interface Association Descriptor Device Class Code and Use Model

LisaB1982 4/13/2008 | 52 | 0 | 0 | technology
Preview

Introduction to High Speed USB.

umairhp 8/11/2008 | 20 | 0 | 0 | technology
Preview

USB 1.0 Specification Position.

umairhp 8/11/2008 | 29 | 0 | 0 | technology
Preview

USB APM Interactions.

umairhp 8/11/2008 | 20 | 0 | 0 | technology
Preview

USB Latency Requirements

umairhp 8/11/2008 | 21 | 0 | 0 | technology
Preview

Cyclic Redundancy Checks in USB.

umairhp 8/11/2008 | 19 | 0 | 0 | technology
Preview

wt_st_assay_perf_whitepaper

dkretschmer 1/23/2008 | 146 | 0 | 0 |
Preview

whitepaper4

dkretschmer 1/23/2008 | 164 | 2 | 0 |
Preview

white-4c

dkretschmer 1/23/2008 | 110 | 0 | 0 |
Preview

WAPWhite_Paper1[1]

dkretschmer 1/23/2008 | 97 | 1 | 0 |
Preview

voip_news_premise_pbx_buyers_guide

dkretschmer 1/23/2008 | 196 | 5 | 0 |
Preview

usbwire[1]

dkretschmer 1/23/2008 | 109 | 0 | 0 |
Preview

usb_20t

dkretschmer 1/23/2008 | 145 | 1 | 0 |
Preview

usb_20g[1]

dkretschmer 1/23/2008 | 94 | 0 | 0 |
Preview

usb latency

dkretschmer 1/23/2008 | 177 | 2 | 0 |
Preview

usb bandwidth

dkretschmer 1/23/2008 | 139 | 2 | 0 |
 
review this doc