History

usb: gadget: function: f_fs: Let ffs_epfile_ioctl wait for enable.

This allows users to make an ioctl call as the first action on a connection. Ex, some functions might want to get endpoint size before making any i/os. Previously, calling ioctls before read/write would depending on the timing of endpoints being enabled. ESHUTDOWN is now a possible return value and ENODEV is not, so change docs accordingly.

Jerry Zhang committed 9 years ago

Commit 222155d1 parent 8a8b1612 files · +58 −42Browse files

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

Unified · Split

include/uapi/linux/usb/functionfs.h+4−3
@@ -275,13 +275,14 @@ struct usb_functionfs_event { · 274 unmodified lines
275275 #define FUNCTIONFS_INTERFACE_REVMAP _IO('g', 128)
276276
277277 /*
278− * Returns real bEndpointAddress of an endpoint. If function is not
279− * active returns -ENODEV.
278+ * Returns real bEndpointAddress of an endpoint. If endpoint shuts down
279+ * during the call, returns -ESHUTDOWN.
280280 */
281281 #define FUNCTIONFS_ENDPOINT_REVMAP _IO('g', 129)
282282
283283 /*
284− * Returns endpoint descriptor. If function is not active returns -ENODEV.
284+ * Returns endpoint descriptor. If endpoint shuts down during the call,
285+ * returns -ESHUTDOWN.
285286 */
286287 #define FUNCTIONFS_ENDPOINT_DESC _IOR('g', 130, \
287288 struct usb_endpoint_descriptor)