[PATCH] usb: gadget: f_fs: add usb_functionfs_descs_head_v2

Subsystems: the rest, usb subsystem

STALE4388d

2 messages, 2 authors, 2014-09-02 · open the first message on its own page

[PATCH] usb: gadget: f_fs: add usb_functionfs_descs_head_v2

From: Zhuang Jin Can <hidden>
Date: 2014-09-02 06:56:52

Add usb_functionfs_descs_head_v2 structure for the new layout of
descriptors.

Signed-off-by: Zhuang Jin Can <redacted>
---
 include/uapi/linux/usb/functionfs.h |    9 +++++++++
 1 file changed, 9 insertions(+)
diff --git a/include/uapi/linux/usb/functionfs.h b/include/uapi/linux/usb/functionfs.h
index 0154b28..0b3f9fc 100644
--- a/include/uapi/linux/usb/functionfs.h
+++ b/include/uapi/linux/usb/functionfs.h
@@ -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;
-- 
1.7.9.5

Re: [PATCH] usb: gadget: f_fs: add usb_functionfs_descs_head_v2

From: Michal Nazarewicz <hidden>
Date: 2014-09-02 12:45:51

On Tue, Sep 02 2014, Zhuang Jin Can [off-list ref] wrote:
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 hunk
Signed-off-by: Zhuang Jin Can <redacted>
---
 include/uapi/linux/usb/functionfs.h |    9 +++++++++
 1 file changed, 9 insertions(+)
diff --git a/include/uapi/linux/usb/functionfs.h b/include/uapi/linux/usb/functionfs.h
index 0154b28..0b3f9fc 100644
--- a/include/uapi/linux/usb/functionfs.h
+++ b/include/uapi/linux/usb/functionfs.h
@@ -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;
-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +--[off-list ref]--<xmpp:mina86@jabber.org>--ooO--(_)--Ooo--
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help