aboutsummaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorJerry Zhang <zhangjerry@google.com>2016-11-11 12:19:58 -0800
committerMister Oyster <oysterized@gmail.com>2017-09-14 17:11:21 +0200
commit5fe0d89935609c6f30e450941949d22a9407868d (patch)
tree1e0e2d24a2954bec9a22a3d65b63c31bdf4e283e /include/uapi
parent17882e4f29339cc4e67bb13ec425ffff1a9d7354 (diff)
usb: gadget: f_fs: Add ioctl for allocating endpoint buffers.
This creates an ioctl named FUNCTIONFS_ENDPOINT_ALLOC which will preallocate buffers for a given size. Any reads/writes on that endpoint below that size will use those buffers instead of allocating their own. If the endpoint is not active, the buffer will not be allocated until it becomes active. Change-Id: I4da517620ed913161ea9e21a31f6b92c9a012b44 Signed-off-by: Jerry Zhang <zhangjerry@google.com>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/usb/functionfs.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/uapi/linux/usb/functionfs.h b/include/uapi/linux/usb/functionfs.h
index 8a17a23d0..94aba0243 100644
--- a/include/uapi/linux/usb/functionfs.h
+++ b/include/uapi/linux/usb/functionfs.h
@@ -175,6 +175,11 @@ struct usb_functionfs_event {
#define FUNCTIONFS_ENDPOINT_DESC _IOR('g', 130, \
struct usb_endpoint_descriptor)
+/*
+ * Sets a buffer length for which all r/w operations under that size use a
+ * preallocated buffer. Behavior of larger operations does not change.
+ */
+#define FUNCTIONFS_ENDPOINT_ALLOC _IOR('g', 131, __u32)
#endif /* _UAPI__LINUX_FUNCTIONFS_H__ */