History

Merge tag 'usb-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next

Felipe writes: usb: patches for v3.17 merge window Surprisingly enough, while a big set of patches, the majority is composed of cleanups (using devm_*, fixing sparse errors, moving code around, adding const, etc). The highlights are addition of new support for PLX USB338x devices, and support for USB 2.0-only configurations of the DWC3 IP core.

Greg Kroah-Hartman committed 12 years ago

Commit 61fe2d72 parents 499b380 8346b33159 files · +7024 −4938Browse files

Showing the changes to include/uapi/linux (1 of 159 files). Show all

Unified · Split

include/uapi/linux/usb/functionfs.h+80−2
@@ -18,10 +18,9 @@ enum functionfs_flags { · 17 unmodified lines
1818 FUNCTIONFS_HAS_FS_DESC = 1,
1919 FUNCTIONFS_HAS_HS_DESC = 2,
2020 FUNCTIONFS_HAS_SS_DESC = 4,
21+ FUNCTIONFS_HAS_MS_OS_DESC = 8,
2122 };
2223
23−#ifndef __KERNEL__
24−
2524 /* Descriptor of an non-audio endpoint */
2625 struct usb_endpoint_descriptor_no_audio {
2726 __u8 bLength;
@@ -41,6 +40,37 @@ struct usb_functionfs_descs_head { · 13 unmodified lines
4140 __le32 hs_count;
4241 } __attribute__((packed, deprecated));
4342
43+/* MS OS Descriptor header */
44+struct usb_os_desc_header {
45+ __u8 interface;
46+ __le32 dwLength;
47+ __le16 bcdVersion;
48+ __le16 wIndex;
49+ union {
50+ struct {
51+ __u8 bCount;
52+ __u8 Reserved;
53+ };
54+ __le16 wCount;
55+ };
56+} __attribute__((packed));
57+
58+struct usb_ext_compat_desc {
59+ __u8 bFirstInterfaceNumber;
60+ __u8 Reserved1;
61+ __u8 CompatibleID[8];
62+ __u8 SubCompatibleID[8];
63+ __u8 Reserved2[6];
64+};
65+
66+struct usb_ext_prop_desc {
67+ __le32 dwSize;
68+ __le32 dwPropertyDataType;
69+ __le16 wPropertyNameLength;
70+} __attribute__((packed));
71+
72+#ifndef __KERNEL__
73+
4474 /*
4575 * Descriptors format:
4676 *
@@ -52,9 +82,11 @@ struct usb_functionfs_descs_head { · 5 unmodified lines
5282 * | | fs_count | LE32 | number of full-speed descriptors |
5383 * | | hs_count | LE32 | number of high-speed descriptors |
5484 * | | ss_count | LE32 | number of super-speed descriptors |
85+ * | | os_count | LE32 | number of MS OS descriptors |
5586 * | | fs_descrs | Descriptor[] | list of full-speed descriptors |
5687 * | | hs_descrs | Descriptor[] | list of high-speed descriptors |
5788 * | | ss_descrs | Descriptor[] | list of super-speed descriptors |
89+ * | | os_descrs | OSDesc[] | list of MS OS descriptors |
5890 *
5991 * Depending on which flags are set, various fields may be missing in the
6092 * structure. Any flags that are not recognised cause the whole block to be
@@ -81,6 +113,52 @@ struct usb_functionfs_descs_head { · 20 unmodified lines
81113 * | 0 | bLength | U8 | length of the descriptor |
82114 * | 1 | bDescriptorType | U8 | descriptor type |
83115 * | 2 | payload | | descriptor's payload |
116+ *
117+ * OSDesc[] is an array of valid MS OS Feature Descriptors which have one of
118+ * the following formats:
119+ *
120+ * | off | name | type | description |
121+ * |-----+-----------------+------+--------------------------|
122+ * | 0 | inteface | U8 | related interface number |
123+ * | 1 | dwLength | U32 | length of the descriptor |
124+ * | 5 | bcdVersion | U16 | currently supported: 1 |
125+ * | 7 | wIndex | U16 | currently supported: 4 |
126+ * | 9 | bCount | U8 | number of ext. compat. |
127+ * | 10 | Reserved | U8 | 0 |
128+ * | 11 | ExtCompat[] | | list of ext. compat. d. |
129+ *
130+ * | off | name | type | description |
131+ * |-----+-----------------+------+--------------------------|
132+ * | 0 | inteface | U8 | related interface number |
133+ * | 1 | dwLength | U32 | length of the descriptor |
134+ * | 5 | bcdVersion | U16 | currently supported: 1 |
135+ * | 7 | wIndex | U16 | currently supported: 5 |
136+ * | 9 | wCount | U16 | number of ext. compat. |
137+ * | 11 | ExtProp[] | | list of ext. prop. d. |
138+ *
139+ * ExtCompat[] is an array of valid Extended Compatiblity descriptors
140+ * which have the following format:
141+ *
142+ * | off | name | type | description |
143+ * |-----+-----------------------+------+-------------------------------------|
144+ * | 0 | bFirstInterfaceNumber | U8 | index of the interface or of the 1st|
145+ * | | | | interface in an IAD group |
146+ * | 1 | Reserved | U8 | 0 |
147+ * | 2 | CompatibleID | U8[8]| compatible ID string |
148+ * | 10 | SubCompatibleID | U8[8]| subcompatible ID string |
149+ * | 18 | Reserved | U8[6]| 0 |
150+ *
151+ * ExtProp[] is an array of valid Extended Properties descriptors
152+ * which have the following format:
153+ *
154+ * | off | name | type | description |
155+ * |-----+-----------------------+------+-------------------------------------|
156+ * | 0 | dwSize | U32 | length of the descriptor |
157+ * | 4 | dwPropertyDataType | U32 | 1..7 |
158+ * | 8 | wPropertyNameLength | U16 | bPropertyName length (NL) |
159+ * | 10 | bPropertyName |U8[NL]| name of this property |
160+ * |10+NL| dwPropertyDataLength | U32 | bPropertyData length (DL) |
161+ * |14+NL| bProperty |U8[DL]| payload of this property |
84162 */
85163
86164 struct usb_functionfs_strings_head {