1STRUCT USB_HOST_CONF(9) Host-Side Data Types and Macro STRUCT USB_HOST_CONF(9)
2
3
4

NAME

6       struct_usb_host_config - representation of a device's configuration
7

SYNOPSIS

9       struct usb_host_config {
10         struct usb_config_descriptor desc;
11         char * string;
12         struct usb_interface_assoc_descriptor * intf_assoc[USB_MAXIADS];
13         struct usb_interface * interface[USB_MAXINTERFACES];
14         struct usb_interface_cache * intf_cache[USB_MAXINTERFACES];
15         unsigned char * extra;
16         int extralen;
17       };
18

MEMBERS

20       desc
21           the device's configuration descriptor.
22
23       string
24           pointer to the cached version of the iConfiguration string, if
25           present for this configuration.
26
27       intf_assoc[USB_MAXIADS]
28           list of any interface association descriptors in this config
29
30       interface[USB_MAXINTERFACES]
31           array of pointers to usb_interface structures, one for each
32           interface in the configuration. The number of interfaces is stored
33           in desc.bNumInterfaces. These pointers are valid only while the the
34           configuration is active.
35
36       intf_cache[USB_MAXINTERFACES]
37           array of pointers to usb_interface_cache structures, one for each
38           interface in the configuration. These structures exist for the
39           entire life of the device.
40
41       extra
42           pointer to buffer containing all extra descriptors associated with
43           this configuration (those preceding the first interface
44           descriptor).
45
46       extralen
47           length of the extra descriptors buffer.
48

DESCRIPTION

50       USB devices may have multiple configurations, but only one can be
51       active at any time. Each encapsulates a different operational
52       environment; for example, a dual-speed device would have separate
53       configurations for full-speed and high-speed operation. The number of
54       configurations available is stored in the device descriptor as
55       bNumConfigurations.
56
57       A configuration can contain multiple interfaces. Each corresponds to a
58       different function of the USB device, and all are available whenever
59       the configuration is active. The USB standard says that interfaces are
60       supposed to be numbered from 0 to desc.bNumInterfaces-1, but a lot of
61       devices get this wrong. In addition, the interface array is not
62       guaranteed to be sorted in numerical order. Use usb_ifnum_to_if to look
63       up an interface entry based on its number.
64
65       Device drivers should not attempt to activate configurations. The
66       choice of which configuration to install is a policy decision based on
67       such considerations as available power, functionality provided, and the
68       user's desires (expressed through userspace tools). However, drivers
69       can call usb_reset_configuration to reinitialize the current
70       configuration and all its interfaces.
71
73Kernel Hackers Manual 3.10         June 2019           STRUCT USB_HOST_CONF(9)
Impressum