Merge git://www.linux-watchdog.org/linux-watchdog
[deliverable/linux.git] / Documentation / media / uapi / gen-errors.rst
CommitLineData
5377d91f
MH
1.. -*- coding: utf-8; mode: rst -*-
2
3.. _gen_errors:
4
5*******************
6Generic Error Codes
7*******************
8
9
10.. _gen-errors:
11
12.. flat-table:: Generic error codes
13 :header-rows: 0
14 :stub-columns: 0
df94711d 15 :widths: 1 16
5377d91f
MH
16
17
18 - .. row 1
19
cdb4af0f 20 - ``EAGAIN`` (aka ``EWOULDBLOCK``)
5377d91f
MH
21
22 - The ioctl can't be handled because the device is in state where it
0579e6e3
MCC
23 can't perform it. This could happen for example in case where
24 device is sleeping and ioctl is performed to query statistics. It
25 is also returned when the ioctl would need to wait for an event,
26 but the device was opened in non-blocking mode.
5377d91f
MH
27
28 - .. row 2
29
cdb4af0f 30 - ``EBADF``
5377d91f
MH
31
32 - The file descriptor is not a valid.
33
34 - .. row 3
35
cdb4af0f 36 - ``EBUSY``
5377d91f
MH
37
38 - The ioctl can't be handled because the device is busy. This is
0579e6e3
MCC
39 typically return while device is streaming, and an ioctl tried to
40 change something that would affect the stream, or would require
41 the usage of a hardware resource that was already allocated. The
42 ioctl must not be retried without performing another action to fix
43 the problem first (typically: stop the stream before retrying).
5377d91f
MH
44
45 - .. row 4
46
cdb4af0f 47 - ``EFAULT``
5377d91f
MH
48
49 - There was a failure while copying data from/to userspace, probably
0579e6e3 50 caused by an invalid pointer reference.
5377d91f
MH
51
52 - .. row 5
53
cdb4af0f 54 - ``EINVAL``
5377d91f
MH
55
56 - One or more of the ioctl parameters are invalid or out of the
0579e6e3
MCC
57 allowed range. This is a widely used error code. See the
58 individual ioctl requests for specific causes.
5377d91f
MH
59
60 - .. row 6
61
cdb4af0f 62 - ``ENODEV``
5377d91f
MH
63
64 - Device not found or was removed.
65
66 - .. row 7
67
cdb4af0f 68 - ``ENOMEM``
5377d91f
MH
69
70 - There's not enough memory to handle the desired operation.
71
72 - .. row 8
73
cdb4af0f 74 - ``ENOTTY``
5377d91f
MH
75
76 - The ioctl is not supported by the driver, actually meaning that
0579e6e3
MCC
77 the required functionality is not available, or the file
78 descriptor is not for a media device.
5377d91f
MH
79
80 - .. row 9
81
cdb4af0f 82 - ``ENOSPC``
5377d91f
MH
83
84 - On USB devices, the stream ioctl's can return this error, meaning
0579e6e3
MCC
85 that this request would overcommit the usb bandwidth reserved for
86 periodic transfers (up to 80% of the USB bandwidth).
5377d91f
MH
87
88 - .. row 10
89
cdb4af0f 90 - ``EPERM``
5377d91f
MH
91
92 - Permission denied. Can be returned if the device needs write
0579e6e3 93 permission, or some special capabilities is needed (e. g. root)
5377d91f 94
706f8a99 95.. note::
5377d91f 96
706f8a99
MCC
97 #. This list is not exaustive; 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.
5377d91f 101
706f8a99
MCC
102 #. Request-specific error codes are listed in the individual
103 requests descriptions.
This page took 0.061477 seconds and 5 git commands to generate.