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.
Showing the changes to include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -275,13 +275,14 @@ struct usb_functionfs_event { · 274 unmodified lines | |||
| 275 | #define FUNCTIONFS_INTERFACE_REVMAP _IO('g', 128) | 275 | #define FUNCTIONFS_INTERFACE_REVMAP _IO('g', 128) |
| 276 | 276 | ||
| 277 | /* | 277 | /* |
| 278 | * Returns real bEndpointAddress of an endpoint. If function is not | 278 | * Returns real bEndpointAddress of an endpoint. If endpoint shuts down |
| 279 | * active returns -ENODEV. | 279 | * during the call, returns -ESHUTDOWN. |
| 280 | */ | 280 | */ |
| 281 | #define FUNCTIONFS_ENDPOINT_REVMAP _IO('g', 129) | 281 | #define FUNCTIONFS_ENDPOINT_REVMAP _IO('g', 129) |
| 282 | 282 | ||
| 283 | /* | 283 | /* |
| 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. | ||
| 285 | */ | 286 | */ |
| 286 | #define FUNCTIONFS_ENDPOINT_DESC _IOR('g', 130, \ | 287 | #define FUNCTIONFS_ENDPOINT_DESC _IOR('g', 130, \ |
| 287 | struct usb_endpoint_descriptor) | 288 | struct usb_endpoint_descriptor) |