Skip to contentSkip to conversation

usb: gadget: f_fs: add usb_functionfs_descs_head_v2

PATCH In review Zhuang Jin Can 2 participants 2 messages Sep 2, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: gadget: f_fs: add usb_functionfs_descs_head_v2

Add usb_functionfs_descs_head_v2 structure for the new layout of descriptors.

---
 include/uapi/linux/usb/functionfs.h |    9 +++++++++
 1 file changed, 9 insertions(+)
include/uapi/linux/usb/functionfs.h +9 -0
index 0154b28..0b3f9fc 100644
@@ -32,6 +32,15 @@ struct usb_endpoint_descriptor_no_audio {
 	__u8  bInterval;
 } __attribute__((packed));
 
+struct usb_functionfs_descs_head_v2 {
+	__le32 magic;
+	__le32 length;
+	__le32 flags;
+	__le32 fs_count;
+	__le32 hs_count;
+	__le32 ss_count;
+} __attribute__((packed));
+
 /* Legacy format, deprecated as of 3.14. */
 struct usb_functionfs_descs_head {
 	__le32 magic;
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 2 lines · Zhuang Jin Can

Add usb_functionfs_descs_head_v2 structure for the new layout of descriptors.

NAK. It's a duplicate of <https://lkml.org/lkml/2014/6/6/128> and even more importantly, the format of the header is not fixed past the flags field (e.g. fs_count may be missing), so fs_count, hs_count and ss_count cannot be in the structure.

Quoted 25 lines
---
 include/uapi/linux/usb/functionfs.h |    9 +++++++++
 1 file changed, 9 insertions(+)
include/uapi/linux/usb/functionfs.h +9 -0
index 0154b28..0b3f9fc 100644
@@ -32,6 +32,15 @@ struct usb_endpoint_descriptor_no_audio {
 	__u8  bInterval;
 } __attribute__((packed));
 
+struct usb_functionfs_descs_head_v2 {
+	__le32 magic;
+	__le32 length;
+	__le32 flags;
+	__le32 fs_count;
+	__le32 hs_count;
+	__le32 ss_count;
+} __attribute__((packed));
+
 /* Legacy format, deprecated as of 3.14. */
 struct usb_functionfs_descs_head {
 	__le32 magic;
Signature · 4 lines
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +--<[email protected]>--<xmpp:[email protected]>--ooO--(_)--Ooo--