mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-07-01 23:53:16 -04:00
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. Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Jerry Zhang <zhangjerry@google.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
This commit is contained in:
parent
8a8b161df5
commit
222155de45
2 changed files with 58 additions and 42 deletions
|
@ -275,13 +275,14 @@ struct usb_functionfs_event {
|
|||
#define FUNCTIONFS_INTERFACE_REVMAP _IO('g', 128)
|
||||
|
||||
/*
|
||||
* Returns real bEndpointAddress of an endpoint. If function is not
|
||||
* active returns -ENODEV.
|
||||
* Returns real bEndpointAddress of an endpoint. If endpoint shuts down
|
||||
* during the call, returns -ESHUTDOWN.
|
||||
*/
|
||||
#define FUNCTIONFS_ENDPOINT_REVMAP _IO('g', 129)
|
||||
|
||||
/*
|
||||
* Returns endpoint descriptor. If function is not active returns -ENODEV.
|
||||
* Returns endpoint descriptor. If endpoint shuts down during the call,
|
||||
* returns -ESHUTDOWN.
|
||||
*/
|
||||
#define FUNCTIONFS_ENDPOINT_DESC _IOR('g', 130, \
|
||||
struct usb_endpoint_descriptor)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue