1 .. Permission is granted to copy, distribute and/or modify this
2 .. document under the terms of the GNU Free Documentation License,
3 .. Version 1.1 or any later version published by the Free Software
4 .. Foundation, with no Invariant Sections, no Front-Cover Texts
5 .. and no Back-Cover Texts. A copy of the license is included at
6 .. Documentation/userspace-api/media/fdl-appendix.rst.
8 .. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
19 .. tabularcolumns:: |p{2.5cm}|p{15.0cm}|
21 .. flat-table:: Generic error codes
27 - - ``EAGAIN`` (aka ``EWOULDBLOCK``)
29 - The ioctl can't be handled because the device is in state where it
30 can't perform it. This could happen for example in case where
31 device is sleeping and ioctl is performed to query statistics. It
32 is also returned when the ioctl would need to wait for an event,
33 but the device was opened in non-blocking mode.
37 - The file descriptor is not a valid.
41 - The ioctl can't be handled because the device is busy. This is
42 typically return while device is streaming, and an ioctl tried to
43 change something that would affect the stream, or would require
44 the usage of a hardware resource that was already allocated. The
45 ioctl must not be retried without performing another action to fix
46 the problem first (typically: stop the stream before retrying).
50 - There was a failure while copying data from/to userspace, probably
51 caused by an invalid pointer reference.
55 - One or more of the ioctl parameters are invalid or out of the
56 allowed range. This is a widely used error code. See the
57 individual ioctl requests for specific causes.
61 - Device not found or was removed.
65 - There's not enough memory to handle the desired operation.
69 - The ioctl is not supported by the driver, actually meaning that
70 the required functionality is not available, or the file
71 descriptor is not for a media device.
75 - On USB devices, the stream ioctl's can return this error, meaning
76 that this request would overcommit the usb bandwidth reserved for
77 periodic transfers (up to 80% of the USB bandwidth).
81 - Permission denied. Can be returned if the device needs write
82 permission, or some special capabilities is needed (e. g. root)
86 - I/O error. Typically used when there are problems communicating with
87 a hardware device. This could indicate broken or flaky hardware.
88 It's a 'Something is wrong, I give up!' type of error.
92 - No device corresponding to this device special file exists.
97 #. This list is not exhaustive; ioctls may return other error codes.
98 Since errors may have side effects such as a driver reset,
99 applications should abort on unexpected errors, or otherwise
100 assume that the device is in a bad state.
102 #. Request-specific error codes are listed in the individual
103 requests descriptions.