Pull in v4.20-rc3 via drm-next.
Showing the changes to include/uapi (68 of 10556 files). Show all
Unified · Split
| @@ -26,7 +26,9 @@ · 25 unmodified lines | ||
| 26 | 26 | #define HUGETLB_FLAG_ENCODE_2MB (21 << HUGETLB_FLAG_ENCODE_SHIFT) |
| 27 | 27 | #define HUGETLB_FLAG_ENCODE_8MB (23 << HUGETLB_FLAG_ENCODE_SHIFT) |
| 28 | 28 | #define HUGETLB_FLAG_ENCODE_16MB (24 << HUGETLB_FLAG_ENCODE_SHIFT) |
| 29 | +#define HUGETLB_FLAG_ENCODE_32MB (25 << HUGETLB_FLAG_ENCODE_SHIFT) | |
| 29 | 30 | #define HUGETLB_FLAG_ENCODE_256MB (28 << HUGETLB_FLAG_ENCODE_SHIFT) |
| 31 | +#define HUGETLB_FLAG_ENCODE_512MB (29 << HUGETLB_FLAG_ENCODE_SHIFT) | |
| 30 | 32 | #define HUGETLB_FLAG_ENCODE_1GB (30 << HUGETLB_FLAG_ENCODE_SHIFT) |
| 31 | 33 | #define HUGETLB_FLAG_ENCODE_2GB (31 << HUGETLB_FLAG_ENCODE_SHIFT) |
| 32 | 34 | #define HUGETLB_FLAG_ENCODE_16GB (34 << HUGETLB_FLAG_ENCODE_SHIFT) |
| @@ -79,6 +79,8 @@ · 78 unmodified lines | ||
| 79 | 79 | #define TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */ |
| 80 | 80 | #define TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode state */ |
| 81 | 81 | #define TIOCGPTPEER _IO('T', 0x41) /* Safely open the slave */ |
| 82 | +#define TIOCGISO7816 _IOR('T', 0x42, struct serial_iso7816) | |
| 83 | +#define TIOCSISO7816 _IOWR('T', 0x43, struct serial_iso7816) | |
| 82 | 84 | |
| 83 | 85 | #define FIONCLEX 0x5450 |
| 84 | 86 | #define FIOCLEX 0x5451 |
| @@ -10,18 +10,7 @@ typedef union sigval { · 9 unmodified lines | ||
| 10 | 10 | void __user *sival_ptr; |
| 11 | 11 | } sigval_t; |
| 12 | 12 | |
| 13 | −/* | |
| 14 | − * This is the size (including padding) of the part of the | |
| 15 | − * struct siginfo that is before the union. | |
| 16 | − */ | |
| 17 | −#ifndef __ARCH_SI_PREAMBLE_SIZE | |
| 18 | −#define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int)) | |
| 19 | −#endif | |
| 20 | − | |
| 21 | 13 | #define SI_MAX_SIZE 128 |
| 22 | −#ifndef SI_PAD_SIZE | |
| 23 | −#define SI_PAD_SIZE ((SI_MAX_SIZE - __ARCH_SI_PREAMBLE_SIZE) / sizeof(int)) | |
| 24 | −#endif | |
| 25 | 14 | |
| 26 | 15 | /* |
| 27 | 16 | * The default "si_band" type is "long", as specified by POSIX. |
| @@ -40,96 +29,108 @@ typedef union sigval { · 12 unmodified lines | ||
| 40 | 29 | #define __ARCH_SI_ATTRIBUTES |
| 41 | 30 | #endif |
| 42 | 31 | |
| 43 | −typedef struct siginfo { | |
| 44 | − int si_signo; | |
| 45 | −#ifndef __ARCH_HAS_SWAPPED_SIGINFO | |
| 46 | − int si_errno; | |
| 47 | − int si_code; | |
| 48 | −#else | |
| 49 | − int si_code; | |
| 50 | − int si_errno; | |
| 51 | −#endif | |
| 52 | − | |
| 53 | − union { | |
| 54 | − int _pad[SI_PAD_SIZE]; | |
| 55 | − | |
| 56 | − /* kill() */ | |
| 57 | − struct { | |
| 58 | − __kernel_pid_t _pid; /* sender's pid */ | |
| 59 | − __kernel_uid32_t _uid; /* sender's uid */ | |
| 60 | − } _kill; | |
| 61 | − | |
| 62 | − /* POSIX.1b timers */ | |
| 63 | − struct { | |
| 64 | − __kernel_timer_t _tid; /* timer id */ | |
| 65 | − int _overrun; /* overrun count */ | |
| 66 | − sigval_t _sigval; /* same as below */ | |
| 67 | − int _sys_private; /* not to be passed to user */ | |
| 68 | − } _timer; | |
| 69 | − | |
| 70 | − /* POSIX.1b signals */ | |
| 71 | − struct { | |
| 72 | − __kernel_pid_t _pid; /* sender's pid */ | |
| 73 | − __kernel_uid32_t _uid; /* sender's uid */ | |
| 74 | − sigval_t _sigval; | |
| 75 | − } _rt; | |
| 76 | − | |
| 77 | − /* SIGCHLD */ | |
| 78 | − struct { | |
| 79 | − __kernel_pid_t _pid; /* which child */ | |
| 80 | − __kernel_uid32_t _uid; /* sender's uid */ | |
| 81 | − int _status; /* exit code */ | |
| 82 | − __ARCH_SI_CLOCK_T _utime; | |
| 83 | − __ARCH_SI_CLOCK_T _stime; | |
| 84 | − } _sigchld; | |
| 85 | − | |
| 86 | − /* SIGILL, SIGFPE, SIGSEGV, SIGBUS, SIGTRAP, SIGEMT */ | |
| 87 | − struct { | |
| 88 | − void __user *_addr; /* faulting insn/memory ref. */ | |
| 32 | +union __sifields { | |
| 33 | + /* kill() */ | |
| 34 | + struct { | |
| 35 | + __kernel_pid_t _pid; /* sender's pid */ | |
| 36 | + __kernel_uid32_t _uid; /* sender's uid */ | |
| 37 | + } _kill; | |
| 38 | + | |
| 39 | + /* POSIX.1b timers */ | |
| 40 | + struct { | |
| 41 | + __kernel_timer_t _tid; /* timer id */ | |
| 42 | + int _overrun; /* overrun count */ | |
| 43 | + sigval_t _sigval; /* same as below */ | |
| 44 | + int _sys_private; /* not to be passed to user */ | |
| 45 | + } _timer; | |
| 46 | + | |
| 47 | + /* POSIX.1b signals */ | |
| 48 | + struct { | |
| 49 | + __kernel_pid_t _pid; /* sender's pid */ | |
| 50 | + __kernel_uid32_t _uid; /* sender's uid */ | |
| 51 | + sigval_t _sigval; | |
| 52 | + } _rt; | |
| 53 | + | |
| 54 | + /* SIGCHLD */ | |
| 55 | + struct { | |
| 56 | + __kernel_pid_t _pid; /* which child */ | |
| 57 | + __kernel_uid32_t _uid; /* sender's uid */ | |
| 58 | + int _status; /* exit code */ | |
| 59 | + __ARCH_SI_CLOCK_T _utime; | |
| 60 | + __ARCH_SI_CLOCK_T _stime; | |
| 61 | + } _sigchld; | |
| 62 | + | |
| 63 | + /* SIGILL, SIGFPE, SIGSEGV, SIGBUS, SIGTRAP, SIGEMT */ | |
| 64 | + struct { | |
| 65 | + void __user *_addr; /* faulting insn/memory ref. */ | |
| 89 | 66 | #ifdef __ARCH_SI_TRAPNO |
| 90 | − int _trapno; /* TRAP # which caused the signal */ | |
| 67 | + int _trapno; /* TRAP # which caused the signal */ | |
| 91 | 68 | #endif |
| 92 | 69 | #ifdef __ia64__ |
| 93 | − int _imm; /* immediate value for "break" */ | |
| 94 | − unsigned int _flags; /* see ia64 si_flags */ | |
| 95 | − unsigned long _isr; /* isr */ | |
| 70 | + int _imm; /* immediate value for "break" */ | |
| 71 | + unsigned int _flags; /* see ia64 si_flags */ | |
| 72 | + unsigned long _isr; /* isr */ | |
| 96 | 73 | #endif |
| 97 | 74 | |
| 98 | 75 | #define __ADDR_BND_PKEY_PAD (__alignof__(void *) < sizeof(short) ? \ |
| 99 | 76 | sizeof(short) : __alignof__(void *)) |
| 100 | − union { | |
| 101 | − /* | |
| 102 | − * used when si_code=BUS_MCEERR_AR or | |
| 103 | − * used when si_code=BUS_MCEERR_AO | |
| 104 | − */ | |
| 105 | − short _addr_lsb; /* LSB of the reported address */ | |
| 106 | − /* used when si_code=SEGV_BNDERR */ | |
| 107 | − struct { | |
| 108 | − char _dummy_bnd[__ADDR_BND_PKEY_PAD]; | |
| 109 | − void __user *_lower; | |
| 110 | − void __user *_upper; | |
| 111 | − } _addr_bnd; | |
| 112 | − /* used when si_code=SEGV_PKUERR */ | |
| 113 | − struct { | |
| 114 | − char _dummy_pkey[__ADDR_BND_PKEY_PAD]; | |
| 115 | − __u32 _pkey; | |
| 116 | − } _addr_pkey; | |
| 117 | − }; | |
| 118 | − } _sigfault; | |
| 119 | − | |
| 120 | − /* SIGPOLL */ | |
| 121 | − struct { | |
| 122 | − __ARCH_SI_BAND_T _band; /* POLL_IN, POLL_OUT, POLL_MSG */ | |
| 123 | − int _fd; | |
| 124 | − } _sigpoll; | |
| 77 | + union { | |
| 78 | + /* | |
| 79 | + * used when si_code=BUS_MCEERR_AR or | |
| 80 | + * used when si_code=BUS_MCEERR_AO | |
| 81 | + */ | |
| 82 | + short _addr_lsb; /* LSB of the reported address */ | |
| 83 | + /* used when si_code=SEGV_BNDERR */ | |
| 84 | + struct { | |
| 85 | + char _dummy_bnd[__ADDR_BND_PKEY_PAD]; | |
| 86 | + void __user *_lower; | |
| 87 | + void __user *_upper; | |
| 88 | + } _addr_bnd; | |
| 89 | + /* used when si_code=SEGV_PKUERR */ | |
| 90 | + struct { | |
| 91 | + char _dummy_pkey[__ADDR_BND_PKEY_PAD]; | |
| 92 | + __u32 _pkey; | |
| 93 | + } _addr_pkey; | |
| 94 | + }; | |
| 95 | + } _sigfault; | |
| 96 | + | |
| 97 | + /* SIGPOLL */ | |
| 98 | + struct { | |
| 99 | + __ARCH_SI_BAND_T _band; /* POLL_IN, POLL_OUT, POLL_MSG */ | |
| 100 | + int _fd; | |
| 101 | + } _sigpoll; | |
| 102 | + | |
| 103 | + /* SIGSYS */ | |
| 104 | + struct { | |
| 105 | + void __user *_call_addr; /* calling user insn */ | |
| 106 | + int _syscall; /* triggering system call number */ | |
| 107 | + unsigned int _arch; /* AUDIT_ARCH_* of syscall */ | |
| 108 | + } _sigsys; | |
| 109 | +}; | |
| 125 | 110 | |
| 126 | − /* SIGSYS */ | |
| 127 | − struct { | |
| 128 | − void __user *_call_addr; /* calling user insn */ | |
| 129 | − int _syscall; /* triggering system call number */ | |
| 130 | − unsigned int _arch; /* AUDIT_ARCH_* of syscall */ | |
| 131 | − } _sigsys; | |
| 132 | − } _sifields; | |
| 111 | +#ifndef __ARCH_HAS_SWAPPED_SIGINFO | |
| 112 | +#define __SIGINFO \ | |
| 113 | +struct { \ | |
| 114 | + int si_signo; \ | |
| 115 | + int si_errno; \ | |
| 116 | + int si_code; \ | |
| 117 | + union __sifields _sifields; \ | |
| 118 | +} | |
| 119 | +#else | |
| 120 | +#define __SIGINFO \ | |
| 121 | +struct { \ | |
| 122 | + int si_signo; \ | |
| 123 | + int si_code; \ | |
| 124 | + int si_errno; \ | |
| 125 | + union __sifields _sifields; \ | |
| 126 | +} | |
| 127 | +#endif /* __ARCH_HAS_SWAPPED_SIGINFO */ | |
| 128 | + | |
| 129 | +typedef struct siginfo { | |
| 130 | + union { | |
| 131 | + __SIGINFO; | |
| 132 | + int _si_pad[SI_MAX_SIZE/sizeof(int)]; | |
| 133 | + }; | |
| 133 | 134 | } __ARCH_SI_ATTRIBUTES siginfo_t; |
| 134 | 135 | |
| 135 | 136 | /* |
| @@ -285,6 +286,12 @@ typedef struct siginfo { · 149 unmodified lines | ||
| 285 | 286 | #define SYS_SECCOMP 1 /* seccomp triggered */ |
| 286 | 287 | #define NSIGSYS 1 |
| 287 | 288 | |
| 289 | +/* | |
| 290 | + * SIGEMT si_codes | |
| 291 | + */ | |
| 292 | +#define EMT_TAGOVF 1 /* tag overflow */ | |
| 293 | +#define NSIGEMT 1 | |
| 294 | + | |
| 288 | 295 | /* |
| 289 | 296 | * sigevent definitions |
| 290 | 297 | * |
| @@ -242,10 +242,12 @@ __SYSCALL(__NR_tee, sys_tee) · 241 unmodified lines | ||
| 242 | 242 | /* fs/stat.c */ |
| 243 | 243 | #define __NR_readlinkat 78 |
| 244 | 244 | __SYSCALL(__NR_readlinkat, sys_readlinkat) |
| 245 | +#if defined(__ARCH_WANT_NEW_STAT) || defined(__ARCH_WANT_STAT64) | |
| 245 | 246 | #define __NR3264_fstatat 79 |
| 246 | 247 | __SC_3264(__NR3264_fstatat, sys_fstatat64, sys_newfstatat) |
| 247 | 248 | #define __NR3264_fstat 80 |
| 248 | 249 | __SC_3264(__NR3264_fstat, sys_fstat64, sys_newfstat) |
| 250 | +#endif | |
| 249 | 251 | |
| 250 | 252 | /* fs/sync.c */ |
| 251 | 253 | #define __NR_sync 81 |
| @@ -326,6 +326,12 @@ struct drm_amdgpu_gem_userptr { · 325 unmodified lines | ||
| 326 | 326 | /* GFX9 and later: */ |
| 327 | 327 | #define AMDGPU_TILING_SWIZZLE_MODE_SHIFT 0 |
| 328 | 328 | #define AMDGPU_TILING_SWIZZLE_MODE_MASK 0x1f |
| 329 | +#define AMDGPU_TILING_DCC_OFFSET_256B_SHIFT 5 | |
| 330 | +#define AMDGPU_TILING_DCC_OFFSET_256B_MASK 0xFFFFFF | |
| 331 | +#define AMDGPU_TILING_DCC_PITCH_MAX_SHIFT 29 | |
| 332 | +#define AMDGPU_TILING_DCC_PITCH_MAX_MASK 0x3FFF | |
| 333 | +#define AMDGPU_TILING_DCC_INDEPENDENT_64B_SHIFT 43 | |
| 334 | +#define AMDGPU_TILING_DCC_INDEPENDENT_64B_MASK 0x1 | |
| 329 | 335 | |
| 330 | 336 | /* Set/Get helpers for tiling flags. */ |
| 331 | 337 | #define AMDGPU_TILING_SET(field, value) \ |
| @@ -717,6 +717,7 @@ struct drm_prime_handle { · 716 unmodified lines | ||
| 717 | 717 | struct drm_syncobj_create { |
| 718 | 718 | __u32 handle; |
| 719 | 719 | #define DRM_SYNCOBJ_CREATE_SIGNALED (1 << 0) |
| 720 | +#define DRM_SYNCOBJ_CREATE_TYPE_TIMELINE (1 << 1) | |
| 720 | 721 | __u32 flags; |
| 721 | 722 | }; |
| 722 | 723 | |
| @@ -152,6 +152,20 @@ extern "C" { · 151 unmodified lines | ||
| 152 | 152 | |
| 153 | 153 | #define DRM_FORMAT_AYUV fourcc_code('A', 'Y', 'U', 'V') /* [31:0] A:Y:Cb:Cr 8:8:8:8 little endian */ |
| 154 | 154 | |
| 155 | +/* | |
| 156 | + * packed YCbCr420 2x2 tiled formats | |
| 157 | + * first 64 bits will contain Y,Cb,Cr components for a 2x2 tile | |
| 158 | + */ | |
| 159 | +/* [63:0] A3:A2:Y3:0:Cr0:0:Y2:0:A1:A0:Y1:0:Cb0:0:Y0:0 1:1:8:2:8:2:8:2:1:1:8:2:8:2:8:2 little endian */ | |
| 160 | +#define DRM_FORMAT_Y0L0 fourcc_code('Y', '0', 'L', '0') | |
| 161 | +/* [63:0] X3:X2:Y3:0:Cr0:0:Y2:0:X1:X0:Y1:0:Cb0:0:Y0:0 1:1:8:2:8:2:8:2:1:1:8:2:8:2:8:2 little endian */ | |
| 162 | +#define DRM_FORMAT_X0L0 fourcc_code('X', '0', 'L', '0') | |
| 163 | + | |
| 164 | +/* [63:0] A3:A2:Y3:Cr0:Y2:A1:A0:Y1:Cb0:Y0 1:1:10:10:10:1:1:10:10:10 little endian */ | |
| 165 | +#define DRM_FORMAT_Y0L2 fourcc_code('Y', '0', 'L', '2') | |
| 166 | +/* [63:0] X3:X2:Y3:Cr0:Y2:X1:X0:Y1:Cb0:Y0 1:1:10:10:10:1:1:10:10:10 little endian */ | |
| 167 | +#define DRM_FORMAT_X0L2 fourcc_code('X', '0', 'L', '2') | |
| 168 | + | |
| 155 | 169 | /* |
| 156 | 170 | * 2 plane RGB + A |
| 157 | 171 | * index 0 = RGB plane, same format as the corresponding non _A8 format has |
| @@ -58,6 +58,11 @@ struct drm_v3d_submit_cl { · 57 unmodified lines | ||
| 58 | 58 | * coordinate shader to determine where primitives land on the screen, |
| 59 | 59 | * then writes out the state updates and draw calls necessary per tile |
| 60 | 60 | * to the tile allocation BO. |
| 61 | + * | |
| 62 | + * This BCL will block on any previous BCL submitted on the | |
| 63 | + * same FD, but not on any RCL or BCLs submitted by other | |
| 64 | + * clients -- that is left up to the submitter to control | |
| 65 | + * using in_sync_bcl if necessary. | |
| 61 | 66 | */ |
| 62 | 67 | __u32 bcl_start; |
| 63 | 68 | |
| @@ -69,6 +74,11 @@ struct drm_v3d_submit_cl { · 5 unmodified lines | ||
| 69 | 74 | * This is the second set of commands executed, which will either |
| 70 | 75 | * execute the tiles that have been set up by the BCL, or a fixed set |
| 71 | 76 | * of tiles (in the case of RCL-only blits). |
| 77 | + * | |
| 78 | + * This RCL will block on this submit's BCL, and any previous | |
| 79 | + * RCL submitted on the same FD, but not on any RCL or BCLs | |
| 80 | + * submitted by other clients -- that is left up to the | |
| 81 | + * submitter to control using in_sync_rcl if necessary. | |
| 72 | 82 | */ |
| 73 | 83 | __u32 rcl_start; |
| 74 | 84 | |
| @@ -200,6 +200,15 @@ struct binder_node_debug_info { · 199 unmodified lines | ||
| 200 | 200 | __u32 has_weak_ref; |
| 201 | 201 | }; |
| 202 | 202 | |
| 203 | +struct binder_node_info_for_ref { | |
| 204 | + __u32 handle; | |
| 205 | + __u32 strong_count; | |
| 206 | + __u32 weak_count; | |
| 207 | + __u32 reserved1; | |
| 208 | + __u32 reserved2; | |
| 209 | + __u32 reserved3; | |
| 210 | +}; | |
| 211 | + | |
| 203 | 212 | #define BINDER_WRITE_READ _IOWR('b', 1, struct binder_write_read) |
| 204 | 213 | #define BINDER_SET_IDLE_TIMEOUT _IOW('b', 3, __s64) |
| 205 | 214 | #define BINDER_SET_MAX_THREADS _IOW('b', 5, __u32) |
| @@ -208,6 +217,7 @@ struct binder_node_debug_info { · 2 unmodified lines | ||
| 208 | 217 | #define BINDER_THREAD_EXIT _IOW('b', 8, __s32) |
| 209 | 218 | #define BINDER_VERSION _IOWR('b', 9, struct binder_version) |
| 210 | 219 | #define BINDER_GET_NODE_DEBUG_INFO _IOWR('b', 11, struct binder_node_debug_info) |
| 220 | +#define BINDER_GET_NODE_INFO_FOR_REF _IOWR('b', 12, struct binder_node_info_for_ref) | |
| 211 | 221 | |
| 212 | 222 | /* |
| 213 | 223 | * NOTE: Two special error codes you should check for when calling |
| @@ -137,8 +137,11 @@ struct blk_zone_range { · 136 unmodified lines | ||
| 137 | 137 | * sector specified in the report request structure. |
| 138 | 138 | * @BLKRESETZONE: Reset the write pointer of the zones in the specified |
| 139 | 139 | * sector range. The sector range must be zone aligned. |
| 140 | + * @BLKGETZONESZ: Get the device zone size in number of 512 B sectors. | |
| 140 | 141 | */ |
| 141 | 142 | #define BLKREPORTZONE _IOWR(0x12, 130, struct blk_zone_report) |
| 142 | 143 | #define BLKRESETZONE _IOW(0x12, 131, struct blk_zone_range) |
| 144 | +#define BLKGETZONESZ _IOW(0x12, 132, __u32) | |
| 145 | +#define BLKGETNRZONES _IOW(0x12, 133, __u32) | |
| 143 | 146 | |
| 144 | 147 | #endif /* _UAPI_BLKZONED_H */ |
| @@ -103,6 +103,7 @@ enum bpf_cmd { · 102 unmodified lines | ||
| 103 | 103 | BPF_BTF_LOAD, |
| 104 | 104 | BPF_BTF_GET_FD_BY_ID, |
| 105 | 105 | BPF_TASK_FD_QUERY, |
| 106 | + BPF_MAP_LOOKUP_AND_DELETE_ELEM, | |
| 106 | 107 | }; |
| 107 | 108 | |
| 108 | 109 | enum bpf_map_type { |
| @@ -127,6 +128,9 @@ enum bpf_map_type { · 18 unmodified lines | ||
| 127 | 128 | BPF_MAP_TYPE_SOCKHASH, |
| 128 | 129 | BPF_MAP_TYPE_CGROUP_STORAGE, |
| 129 | 130 | BPF_MAP_TYPE_REUSEPORT_SOCKARRAY, |
| 131 | + BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE, | |
| 132 | + BPF_MAP_TYPE_QUEUE, | |
| 133 | + BPF_MAP_TYPE_STACK, | |
| 130 | 134 | }; |
| 131 | 135 | |
| 132 | 136 | enum bpf_prog_type { |
| @@ -152,6 +156,7 @@ enum bpf_prog_type { · 19 unmodified lines | ||
| 152 | 156 | BPF_PROG_TYPE_LWT_SEG6LOCAL, |
| 153 | 157 | BPF_PROG_TYPE_LIRC_MODE2, |
| 154 | 158 | BPF_PROG_TYPE_SK_REUSEPORT, |
| 159 | + BPF_PROG_TYPE_FLOW_DISSECTOR, | |
| 155 | 160 | }; |
| 156 | 161 | |
| 157 | 162 | enum bpf_attach_type { |
| @@ -172,6 +177,7 @@ enum bpf_attach_type { · 14 unmodified lines | ||
| 172 | 177 | BPF_CGROUP_UDP4_SENDMSG, |
| 173 | 178 | BPF_CGROUP_UDP6_SENDMSG, |
| 174 | 179 | BPF_LIRC_MODE2, |
| 180 | + BPF_FLOW_DISSECTOR, | |
| 175 | 181 | __MAX_BPF_ATTACH_TYPE |
| 176 | 182 | }; |
| 177 | 183 | |
| @@ -459,6 +465,28 @@ union bpf_attr { · 281 unmodified lines | ||
| 459 | 465 | * Return |
| 460 | 466 | * 0 on success, or a negative error in case of failure. |
| 461 | 467 | * |
| 468 | + * int bpf_map_push_elem(struct bpf_map *map, const void *value, u64 flags) | |
| 469 | + * Description | |
| 470 | + * Push an element *value* in *map*. *flags* is one of: | |
| 471 | + * | |
| 472 | + * **BPF_EXIST** | |
| 473 | + * If the queue/stack is full, the oldest element is removed to | |
| 474 | + * make room for this. | |
| 475 | + * Return | |
| 476 | + * 0 on success, or a negative error in case of failure. | |
| 477 | + * | |
| 478 | + * int bpf_map_pop_elem(struct bpf_map *map, void *value) | |
| 479 | + * Description | |
| 480 | + * Pop an element from *map*. | |
| 481 | + * Return | |
| 482 | + * 0 on success, or a negative error in case of failure. | |
| 483 | + * | |
| 484 | + * int bpf_map_peek_elem(struct bpf_map *map, void *value) | |
| 485 | + * Description | |
| 486 | + * Get an element from *map* without removing it. | |
| 487 | + * Return | |
| 488 | + * 0 on success, or a negative error in case of failure. | |
| 489 | + * | |
| 462 | 490 | * int bpf_probe_read(void *dst, u32 size, const void *src) |
| 463 | 491 | * Description |
| 464 | 492 | * For tracing programs, safely attempt to read *size* bytes from |
| @@ -1430,7 +1458,7 @@ union bpf_attr { · 965 unmodified lines | ||
| 1430 | 1458 | * Return |
| 1431 | 1459 | * 0 on success, or a negative error in case of failure. |
| 1432 | 1460 | * |
| 1433 | − * int bpf_skb_adjust_room(struct sk_buff *skb, u32 len_diff, u32 mode, u64 flags) | |
| 1461 | + * int bpf_skb_adjust_room(struct sk_buff *skb, s32 len_diff, u32 mode, u64 flags) | |
| 1434 | 1462 | * Description |
| 1435 | 1463 | * Grow or shrink the room for data in the packet associated to |
| 1436 | 1464 | * *skb* by *len_diff*, and according to the selected *mode*. |
| @@ -2141,6 +2169,94 @@ union bpf_attr { · 704 unmodified lines | ||
| 2141 | 2169 | * request in the skb. |
| 2142 | 2170 | * Return |
| 2143 | 2171 | * 0 on success, or a negative error in case of failure. |
| 2172 | + * | |
| 2173 | + * struct bpf_sock *bpf_sk_lookup_tcp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u32 netns, u64 flags) | |
| 2174 | + * Description | |
| 2175 | + * Look for TCP socket matching *tuple*, optionally in a child | |
| 2176 | + * network namespace *netns*. The return value must be checked, | |
| 2177 | + * and if non-NULL, released via **bpf_sk_release**\ (). | |
| 2178 | + * | |
| 2179 | + * The *ctx* should point to the context of the program, such as | |
| 2180 | + * the skb or socket (depending on the hook in use). This is used | |
| 2181 | + * to determine the base network namespace for the lookup. | |
| 2182 | + * | |
| 2183 | + * *tuple_size* must be one of: | |
| 2184 | + * | |
| 2185 | + * **sizeof**\ (*tuple*\ **->ipv4**) | |
| 2186 | + * Look for an IPv4 socket. | |
| 2187 | + * **sizeof**\ (*tuple*\ **->ipv6**) | |
| 2188 | + * Look for an IPv6 socket. | |
| 2189 | + * | |
| 2190 | + * If the *netns* is zero, then the socket lookup table in the | |
| 2191 | + * netns associated with the *ctx* will be used. For the TC hooks, | |
| 2192 | + * this in the netns of the device in the skb. For socket hooks, | |
| 2193 | + * this in the netns of the socket. If *netns* is non-zero, then | |
| 2194 | + * it specifies the ID of the netns relative to the netns | |
| 2195 | + * associated with the *ctx*. | |
| 2196 | + * | |
| 2197 | + * All values for *flags* are reserved for future usage, and must | |
| 2198 | + * be left at zero. | |
| 2199 | + * | |
| 2200 | + * This helper is available only if the kernel was compiled with | |
| 2201 | + * **CONFIG_NET** configuration option. | |
| 2202 | + * Return | |
| 2203 | + * Pointer to *struct bpf_sock*, or NULL in case of failure. | |
| 2204 | + * | |
| 2205 | + * struct bpf_sock *bpf_sk_lookup_udp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u32 netns, u64 flags) | |
| 2206 | + * Description | |
| 2207 | + * Look for UDP socket matching *tuple*, optionally in a child | |
| 2208 | + * network namespace *netns*. The return value must be checked, | |
| 2209 | + * and if non-NULL, released via **bpf_sk_release**\ (). | |
| 2210 | + * | |
| 2211 | + * The *ctx* should point to the context of the program, such as | |
| 2212 | + * the skb or socket (depending on the hook in use). This is used | |
| 2213 | + * to determine the base network namespace for the lookup. | |
| 2214 | + * | |
| 2215 | + * *tuple_size* must be one of: | |
| 2216 | + * | |
| 2217 | + * **sizeof**\ (*tuple*\ **->ipv4**) | |
| 2218 | + * Look for an IPv4 socket. | |
| 2219 | + * **sizeof**\ (*tuple*\ **->ipv6**) | |
| 2220 | + * Look for an IPv6 socket. | |
| 2221 | + * | |
| 2222 | + * If the *netns* is zero, then the socket lookup table in the | |
| 2223 | + * netns associated with the *ctx* will be used. For the TC hooks, | |
| 2224 | + * this in the netns of the device in the skb. For socket hooks, | |
| 2225 | + * this in the netns of the socket. If *netns* is non-zero, then | |
| 2226 | + * it specifies the ID of the netns relative to the netns | |
| 2227 | + * associated with the *ctx*. | |
| 2228 | + * | |
| 2229 | + * All values for *flags* are reserved for future usage, and must | |
| 2230 | + * be left at zero. | |
| 2231 | + * | |
| 2232 | + * This helper is available only if the kernel was compiled with | |
| 2233 | + * **CONFIG_NET** configuration option. | |
| 2234 | + * Return | |
| 2235 | + * Pointer to *struct bpf_sock*, or NULL in case of failure. | |
| 2236 | + * | |
| 2237 | + * int bpf_sk_release(struct bpf_sock *sk) | |
| 2238 | + * Description | |
| 2239 | + * Release the reference held by *sock*. *sock* must be a non-NULL | |
| 2240 | + * pointer that was returned from bpf_sk_lookup_xxx\ (). | |
| 2241 | + * Return | |
| 2242 | + * 0 on success, or a negative error in case of failure. | |
| 2243 | + * | |
| 2244 | + * int bpf_msg_push_data(struct sk_buff *skb, u32 start, u32 len, u64 flags) | |
| 2245 | + * Description | |
| 2246 | + * For socket policies, insert *len* bytes into msg at offset | |
| 2247 | + * *start*. | |
| 2248 | + * | |
| 2249 | + * If a program of type **BPF_PROG_TYPE_SK_MSG** is run on a | |
| 2250 | + * *msg* it may want to insert metadata or options into the msg. | |
| 2251 | + * This can later be read and used by any of the lower layer BPF | |
| 2252 | + * hooks. | |
| 2253 | + * | |
| 2254 | + * This helper may fail if under memory pressure (a malloc | |
| 2255 | + * fails) in these cases BPF programs will get an appropriate | |
| 2256 | + * error and BPF programs will need to handle them. | |
| 2257 | + * | |
| 2258 | + * Return | |
| 2259 | + * 0 on success, or a negative error in case of failure. | |
| 2144 | 2260 | */ |
| 2145 | 2261 | #define __BPF_FUNC_MAPPER(FN) \ |
| 2146 | 2262 | FN(unspec), \ |
| @@ -2226,7 +2342,14 @@ union bpf_attr { · 79 unmodified lines | ||
| 2226 | 2342 | FN(get_current_cgroup_id), \ |
| 2227 | 2343 | FN(get_local_storage), \ |
| 2228 | 2344 | FN(sk_select_reuseport), \ |
| 2229 | − FN(skb_ancestor_cgroup_id), | |
| 2345 | + FN(skb_ancestor_cgroup_id), \ | |
| 2346 | + FN(sk_lookup_tcp), \ | |
| 2347 | + FN(sk_lookup_udp), \ | |
| 2348 | + FN(sk_release), \ | |
| 2349 | + FN(map_push_elem), \ | |
| 2350 | + FN(map_pop_elem), \ | |
| 2351 | + FN(map_peek_elem), \ | |
| 2352 | + FN(msg_push_data), | |
| 2230 | 2353 | |
| 2231 | 2354 | /* integer value in 'imm' field of BPF_CALL instruction selects which helper |
| 2232 | 2355 | * function eBPF program intends to call |
| @@ -2333,6 +2456,7 @@ struct __sk_buff { · 100 unmodified lines | ||
| 2333 | 2456 | /* ... here. */ |
| 2334 | 2457 | |
| 2335 | 2458 | __u32 data_meta; |
| 2459 | + struct bpf_flow_keys *flow_keys; | |
| 2336 | 2460 | }; |
| 2337 | 2461 | |
| 2338 | 2462 | struct bpf_tunnel_key { |
| @@ -2395,6 +2519,23 @@ struct bpf_sock { · 56 unmodified lines | ||
| 2395 | 2519 | */ |
| 2396 | 2520 | }; |
| 2397 | 2521 | |
| 2522 | +struct bpf_sock_tuple { | |
| 2523 | + union { | |
| 2524 | + struct { | |
| 2525 | + __be32 saddr; | |
| 2526 | + __be32 daddr; | |
| 2527 | + __be16 sport; | |
| 2528 | + __be16 dport; | |
| 2529 | + } ipv4; | |
| 2530 | + struct { | |
| 2531 | + __be32 saddr[4]; | |
| 2532 | + __be32 daddr[4]; | |
| 2533 | + __be16 sport; | |
| 2534 | + __be16 dport; | |
| 2535 | + } ipv6; | |
| 2536 | + }; | |
| 2537 | +}; | |
| 2538 | + | |
| 2398 | 2539 | #define XDP_PACKET_HEADROOM 256 |
| 2399 | 2540 | |
| 2400 | 2541 | /* User return codes for XDP prog type. |
| @@ -2778,4 +2919,27 @@ enum bpf_task_fd_type { · 377 unmodified lines | ||
| 2778 | 2919 | BPF_FD_TYPE_URETPROBE, /* filename + offset */ |
| 2779 | 2920 | }; |
| 2780 | 2921 | |
| 2922 | +struct bpf_flow_keys { | |
| 2923 | + __u16 nhoff; | |
| 2924 | + __u16 thoff; | |
| 2925 | + __u16 addr_proto; /* ETH_P_* of valid addrs */ | |
| 2926 | + __u8 is_frag; | |
| 2927 | + __u8 is_first_frag; | |
| 2928 | + __u8 is_encap; | |
| 2929 | + __u8 ip_proto; | |
| 2930 | + __be16 n_proto; | |
| 2931 | + __be16 sport; | |
| 2932 | + __be16 dport; | |
| 2933 | + union { | |
| 2934 | + struct { | |
| 2935 | + __be32 ipv4_src; | |
| 2936 | + __be32 ipv4_dst; | |
| 2937 | + }; | |
| 2938 | + struct { | |
| 2939 | + __u32 ipv6_src[4]; /* in6_addr; network order */ | |
| 2940 | + __u32 ipv6_dst[4]; /* in6_addr; network order */ | |
| 2941 | + }; | |
| 2942 | + }; | |
| 2943 | +}; | |
| 2944 | + | |
| 2781 | 2945 | #endif /* _UAPI__LINUX_BPF_H__ */ |
| @@ -152,10 +152,13 @@ static inline void cec_msg_set_reply_to(struct cec_msg *msg, · 151 unmodified lines | ||
| 152 | 152 | #define CEC_TX_STATUS_LOW_DRIVE (1 << 3) |
| 153 | 153 | #define CEC_TX_STATUS_ERROR (1 << 4) |
| 154 | 154 | #define CEC_TX_STATUS_MAX_RETRIES (1 << 5) |
| 155 | +#define CEC_TX_STATUS_ABORTED (1 << 6) | |
| 156 | +#define CEC_TX_STATUS_TIMEOUT (1 << 7) | |
| 155 | 157 | |
| 156 | 158 | #define CEC_RX_STATUS_OK (1 << 0) |
| 157 | 159 | #define CEC_RX_STATUS_TIMEOUT (1 << 1) |
| 158 | 160 | #define CEC_RX_STATUS_FEATURE_ABORT (1 << 2) |
| 161 | +#define CEC_RX_STATUS_ABORTED (1 << 3) | |
| 159 | 162 | |
| 160 | 163 | static inline int cec_msg_status_is_ok(const struct cec_msg *msg) |
| 161 | 164 | { |
| @@ -29,6 +29,7 @@ enum { · 28 unmodified lines | ||
| 29 | 29 | CRYPTO_MSG_UPDATEALG, |
| 30 | 30 | CRYPTO_MSG_GETALG, |
| 31 | 31 | CRYPTO_MSG_DELRNG, |
| 32 | + CRYPTO_MSG_GETSTAT, | |
| 32 | 33 | __CRYPTO_MSG_MAX |
| 33 | 34 | }; |
| 34 | 35 | #define CRYPTO_MSG_MAX (__CRYPTO_MSG_MAX - 1) |
| @@ -50,6 +51,16 @@ enum crypto_attr_type_t { · 15 unmodified lines | ||
| 50 | 51 | CRYPTOCFGA_REPORT_AKCIPHER, /* struct crypto_report_akcipher */ |
| 51 | 52 | CRYPTOCFGA_REPORT_KPP, /* struct crypto_report_kpp */ |
| 52 | 53 | CRYPTOCFGA_REPORT_ACOMP, /* struct crypto_report_acomp */ |
| 54 | + CRYPTOCFGA_STAT_LARVAL, /* struct crypto_stat */ | |
| 55 | + CRYPTOCFGA_STAT_HASH, /* struct crypto_stat */ | |
| 56 | + CRYPTOCFGA_STAT_BLKCIPHER, /* struct crypto_stat */ | |
| 57 | + CRYPTOCFGA_STAT_AEAD, /* struct crypto_stat */ | |
| 58 | + CRYPTOCFGA_STAT_COMPRESS, /* struct crypto_stat */ | |
| 59 | + CRYPTOCFGA_STAT_RNG, /* struct crypto_stat */ | |
| 60 | + CRYPTOCFGA_STAT_CIPHER, /* struct crypto_stat */ | |
| 61 | + CRYPTOCFGA_STAT_AKCIPHER, /* struct crypto_stat */ | |
| 62 | + CRYPTOCFGA_STAT_KPP, /* struct crypto_stat */ | |
| 63 | + CRYPTOCFGA_STAT_ACOMP, /* struct crypto_stat */ | |
| 53 | 64 | __CRYPTOCFGA_MAX |
| 54 | 65 | |
| 55 | 66 | #define CRYPTOCFGA_MAX (__CRYPTOCFGA_MAX - 1) |
| @@ -65,6 +76,47 @@ struct crypto_user_alg { · 9 unmodified lines | ||
| 65 | 76 | __u32 cru_flags; |
| 66 | 77 | }; |
| 67 | 78 | |
| 79 | +struct crypto_stat { | |
| 80 | + char type[CRYPTO_MAX_NAME]; | |
| 81 | + union { | |
| 82 | + __u32 stat_encrypt_cnt; | |
| 83 | + __u32 stat_compress_cnt; | |
| 84 | + __u32 stat_generate_cnt; | |
| 85 | + __u32 stat_hash_cnt; | |
| 86 | + __u32 stat_setsecret_cnt; | |
| 87 | + }; | |
| 88 | + union { | |
| 89 | + __u64 stat_encrypt_tlen; | |
| 90 | + __u64 stat_compress_tlen; | |
| 91 | + __u64 stat_generate_tlen; | |
| 92 | + __u64 stat_hash_tlen; | |
| 93 | + }; | |
| 94 | + union { | |
| 95 | + __u32 stat_akcipher_err_cnt; | |
| 96 | + __u32 stat_cipher_err_cnt; | |
| 97 | + __u32 stat_compress_err_cnt; | |
| 98 | + __u32 stat_aead_err_cnt; | |
| 99 | + __u32 stat_hash_err_cnt; | |
| 100 | + __u32 stat_rng_err_cnt; | |
| 101 | + __u32 stat_kpp_err_cnt; | |
| 102 | + }; | |
| 103 | + union { | |
| 104 | + __u32 stat_decrypt_cnt; | |
| 105 | + __u32 stat_decompress_cnt; | |
| 106 | + __u32 stat_seed_cnt; | |
| 107 | + __u32 stat_generate_public_key_cnt; | |
| 108 | + }; | |
| 109 | + union { | |
| 110 | + __u64 stat_decrypt_tlen; | |
| 111 | + __u64 stat_decompress_tlen; | |
| 112 | + }; | |
| 113 | + union { | |
| 114 | + __u32 stat_verify_cnt; | |
| 115 | + __u32 stat_compute_shared_secret_cnt; | |
| 116 | + }; | |
| 117 | + __u32 stat_sign_cnt; | |
| 118 | +}; | |
| 119 | + | |
| 68 | 120 | struct crypto_report_larval { |
| 69 | 121 | char type[CRYPTO_MAX_NAME]; |
| 70 | 122 | }; |
| @@ -0,0 +1,116 @@ | ||
| 1 | +/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ | |
| 2 | +/* DNS resolver interface definitions. | |
| 3 | + * | |
| 4 | + * Copyright (C) 2018 Red Hat, Inc. All Rights Reserved. | |
| 5 | + * Written by David Howells (dhowells@redhat.com) | |
| 6 | + * | |
| 7 | + * This program is free software; you can redistribute it and/or | |
| 8 | + * modify it under the terms of the GNU General Public Licence | |
| 9 | + * as published by the Free Software Foundation; either version | |
| 10 | + * 2 of the Licence, or (at your option) any later version. | |
| 11 | + */ | |
| 12 | + | |
| 13 | +#ifndef _UAPI_LINUX_DNS_RESOLVER_H | |
| 14 | +#define _UAPI_LINUX_DNS_RESOLVER_H | |
| 15 | + | |
| 16 | +#include <linux/types.h> | |
| 17 | + | |
| 18 | +/* | |
| 19 | + * Type of payload. | |
| 20 | + */ | |
| 21 | +enum dns_payload_content_type { | |
| 22 | + DNS_PAYLOAD_IS_SERVER_LIST = 0, /* List of servers, requested by srv=1 */ | |
| 23 | +}; | |
| 24 | + | |
| 25 | +/* | |
| 26 | + * Type of address that might be found in an address record. | |
| 27 | + */ | |
| 28 | +enum dns_payload_address_type { | |
| 29 | + DNS_ADDRESS_IS_IPV4 = 0, /* 4-byte AF_INET address */ | |
| 30 | + DNS_ADDRESS_IS_IPV6 = 1, /* 16-byte AF_INET6 address */ | |
| 31 | +}; | |
| 32 | + | |
| 33 | +/* | |
| 34 | + * Type of protocol used to access a server. | |
| 35 | + */ | |
| 36 | +enum dns_payload_protocol_type { | |
| 37 | + DNS_SERVER_PROTOCOL_UNSPECIFIED = 0, | |
| 38 | + DNS_SERVER_PROTOCOL_UDP = 1, /* Use UDP to talk to the server */ | |
| 39 | + DNS_SERVER_PROTOCOL_TCP = 2, /* Use TCP to talk to the server */ | |
| 40 | +}; | |
| 41 | + | |
| 42 | +/* | |
| 43 | + * Source of record included in DNS resolver payload. | |
| 44 | + */ | |
| 45 | +enum dns_record_source { | |
| 46 | + DNS_RECORD_UNAVAILABLE = 0, /* No source available (empty record) */ | |
| 47 | + DNS_RECORD_FROM_CONFIG = 1, /* From local configuration data */ | |
| 48 | + DNS_RECORD_FROM_DNS_A = 2, /* From DNS A or AAAA record */ | |
| 49 | + DNS_RECORD_FROM_DNS_AFSDB = 3, /* From DNS AFSDB record */ | |
| 50 | + DNS_RECORD_FROM_DNS_SRV = 4, /* From DNS SRV record */ | |
| 51 | + DNS_RECORD_FROM_NSS = 5, /* From NSS */ | |
| 52 | + NR__dns_record_source | |
| 53 | +}; | |
| 54 | + | |
| 55 | +/* | |
| 56 | + * Status of record included in DNS resolver payload. | |
| 57 | + */ | |
| 58 | +enum dns_lookup_status { | |
| 59 | + DNS_LOOKUP_NOT_DONE = 0, /* No lookup has been made */ | |
| 60 | + DNS_LOOKUP_GOOD = 1, /* Good records obtained */ | |
| 61 | + DNS_LOOKUP_GOOD_WITH_BAD = 2, /* Good records, some decoding errors */ | |
| 62 | + DNS_LOOKUP_BAD = 3, /* Couldn't decode results */ | |
| 63 | + DNS_LOOKUP_GOT_NOT_FOUND = 4, /* Got a "Not Found" result */ | |
| 64 | + DNS_LOOKUP_GOT_LOCAL_FAILURE = 5, /* Local failure during lookup */ | |
| 65 | + DNS_LOOKUP_GOT_TEMP_FAILURE = 6, /* Temporary failure during lookup */ | |
| 66 | + DNS_LOOKUP_GOT_NS_FAILURE = 7, /* Name server failure */ | |
| 67 | + NR__dns_lookup_status | |
| 68 | +}; | |
| 69 | + | |
| 70 | +/* | |
| 71 | + * Header at the beginning of binary format payload. | |
| 72 | + */ | |
| 73 | +struct dns_payload_header { | |
| 74 | + __u8 zero; /* Zero byte: marks this as not being text */ | |
| 75 | + __u8 content; /* enum dns_payload_content_type */ | |
| 76 | + __u8 version; /* Encoding version */ | |
| 77 | +} __packed; | |
| 78 | + | |
| 79 | +/* | |
| 80 | + * Header at the beginning of a V1 server list. This is followed directly by | |
| 81 | + * the server records. Each server records begins with a struct of type | |
| 82 | + * dns_server_list_v1_server. | |
| 83 | + */ | |
| 84 | +struct dns_server_list_v1_header { | |
| 85 | + struct dns_payload_header hdr; | |
| 86 | + __u8 source; /* enum dns_record_source */ | |
| 87 | + __u8 status; /* enum dns_lookup_status */ | |
| 88 | + __u8 nr_servers; /* Number of server records following this */ | |
| 89 | +} __packed; | |
| 90 | + | |
| 91 | +/* | |
| 92 | + * Header at the beginning of each V1 server record. This is followed by the | |
| 93 | + * characters of the name with no NUL-terminator, followed by the address | |
| 94 | + * records for that server. Each address record begins with a struct of type | |
| 95 | + * struct dns_server_list_v1_address. | |
| 96 | + */ | |
| 97 | +struct dns_server_list_v1_server { | |
| 98 | + __u16 name_len; /* Length of name (LE) */ | |
| 99 | + __u16 priority; /* Priority (as SRV record) (LE) */ | |
| 100 | + __u16 weight; /* Weight (as SRV record) (LE) */ | |
| 101 | + __u16 port; /* UDP/TCP port number (LE) */ | |
| 102 | + __u8 source; /* enum dns_record_source */ | |
| 103 | + __u8 status; /* enum dns_lookup_status */ | |
| 104 | + __u8 protocol; /* enum dns_payload_protocol_type */ | |
| 105 | + __u8 nr_addrs; | |
| 106 | +} __packed; | |
| 107 | + | |
| 108 | +/* | |
| 109 | + * Header at the beginning of each V1 address record. This is followed by the | |
| 110 | + * bytes of the address, 4 for IPV4 and 16 for IPV6. | |
| 111 | + */ | |
| 112 | +struct dns_server_list_v1_address { | |
| 113 | + __u8 address_type; /* enum dns_payload_address_type */ | |
| 114 | +} __packed; | |
| 115 | + | |
| 116 | +#endif /* _UAPI_LINUX_DNS_RESOLVER_H */ | |
| @@ -41,6 +41,7 @@ · 40 unmodified lines | ||
| 41 | 41 | #define EM_TILEPRO 188 /* Tilera TILEPro */ |
| 42 | 42 | #define EM_MICROBLAZE 189 /* Xilinx MicroBlaze */ |
| 43 | 43 | #define EM_TILEGX 191 /* Tilera TILE-Gx */ |
| 44 | +#define EM_RISCV 243 /* RISC-V */ | |
| 44 | 45 | #define EM_BPF 247 /* Linux BPF - in-kernel virtual machine */ |
| 45 | 46 | #define EM_FRV 0x5441 /* Fujitsu FR-V */ |
| 46 | 47 | |
| @@ -91,10 +91,6 @@ · 90 unmodified lines | ||
| 91 | 91 | * %ETHTOOL_GSET to get the current values before making specific |
| 92 | 92 | * changes and then applying them with %ETHTOOL_SSET. |
| 93 | 93 | * |
| 94 | − * Drivers that implement set_settings() should validate all fields | |
| 95 | − * other than @cmd that are not described as read-only or deprecated, | |
| 96 | − * and must ignore all fields described as read-only. | |
| 97 | − * | |
| 98 | 94 | * Deprecated fields should be ignored by both users and drivers. |
| 99 | 95 | */ |
| 100 | 96 | struct ethtool_cmd { |
| @@ -1800,14 +1796,9 @@ enum ethtool_reset_flags { · 1699 unmodified lines | ||
| 1800 | 1796 | * rejected. |
| 1801 | 1797 | * |
| 1802 | 1798 | * Deprecated %ethtool_cmd fields transceiver, maxtxpkt and maxrxpkt |
| 1803 | − * are not available in %ethtool_link_settings. Until all drivers are | |
| 1804 | − * converted to ignore them or to the new %ethtool_link_settings API, | |
| 1805 | − * for both queries and changes, users should always try | |
| 1806 | − * %ETHTOOL_GLINKSETTINGS first, and if it fails with -ENOTSUPP stick | |
| 1807 | − * only to %ETHTOOL_GSET and %ETHTOOL_SSET consistently. If it | |
| 1808 | − * succeeds, then users should stick to %ETHTOOL_GLINKSETTINGS and | |
| 1809 | − * %ETHTOOL_SLINKSETTINGS (which would support drivers implementing | |
| 1810 | − * either %ethtool_cmd or %ethtool_link_settings). | |
| 1799 | + * are not available in %ethtool_link_settings. These fields will be | |
| 1800 | + * always set to zero in %ETHTOOL_GSET reply and %ETHTOOL_SSET will | |
| 1801 | + * fail if any of them is set to non-zero value. | |
| 1811 | 1802 | * |
| 1812 | 1803 | * Users should assume that all fields not marked read-only are |
| 1813 | 1804 | * writable and subject to validation by the driver. They should use |
| @@ -27,10 +27,12 @@ · 26 unmodified lines | ||
| 27 | 27 | #define FAN_CLOEXEC 0x00000001 |
| 28 | 28 | #define FAN_NONBLOCK 0x00000002 |
| 29 | 29 | |
| 30 | −/* These are NOT bitwise flags. Both bits are used togther. */ | |
| 30 | +/* These are NOT bitwise flags. Both bits are used together. */ | |
| 31 | 31 | #define FAN_CLASS_NOTIF 0x00000000 |
| 32 | 32 | #define FAN_CLASS_CONTENT 0x00000004 |
| 33 | 33 | #define FAN_CLASS_PRE_CONTENT 0x00000008 |
| 34 | + | |
| 35 | +/* Deprecated - do not use this in programs and do not add new flags here! */ | |
| 34 | 36 | #define FAN_ALL_CLASS_BITS (FAN_CLASS_NOTIF | FAN_CLASS_CONTENT | \ |
| 35 | 37 | FAN_CLASS_PRE_CONTENT) |
| 36 | 38 | |
| @@ -38,6 +40,10 @@ · 1 unmodified line | ||
| 38 | 40 | #define FAN_UNLIMITED_MARKS 0x00000020 |
| 39 | 41 | #define FAN_ENABLE_AUDIT 0x00000040 |
| 40 | 42 | |
| 43 | +/* Flags to determine fanotify event format */ | |
| 44 | +#define FAN_REPORT_TID 0x00000100 /* event->pid is thread id */ | |
| 45 | + | |
| 46 | +/* Deprecated - do not use this in programs and do not add new flags here! */ | |
| 41 | 47 | #define FAN_ALL_INIT_FLAGS (FAN_CLOEXEC | FAN_NONBLOCK | \ |
| 42 | 48 | FAN_ALL_CLASS_BITS | FAN_UNLIMITED_QUEUE |\ |
| 43 | 49 | FAN_UNLIMITED_MARKS) |
| @@ -47,11 +53,18 @@ · 3 unmodified lines | ||
| 47 | 53 | #define FAN_MARK_REMOVE 0x00000002 |
| 48 | 54 | #define FAN_MARK_DONT_FOLLOW 0x00000004 |
| 49 | 55 | #define FAN_MARK_ONLYDIR 0x00000008 |
| 50 | −#define FAN_MARK_MOUNT 0x00000010 | |
| 56 | +/* FAN_MARK_MOUNT is 0x00000010 */ | |
| 51 | 57 | #define FAN_MARK_IGNORED_MASK 0x00000020 |
| 52 | 58 | #define FAN_MARK_IGNORED_SURV_MODIFY 0x00000040 |
| 53 | 59 | #define FAN_MARK_FLUSH 0x00000080 |
| 60 | +/* FAN_MARK_FILESYSTEM is 0x00000100 */ | |
| 54 | 61 | |
| 62 | +/* These are NOT bitwise flags. Both bits can be used togther. */ | |
| 63 | +#define FAN_MARK_INODE 0x00000000 | |
| 64 | +#define FAN_MARK_MOUNT 0x00000010 | |
| 65 | +#define FAN_MARK_FILESYSTEM 0x00000100 | |
| 66 | + | |
| 67 | +/* Deprecated - do not use this in programs and do not add new flags here! */ | |
| 55 | 68 | #define FAN_ALL_MARK_FLAGS (FAN_MARK_ADD |\ |
| 56 | 69 | FAN_MARK_REMOVE |\ |
| 57 | 70 | FAN_MARK_DONT_FOLLOW |\ |
| @@ -61,11 +74,7 @@ · 3 unmodified lines | ||
| 61 | 74 | FAN_MARK_IGNORED_SURV_MODIFY |\ |
| 62 | 75 | FAN_MARK_FLUSH) |
| 63 | 76 | |
| 64 | −/* | |
| 65 | − * All of the events - we build the list by hand so that we can add flags in | |
| 66 | − * the future and not break backward compatibility. Apps will get only the | |
| 67 | − * events that they originally wanted. Be sure to add new events here! | |
| 68 | − */ | |
| 77 | +/* Deprecated - do not use this in programs and do not add new flags here! */ | |
| 69 | 78 | #define FAN_ALL_EVENTS (FAN_ACCESS |\ |
| 70 | 79 | FAN_MODIFY |\ |
| 71 | 80 | FAN_CLOSE |\ |
| @@ -74,9 +83,11 @@ · 2 unmodified lines | ||
| 74 | 83 | /* |
| 75 | 84 | * All events which require a permission response from userspace |
| 76 | 85 | */ |
| 86 | +/* Deprecated - do not use this in programs and do not add new flags here! */ | |
| 77 | 87 | #define FAN_ALL_PERM_EVENTS (FAN_OPEN_PERM |\ |
| 78 | 88 | FAN_ACCESS_PERM) |
| 79 | 89 | |
| 90 | +/* Deprecated - do not use this in programs and do not add new flags here! */ | |
| 80 | 91 | #define FAN_ALL_OUTGOING_EVENTS (FAN_ALL_EVENTS |\ |
| 81 | 92 | FAN_ALL_PERM_EVENTS |\ |
| 82 | 93 | FAN_Q_OVERFLOW) |
| @@ -47,11 +47,11 @@ · 46 unmodified lines | ||
| 47 | 47 | #define FW_CDEV_EVENT_ISO_INTERRUPT_MULTICHANNEL 0x09 |
| 48 | 48 | |
| 49 | 49 | /** |
| 50 | − * struct fw_cdev_event_common - Common part of all fw_cdev_event_ types | |
| 50 | + * struct fw_cdev_event_common - Common part of all fw_cdev_event_* types | |
| 51 | 51 | * @closure: For arbitrary use by userspace |
| 52 | − * @type: Discriminates the fw_cdev_event_ types | |
| 52 | + * @type: Discriminates the fw_cdev_event_* types | |
| 53 | 53 | * |
| 54 | − * This struct may be used to access generic members of all fw_cdev_event_ | |
| 54 | + * This struct may be used to access generic members of all fw_cdev_event_* | |
| 55 | 55 | * types regardless of the specific type. |
| 56 | 56 | * |
| 57 | 57 | * Data passed in the @closure field for a request will be returned in the |
| @@ -123,7 +123,13 @@ struct fw_cdev_event_response { · 65 unmodified lines | ||
| 123 | 123 | |
| 124 | 124 | /** |
| 125 | 125 | * struct fw_cdev_event_request - Old version of &fw_cdev_event_request2 |
| 126 | + * @closure: See &fw_cdev_event_common; set by %FW_CDEV_IOC_ALLOCATE ioctl | |
| 126 | 127 | * @type: See &fw_cdev_event_common; always %FW_CDEV_EVENT_REQUEST |
| 128 | + * @tcode: Transaction code of the incoming request | |
| 129 | + * @offset: The offset into the 48-bit per-node address space | |
| 130 | + * @handle: Reference to the kernel-side pending request | |
| 131 | + * @length: Data length, i.e. the request's payload size in bytes | |
| 132 | + * @data: Incoming data, if any | |
| 127 | 133 | * |
| 128 | 134 | * This event is sent instead of &fw_cdev_event_request2 if the kernel or |
| 129 | 135 | * the client implements ABI version <= 3. &fw_cdev_event_request lacks |
| @@ -353,7 +359,7 @@ struct fw_cdev_event_phy_packet { · 223 unmodified lines | ||
| 353 | 359 | }; |
| 354 | 360 | |
| 355 | 361 | /** |
| 356 | − * union fw_cdev_event - Convenience union of fw_cdev_event_ types | |
| 362 | + * union fw_cdev_event - Convenience union of fw_cdev_event_* types | |
| 357 | 363 | * @common: Valid for all types |
| 358 | 364 | * @bus_reset: Valid if @common.type == %FW_CDEV_EVENT_BUS_RESET |
| 359 | 365 | * @response: Valid if @common.type == %FW_CDEV_EVENT_RESPONSE |
| @@ -735,7 +741,7 @@ struct fw_cdev_set_iso_channels { · 375 unmodified lines | ||
| 735 | 741 | * @header: Header and payload in case of a transmit context. |
| 736 | 742 | * |
| 737 | 743 | * &struct fw_cdev_iso_packet is used to describe isochronous packet queues. |
| 738 | − * Use the FW_CDEV_ISO_ macros to fill in @control. | |
| 744 | + * Use the FW_CDEV_ISO_* macros to fill in @control. | |
| 739 | 745 | * The @header array is empty in case of receive contexts. |
| 740 | 746 | * |
| 741 | 747 | * Context type %FW_CDEV_ISO_CONTEXT_TRANSMIT: |
| @@ -842,7 +848,7 @@ struct fw_cdev_queue_iso { · 100 unmodified lines | ||
| 842 | 848 | * the %FW_CDEV_ISO_SYNC bit set |
| 843 | 849 | * @tags: Tag filter bit mask. Only valid for isochronous reception. |
| 844 | 850 | * Determines the tag values for which packets will be accepted. |
| 845 | − * Use FW_CDEV_ISO_CONTEXT_MATCH_ macros to set @tags. | |
| 851 | + * Use FW_CDEV_ISO_CONTEXT_MATCH_* macros to set @tags. | |
| 846 | 852 | * @handle: Isochronous context handle within which to transmit or receive |
| 847 | 853 | */ |
| 848 | 854 | struct fw_cdev_start_iso { |
| @@ -1009,8 +1015,8 @@ struct fw_cdev_send_stream_packet { · 160 unmodified lines | ||
| 1009 | 1015 | * on the same card as this device. After transmission, an |
| 1010 | 1016 | * %FW_CDEV_EVENT_PHY_PACKET_SENT event is generated. |
| 1011 | 1017 | * |
| 1012 | − * The payload @data[] shall be specified in host byte order. Usually, | |
| 1013 | − * @data[1] needs to be the bitwise inverse of @data[0]. VersaPHY packets | |
| 1018 | + * The payload @data\[\] shall be specified in host byte order. Usually, | |
| 1019 | + * @data\[1\] needs to be the bitwise inverse of @data\[0\]. VersaPHY packets | |
| 1014 | 1020 | * are an exception to this rule. |
| 1015 | 1021 | * |
| 1016 | 1022 | * The ioctl is only permitted on device files which represent a local node. |
| @@ -279,8 +279,8 @@ struct fsxattr { · 278 unmodified lines | ||
| 279 | 279 | #define FS_ENCRYPTION_MODE_AES_256_CTS 4 |
| 280 | 280 | #define FS_ENCRYPTION_MODE_AES_128_CBC 5 |
| 281 | 281 | #define FS_ENCRYPTION_MODE_AES_128_CTS 6 |
| 282 | −#define FS_ENCRYPTION_MODE_SPECK128_256_XTS 7 | |
| 283 | −#define FS_ENCRYPTION_MODE_SPECK128_256_CTS 8 | |
| 282 | +#define FS_ENCRYPTION_MODE_SPECK128_256_XTS 7 /* Removed, do not use. */ | |
| 283 | +#define FS_ENCRYPTION_MODE_SPECK128_256_CTS 8 /* Removed, do not use. */ | |
| 284 | 284 | |
| 285 | 285 | struct fscrypt_policy { |
| 286 | 286 | __u8 version; |
| @@ -116,6 +116,12 @@ · 115 unmodified lines | ||
| 116 | 116 | * |
| 117 | 117 | * 7.27 |
| 118 | 118 | * - add FUSE_ABORT_ERROR |
| 119 | + * | |
| 120 | + * 7.28 | |
| 121 | + * - add FUSE_COPY_FILE_RANGE | |
| 122 | + * - add FOPEN_CACHE_DIR | |
| 123 | + * - add FUSE_MAX_PAGES, add max_pages to init_out | |
| 124 | + * - add FUSE_CACHE_SYMLINKS | |
| 119 | 125 | */ |
| 120 | 126 | |
| 121 | 127 | #ifndef _LINUX_FUSE_H |
| @@ -151,7 +157,7 @@ · 29 unmodified lines | ||
| 151 | 157 | #define FUSE_KERNEL_VERSION 7 |
| 152 | 158 | |
| 153 | 159 | /** Minor version number of this interface */ |
| 154 | −#define FUSE_KERNEL_MINOR_VERSION 27 | |
| 160 | +#define FUSE_KERNEL_MINOR_VERSION 28 | |
| 155 | 161 | |
| 156 | 162 | /** The node ID of the root inode */ |
| 157 | 163 | #define FUSE_ROOT_ID 1 |
| @@ -219,10 +225,12 @@ struct fuse_file_lock { · 61 unmodified lines | ||
| 219 | 225 | * FOPEN_DIRECT_IO: bypass page cache for this open file |
| 220 | 226 | * FOPEN_KEEP_CACHE: don't invalidate the data cache on open |
| 221 | 227 | * FOPEN_NONSEEKABLE: the file is not seekable |
| 228 | + * FOPEN_CACHE_DIR: allow caching this directory | |
| 222 | 229 | */ |
| 223 | 230 | #define FOPEN_DIRECT_IO (1 << 0) |
| 224 | 231 | #define FOPEN_KEEP_CACHE (1 << 1) |
| 225 | 232 | #define FOPEN_NONSEEKABLE (1 << 2) |
| 233 | +#define FOPEN_CACHE_DIR (1 << 3) | |
| 226 | 234 | |
| 227 | 235 | /** |
| 228 | 236 | * INIT request/reply flags |
| @@ -249,6 +257,8 @@ struct fuse_file_lock { · 20 unmodified lines | ||
| 249 | 257 | * FUSE_HANDLE_KILLPRIV: fs handles killing suid/sgid/cap on write/chown/trunc |
| 250 | 258 | * FUSE_POSIX_ACL: filesystem supports posix acls |
| 251 | 259 | * FUSE_ABORT_ERROR: reading the device after abort returns ECONNABORTED |
| 260 | + * FUSE_MAX_PAGES: init_out.max_pages contains the max number of req pages | |
| 261 | + * FUSE_CACHE_SYMLINKS: cache READLINK responses | |
| 252 | 262 | */ |
| 253 | 263 | #define FUSE_ASYNC_READ (1 << 0) |
| 254 | 264 | #define FUSE_POSIX_LOCKS (1 << 1) |
| @@ -272,6 +282,8 @@ struct fuse_file_lock { · 17 unmodified lines | ||
| 272 | 282 | #define FUSE_HANDLE_KILLPRIV (1 << 19) |
| 273 | 283 | #define FUSE_POSIX_ACL (1 << 20) |
| 274 | 284 | #define FUSE_ABORT_ERROR (1 << 21) |
| 285 | +#define FUSE_MAX_PAGES (1 << 22) | |
| 286 | +#define FUSE_CACHE_SYMLINKS (1 << 23) | |
| 275 | 287 | |
| 276 | 288 | /** |
| 277 | 289 | * CUSE INIT request/reply flags |
| @@ -337,53 +349,54 @@ struct fuse_file_lock { · 59 unmodified lines | ||
| 337 | 349 | #define FUSE_POLL_SCHEDULE_NOTIFY (1 << 0) |
| 338 | 350 | |
| 339 | 351 | enum fuse_opcode { |
| 340 | − FUSE_LOOKUP = 1, | |
| 341 | − FUSE_FORGET = 2, /* no reply */ | |
| 342 | − FUSE_GETATTR = 3, | |
| 343 | − FUSE_SETATTR = 4, | |
| 344 | − FUSE_READLINK = 5, | |
| 345 | − FUSE_SYMLINK = 6, | |
| 346 | − FUSE_MKNOD = 8, | |
| 347 | − FUSE_MKDIR = 9, | |
| 348 | − FUSE_UNLINK = 10, | |
| 349 | − FUSE_RMDIR = 11, | |
| 350 | − FUSE_RENAME = 12, | |
| 351 | − FUSE_LINK = 13, | |
| 352 | − FUSE_OPEN = 14, | |
| 353 | − FUSE_READ = 15, | |
| 354 | − FUSE_WRITE = 16, | |
| 355 | − FUSE_STATFS = 17, | |
| 356 | − FUSE_RELEASE = 18, | |
| 357 | − FUSE_FSYNC = 20, | |
| 358 | − FUSE_SETXATTR = 21, | |
| 359 | − FUSE_GETXATTR = 22, | |
| 360 | − FUSE_LISTXATTR = 23, | |
| 361 | − FUSE_REMOVEXATTR = 24, | |
| 362 | − FUSE_FLUSH = 25, | |
| 363 | − FUSE_INIT = 26, | |
| 364 | − FUSE_OPENDIR = 27, | |
| 365 | − FUSE_READDIR = 28, | |
| 366 | − FUSE_RELEASEDIR = 29, | |
| 367 | − FUSE_FSYNCDIR = 30, | |
| 368 | − FUSE_GETLK = 31, | |
| 369 | − FUSE_SETLK = 32, | |
| 370 | − FUSE_SETLKW = 33, | |
| 371 | − FUSE_ACCESS = 34, | |
| 372 | − FUSE_CREATE = 35, | |
| 373 | − FUSE_INTERRUPT = 36, | |
| 374 | − FUSE_BMAP = 37, | |
| 375 | − FUSE_DESTROY = 38, | |
| 376 | − FUSE_IOCTL = 39, | |
| 377 | − FUSE_POLL = 40, | |
| 378 | − FUSE_NOTIFY_REPLY = 41, | |
| 379 | − FUSE_BATCH_FORGET = 42, | |
| 380 | − FUSE_FALLOCATE = 43, | |
| 381 | − FUSE_READDIRPLUS = 44, | |
| 382 | − FUSE_RENAME2 = 45, | |
| 383 | − FUSE_LSEEK = 46, | |
| 352 | + FUSE_LOOKUP = 1, | |
| 353 | + FUSE_FORGET = 2, /* no reply */ | |
| 354 | + FUSE_GETATTR = 3, | |
| 355 | + FUSE_SETATTR = 4, | |
| 356 | + FUSE_READLINK = 5, | |
| 357 | + FUSE_SYMLINK = 6, | |
| 358 | + FUSE_MKNOD = 8, | |
| 359 | + FUSE_MKDIR = 9, | |
| 360 | + FUSE_UNLINK = 10, | |
| 361 | + FUSE_RMDIR = 11, | |
| 362 | + FUSE_RENAME = 12, | |
| 363 | + FUSE_LINK = 13, | |
| 364 | + FUSE_OPEN = 14, | |
| 365 | + FUSE_READ = 15, | |
| 366 | + FUSE_WRITE = 16, | |
| 367 | + FUSE_STATFS = 17, | |
| 368 | + FUSE_RELEASE = 18, | |
| 369 | + FUSE_FSYNC = 20, | |
| 370 | + FUSE_SETXATTR = 21, | |
| 371 | + FUSE_GETXATTR = 22, | |
| 372 | + FUSE_LISTXATTR = 23, | |
| 373 | + FUSE_REMOVEXATTR = 24, | |
| 374 | + FUSE_FLUSH = 25, | |
| 375 | + FUSE_INIT = 26, | |
| 376 | + FUSE_OPENDIR = 27, | |
| 377 | + FUSE_READDIR = 28, | |
| 378 | + FUSE_RELEASEDIR = 29, | |
| 379 | + FUSE_FSYNCDIR = 30, | |
| 380 | + FUSE_GETLK = 31, | |
| 381 | + FUSE_SETLK = 32, | |
| 382 | + FUSE_SETLKW = 33, | |
| 383 | + FUSE_ACCESS = 34, | |
| 384 | + FUSE_CREATE = 35, | |
| 385 | + FUSE_INTERRUPT = 36, | |
| 386 | + FUSE_BMAP = 37, | |
| 387 | + FUSE_DESTROY = 38, | |
| 388 | + FUSE_IOCTL = 39, | |
| 389 | + FUSE_POLL = 40, | |
| 390 | + FUSE_NOTIFY_REPLY = 41, | |
| 391 | + FUSE_BATCH_FORGET = 42, | |
| 392 | + FUSE_FALLOCATE = 43, | |
| 393 | + FUSE_READDIRPLUS = 44, | |
| 394 | + FUSE_RENAME2 = 45, | |
| 395 | + FUSE_LSEEK = 46, | |
| 396 | + FUSE_COPY_FILE_RANGE = 47, | |
| 384 | 397 | |
| 385 | 398 | /* CUSE specific operations */ |
| 386 | − CUSE_INIT = 4096, | |
| 399 | + CUSE_INIT = 4096, | |
| 387 | 400 | }; |
| 388 | 401 | |
| 389 | 402 | enum fuse_notify_code { |
| @@ -610,7 +623,9 @@ struct fuse_init_out { · 220 unmodified lines | ||
| 610 | 623 | uint16_t congestion_threshold; |
| 611 | 624 | uint32_t max_write; |
| 612 | 625 | uint32_t time_gran; |
| 613 | − uint32_t unused[9]; | |
| 626 | + uint16_t max_pages; | |
| 627 | + uint16_t padding; | |
| 628 | + uint32_t unused[8]; | |
| 614 | 629 | }; |
| 615 | 630 | |
| 616 | 631 | #define CUSE_INIT_INFO_MAX 4096 |
| @@ -792,4 +807,14 @@ struct fuse_lseek_out { · 175 unmodified lines | ||
| 792 | 807 | uint64_t offset; |
| 793 | 808 | }; |
| 794 | 809 | |
| 810 | +struct fuse_copy_file_range_in { | |
| 811 | + uint64_t fh_in; | |
| 812 | + uint64_t off_in; | |
| 813 | + uint64_t nodeid_out; | |
| 814 | + uint64_t fh_out; | |
| 815 | + uint64_t off_out; | |
| 816 | + uint64_t len; | |
| 817 | + uint64_t flags; | |
| 818 | +}; | |
| 819 | + | |
| 795 | 820 | #endif /* _LINUX_FUSE_H */ |
| @@ -12,6 +12,7 @@ enum { · 11 unmodified lines | ||
| 12 | 12 | TCA_STATS_APP, |
| 13 | 13 | TCA_STATS_RATE_EST64, |
| 14 | 14 | TCA_STATS_PAD, |
| 15 | + TCA_STATS_BASIC_HW, | |
| 15 | 16 | __TCA_STATS_MAX, |
| 16 | 17 | }; |
| 17 | 18 | #define TCA_STATS_MAX (__TCA_STATS_MAX - 1) |
| @@ -65,7 +65,7 @@ struct gpioline_info { · 64 unmodified lines | ||
| 65 | 65 | |
| 66 | 66 | /** |
| 67 | 67 | * struct gpiohandle_request - Information about a GPIO handle request |
| 68 | − * @lineoffsets: an array desired lines, specified by offset index for the | |
| 68 | + * @lineoffsets: an array of desired lines, specified by offset index for the | |
| 69 | 69 | * associated GPIO device |
| 70 | 70 | * @flags: desired flags for the desired GPIO lines, such as |
| 71 | 71 | * GPIOHANDLE_REQUEST_OUTPUT, GPIOHANDLE_REQUEST_ACTIVE_LOW etc, OR:ed |
| @@ -34,6 +34,7 @@ enum { · 33 unmodified lines | ||
| 34 | 34 | IFA_MULTICAST, |
| 35 | 35 | IFA_FLAGS, |
| 36 | 36 | IFA_RT_PRIORITY, /* u32, priority/metric for prefix route */ |
| 37 | + IFA_TARGET_NETNSID, | |
| 37 | 38 | __IFA_MAX, |
| 38 | 39 | }; |
| 39 | 40 | |
| @@ -114,18 +114,18 @@ · 113 unmodified lines | ||
| 114 | 114 | |
| 115 | 115 | /* ARP ioctl request. */ |
| 116 | 116 | struct arpreq { |
| 117 | − struct sockaddr arp_pa; /* protocol address */ | |
| 118 | − struct sockaddr arp_ha; /* hardware address */ | |
| 119 | − int arp_flags; /* flags */ | |
| 120 | − struct sockaddr arp_netmask; /* netmask (only for proxy arps) */ | |
| 121 | − char arp_dev[16]; | |
| 117 | + struct sockaddr arp_pa; /* protocol address */ | |
| 118 | + struct sockaddr arp_ha; /* hardware address */ | |
| 119 | + int arp_flags; /* flags */ | |
| 120 | + struct sockaddr arp_netmask; /* netmask (only for proxy arps) */ | |
| 121 | + char arp_dev[IFNAMSIZ]; | |
| 122 | 122 | }; |
| 123 | 123 | |
| 124 | 124 | struct arpreq_old { |
| 125 | − struct sockaddr arp_pa; /* protocol address */ | |
| 126 | − struct sockaddr arp_ha; /* hardware address */ | |
| 127 | − int arp_flags; /* flags */ | |
| 128 | − struct sockaddr arp_netmask; /* netmask (only for proxy arps) */ | |
| 125 | + struct sockaddr arp_pa; /* protocol address */ | |
| 126 | + struct sockaddr arp_ha; /* hardware address */ | |
| 127 | + int arp_flags; /* flags */ | |
| 128 | + struct sockaddr arp_netmask; /* netmask (only for proxy arps) */ | |
| 129 | 129 | }; |
| 130 | 130 | |
| 131 | 131 | /* ARP Flag values. */ |
| @@ -6,9 +6,10 @@ · 5 unmodified lines | ||
| 6 | 6 | * |
| 7 | 7 | * Global definitions for the ANSI FDDI interface. |
| 8 | 8 | * |
| 9 | − * Version: @(#)if_fddi.h 1.0.2 Sep 29 2004 | |
| 9 | + * Version: @(#)if_fddi.h 1.0.3 Oct 6 2018 | |
| 10 | 10 | * |
| 11 | − * Author: Lawrence V. Stefani, <stefani@lkg.dec.com> | |
| 11 | + * Author: Lawrence V. Stefani, <stefani@yahoo.com> | |
| 12 | + * Maintainer: Maciej W. Rozycki, <macro@linux-mips.org> | |
| 12 | 13 | * |
| 13 | 14 | * if_fddi.h is based on previous if_ether.h and if_tr.h work by |
| 14 | 15 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> |
| @@ -45,7 +46,21 @@ · 30 unmodified lines | ||
| 45 | 46 | #define FDDI_K_OUI_LEN 3 /* Octets in OUI in 802.2 SNAP |
| 46 | 47 | header */ |
| 47 | 48 | |
| 48 | −/* Define FDDI Frame Control (FC) Byte values */ | |
| 49 | +/* Define FDDI Frame Control (FC) Byte masks */ | |
| 50 | +#define FDDI_FC_K_CLASS_MASK 0x80 /* class bit */ | |
| 51 | +#define FDDI_FC_K_CLASS_SYNC 0x80 | |
| 52 | +#define FDDI_FC_K_CLASS_ASYNC 0x00 | |
| 53 | +#define FDDI_FC_K_ALEN_MASK 0x40 /* address length bit */ | |
| 54 | +#define FDDI_FC_K_ALEN_48 0x40 | |
| 55 | +#define FDDI_FC_K_ALEN_16 0x00 | |
| 56 | +#define FDDI_FC_K_FORMAT_MASK 0x30 /* format bits */ | |
| 57 | +#define FDDI_FC_K_FORMAT_FUTURE 0x30 | |
| 58 | +#define FDDI_FC_K_FORMAT_IMPLEMENTOR 0x20 | |
| 59 | +#define FDDI_FC_K_FORMAT_LLC 0x10 | |
| 60 | +#define FDDI_FC_K_FORMAT_MANAGEMENT 0x00 | |
| 61 | +#define FDDI_FC_K_CONTROL_MASK 0x0f /* control bits */ | |
| 62 | + | |
| 63 | +/* Define FDDI Frame Control (FC) Byte specific values */ | |
| 49 | 64 | #define FDDI_FC_K_VOID 0x00 |
| 50 | 65 | #define FDDI_FC_K_NON_RESTRICTED_TOKEN 0x80 |
| 51 | 66 | #define FDDI_FC_K_RESTRICTED_TOKEN 0xC0 |
| @@ -161,6 +161,7 @@ enum { · 160 unmodified lines | ||
| 161 | 161 | IFLA_EVENT, |
| 162 | 162 | IFLA_NEW_NETNSID, |
| 163 | 163 | IFLA_IF_NETNSID, |
| 164 | + IFLA_TARGET_NETNSID = IFLA_IF_NETNSID, /* new alias */ | |
| 164 | 165 | IFLA_CARRIER_UP_COUNT, |
| 165 | 166 | IFLA_CARRIER_DOWN_COUNT, |
| 166 | 167 | IFLA_NEW_IFINDEX, |
| @@ -286,6 +287,7 @@ enum { · 119 unmodified lines | ||
| 286 | 287 | IFLA_BR_MCAST_STATS_ENABLED, |
| 287 | 288 | IFLA_BR_MCAST_IGMP_VERSION, |
| 288 | 289 | IFLA_BR_MCAST_MLD_VERSION, |
| 290 | + IFLA_BR_VLAN_STATS_PER_PORT, | |
| 289 | 291 | __IFLA_BR_MAX, |
| 290 | 292 | }; |
| 291 | 293 | |
| @@ -554,6 +556,7 @@ enum { · 262 unmodified lines | ||
| 554 | 556 | IFLA_GENEVE_UDP_ZERO_CSUM6_TX, |
| 555 | 557 | IFLA_GENEVE_UDP_ZERO_CSUM6_RX, |
| 556 | 558 | IFLA_GENEVE_LABEL, |
| 559 | + IFLA_GENEVE_TTL_INHERIT, | |
| 557 | 560 | __IFLA_GENEVE_MAX |
| 558 | 561 | }; |
| 559 | 562 | #define IFLA_GENEVE_MAX (__IFLA_GENEVE_MAX - 1) |
| @@ -57,6 +57,7 @@ struct sockaddr_ll { · 56 unmodified lines | ||
| 57 | 57 | #define PACKET_QDISC_BYPASS 20 |
| 58 | 58 | #define PACKET_ROLLOVER_STATS 21 |
| 59 | 59 | #define PACKET_FANOUT_DATA 22 |
| 60 | +#define PACKET_IGNORE_OUTGOING 23 | |
| 60 | 61 | |
| 61 | 62 | #define PACKET_FANOUT_HASH 0 |
| 62 | 63 | #define PACKET_FANOUT_LB 1 |
| @@ -177,6 +177,7 @@ struct in6_flowlabel_req { · 176 unmodified lines | ||
| 177 | 177 | #define IPV6_V6ONLY 26 |
| 178 | 178 | #define IPV6_JOIN_ANYCAST 27 |
| 179 | 179 | #define IPV6_LEAVE_ANYCAST 28 |
| 180 | +#define IPV6_MULTICAST_ALL 29 | |
| 180 | 181 | |
| 181 | 182 | /* IPV6_MTU_DISCOVER values */ |
| 182 | 183 | #define IPV6_PMTUDISC_DONT 0 |
| @@ -708,6 +708,15 @@ · 707 unmodified lines | ||
| 708 | 708 | #define REL_DIAL 0x07 |
| 709 | 709 | #define REL_WHEEL 0x08 |
| 710 | 710 | #define REL_MISC 0x09 |
| 711 | +/* | |
| 712 | + * 0x0a is reserved and should not be used in input drivers. | |
| 713 | + * It was used by HID as REL_MISC+1 and userspace needs to detect if | |
| 714 | + * the next REL_* event is correct or is just REL_MISC + n. | |
| 715 | + * We define here REL_RESERVED so userspace can rely on it and detect | |
| 716 | + * the situation described above. | |
| 717 | + */ | |
| 718 | +#define REL_RESERVED 0x0a | |
| 719 | +#define REL_WHEEL_HI_RES 0x0b | |
| 711 | 720 | #define REL_MAX 0x0f |
| 712 | 721 | #define REL_CNT (REL_MAX+1) |
| 713 | 722 | |
| @@ -744,6 +753,15 @@ · 30 unmodified lines | ||
| 744 | 753 | |
| 745 | 754 | #define ABS_MISC 0x28 |
| 746 | 755 | |
| 756 | +/* | |
| 757 | + * 0x2e is reserved and should not be used in input drivers. | |
| 758 | + * It was used by HID as ABS_MISC+6 and userspace needs to detect if | |
| 759 | + * the next ABS_* event is correct or is just ABS_MISC + n. | |
| 760 | + * We define here ABS_RESERVED so userspace can rely on it and detect | |
| 761 | + * the situation described above. | |
| 762 | + */ | |
| 763 | +#define ABS_RESERVED 0x2e | |
| 764 | + | |
| 747 | 765 | #define ABS_MT_SLOT 0x2f /* MT slot being modified */ |
| 748 | 766 | #define ABS_MT_TOUCH_MAJOR 0x30 /* Major axis of touching ellipse */ |
| 749 | 767 | #define ABS_MT_TOUCH_MINOR 0x31 /* Minor axis (omit if circular) */ |
| @@ -61,11 +61,21 @@ · 60 unmodified lines | ||
| 61 | 61 | #define KEYCTL_INVALIDATE 21 /* invalidate a key */ |
| 62 | 62 | #define KEYCTL_GET_PERSISTENT 22 /* get a user's persistent keyring */ |
| 63 | 63 | #define KEYCTL_DH_COMPUTE 23 /* Compute Diffie-Hellman values */ |
| 64 | +#define KEYCTL_PKEY_QUERY 24 /* Query public key parameters */ | |
| 65 | +#define KEYCTL_PKEY_ENCRYPT 25 /* Encrypt a blob using a public key */ | |
| 66 | +#define KEYCTL_PKEY_DECRYPT 26 /* Decrypt a blob using a public key */ | |
| 67 | +#define KEYCTL_PKEY_SIGN 27 /* Create a public key signature */ | |
| 68 | +#define KEYCTL_PKEY_VERIFY 28 /* Verify a public key signature */ | |
| 64 | 69 | #define KEYCTL_RESTRICT_KEYRING 29 /* Restrict keys allowed to link to a keyring */ |
| 65 | 70 | |
| 66 | 71 | /* keyctl structures */ |
| 67 | 72 | struct keyctl_dh_params { |
| 68 | − __s32 private; | |
| 73 | + union { | |
| 74 | +#ifndef __cplusplus | |
| 75 | + __s32 private; | |
| 76 | +#endif | |
| 77 | + __s32 priv; | |
| 78 | + }; | |
| 69 | 79 | __s32 prime; |
| 70 | 80 | __s32 base; |
| 71 | 81 | }; |
| @@ -77,4 +87,29 @@ struct keyctl_kdf_params { · 5 unmodified lines | ||
| 77 | 87 | __u32 __spare[8]; |
| 78 | 88 | }; |
| 79 | 89 | |
| 90 | +#define KEYCTL_SUPPORTS_ENCRYPT 0x01 | |
| 91 | +#define KEYCTL_SUPPORTS_DECRYPT 0x02 | |
| 92 | +#define KEYCTL_SUPPORTS_SIGN 0x04 | |
| 93 | +#define KEYCTL_SUPPORTS_VERIFY 0x08 | |
| 94 | + | |
| 95 | +struct keyctl_pkey_query { | |
| 96 | + __u32 supported_ops; /* Which ops are supported */ | |
| 97 | + __u32 key_size; /* Size of the key in bits */ | |
| 98 | + __u16 max_data_size; /* Maximum size of raw data to sign in bytes */ | |
| 99 | + __u16 max_sig_size; /* Maximum size of signature in bytes */ | |
| 100 | + __u16 max_enc_size; /* Maximum size of encrypted blob in bytes */ | |
| 101 | + __u16 max_dec_size; /* Maximum size of decrypted blob in bytes */ | |
| 102 | + __u32 __spare[10]; | |
| 103 | +}; | |
| 104 | + | |
| 105 | +struct keyctl_pkey_params { | |
| 106 | + __s32 key_id; /* Serial no. of public key to use */ | |
| 107 | + __u32 in_len; /* Input data size */ | |
| 108 | + union { | |
| 109 | + __u32 out_len; /* Output buffer size (encrypt/decrypt/sign) */ | |
| 110 | + __u32 in2_len; /* 2nd input data size (verify) */ | |
| 111 | + }; | |
| 112 | + __u32 __spare[7]; | |
| 113 | +}; | |
| 114 | + | |
| 80 | 115 | #endif /* _LINUX_KEYCTL_H */ |
| @@ -83,11 +83,11 @@ struct kfd_ioctl_set_cu_mask_args { · 82 unmodified lines | ||
| 83 | 83 | }; |
| 84 | 84 | |
| 85 | 85 | struct kfd_ioctl_get_queue_wave_state_args { |
| 86 | − uint64_t ctl_stack_address; /* to KFD */ | |
| 87 | − uint32_t ctl_stack_used_size; /* from KFD */ | |
| 88 | − uint32_t save_area_used_size; /* from KFD */ | |
| 89 | − uint32_t queue_id; /* to KFD */ | |
| 90 | − uint32_t pad; | |
| 86 | + __u64 ctl_stack_address; /* to KFD */ | |
| 87 | + __u32 ctl_stack_used_size; /* from KFD */ | |
| 88 | + __u32 save_area_used_size; /* from KFD */ | |
| 89 | + __u32 queue_id; /* to KFD */ | |
| 90 | + __u32 pad; | |
| 91 | 91 | }; |
| 92 | 92 | |
| 93 | 93 | /* For kfd_ioctl_set_memory_policy_args.default_policy and alternate_policy */ |
| @@ -255,10 +255,10 @@ struct kfd_hsa_memory_exception_data { · 161 unmodified lines | ||
| 255 | 255 | |
| 256 | 256 | /* hw exception data */ |
| 257 | 257 | struct kfd_hsa_hw_exception_data { |
| 258 | − uint32_t reset_type; | |
| 259 | − uint32_t reset_cause; | |
| 260 | − uint32_t memory_lost; | |
| 261 | − uint32_t gpu_id; | |
| 258 | + __u32 reset_type; | |
| 259 | + __u32 reset_cause; | |
| 260 | + __u32 memory_lost; | |
| 261 | + __u32 gpu_id; | |
| 262 | 262 | }; |
| 263 | 263 | |
| 264 | 264 | /* Event data */ |
| @@ -420,13 +420,19 @@ struct kvm_run { · 419 unmodified lines | ||
| 420 | 420 | struct kvm_coalesced_mmio_zone { |
| 421 | 421 | __u64 addr; |
| 422 | 422 | __u32 size; |
| 423 | − __u32 pad; | |
| 423 | + union { | |
| 424 | + __u32 pad; | |
| 425 | + __u32 pio; | |
| 426 | + }; | |
| 424 | 427 | }; |
| 425 | 428 | |
| 426 | 429 | struct kvm_coalesced_mmio { |
| 427 | 430 | __u64 phys_addr; |
| 428 | 431 | __u32 len; |
| 429 | − __u32 pad; | |
| 432 | + union { | |
| 433 | + __u32 pad; | |
| 434 | + __u32 pio; | |
| 435 | + }; | |
| 430 | 436 | __u8 data[8]; |
| 431 | 437 | }; |
| 432 | 438 | |
| @@ -719,6 +725,7 @@ struct kvm_ppc_one_seg_page_size { · 286 unmodified lines | ||
| 719 | 725 | |
| 720 | 726 | #define KVM_PPC_PAGE_SIZES_REAL 0x00000001 |
| 721 | 727 | #define KVM_PPC_1T_SEGMENTS 0x00000002 |
| 728 | +#define KVM_PPC_NO_HASH 0x00000004 | |
| 722 | 729 | |
| 723 | 730 | struct kvm_ppc_smmu_info { |
| 724 | 731 | __u64 flags; |
| @@ -750,6 +757,15 @@ struct kvm_ppc_resize_hpt { · 25 unmodified lines | ||
| 750 | 757 | |
| 751 | 758 | #define KVM_S390_SIE_PAGE_OFFSET 1 |
| 752 | 759 | |
| 760 | +/* | |
| 761 | + * On arm64, machine type can be used to request the physical | |
| 762 | + * address size for the VM. Bits[7-0] are reserved for the guest | |
| 763 | + * PA size shift (i.e, log2(PA_Size)). For backward compatibility, | |
| 764 | + * value 0 implies the default IPA size, 40bits. | |
| 765 | + */ | |
| 766 | +#define KVM_VM_TYPE_ARM_IPA_SIZE_MASK 0xffULL | |
| 767 | +#define KVM_VM_TYPE_ARM_IPA_SIZE(x) \ | |
| 768 | + ((x) & KVM_VM_TYPE_ARM_IPA_SIZE_MASK) | |
| 753 | 769 | /* |
| 754 | 770 | * ioctls for /dev/kvm fds: |
| 755 | 771 | */ |
| @@ -953,6 +969,12 @@ struct kvm_ppc_resize_hpt { · 197 unmodified lines | ||
| 953 | 969 | #define KVM_CAP_NESTED_STATE 157 |
| 954 | 970 | #define KVM_CAP_ARM_INJECT_SERROR_ESR 158 |
| 955 | 971 | #define KVM_CAP_MSR_PLATFORM_INFO 159 |
| 972 | +#define KVM_CAP_PPC_NESTED_HV 160 | |
| 973 | +#define KVM_CAP_HYPERV_SEND_IPI 161 | |
| 974 | +#define KVM_CAP_COALESCED_PIO 162 | |
| 975 | +#define KVM_CAP_HYPERV_ENLIGHTENED_VMCS 163 | |
| 976 | +#define KVM_CAP_EXCEPTION_PAYLOAD 164 | |
| 977 | +#define KVM_CAP_ARM_VM_IPA_SIZE 165 | |
| 956 | 978 | |
| 957 | 979 | #ifdef KVM_CAP_IRQ_ROUTING |
| 958 | 980 | |
| @@ -29,6 +29,7 @@ · 28 unmodified lines | ||
| 29 | 29 | #define HPFS_SUPER_MAGIC 0xf995e849 |
| 30 | 30 | #define ISOFS_SUPER_MAGIC 0x9660 |
| 31 | 31 | #define JFFS2_SUPER_MAGIC 0x72b6 |
| 32 | +#define XFS_SUPER_MAGIC 0x58465342 /* "XFSB" */ | |
| 32 | 33 | #define PSTOREFS_MAGIC 0x6165676C |
| 33 | 34 | #define EFIVARFS_MAGIC 0xde5e81e4 |
| 34 | 35 | #define HOSTFS_SUPER_MAGIC 0x00c0ffee |
| @@ -369,6 +369,14 @@ struct media_v2_topology { · 368 unmodified lines | ||
| 369 | 369 | #define MEDIA_IOC_ENUM_LINKS _IOWR('|', 0x02, struct media_links_enum) |
| 370 | 370 | #define MEDIA_IOC_SETUP_LINK _IOWR('|', 0x03, struct media_link_desc) |
| 371 | 371 | #define MEDIA_IOC_G_TOPOLOGY _IOWR('|', 0x04, struct media_v2_topology) |
| 372 | +#define MEDIA_IOC_REQUEST_ALLOC _IOR ('|', 0x05, int) | |
| 373 | + | |
| 374 | +/* | |
| 375 | + * These ioctls are called on the request file descriptor as returned | |
| 376 | + * by MEDIA_IOC_REQUEST_ALLOC. | |
| 377 | + */ | |
| 378 | +#define MEDIA_REQUEST_IOC_QUEUE _IO('|', 0x80) | |
| 379 | +#define MEDIA_REQUEST_IOC_REINIT _IO('|', 0x81) | |
| 372 | 380 | |
| 373 | 381 | #ifndef __KERNEL__ |
| 374 | 382 | |
| @@ -25,7 +25,9 @@ · 24 unmodified lines | ||
| 25 | 25 | #define MFD_HUGE_2MB HUGETLB_FLAG_ENCODE_2MB |
| 26 | 26 | #define MFD_HUGE_8MB HUGETLB_FLAG_ENCODE_8MB |
| 27 | 27 | #define MFD_HUGE_16MB HUGETLB_FLAG_ENCODE_16MB |
| 28 | +#define MFD_HUGE_32MB HUGETLB_FLAG_ENCODE_32MB | |
| 28 | 29 | #define MFD_HUGE_256MB HUGETLB_FLAG_ENCODE_256MB |
| 30 | +#define MFD_HUGE_512MB HUGETLB_FLAG_ENCODE_512MB | |
| 29 | 31 | #define MFD_HUGE_1GB HUGETLB_FLAG_ENCODE_1GB |
| 30 | 32 | #define MFD_HUGE_2GB HUGETLB_FLAG_ENCODE_2GB |
| 31 | 33 | #define MFD_HUGE_16GB HUGETLB_FLAG_ENCODE_16GB |
| @@ -28,7 +28,9 @@ · 27 unmodified lines | ||
| 28 | 28 | #define MAP_HUGE_2MB HUGETLB_FLAG_ENCODE_2MB |
| 29 | 29 | #define MAP_HUGE_8MB HUGETLB_FLAG_ENCODE_8MB |
| 30 | 30 | #define MAP_HUGE_16MB HUGETLB_FLAG_ENCODE_16MB |
| 31 | +#define MAP_HUGE_32MB HUGETLB_FLAG_ENCODE_32MB | |
| 31 | 32 | #define MAP_HUGE_256MB HUGETLB_FLAG_ENCODE_256MB |
| 33 | +#define MAP_HUGE_512MB HUGETLB_FLAG_ENCODE_512MB | |
| 32 | 34 | #define MAP_HUGE_1GB HUGETLB_FLAG_ENCODE_1GB |
| 33 | 35 | #define MAP_HUGE_2GB HUGETLB_FLAG_ENCODE_2GB |
| 34 | 36 | #define MAP_HUGE_16GB HUGETLB_FLAG_ENCODE_16GB |
| @@ -23,6 +23,9 @@ · 22 unmodified lines | ||
| 23 | 23 | * optionally the preferred NCSI_ATTR_CHANNEL_ID. |
| 24 | 24 | * @NCSI_CMD_CLEAR_INTERFACE: clear any preferred package/channel combination. |
| 25 | 25 | * Requires NCSI_ATTR_IFINDEX. |
| 26 | + * @NCSI_CMD_SEND_CMD: send NC-SI command to network card. | |
| 27 | + * Requires NCSI_ATTR_IFINDEX, NCSI_ATTR_PACKAGE_ID | |
| 28 | + * and NCSI_ATTR_CHANNEL_ID. | |
| 26 | 29 | * @NCSI_CMD_MAX: highest command number |
| 27 | 30 | */ |
| 28 | 31 | enum ncsi_nl_commands { |
| @@ -30,6 +33,7 @@ enum ncsi_nl_commands { · 1 unmodified line | ||
| 30 | 33 | NCSI_CMD_PKG_INFO, |
| 31 | 34 | NCSI_CMD_SET_INTERFACE, |
| 32 | 35 | NCSI_CMD_CLEAR_INTERFACE, |
| 36 | + NCSI_CMD_SEND_CMD, | |
| 33 | 37 | |
| 34 | 38 | __NCSI_CMD_AFTER_LAST, |
| 35 | 39 | NCSI_CMD_MAX = __NCSI_CMD_AFTER_LAST - 1 |
| @@ -43,6 +47,7 @@ enum ncsi_nl_commands { · 7 unmodified lines | ||
| 43 | 47 | * @NCSI_ATTR_PACKAGE_LIST: nested array of NCSI_PKG_ATTR attributes |
| 44 | 48 | * @NCSI_ATTR_PACKAGE_ID: package ID |
| 45 | 49 | * @NCSI_ATTR_CHANNEL_ID: channel ID |
| 50 | + * @NCSI_ATTR_DATA: command payload | |
| 46 | 51 | * @NCSI_ATTR_MAX: highest attribute number |
| 47 | 52 | */ |
| 48 | 53 | enum ncsi_nl_attrs { |
| @@ -51,6 +56,7 @@ enum ncsi_nl_attrs { · 2 unmodified lines | ||
| 51 | 56 | NCSI_ATTR_PACKAGE_LIST, |
| 52 | 57 | NCSI_ATTR_PACKAGE_ID, |
| 53 | 58 | NCSI_ATTR_CHANNEL_ID, |
| 59 | + NCSI_ATTR_DATA, | |
| 54 | 60 | |
| 55 | 61 | __NCSI_ATTR_AFTER_LAST, |
| 56 | 62 | NCSI_ATTR_MAX = __NCSI_ATTR_AFTER_LAST - 1 |
| @@ -128,37 +128,31 @@ enum { · 127 unmodified lines | ||
| 128 | 128 | |
| 129 | 129 | static inline const char *nvdimm_bus_cmd_name(unsigned cmd) |
| 130 | 130 | { |
| 131 | − static const char * const names[] = { | |
| 132 | − [ND_CMD_ARS_CAP] = "ars_cap", | |
| 133 | − [ND_CMD_ARS_START] = "ars_start", | |
| 134 | − [ND_CMD_ARS_STATUS] = "ars_status", | |
| 135 | − [ND_CMD_CLEAR_ERROR] = "clear_error", | |
| 136 | − [ND_CMD_CALL] = "cmd_call", | |
| 137 | − }; | |
| 138 | − | |
| 139 | − if (cmd < ARRAY_SIZE(names) && names[cmd]) | |
| 140 | − return names[cmd]; | |
| 141 | − return "unknown"; | |
| 131 | + switch (cmd) { | |
| 132 | + case ND_CMD_ARS_CAP: return "ars_cap"; | |
| 133 | + case ND_CMD_ARS_START: return "ars_start"; | |
| 134 | + case ND_CMD_ARS_STATUS: return "ars_status"; | |
| 135 | + case ND_CMD_CLEAR_ERROR: return "clear_error"; | |
| 136 | + case ND_CMD_CALL: return "cmd_call"; | |
| 137 | + default: return "unknown"; | |
| 138 | + } | |
| 142 | 139 | } |
| 143 | 140 | |
| 144 | 141 | static inline const char *nvdimm_cmd_name(unsigned cmd) |
| 145 | 142 | { |
| 146 | − static const char * const names[] = { | |
| 147 | − [ND_CMD_SMART] = "smart", | |
| 148 | − [ND_CMD_SMART_THRESHOLD] = "smart_thresh", | |
| 149 | − [ND_CMD_DIMM_FLAGS] = "flags", | |
| 150 | − [ND_CMD_GET_CONFIG_SIZE] = "get_size", | |
| 151 | − [ND_CMD_GET_CONFIG_DATA] = "get_data", | |
| 152 | − [ND_CMD_SET_CONFIG_DATA] = "set_data", | |
| 153 | − [ND_CMD_VENDOR_EFFECT_LOG_SIZE] = "effect_size", | |
| 154 | − [ND_CMD_VENDOR_EFFECT_LOG] = "effect_log", | |
| 155 | − [ND_CMD_VENDOR] = "vendor", | |
| 156 | − [ND_CMD_CALL] = "cmd_call", | |
| 157 | − }; | |
| 158 | − | |
| 159 | − if (cmd < ARRAY_SIZE(names) && names[cmd]) | |
| 160 | − return names[cmd]; | |
| 161 | − return "unknown"; | |
| 143 | + switch (cmd) { | |
| 144 | + case ND_CMD_SMART: return "smart"; | |
| 145 | + case ND_CMD_SMART_THRESHOLD: return "smart_thresh"; | |
| 146 | + case ND_CMD_DIMM_FLAGS: return "flags"; | |
| 147 | + case ND_CMD_GET_CONFIG_SIZE: return "get_size"; | |
| 148 | + case ND_CMD_GET_CONFIG_DATA: return "get_data"; | |
| 149 | + case ND_CMD_SET_CONFIG_DATA: return "set_data"; | |
| 150 | + case ND_CMD_VENDOR_EFFECT_LOG_SIZE: return "effect_size"; | |
| 151 | + case ND_CMD_VENDOR_EFFECT_LOG: return "effect_log"; | |
| 152 | + case ND_CMD_VENDOR: return "vendor"; | |
| 153 | + case ND_CMD_CALL: return "cmd_call"; | |
| 154 | + default: return "unknown"; | |
| 155 | + } | |
| 162 | 156 | } |
| 163 | 157 | |
| 164 | 158 | #define ND_IOCTL 'N' |
| @@ -208,10 +202,6 @@ enum nd_driver_flags { · 43 unmodified lines | ||
| 208 | 202 | ND_DRIVER_DAX_PMEM = 1 << ND_DEVICE_DAX_PMEM, |
| 209 | 203 | }; |
| 210 | 204 | |
| 211 | −enum { | |
| 212 | − ND_MIN_NAMESPACE_SIZE = PAGE_SIZE, | |
| 213 | −}; | |
| 214 | − | |
| 215 | 205 | enum ars_masks { |
| 216 | 206 | ARS_STATUS_MASK = 0x0000FFFF, |
| 217 | 207 | ARS_EXT_STATUS_SHIFT = 16, |
| @@ -43,6 +43,7 @@ enum { · 42 unmodified lines | ||
| 43 | 43 | #define NTF_PROXY 0x08 /* == ATF_PUBL */ |
| 44 | 44 | #define NTF_EXT_LEARNED 0x10 |
| 45 | 45 | #define NTF_OFFLOADED 0x20 |
| 46 | +#define NTF_STICKY 0x40 | |
| 46 | 47 | #define NTF_ROUTER 0x80 |
| 47 | 48 | |
| 48 | 49 | /* |
| @@ -826,12 +826,14 @@ enum nft_meta_keys { · 825 unmodified lines | ||
| 826 | 826 | * @NFT_RT_NEXTHOP4: routing nexthop for IPv4 |
| 827 | 827 | * @NFT_RT_NEXTHOP6: routing nexthop for IPv6 |
| 828 | 828 | * @NFT_RT_TCPMSS: fetch current path tcp mss |
| 829 | + * @NFT_RT_XFRM: boolean, skb->dst->xfrm != NULL | |
| 829 | 830 | */ |
| 830 | 831 | enum nft_rt_keys { |
| 831 | 832 | NFT_RT_CLASSID, |
| 832 | 833 | NFT_RT_NEXTHOP4, |
| 833 | 834 | NFT_RT_NEXTHOP6, |
| 834 | 835 | NFT_RT_TCPMSS, |
| 836 | + NFT_RT_XFRM, | |
| 835 | 837 | __NFT_RT_MAX |
| 836 | 838 | }; |
| 837 | 839 | #define NFT_RT_MAX (__NFT_RT_MAX - 1) |
| @@ -1174,6 +1176,21 @@ enum nft_quota_attributes { · 336 unmodified lines | ||
| 1174 | 1176 | }; |
| 1175 | 1177 | #define NFTA_QUOTA_MAX (__NFTA_QUOTA_MAX - 1) |
| 1176 | 1178 | |
| 1179 | +/** | |
| 1180 | + * enum nft_secmark_attributes - nf_tables secmark object netlink attributes | |
| 1181 | + * | |
| 1182 | + * @NFTA_SECMARK_CTX: security context (NLA_STRING) | |
| 1183 | + */ | |
| 1184 | +enum nft_secmark_attributes { | |
| 1185 | + NFTA_SECMARK_UNSPEC, | |
| 1186 | + NFTA_SECMARK_CTX, | |
| 1187 | + __NFTA_SECMARK_MAX, | |
| 1188 | +}; | |
| 1189 | +#define NFTA_SECMARK_MAX (__NFTA_SECMARK_MAX - 1) | |
| 1190 | + | |
| 1191 | +/* Max security context length */ | |
| 1192 | +#define NFT_SECMARK_CTX_MAXLEN 256 | |
| 1193 | + | |
| 1177 | 1194 | /** |
| 1178 | 1195 | * enum nft_reject_types - nf_tables reject expression reject types |
| 1179 | 1196 | * |
| @@ -1430,7 +1447,8 @@ enum nft_ct_timeout_timeout_attributes { · 250 unmodified lines | ||
| 1430 | 1447 | #define NFT_OBJECT_CONNLIMIT 5 |
| 1431 | 1448 | #define NFT_OBJECT_TUNNEL 6 |
| 1432 | 1449 | #define NFT_OBJECT_CT_TIMEOUT 7 |
| 1433 | −#define __NFT_OBJECT_MAX 8 | |
| 1450 | +#define NFT_OBJECT_SECMARK 8 | |
| 1451 | +#define __NFT_OBJECT_MAX 9 | |
| 1434 | 1452 | #define NFT_OBJECT_MAX (__NFT_OBJECT_MAX - 1) |
| 1435 | 1453 | |
| 1436 | 1454 | /** |
| @@ -1493,9 +1511,16 @@ enum nft_flowtable_hook_attributes { · 56 unmodified lines | ||
| 1493 | 1511 | }; |
| 1494 | 1512 | #define NFTA_FLOWTABLE_HOOK_MAX (__NFTA_FLOWTABLE_HOOK_MAX - 1) |
| 1495 | 1513 | |
| 1514 | +/** | |
| 1515 | + * enum nft_osf_attributes - nftables osf expression netlink attributes | |
| 1516 | + * | |
| 1517 | + * @NFTA_OSF_DREG: destination register (NLA_U32: nft_registers) | |
| 1518 | + * @NFTA_OSF_TTL: Value of the TTL osf option (NLA_U8) | |
| 1519 | + */ | |
| 1496 | 1520 | enum nft_osf_attributes { |
| 1497 | 1521 | NFTA_OSF_UNSPEC, |
| 1498 | 1522 | NFTA_OSF_DREG, |
| 1523 | + NFTA_OSF_TTL, | |
| 1499 | 1524 | __NFTA_OSF_MAX, |
| 1500 | 1525 | }; |
| 1501 | 1526 | #define NFTA_OSF_MAX (__NFTA_OSF_MAX - 1) |
| @@ -1512,6 +1537,35 @@ enum nft_devices_attributes { · 10 unmodified lines | ||
| 1512 | 1537 | }; |
| 1513 | 1538 | #define NFTA_DEVICE_MAX (__NFTA_DEVICE_MAX - 1) |
| 1514 | 1539 | |
| 1540 | +/* | |
| 1541 | + * enum nft_xfrm_attributes - nf_tables xfrm expr netlink attributes | |
| 1542 | + * | |
| 1543 | + * @NFTA_XFRM_DREG: destination register (NLA_U32) | |
| 1544 | + * @NFTA_XFRM_KEY: enum nft_xfrm_keys (NLA_U32) | |
| 1545 | + * @NFTA_XFRM_DIR: direction (NLA_U8) | |
| 1546 | + * @NFTA_XFRM_SPNUM: index in secpath array (NLA_U32) | |
| 1547 | + */ | |
| 1548 | +enum nft_xfrm_attributes { | |
| 1549 | + NFTA_XFRM_UNSPEC, | |
| 1550 | + NFTA_XFRM_DREG, | |
| 1551 | + NFTA_XFRM_KEY, | |
| 1552 | + NFTA_XFRM_DIR, | |
| 1553 | + NFTA_XFRM_SPNUM, | |
| 1554 | + __NFTA_XFRM_MAX | |
| 1555 | +}; | |
| 1556 | +#define NFTA_XFRM_MAX (__NFTA_XFRM_MAX - 1) | |
| 1557 | + | |
| 1558 | +enum nft_xfrm_keys { | |
| 1559 | + NFT_XFRM_KEY_UNSPEC, | |
| 1560 | + NFT_XFRM_KEY_DADDR_IP4, | |
| 1561 | + NFT_XFRM_KEY_DADDR_IP6, | |
| 1562 | + NFT_XFRM_KEY_SADDR_IP4, | |
| 1563 | + NFT_XFRM_KEY_SADDR_IP6, | |
| 1564 | + NFT_XFRM_KEY_REQID, | |
| 1565 | + NFT_XFRM_KEY_SPI, | |
| 1566 | + __NFT_XFRM_KEY_MAX, | |
| 1567 | +}; | |
| 1568 | +#define NFT_XFRM_KEY_MAX (__NFT_XFRM_KEY_MAX - 1) | |
| 1515 | 1569 | |
| 1516 | 1570 | /** |
| 1517 | 1571 | * enum nft_trace_attributes - nf_tables trace netlink attributes |
| @@ -1581,8 +1635,8 @@ enum nft_ng_attributes { · 63 unmodified lines | ||
| 1581 | 1635 | NFTA_NG_MODULUS, |
| 1582 | 1636 | NFTA_NG_TYPE, |
| 1583 | 1637 | NFTA_NG_OFFSET, |
| 1584 | − NFTA_NG_SET_NAME, | |
| 1585 | − NFTA_NG_SET_ID, | |
| 1638 | + NFTA_NG_SET_NAME, /* deprecated */ | |
| 1639 | + NFTA_NG_SET_ID, /* deprecated */ | |
| 1586 | 1640 | __NFTA_NG_MAX |
| 1587 | 1641 | }; |
| 1588 | 1642 | #define NFTA_NG_MAX (__NFTA_NG_MAX - 1) |
| @@ -22,4 +22,20 @@ struct xt_cgroup_info_v1 { · 21 unmodified lines | ||
| 22 | 22 | void *priv __attribute__((aligned(8))); |
| 23 | 23 | }; |
| 24 | 24 | |
| 25 | +#define XT_CGROUP_PATH_MAX 512 | |
| 26 | + | |
| 27 | +struct xt_cgroup_info_v2 { | |
| 28 | + __u8 has_path; | |
| 29 | + __u8 has_classid; | |
| 30 | + __u8 invert_path; | |
| 31 | + __u8 invert_classid; | |
| 32 | + union { | |
| 33 | + char path[XT_CGROUP_PATH_MAX]; | |
| 34 | + __u32 classid; | |
| 35 | + }; | |
| 36 | + | |
| 37 | + /* kernel internal data */ | |
| 38 | + void *priv __attribute__((aligned(8))); | |
| 39 | +}; | |
| 40 | + | |
| 25 | 41 | #endif /* _UAPI_XT_CGROUP_H */ |
| @@ -11,6 +11,10 @@ · 10 unmodified lines | ||
| 11 | 11 | #include <linux/if_vlan.h> |
| 12 | 12 | #include <linux/if_pppox.h> |
| 13 | 13 | |
| 14 | +#ifndef __KERNEL__ | |
| 15 | +#include <limits.h> /* for INT_MIN, INT_MAX */ | |
| 16 | +#endif | |
| 17 | + | |
| 14 | 18 | /* Bridge Hooks */ |
| 15 | 19 | /* After promisc drops, checksum checks. */ |
| 16 | 20 | #define NF_BR_PRE_ROUTING 0 |
| @@ -155,6 +155,7 @@ enum nlmsgerr_attrs { · 154 unmodified lines | ||
| 155 | 155 | #define NETLINK_LIST_MEMBERSHIPS 9 |
| 156 | 156 | #define NETLINK_CAP_ACK 10 |
| 157 | 157 | #define NETLINK_EXT_ACK 11 |
| 158 | +#define NETLINK_DUMP_STRICT_CHK 12 | |
| 158 | 159 | |
| 159 | 160 | struct nl_pktinfo { |
| 160 | 161 | __u32 group; |
| @@ -1033,6 +1033,9 @@ · 1032 unmodified lines | ||
| 1033 | 1033 | * %NL80211_ATTR_CHANNEL_WIDTH,%NL80211_ATTR_NSS attributes with its |
| 1034 | 1034 | * address(specified in %NL80211_ATTR_MAC). |
| 1035 | 1035 | * |
| 1036 | + * @NL80211_CMD_GET_FTM_RESPONDER_STATS: Retrieve FTM responder statistics, in | |
| 1037 | + * the %NL80211_ATTR_FTM_RESPONDER_STATS attribute. | |
| 1038 | + * | |
| 1036 | 1039 | * @NL80211_CMD_MAX: highest used command number |
| 1037 | 1040 | * @__NL80211_CMD_AFTER_LAST: internal use |
| 1038 | 1041 | */ |
| @@ -1245,6 +1248,8 @@ enum nl80211_commands { · 206 unmodified lines | ||
| 1245 | 1248 | |
| 1246 | 1249 | NL80211_CMD_CONTROL_PORT_FRAME, |
| 1247 | 1250 | |
| 1251 | + NL80211_CMD_GET_FTM_RESPONDER_STATS, | |
| 1252 | + | |
| 1248 | 1253 | /* add new commands above here */ |
| 1249 | 1254 | |
| 1250 | 1255 | /* used to define NL80211_CMD_MAX below */ |
| @@ -2241,6 +2246,14 @@ enum nl80211_commands { · 990 unmodified lines | ||
| 2241 | 2246 | * association request when used with NL80211_CMD_NEW_STATION). Can be set |
| 2242 | 2247 | * only if %NL80211_STA_FLAG_WME is set. |
| 2243 | 2248 | * |
| 2249 | + * @NL80211_ATTR_FTM_RESPONDER: nested attribute which user-space can include | |
| 2250 | + * in %NL80211_CMD_START_AP or %NL80211_CMD_SET_BEACON for fine timing | |
| 2251 | + * measurement (FTM) responder functionality and containing parameters as | |
| 2252 | + * possible, see &enum nl80211_ftm_responder_attr | |
| 2253 | + * | |
| 2254 | + * @NL80211_ATTR_FTM_RESPONDER_STATS: Nested attribute with FTM responder | |
| 2255 | + * statistics, see &enum nl80211_ftm_responder_stats. | |
| 2256 | + * | |
| 2244 | 2257 | * @NUM_NL80211_ATTR: total number of nl80211_attrs available |
| 2245 | 2258 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
| 2246 | 2259 | * @__NL80211_ATTR_AFTER_LAST: internal use |
| @@ -2682,6 +2695,10 @@ enum nl80211_attrs { · 435 unmodified lines | ||
| 2682 | 2695 | |
| 2683 | 2696 | NL80211_ATTR_HE_CAPABILITY, |
| 2684 | 2697 | |
| 2698 | + NL80211_ATTR_FTM_RESPONDER, | |
| 2699 | + | |
| 2700 | + NL80211_ATTR_FTM_RESPONDER_STATS, | |
| 2701 | + | |
| 2685 | 2702 | /* add attributes here, update the policy in nl80211.c */ |
| 2686 | 2703 | |
| 2687 | 2704 | __NL80211_ATTR_AFTER_LAST, |
| @@ -3050,8 +3067,13 @@ enum nl80211_sta_bss_param { · 362 unmodified lines | ||
| 3050 | 3067 | * received from the station (u64, usec) |
| 3051 | 3068 | * @NL80211_STA_INFO_PAD: attribute used for padding for 64-bit alignment |
| 3052 | 3069 | * @NL80211_STA_INFO_ACK_SIGNAL: signal strength of the last ACK frame(u8, dBm) |
| 3053 | − * @NL80211_STA_INFO_DATA_ACK_SIGNAL_AVG: avg signal strength of (data) | |
| 3054 | − * ACK frame (s8, dBm) | |
| 3070 | + * @NL80211_STA_INFO_ACK_SIGNAL_AVG: avg signal strength of ACK frames (s8, dBm) | |
| 3071 | + * @NL80211_STA_INFO_RX_MPDUS: total number of received packets (MPDUs) | |
| 3072 | + * (u32, from this station) | |
| 3073 | + * @NL80211_STA_INFO_FCS_ERROR_COUNT: total number of packets (MPDUs) received | |
| 3074 | + * with an FCS error (u32, from this station). This count may not include | |
| 3075 | + * some packets with an FCS error due to TA corruption. Hence this counter | |
| 3076 | + * might not be fully accurate. | |
| 3055 | 3077 | * @__NL80211_STA_INFO_AFTER_LAST: internal |
| 3056 | 3078 | * @NL80211_STA_INFO_MAX: highest possible station info attribute |
| 3057 | 3079 | */ |
| @@ -3091,13 +3113,19 @@ enum nl80211_sta_info { · 33 unmodified lines | ||
| 3091 | 3113 | NL80211_STA_INFO_RX_DURATION, |
| 3092 | 3114 | NL80211_STA_INFO_PAD, |
| 3093 | 3115 | NL80211_STA_INFO_ACK_SIGNAL, |
| 3094 | − NL80211_STA_INFO_DATA_ACK_SIGNAL_AVG, | |
| 3116 | + NL80211_STA_INFO_ACK_SIGNAL_AVG, | |
| 3117 | + NL80211_STA_INFO_RX_MPDUS, | |
| 3118 | + NL80211_STA_INFO_FCS_ERROR_COUNT, | |
| 3095 | 3119 | |
| 3096 | 3120 | /* keep last */ |
| 3097 | 3121 | __NL80211_STA_INFO_AFTER_LAST, |
| 3098 | 3122 | NL80211_STA_INFO_MAX = __NL80211_STA_INFO_AFTER_LAST - 1 |
| 3099 | 3123 | }; |
| 3100 | 3124 | |
| 3125 | +/* we renamed this - stay compatible */ | |
| 3126 | +#define NL80211_STA_INFO_DATA_ACK_SIGNAL_AVG NL80211_STA_INFO_ACK_SIGNAL_AVG | |
| 3127 | + | |
| 3128 | + | |
| 3101 | 3129 | /** |
| 3102 | 3130 | * enum nl80211_tid_stats - per TID statistics attributes |
| 3103 | 3131 | * @__NL80211_TID_STATS_INVALID: attribute number 0 is reserved |
| @@ -4338,7 +4366,7 @@ enum nl80211_txrate_gi { · 1234 unmodified lines | ||
| 4338 | 4366 | * enum nl80211_band - Frequency band |
| 4339 | 4367 | * @NL80211_BAND_2GHZ: 2.4 GHz ISM band |
| 4340 | 4368 | * @NL80211_BAND_5GHZ: around 5 GHz band (4.9 - 5.7 GHz) |
| 4341 | − * @NL80211_BAND_60GHZ: around 60 GHz band (58.32 - 64.80 GHz) | |
| 4369 | + * @NL80211_BAND_60GHZ: around 60 GHz band (58.32 - 69.12 GHz) | |
| 4342 | 4370 | * @NUM_NL80211_BANDS: number of bands, avoid using this in userspace |
| 4343 | 4371 | * since newer kernel versions may support more bands |
| 4344 | 4372 | */ |
| @@ -5213,9 +5241,8 @@ enum nl80211_feature_flags { · 868 unmodified lines | ||
| 5213 | 5241 | * "radar detected" event. |
| 5214 | 5242 | * @NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211: Driver supports sending and |
| 5215 | 5243 | * receiving control port frames over nl80211 instead of the netdevice. |
| 5216 | − * @NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT: This Driver support data ack | |
| 5217 | − * rssi if firmware support, this flag is to intimate about ack rssi | |
| 5218 | − * support to nl80211. | |
| 5244 | + * @NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT: This driver/device supports | |
| 5245 | + * (average) ACK signal strength reporting. | |
| 5219 | 5246 | * @NL80211_EXT_FEATURE_TXQS: Driver supports FQ-CoDel-enabled intermediate |
| 5220 | 5247 | * TXQs. |
| 5221 | 5248 | * @NL80211_EXT_FEATURE_SCAN_RANDOM_SN: Driver/device supports randomizing the |
| @@ -5223,6 +5250,13 @@ enum nl80211_feature_flags { · 1 unmodified line | ||
| 5223 | 5250 | * @NL80211_EXT_FEATURE_SCAN_MIN_PREQ_CONTENT: Driver/device can omit all data |
| 5224 | 5251 | * except for supported rates from the probe request content if requested |
| 5225 | 5252 | * by the %NL80211_SCAN_FLAG_MIN_PREQ_CONTENT flag. |
| 5253 | + * @NL80211_EXT_FEATURE_ENABLE_FTM_RESPONDER: Driver supports enabling fine | |
| 5254 | + * timing measurement responder role. | |
| 5255 | + * | |
| 5256 | + * @NL80211_EXT_FEATURE_CAN_REPLACE_PTK0: Driver/device confirm that they are | |
| 5257 | + * able to rekey an in-use key correctly. Userspace must not rekey PTK keys | |
| 5258 | + * if this flag is not set. Ignoring this can leak clear text packets and/or | |
| 5259 | + * freeze the connection. | |
| 5226 | 5260 | * |
| 5227 | 5261 | * @NUM_NL80211_EXT_FEATURES: number of extended features. |
| 5228 | 5262 | * @MAX_NL80211_EXT_FEATURES: highest extended feature index. |
| @@ -5255,10 +5289,14 @@ enum nl80211_ext_feature_index { · 26 unmodified lines | ||
| 5255 | 5289 | NL80211_EXT_FEATURE_HIGH_ACCURACY_SCAN, |
| 5256 | 5290 | NL80211_EXT_FEATURE_DFS_OFFLOAD, |
| 5257 | 5291 | NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211, |
| 5258 | − NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT, | |
| 5292 | + NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT, | |
| 5293 | + /* we renamed this - stay compatible */ | |
| 5294 | + NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT = NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT, | |
| 5259 | 5295 | NL80211_EXT_FEATURE_TXQS, |
| 5260 | 5296 | NL80211_EXT_FEATURE_SCAN_RANDOM_SN, |
| 5261 | 5297 | NL80211_EXT_FEATURE_SCAN_MIN_PREQ_CONTENT, |
| 5298 | + NL80211_EXT_FEATURE_CAN_REPLACE_PTK0, | |
| 5299 | + NL80211_EXT_FEATURE_ENABLE_FTM_RESPONDER, | |
| 5262 | 5300 | |
| 5263 | 5301 | /* add new features before the definition below */ |
| 5264 | 5302 | NUM_NL80211_EXT_FEATURES, |
| @@ -5798,4 +5836,74 @@ enum nl80211_external_auth_action { · 533 unmodified lines | ||
| 5798 | 5836 | NL80211_EXTERNAL_AUTH_ABORT, |
| 5799 | 5837 | }; |
| 5800 | 5838 | |
| 5839 | +/** | |
| 5840 | + * enum nl80211_ftm_responder_attributes - fine timing measurement | |
| 5841 | + * responder attributes | |
| 5842 | + * @__NL80211_FTM_RESP_ATTR_INVALID: Invalid | |
| 5843 | + * @NL80211_FTM_RESP_ATTR_ENABLED: FTM responder is enabled | |
| 5844 | + * @NL80211_FTM_RESP_ATTR_LCI: The content of Measurement Report Element | |
| 5845 | + * (9.4.2.22 in 802.11-2016) with type 8 - LCI (9.4.2.22.10) | |
| 5846 | + * @NL80211_FTM_RESP_ATTR_CIVIC: The content of Measurement Report Element | |
| 5847 | + * (9.4.2.22 in 802.11-2016) with type 11 - Civic (Section 9.4.2.22.13) | |
| 5848 | + * @__NL80211_FTM_RESP_ATTR_LAST: Internal | |
| 5849 | + * @NL80211_FTM_RESP_ATTR_MAX: highest FTM responder attribute. | |
| 5850 | + */ | |
| 5851 | +enum nl80211_ftm_responder_attributes { | |
| 5852 | + __NL80211_FTM_RESP_ATTR_INVALID, | |
| 5853 | + | |
| 5854 | + NL80211_FTM_RESP_ATTR_ENABLED, | |
| 5855 | + NL80211_FTM_RESP_ATTR_LCI, | |
| 5856 | + NL80211_FTM_RESP_ATTR_CIVICLOC, | |
| 5857 | + | |
| 5858 | + /* keep last */ | |
| 5859 | + __NL80211_FTM_RESP_ATTR_LAST, | |
| 5860 | + NL80211_FTM_RESP_ATTR_MAX = __NL80211_FTM_RESP_ATTR_LAST - 1, | |
| 5861 | +}; | |
| 5862 | + | |
| 5863 | +/* | |
| 5864 | + * enum nl80211_ftm_responder_stats - FTM responder statistics | |
| 5865 | + * | |
| 5866 | + * These attribute types are used with %NL80211_ATTR_FTM_RESPONDER_STATS | |
| 5867 | + * when getting FTM responder statistics. | |
| 5868 | + * | |
| 5869 | + * @__NL80211_FTM_STATS_INVALID: attribute number 0 is reserved | |
| 5870 | + * @NL80211_FTM_STATS_SUCCESS_NUM: number of FTM sessions in which all frames | |
| 5871 | + * were ssfully answered (u32) | |
| 5872 | + * @NL80211_FTM_STATS_PARTIAL_NUM: number of FTM sessions in which part of the | |
| 5873 | + * frames were successfully answered (u32) | |
| 5874 | + * @NL80211_FTM_STATS_FAILED_NUM: number of failed FTM sessions (u32) | |
| 5875 | + * @NL80211_FTM_STATS_ASAP_NUM: number of ASAP sessions (u32) | |
| 5876 | + * @NL80211_FTM_STATS_NON_ASAP_NUM: number of non-ASAP sessions (u32) | |
| 5877 | + * @NL80211_FTM_STATS_TOTAL_DURATION_MSEC: total sessions durations - gives an | |
| 5878 | + * indication of how much time the responder was busy (u64, msec) | |
| 5879 | + * @NL80211_FTM_STATS_UNKNOWN_TRIGGERS_NUM: number of unknown FTM triggers - | |
| 5880 | + * triggers from initiators that didn't finish successfully the negotiation | |
| 5881 | + * phase with the responder (u32) | |
| 5882 | + * @NL80211_FTM_STATS_RESCHEDULE_REQUESTS_NUM: number of FTM reschedule requests | |
| 5883 | + * - initiator asks for a new scheduling although it already has scheduled | |
| 5884 | + * FTM slot (u32) | |
| 5885 | + * @NL80211_FTM_STATS_OUT_OF_WINDOW_TRIGGERS_NUM: number of FTM triggers out of | |
| 5886 | + * scheduled window (u32) | |
| 5887 | + * @NL80211_FTM_STATS_PAD: used for padding, ignore | |
| 5888 | + * @__NL80211_TXQ_ATTR_AFTER_LAST: Internal | |
| 5889 | + * @NL80211_FTM_STATS_MAX: highest possible FTM responder stats attribute | |
| 5890 | + */ | |
| 5891 | +enum nl80211_ftm_responder_stats { | |
| 5892 | + __NL80211_FTM_STATS_INVALID, | |
| 5893 | + NL80211_FTM_STATS_SUCCESS_NUM, | |
| 5894 | + NL80211_FTM_STATS_PARTIAL_NUM, | |
| 5895 | + NL80211_FTM_STATS_FAILED_NUM, | |
| 5896 | + NL80211_FTM_STATS_ASAP_NUM, | |
| 5897 | + NL80211_FTM_STATS_NON_ASAP_NUM, | |
| 5898 | + NL80211_FTM_STATS_TOTAL_DURATION_MSEC, | |
| 5899 | + NL80211_FTM_STATS_UNKNOWN_TRIGGERS_NUM, | |
| 5900 | + NL80211_FTM_STATS_RESCHEDULE_REQUESTS_NUM, | |
| 5901 | + NL80211_FTM_STATS_OUT_OF_WINDOW_TRIGGERS_NUM, | |
| 5902 | + NL80211_FTM_STATS_PAD, | |
| 5903 | + | |
| 5904 | + /* keep last */ | |
| 5905 | + __NL80211_FTM_STATS_AFTER_LAST, | |
| 5906 | + NL80211_FTM_STATS_MAX = __NL80211_FTM_STATS_AFTER_LAST - 1 | |
| 5907 | +}; | |
| 5908 | + | |
| 5801 | 5909 | #endif /* __LINUX_NL80211_H */ |
| @@ -52,6 +52,7 @@ · 51 unmodified lines | ||
| 52 | 52 | #define PCI_COMMAND_INTX_DISABLE 0x400 /* INTx Emulation Disable */ |
| 53 | 53 | |
| 54 | 54 | #define PCI_STATUS 0x06 /* 16 bits */ |
| 55 | +#define PCI_STATUS_IMM_READY 0x01 /* Immediate Readiness */ | |
| 55 | 56 | #define PCI_STATUS_INTERRUPT 0x08 /* Interrupt status */ |
| 56 | 57 | #define PCI_STATUS_CAP_LIST 0x10 /* Support Capability List */ |
| 57 | 58 | #define PCI_STATUS_66MHZ 0x20 /* Support 66 MHz PCI 2.1 bus */ |
| @@ -646,10 +646,12 @@ struct perf_event_mmap_page { · 645 unmodified lines | ||
| 646 | 646 | * |
| 647 | 647 | * PERF_RECORD_MISC_MMAP_DATA - PERF_RECORD_MMAP* events |
| 648 | 648 | * PERF_RECORD_MISC_COMM_EXEC - PERF_RECORD_COMM event |
| 649 | + * PERF_RECORD_MISC_FORK_EXEC - PERF_RECORD_FORK event (perf internal) | |
| 649 | 650 | * PERF_RECORD_MISC_SWITCH_OUT - PERF_RECORD_SWITCH* events |
| 650 | 651 | */ |
| 651 | 652 | #define PERF_RECORD_MISC_MMAP_DATA (1 << 13) |
| 652 | 653 | #define PERF_RECORD_MISC_COMM_EXEC (1 << 13) |
| 654 | +#define PERF_RECORD_MISC_FORK_EXEC (1 << 13) | |
| 653 | 655 | #define PERF_RECORD_MISC_SWITCH_OUT (1 << 13) |
| 654 | 656 | /* |
| 655 | 657 | * These PERF_RECORD_MISC_* flags below are safely reused |
| @@ -483,6 +483,8 @@ enum { · 482 unmodified lines | ||
| 483 | 483 | TCA_FLOWER_KEY_ENC_OPTS, |
| 484 | 484 | TCA_FLOWER_KEY_ENC_OPTS_MASK, |
| 485 | 485 | |
| 486 | + TCA_FLOWER_IN_HW_COUNT, | |
| 487 | + | |
| 486 | 488 | __TCA_FLOWER_MAX, |
| 487 | 489 | }; |
| 488 | 490 | |
| @@ -395,9 +395,9 @@ enum { · 394 unmodified lines | ||
| 395 | 395 | struct tc_htb_xstats { |
| 396 | 396 | __u32 lends; |
| 397 | 397 | __u32 borrows; |
| 398 | − __u32 giants; /* too big packets (rate will not be accurate) */ | |
| 399 | − __u32 tokens; | |
| 400 | − __u32 ctokens; | |
| 398 | + __u32 giants; /* unused since 'Make HTB scheduler work with TSO.' */ | |
| 399 | + __s32 tokens; | |
| 400 | + __s32 ctokens; | |
| 401 | 401 | }; |
| 402 | 402 | |
| 403 | 403 | /* HFSC section */ |
| @@ -1084,4 +1084,50 @@ enum { · 680 unmodified lines | ||
| 1084 | 1084 | CAKE_ATM_MAX |
| 1085 | 1085 | }; |
| 1086 | 1086 | |
| 1087 | + | |
| 1088 | +/* TAPRIO */ | |
| 1089 | +enum { | |
| 1090 | + TC_TAPRIO_CMD_SET_GATES = 0x00, | |
| 1091 | + TC_TAPRIO_CMD_SET_AND_HOLD = 0x01, | |
| 1092 | + TC_TAPRIO_CMD_SET_AND_RELEASE = 0x02, | |
| 1093 | +}; | |
| 1094 | + | |
| 1095 | +enum { | |
| 1096 | + TCA_TAPRIO_SCHED_ENTRY_UNSPEC, | |
| 1097 | + TCA_TAPRIO_SCHED_ENTRY_INDEX, /* u32 */ | |
| 1098 | + TCA_TAPRIO_SCHED_ENTRY_CMD, /* u8 */ | |
| 1099 | + TCA_TAPRIO_SCHED_ENTRY_GATE_MASK, /* u32 */ | |
| 1100 | + TCA_TAPRIO_SCHED_ENTRY_INTERVAL, /* u32 */ | |
| 1101 | + __TCA_TAPRIO_SCHED_ENTRY_MAX, | |
| 1102 | +}; | |
| 1103 | +#define TCA_TAPRIO_SCHED_ENTRY_MAX (__TCA_TAPRIO_SCHED_ENTRY_MAX - 1) | |
| 1104 | + | |
| 1105 | +/* The format for schedule entry list is: | |
| 1106 | + * [TCA_TAPRIO_SCHED_ENTRY_LIST] | |
| 1107 | + * [TCA_TAPRIO_SCHED_ENTRY] | |
| 1108 | + * [TCA_TAPRIO_SCHED_ENTRY_CMD] | |
| 1109 | + * [TCA_TAPRIO_SCHED_ENTRY_GATES] | |
| 1110 | + * [TCA_TAPRIO_SCHED_ENTRY_INTERVAL] | |
| 1111 | + */ | |
| 1112 | +enum { | |
| 1113 | + TCA_TAPRIO_SCHED_UNSPEC, | |
| 1114 | + TCA_TAPRIO_SCHED_ENTRY, | |
| 1115 | + __TCA_TAPRIO_SCHED_MAX, | |
| 1116 | +}; | |
| 1117 | + | |
| 1118 | +#define TCA_TAPRIO_SCHED_MAX (__TCA_TAPRIO_SCHED_MAX - 1) | |
| 1119 | + | |
| 1120 | +enum { | |
| 1121 | + TCA_TAPRIO_ATTR_UNSPEC, | |
| 1122 | + TCA_TAPRIO_ATTR_PRIOMAP, /* struct tc_mqprio_qopt */ | |
| 1123 | + TCA_TAPRIO_ATTR_SCHED_ENTRY_LIST, /* nested of entry */ | |
| 1124 | + TCA_TAPRIO_ATTR_SCHED_BASE_TIME, /* s64 */ | |
| 1125 | + TCA_TAPRIO_ATTR_SCHED_SINGLE_ENTRY, /* single entry */ | |
| 1126 | + TCA_TAPRIO_ATTR_SCHED_CLOCKID, /* s32 */ | |
| 1127 | + TCA_TAPRIO_PAD, | |
| 1128 | + __TCA_TAPRIO_ATTR_MAX, | |
| 1129 | +}; | |
| 1130 | + | |
| 1131 | +#define TCA_TAPRIO_ATTR_MAX (__TCA_TAPRIO_ATTR_MAX - 1) | |
| 1132 | + | |
| 1087 | 1133 | #endif |
| @@ -301,6 +301,7 @@ enum sctp_sinfo_flags { · 300 unmodified lines | ||
| 301 | 301 | SCTP_SACK_IMMEDIATELY = (1 << 3), /* SACK should be sent without delay. */ |
| 302 | 302 | /* 2 bits here have been used by SCTP_PR_SCTP_MASK */ |
| 303 | 303 | SCTP_SENDALL = (1 << 6), |
| 304 | + SCTP_PR_SCTP_ALL = (1 << 7), | |
| 304 | 305 | SCTP_NOTIFICATION = MSG_NOTIFICATION, /* Next message is not user msg but notification. */ |
| 305 | 306 | SCTP_EOF = MSG_FIN, /* Initiate graceful shutdown process. */ |
| 306 | 307 | }; |
| @@ -567,6 +568,8 @@ struct sctp_assoc_reset_event { · 260 unmodified lines | ||
| 567 | 568 | |
| 568 | 569 | #define SCTP_ASSOC_CHANGE_DENIED 0x0004 |
| 569 | 570 | #define SCTP_ASSOC_CHANGE_FAILED 0x0008 |
| 571 | +#define SCTP_STREAM_CHANGE_DENIED SCTP_ASSOC_CHANGE_DENIED | |
| 572 | +#define SCTP_STREAM_CHANGE_FAILED SCTP_ASSOC_CHANGE_FAILED | |
| 570 | 573 | struct sctp_stream_change_event { |
| 571 | 574 | __u16 strchange_type; |
| 572 | 575 | __u16 strchange_flags; |
| @@ -1150,6 +1153,7 @@ struct sctp_add_streams { · 577 unmodified lines | ||
| 1150 | 1153 | /* SCTP Stream schedulers */ |
| 1151 | 1154 | enum sctp_sched_type { |
| 1152 | 1155 | SCTP_SS_FCFS, |
| 1156 | + SCTP_SS_DEFAULT = SCTP_SS_FCFS, | |
| 1153 | 1157 | SCTP_SS_PRIO, |
| 1154 | 1158 | SCTP_SS_RR, |
| 1155 | 1159 | SCTP_SS_MAX = SCTP_SS_RR |
| @@ -132,4 +132,21 @@ struct serial_rs485 { · 131 unmodified lines | ||
| 132 | 132 | are a royal PITA .. */ |
| 133 | 133 | }; |
| 134 | 134 | |
| 135 | +/* | |
| 136 | + * Serial interface for controlling ISO7816 settings on chips with suitable | |
| 137 | + * support. Set with TIOCSISO7816 and get with TIOCGISO7816 if supported by | |
| 138 | + * your platform. | |
| 139 | + */ | |
| 140 | +struct serial_iso7816 { | |
| 141 | + __u32 flags; /* ISO7816 feature flags */ | |
| 142 | +#define SER_ISO7816_ENABLED (1 << 0) | |
| 143 | +#define SER_ISO7816_T_PARAM (0x0f << 4) | |
| 144 | +#define SER_ISO7816_T(t) (((t) & 0x0f) << 4) | |
| 145 | + __u32 tg; | |
| 146 | + __u32 sc_fi; | |
| 147 | + __u32 sc_di; | |
| 148 | + __u32 clk; | |
| 149 | + __u32 reserved[5]; | |
| 150 | +}; | |
| 151 | + | |
| 135 | 152 | #endif /* _UAPI_LINUX_SERIAL_H */ |
| @@ -65,7 +65,9 @@ struct shmid_ds { · 64 unmodified lines | ||
| 65 | 65 | #define SHM_HUGE_2MB HUGETLB_FLAG_ENCODE_2MB |
| 66 | 66 | #define SHM_HUGE_8MB HUGETLB_FLAG_ENCODE_8MB |
| 67 | 67 | #define SHM_HUGE_16MB HUGETLB_FLAG_ENCODE_16MB |
| 68 | +#define SHM_HUGE_32MB HUGETLB_FLAG_ENCODE_32MB | |
| 68 | 69 | #define SHM_HUGE_256MB HUGETLB_FLAG_ENCODE_256MB |
| 70 | +#define SHM_HUGE_512MB HUGETLB_FLAG_ENCODE_512MB | |
| 69 | 71 | #define SHM_HUGE_1GB HUGETLB_FLAG_ENCODE_1GB |
| 70 | 72 | #define SHM_HUGE_2GB HUGETLB_FLAG_ENCODE_2GB |
| 71 | 73 | #define SHM_HUGE_16GB HUGETLB_FLAG_ENCODE_16GB |
| @@ -18,14 +18,17 @@ struct smc_diag_req { · 17 unmodified lines | ||
| 18 | 18 | * on the internal clcsock, and more SMC-related socket data |
| 19 | 19 | */ |
| 20 | 20 | struct smc_diag_msg { |
| 21 | − __u8 diag_family; | |
| 22 | − __u8 diag_state; | |
| 23 | − __u8 diag_mode; | |
| 24 | − __u8 diag_shutdown; | |
| 21 | + __u8 diag_family; | |
| 22 | + __u8 diag_state; | |
| 23 | + union { | |
| 24 | + __u8 diag_mode; | |
| 25 | + __u8 diag_fallback; /* the old name of the field */ | |
| 26 | + }; | |
| 27 | + __u8 diag_shutdown; | |
| 25 | 28 | struct inet_diag_sockid id; |
| 26 | 29 | |
| 27 | − __u32 diag_uid; | |
| 28 | − __u64 diag_inode; | |
| 30 | + __u32 diag_uid; | |
| 31 | + __aligned_u64 diag_inode; | |
| 29 | 32 | }; |
| 30 | 33 | |
| 31 | 34 | /* Mode of a connection */ |
| @@ -99,11 +102,11 @@ struct smc_diag_fallback { · 67 unmodified lines | ||
| 99 | 102 | }; |
| 100 | 103 | |
| 101 | 104 | struct smcd_diag_dmbinfo { /* SMC-D Socket internals */ |
| 102 | − __u32 linkid; /* Link identifier */ | |
| 103 | − __u64 peer_gid; /* Peer GID */ | |
| 104 | − __u64 my_gid; /* My GID */ | |
| 105 | − __u64 token; /* Token of DMB */ | |
| 106 | − __u64 peer_token; /* Token of remote DMBE */ | |
| 105 | + __u32 linkid; /* Link identifier */ | |
| 106 | + __aligned_u64 peer_gid; /* Peer GID */ | |
| 107 | + __aligned_u64 my_gid; /* My GID */ | |
| 108 | + __aligned_u64 token; /* Token of DMB */ | |
| 109 | + __aligned_u64 peer_token; /* Token of remote DMBE */ | |
| 107 | 110 | }; |
| 108 | 111 | |
| 109 | 112 | #endif /* _UAPI_SMC_DIAG_H_ */ |
| @@ -34,7 +34,7 @@ · 33 unmodified lines | ||
| 34 | 34 | */ |
| 35 | 35 | |
| 36 | 36 | |
| 37 | −#define TASKSTATS_VERSION 8 | |
| 37 | +#define TASKSTATS_VERSION 9 | |
| 38 | 38 | #define TS_COMM_LEN 32 /* should be >= TASK_COMM_LEN |
| 39 | 39 | * in linux/sched.h */ |
| 40 | 40 | |
| @@ -164,6 +164,10 @@ struct taskstats { · 123 unmodified lines | ||
| 164 | 164 | /* Delay waiting for memory reclaim */ |
| 165 | 165 | __u64 freepages_count; |
| 166 | 166 | __u64 freepages_delay_total; |
| 167 | + | |
| 168 | + /* Delay waiting for thrashing page */ | |
| 169 | + __u64 thrashing_count; | |
| 170 | + __u64 thrashing_delay_total; | |
| 167 | 171 | }; |
| 168 | 172 | |
| 169 | 173 | |
| @@ -40,5 +40,6 @@ struct udphdr { · 39 unmodified lines | ||
| 40 | 40 | #define UDP_ENCAP_L2TPINUDP 3 /* rfc2661 */ |
| 41 | 41 | #define UDP_ENCAP_GTP0 4 /* GSM TS 09.60 */ |
| 42 | 42 | #define UDP_ENCAP_GTP1U 5 /* 3GPP TS 29.060 */ |
| 43 | +#define UDP_ENCAP_RXRPC 6 | |
| 43 | 44 | |
| 44 | 45 | #endif /* _UAPI_LINUX_UDP_H */ |
| @@ -4,6 +4,7 @@ · 3 unmodified lines | ||
| 4 | 4 | * Copyright (C) 2008 Novell, Inc. |
| 5 | 5 | * Copyright (C) 2008 Greg Kroah-Hartman <gregkh@suse.de> |
| 6 | 6 | * Copyright (C) 2015 Dave Penkler <dpenkler@gmail.com> |
| 7 | + * Copyright (C) 2018 IVI Foundation, Inc. | |
| 7 | 8 | * |
| 8 | 9 | * This file holds USB constants defined by the USB Device Class |
| 9 | 10 | * and USB488 Subclass Definitions for Test and Measurement devices |
| @@ -40,11 +41,38 @@ · 30 unmodified lines | ||
| 40 | 41 | #define USBTMC488_REQUEST_GOTO_LOCAL 161 |
| 41 | 42 | #define USBTMC488_REQUEST_LOCAL_LOCKOUT 162 |
| 42 | 43 | |
| 44 | +struct usbtmc_request { | |
| 45 | + __u8 bRequestType; | |
| 46 | + __u8 bRequest; | |
| 47 | + __u16 wValue; | |
| 48 | + __u16 wIndex; | |
| 49 | + __u16 wLength; | |
| 50 | +} __attribute__ ((packed)); | |
| 51 | + | |
| 52 | +struct usbtmc_ctrlrequest { | |
| 53 | + struct usbtmc_request req; | |
| 54 | + void __user *data; /* pointer to user space */ | |
| 55 | +} __attribute__ ((packed)); | |
| 56 | + | |
| 43 | 57 | struct usbtmc_termchar { |
| 44 | 58 | __u8 term_char; |
| 45 | 59 | __u8 term_char_enabled; |
| 46 | 60 | } __attribute__ ((packed)); |
| 47 | 61 | |
| 62 | +/* | |
| 63 | + * usbtmc_message->flags: | |
| 64 | + */ | |
| 65 | +#define USBTMC_FLAG_ASYNC 0x0001 | |
| 66 | +#define USBTMC_FLAG_APPEND 0x0002 | |
| 67 | +#define USBTMC_FLAG_IGNORE_TRAILER 0x0004 | |
| 68 | + | |
| 69 | +struct usbtmc_message { | |
| 70 | + __u32 transfer_size; /* size of bytes to transfer */ | |
| 71 | + __u32 transferred; /* size of received/written bytes */ | |
| 72 | + __u32 flags; /* bit 0: 0 = synchronous; 1 = asynchronous */ | |
| 73 | + void __user *message; /* pointer to header and data in user space */ | |
| 74 | +} __attribute__ ((packed)); | |
| 75 | + | |
| 48 | 76 | /* Request values for USBTMC driver's ioctl entry point */ |
| 49 | 77 | #define USBTMC_IOC_NR 91 |
| 50 | 78 | #define USBTMC_IOCTL_INDICATOR_PULSE _IO(USBTMC_IOC_NR, 1) |
| @@ -53,10 +81,15 @@ struct usbtmc_termchar { · 2 unmodified lines | ||
| 53 | 81 | #define USBTMC_IOCTL_ABORT_BULK_IN _IO(USBTMC_IOC_NR, 4) |
| 54 | 82 | #define USBTMC_IOCTL_CLEAR_OUT_HALT _IO(USBTMC_IOC_NR, 6) |
| 55 | 83 | #define USBTMC_IOCTL_CLEAR_IN_HALT _IO(USBTMC_IOC_NR, 7) |
| 84 | +#define USBTMC_IOCTL_CTRL_REQUEST _IOWR(USBTMC_IOC_NR, 8, struct usbtmc_ctrlrequest) | |
| 56 | 85 | #define USBTMC_IOCTL_GET_TIMEOUT _IOR(USBTMC_IOC_NR, 9, __u32) |
| 57 | 86 | #define USBTMC_IOCTL_SET_TIMEOUT _IOW(USBTMC_IOC_NR, 10, __u32) |
| 58 | 87 | #define USBTMC_IOCTL_EOM_ENABLE _IOW(USBTMC_IOC_NR, 11, __u8) |
| 59 | 88 | #define USBTMC_IOCTL_CONFIG_TERMCHAR _IOW(USBTMC_IOC_NR, 12, struct usbtmc_termchar) |
| 89 | +#define USBTMC_IOCTL_WRITE _IOWR(USBTMC_IOC_NR, 13, struct usbtmc_message) | |
| 90 | +#define USBTMC_IOCTL_READ _IOWR(USBTMC_IOC_NR, 14, struct usbtmc_message) | |
| 91 | +#define USBTMC_IOCTL_WRITE_RESULT _IOWR(USBTMC_IOC_NR, 15, __u32) | |
| 92 | +#define USBTMC_IOCTL_API_VERSION _IOR(USBTMC_IOC_NR, 16, __u32) | |
| 60 | 93 | |
| 61 | 94 | #define USBTMC488_IOCTL_GET_CAPS _IOR(USBTMC_IOC_NR, 17, unsigned char) |
| 62 | 95 | #define USBTMC488_IOCTL_READ_STB _IOR(USBTMC_IOC_NR, 18, unsigned char) |
| @@ -64,6 +97,14 @@ struct usbtmc_termchar { · 1 unmodified line | ||
| 64 | 97 | #define USBTMC488_IOCTL_GOTO_LOCAL _IO(USBTMC_IOC_NR, 20) |
| 65 | 98 | #define USBTMC488_IOCTL_LOCAL_LOCKOUT _IO(USBTMC_IOC_NR, 21) |
| 66 | 99 | #define USBTMC488_IOCTL_TRIGGER _IO(USBTMC_IOC_NR, 22) |
| 100 | +#define USBTMC488_IOCTL_WAIT_SRQ _IOW(USBTMC_IOC_NR, 23, __u32) | |
| 101 | + | |
| 102 | +#define USBTMC_IOCTL_MSG_IN_ATTR _IOR(USBTMC_IOC_NR, 24, __u8) | |
| 103 | +#define USBTMC_IOCTL_AUTO_ABORT _IOW(USBTMC_IOC_NR, 25, __u8) | |
| 104 | + | |
| 105 | +/* Cancel and cleanup asynchronous calls */ | |
| 106 | +#define USBTMC_IOCTL_CANCEL_IO _IO(USBTMC_IOC_NR, 35) | |
| 107 | +#define USBTMC_IOCTL_CLEANUP_IO _IO(USBTMC_IOC_NR, 36) | |
| 67 | 108 | |
| 68 | 109 | /* Driver encoded usb488 capabilities */ |
| 69 | 110 | #define USBTMC488_CAPABILITY_TRIGGER 1 |
| @@ -192,14 +192,14 @@ struct uvc_descriptor_header { · 191 unmodified lines | ||
| 192 | 192 | |
| 193 | 193 | /* 3.7.2. Video Control Interface Header Descriptor */ |
| 194 | 194 | struct uvc_header_descriptor { |
| 195 | − __u8 bLength; | |
| 196 | − __u8 bDescriptorType; | |
| 197 | − __u8 bDescriptorSubType; | |
| 198 | − __u16 bcdUVC; | |
| 199 | − __u16 wTotalLength; | |
| 200 | − __u32 dwClockFrequency; | |
| 201 | − __u8 bInCollection; | |
| 202 | − __u8 baInterfaceNr[]; | |
| 195 | + __u8 bLength; | |
| 196 | + __u8 bDescriptorType; | |
| 197 | + __u8 bDescriptorSubType; | |
| 198 | + __le16 bcdUVC; | |
| 199 | + __le16 wTotalLength; | |
| 200 | + __le32 dwClockFrequency; | |
| 201 | + __u8 bInCollection; | |
| 202 | + __u8 baInterfaceNr[]; | |
| 203 | 203 | } __attribute__((__packed__)); |
| 204 | 204 | |
| 205 | 205 | #define UVC_DT_HEADER_SIZE(n) (12+(n)) |
| @@ -209,57 +209,57 @@ struct uvc_header_descriptor { · 3 unmodified lines | ||
| 209 | 209 | |
| 210 | 210 | #define DECLARE_UVC_HEADER_DESCRIPTOR(n) \ |
| 211 | 211 | struct UVC_HEADER_DESCRIPTOR(n) { \ |
| 212 | − __u8 bLength; \ | |
| 213 | − __u8 bDescriptorType; \ | |
| 214 | − __u8 bDescriptorSubType; \ | |
| 215 | − __u16 bcdUVC; \ | |
| 216 | − __u16 wTotalLength; \ | |
| 217 | − __u32 dwClockFrequency; \ | |
| 218 | − __u8 bInCollection; \ | |
| 219 | − __u8 baInterfaceNr[n]; \ | |
| 212 | + __u8 bLength; \ | |
| 213 | + __u8 bDescriptorType; \ | |
| 214 | + __u8 bDescriptorSubType; \ | |
| 215 | + __le16 bcdUVC; \ | |
| 216 | + __le16 wTotalLength; \ | |
| 217 | + __le32 dwClockFrequency; \ | |
| 218 | + __u8 bInCollection; \ | |
| 219 | + __u8 baInterfaceNr[n]; \ | |
| 220 | 220 | } __attribute__ ((packed)) |
| 221 | 221 | |
| 222 | 222 | /* 3.7.2.1. Input Terminal Descriptor */ |
| 223 | 223 | struct uvc_input_terminal_descriptor { |
| 224 | − __u8 bLength; | |
| 225 | − __u8 bDescriptorType; | |
| 226 | − __u8 bDescriptorSubType; | |
| 227 | − __u8 bTerminalID; | |
| 228 | − __u16 wTerminalType; | |
| 229 | − __u8 bAssocTerminal; | |
| 230 | − __u8 iTerminal; | |
| 224 | + __u8 bLength; | |
| 225 | + __u8 bDescriptorType; | |
| 226 | + __u8 bDescriptorSubType; | |
| 227 | + __u8 bTerminalID; | |
| 228 | + __le16 wTerminalType; | |
| 229 | + __u8 bAssocTerminal; | |
| 230 | + __u8 iTerminal; | |
| 231 | 231 | } __attribute__((__packed__)); |
| 232 | 232 | |
| 233 | 233 | #define UVC_DT_INPUT_TERMINAL_SIZE 8 |
| 234 | 234 | |
| 235 | 235 | /* 3.7.2.2. Output Terminal Descriptor */ |
| 236 | 236 | struct uvc_output_terminal_descriptor { |
| 237 | − __u8 bLength; | |
| 238 | − __u8 bDescriptorType; | |
| 239 | − __u8 bDescriptorSubType; | |
| 240 | − __u8 bTerminalID; | |
| 241 | − __u16 wTerminalType; | |
| 242 | − __u8 bAssocTerminal; | |
| 243 | − __u8 bSourceID; | |
| 244 | − __u8 iTerminal; | |
| 237 | + __u8 bLength; | |
| 238 | + __u8 bDescriptorType; | |
| 239 | + __u8 bDescriptorSubType; | |
| 240 | + __u8 bTerminalID; | |
| 241 | + __le16 wTerminalType; | |
| 242 | + __u8 bAssocTerminal; | |
| 243 | + __u8 bSourceID; | |
| 244 | + __u8 iTerminal; | |
| 245 | 245 | } __attribute__((__packed__)); |
| 246 | 246 | |
| 247 | 247 | #define UVC_DT_OUTPUT_TERMINAL_SIZE 9 |
| 248 | 248 | |
| 249 | 249 | /* 3.7.2.3. Camera Terminal Descriptor */ |
| 250 | 250 | struct uvc_camera_terminal_descriptor { |
| 251 | − __u8 bLength; | |
| 252 | − __u8 bDescriptorType; | |
| 253 | − __u8 bDescriptorSubType; | |
| 254 | − __u8 bTerminalID; | |
| 255 | − __u16 wTerminalType; | |
| 256 | − __u8 bAssocTerminal; | |
| 257 | − __u8 iTerminal; | |
| 258 | − __u16 wObjectiveFocalLengthMin; | |
| 259 | − __u16 wObjectiveFocalLengthMax; | |
| 260 | − __u16 wOcularFocalLength; | |
| 261 | − __u8 bControlSize; | |
| 262 | − __u8 bmControls[3]; | |
| 251 | + __u8 bLength; | |
| 252 | + __u8 bDescriptorType; | |
| 253 | + __u8 bDescriptorSubType; | |
| 254 | + __u8 bTerminalID; | |
| 255 | + __le16 wTerminalType; | |
| 256 | + __u8 bAssocTerminal; | |
| 257 | + __u8 iTerminal; | |
| 258 | + __le16 wObjectiveFocalLengthMin; | |
| 259 | + __le16 wObjectiveFocalLengthMax; | |
| 260 | + __le16 wOcularFocalLength; | |
| 261 | + __u8 bControlSize; | |
| 262 | + __u8 bmControls[3]; | |
| 263 | 263 | } __attribute__((__packed__)); |
| 264 | 264 | |
| 265 | 265 | #define UVC_DT_CAMERA_TERMINAL_SIZE(n) (15+(n)) |
| @@ -293,15 +293,15 @@ struct UVC_SELECTOR_UNIT_DESCRIPTOR(n) { \ · 27 unmodified lines | ||
| 293 | 293 | |
| 294 | 294 | /* 3.7.2.5. Processing Unit Descriptor */ |
| 295 | 295 | struct uvc_processing_unit_descriptor { |
| 296 | − __u8 bLength; | |
| 297 | − __u8 bDescriptorType; | |
| 298 | − __u8 bDescriptorSubType; | |
| 299 | − __u8 bUnitID; | |
| 300 | − __u8 bSourceID; | |
| 301 | − __u16 wMaxMultiplier; | |
| 302 | − __u8 bControlSize; | |
| 303 | − __u8 bmControls[2]; | |
| 304 | − __u8 iProcessing; | |
| 296 | + __u8 bLength; | |
| 297 | + __u8 bDescriptorType; | |
| 298 | + __u8 bDescriptorSubType; | |
| 299 | + __u8 bUnitID; | |
| 300 | + __u8 bSourceID; | |
| 301 | + __le16 wMaxMultiplier; | |
| 302 | + __u8 bControlSize; | |
| 303 | + __u8 bmControls[2]; | |
| 304 | + __u8 iProcessing; | |
| 305 | 305 | } __attribute__((__packed__)); |
| 306 | 306 | |
| 307 | 307 | #define UVC_DT_PROCESSING_UNIT_SIZE(n) (9+(n)) |
| @@ -343,29 +343,29 @@ struct UVC_EXTENSION_UNIT_DESCRIPTOR(p, n) { \ · 35 unmodified lines | ||
| 343 | 343 | |
| 344 | 344 | /* 3.8.2.2. Video Control Interrupt Endpoint Descriptor */ |
| 345 | 345 | struct uvc_control_endpoint_descriptor { |
| 346 | − __u8 bLength; | |
| 347 | − __u8 bDescriptorType; | |
| 348 | − __u8 bDescriptorSubType; | |
| 349 | − __u16 wMaxTransferSize; | |
| 346 | + __u8 bLength; | |
| 347 | + __u8 bDescriptorType; | |
| 348 | + __u8 bDescriptorSubType; | |
| 349 | + __le16 wMaxTransferSize; | |
| 350 | 350 | } __attribute__((__packed__)); |
| 351 | 351 | |
| 352 | 352 | #define UVC_DT_CONTROL_ENDPOINT_SIZE 5 |
| 353 | 353 | |
| 354 | 354 | /* 3.9.2.1. Input Header Descriptor */ |
| 355 | 355 | struct uvc_input_header_descriptor { |
| 356 | − __u8 bLength; | |
| 357 | − __u8 bDescriptorType; | |
| 358 | − __u8 bDescriptorSubType; | |
| 359 | − __u8 bNumFormats; | |
| 360 | − __u16 wTotalLength; | |
| 361 | − __u8 bEndpointAddress; | |
| 362 | − __u8 bmInfo; | |
| 363 | − __u8 bTerminalLink; | |
| 364 | − __u8 bStillCaptureMethod; | |
| 365 | − __u8 bTriggerSupport; | |
| 366 | − __u8 bTriggerUsage; | |
| 367 | − __u8 bControlSize; | |
| 368 | − __u8 bmaControls[]; | |
| 356 | + __u8 bLength; | |
| 357 | + __u8 bDescriptorType; | |
| 358 | + __u8 bDescriptorSubType; | |
| 359 | + __u8 bNumFormats; | |
| 360 | + __le16 wTotalLength; | |
| 361 | + __u8 bEndpointAddress; | |
| 362 | + __u8 bmInfo; | |
| 363 | + __u8 bTerminalLink; | |
| 364 | + __u8 bStillCaptureMethod; | |
| 365 | + __u8 bTriggerSupport; | |
| 366 | + __u8 bTriggerUsage; | |
| 367 | + __u8 bControlSize; | |
| 368 | + __u8 bmaControls[]; | |
| 369 | 369 | } __attribute__((__packed__)); |
| 370 | 370 | |
| 371 | 371 | #define UVC_DT_INPUT_HEADER_SIZE(n, p) (13+(n*p)) |
| @@ -375,32 +375,32 @@ struct uvc_input_header_descriptor { · 3 unmodified lines | ||
| 375 | 375 | |
| 376 | 376 | #define DECLARE_UVC_INPUT_HEADER_DESCRIPTOR(n, p) \ |
| 377 | 377 | struct UVC_INPUT_HEADER_DESCRIPTOR(n, p) { \ |
| 378 | − __u8 bLength; \ | |
| 379 | − __u8 bDescriptorType; \ | |
| 380 | − __u8 bDescriptorSubType; \ | |
| 381 | − __u8 bNumFormats; \ | |
| 382 | − __u16 wTotalLength; \ | |
| 383 | − __u8 bEndpointAddress; \ | |
| 384 | − __u8 bmInfo; \ | |
| 385 | − __u8 bTerminalLink; \ | |
| 386 | − __u8 bStillCaptureMethod; \ | |
| 387 | − __u8 bTriggerSupport; \ | |
| 388 | − __u8 bTriggerUsage; \ | |
| 389 | − __u8 bControlSize; \ | |
| 390 | − __u8 bmaControls[p][n]; \ | |
| 378 | + __u8 bLength; \ | |
| 379 | + __u8 bDescriptorType; \ | |
| 380 | + __u8 bDescriptorSubType; \ | |
| 381 | + __u8 bNumFormats; \ | |
| 382 | + __le16 wTotalLength; \ | |
| 383 | + __u8 bEndpointAddress; \ | |
| 384 | + __u8 bmInfo; \ | |
| 385 | + __u8 bTerminalLink; \ | |
| 386 | + __u8 bStillCaptureMethod; \ | |
| 387 | + __u8 bTriggerSupport; \ | |
| 388 | + __u8 bTriggerUsage; \ | |
| 389 | + __u8 bControlSize; \ | |
| 390 | + __u8 bmaControls[p][n]; \ | |
| 391 | 391 | } __attribute__ ((packed)) |
| 392 | 392 | |
| 393 | 393 | /* 3.9.2.2. Output Header Descriptor */ |
| 394 | 394 | struct uvc_output_header_descriptor { |
| 395 | − __u8 bLength; | |
| 396 | − __u8 bDescriptorType; | |
| 397 | − __u8 bDescriptorSubType; | |
| 398 | − __u8 bNumFormats; | |
| 399 | − __u16 wTotalLength; | |
| 400 | − __u8 bEndpointAddress; | |
| 401 | − __u8 bTerminalLink; | |
| 402 | − __u8 bControlSize; | |
| 403 | − __u8 bmaControls[]; | |
| 395 | + __u8 bLength; | |
| 396 | + __u8 bDescriptorType; | |
| 397 | + __u8 bDescriptorSubType; | |
| 398 | + __u8 bNumFormats; | |
| 399 | + __le16 wTotalLength; | |
| 400 | + __u8 bEndpointAddress; | |
| 401 | + __u8 bTerminalLink; | |
| 402 | + __u8 bControlSize; | |
| 403 | + __u8 bmaControls[]; | |
| 404 | 404 | } __attribute__((__packed__)); |
| 405 | 405 | |
| 406 | 406 | #define UVC_DT_OUTPUT_HEADER_SIZE(n, p) (9+(n*p)) |
| @@ -410,15 +410,15 @@ struct uvc_output_header_descriptor { · 3 unmodified lines | ||
| 410 | 410 | |
| 411 | 411 | #define DECLARE_UVC_OUTPUT_HEADER_DESCRIPTOR(n, p) \ |
| 412 | 412 | struct UVC_OUTPUT_HEADER_DESCRIPTOR(n, p) { \ |
| 413 | − __u8 bLength; \ | |
| 414 | − __u8 bDescriptorType; \ | |
| 415 | − __u8 bDescriptorSubType; \ | |
| 416 | − __u8 bNumFormats; \ | |
| 417 | − __u16 wTotalLength; \ | |
| 418 | − __u8 bEndpointAddress; \ | |
| 419 | − __u8 bTerminalLink; \ | |
| 420 | − __u8 bControlSize; \ | |
| 421 | − __u8 bmaControls[p][n]; \ | |
| 413 | + __u8 bLength; \ | |
| 414 | + __u8 bDescriptorType; \ | |
| 415 | + __u8 bDescriptorSubType; \ | |
| 416 | + __u8 bNumFormats; \ | |
| 417 | + __le16 wTotalLength; \ | |
| 418 | + __u8 bEndpointAddress; \ | |
| 419 | + __u8 bTerminalLink; \ | |
| 420 | + __u8 bControlSize; \ | |
| 421 | + __u8 bmaControls[p][n]; \ | |
| 422 | 422 | } __attribute__ ((packed)) |
| 423 | 423 | |
| 424 | 424 | /* 3.9.2.6. Color matching descriptor */ |
| @@ -473,19 +473,19 @@ struct uvc_format_uncompressed { · 48 unmodified lines | ||
| 473 | 473 | |
| 474 | 474 | /* Uncompressed Payload - 3.1.2. Uncompressed Video Frame Descriptor */ |
| 475 | 475 | struct uvc_frame_uncompressed { |
| 476 | − __u8 bLength; | |
| 477 | − __u8 bDescriptorType; | |
| 478 | − __u8 bDescriptorSubType; | |
| 479 | − __u8 bFrameIndex; | |
| 480 | − __u8 bmCapabilities; | |
| 481 | − __u16 wWidth; | |
| 482 | − __u16 wHeight; | |
| 483 | − __u32 dwMinBitRate; | |
| 484 | − __u32 dwMaxBitRate; | |
| 485 | − __u32 dwMaxVideoFrameBufferSize; | |
| 486 | − __u32 dwDefaultFrameInterval; | |
| 487 | − __u8 bFrameIntervalType; | |
| 488 | − __u32 dwFrameInterval[]; | |
| 476 | + __u8 bLength; | |
| 477 | + __u8 bDescriptorType; | |
| 478 | + __u8 bDescriptorSubType; | |
| 479 | + __u8 bFrameIndex; | |
| 480 | + __u8 bmCapabilities; | |
| 481 | + __le16 wWidth; | |
| 482 | + __le16 wHeight; | |
| 483 | + __le32 dwMinBitRate; | |
| 484 | + __le32 dwMaxBitRate; | |
| 485 | + __le32 dwMaxVideoFrameBufferSize; | |
| 486 | + __le32 dwDefaultFrameInterval; | |
| 487 | + __u8 bFrameIntervalType; | |
| 488 | + __le32 dwFrameInterval[]; | |
| 489 | 489 | } __attribute__((__packed__)); |
| 490 | 490 | |
| 491 | 491 | #define UVC_DT_FRAME_UNCOMPRESSED_SIZE(n) (26+4*(n)) |
| @@ -495,19 +495,19 @@ struct uvc_frame_uncompressed { · 3 unmodified lines | ||
| 495 | 495 | |
| 496 | 496 | #define DECLARE_UVC_FRAME_UNCOMPRESSED(n) \ |
| 497 | 497 | struct UVC_FRAME_UNCOMPRESSED(n) { \ |
| 498 | − __u8 bLength; \ | |
| 499 | − __u8 bDescriptorType; \ | |
| 500 | − __u8 bDescriptorSubType; \ | |
| 501 | − __u8 bFrameIndex; \ | |
| 502 | − __u8 bmCapabilities; \ | |
| 503 | − __u16 wWidth; \ | |
| 504 | − __u16 wHeight; \ | |
| 505 | − __u32 dwMinBitRate; \ | |
| 506 | − __u32 dwMaxBitRate; \ | |
| 507 | − __u32 dwMaxVideoFrameBufferSize; \ | |
| 508 | − __u32 dwDefaultFrameInterval; \ | |
| 509 | − __u8 bFrameIntervalType; \ | |
| 510 | − __u32 dwFrameInterval[n]; \ | |
| 498 | + __u8 bLength; \ | |
| 499 | + __u8 bDescriptorType; \ | |
| 500 | + __u8 bDescriptorSubType; \ | |
| 501 | + __u8 bFrameIndex; \ | |
| 502 | + __u8 bmCapabilities; \ | |
| 503 | + __le16 wWidth; \ | |
| 504 | + __le16 wHeight; \ | |
| 505 | + __le32 dwMinBitRate; \ | |
| 506 | + __le32 dwMaxBitRate; \ | |
| 507 | + __le32 dwMaxVideoFrameBufferSize; \ | |
| 508 | + __le32 dwDefaultFrameInterval; \ | |
| 509 | + __u8 bFrameIntervalType; \ | |
| 510 | + __le32 dwFrameInterval[n]; \ | |
| 511 | 511 | } __attribute__ ((packed)) |
| 512 | 512 | |
| 513 | 513 | /* MJPEG Payload - 3.1.1. MJPEG Video Format Descriptor */ |
| @@ -529,19 +529,19 @@ struct uvc_format_mjpeg { · 15 unmodified lines | ||
| 529 | 529 | |
| 530 | 530 | /* MJPEG Payload - 3.1.2. MJPEG Video Frame Descriptor */ |
| 531 | 531 | struct uvc_frame_mjpeg { |
| 532 | − __u8 bLength; | |
| 533 | − __u8 bDescriptorType; | |
| 534 | − __u8 bDescriptorSubType; | |
| 535 | − __u8 bFrameIndex; | |
| 536 | − __u8 bmCapabilities; | |
| 537 | − __u16 wWidth; | |
| 538 | − __u16 wHeight; | |
| 539 | − __u32 dwMinBitRate; | |
| 540 | − __u32 dwMaxBitRate; | |
| 541 | − __u32 dwMaxVideoFrameBufferSize; | |
| 542 | − __u32 dwDefaultFrameInterval; | |
| 543 | − __u8 bFrameIntervalType; | |
| 544 | − __u32 dwFrameInterval[]; | |
| 532 | + __u8 bLength; | |
| 533 | + __u8 bDescriptorType; | |
| 534 | + __u8 bDescriptorSubType; | |
| 535 | + __u8 bFrameIndex; | |
| 536 | + __u8 bmCapabilities; | |
| 537 | + __le16 wWidth; | |
| 538 | + __le16 wHeight; | |
| 539 | + __le32 dwMinBitRate; | |
| 540 | + __le32 dwMaxBitRate; | |
| 541 | + __le32 dwMaxVideoFrameBufferSize; | |
| 542 | + __le32 dwDefaultFrameInterval; | |
| 543 | + __u8 bFrameIntervalType; | |
| 544 | + __le32 dwFrameInterval[]; | |
| 545 | 545 | } __attribute__((__packed__)); |
| 546 | 546 | |
| 547 | 547 | #define UVC_DT_FRAME_MJPEG_SIZE(n) (26+4*(n)) |
| @@ -551,19 +551,19 @@ struct uvc_frame_mjpeg { · 3 unmodified lines | ||
| 551 | 551 | |
| 552 | 552 | #define DECLARE_UVC_FRAME_MJPEG(n) \ |
| 553 | 553 | struct UVC_FRAME_MJPEG(n) { \ |
| 554 | − __u8 bLength; \ | |
| 555 | − __u8 bDescriptorType; \ | |
| 556 | − __u8 bDescriptorSubType; \ | |
| 557 | − __u8 bFrameIndex; \ | |
| 558 | − __u8 bmCapabilities; \ | |
| 559 | − __u16 wWidth; \ | |
| 560 | − __u16 wHeight; \ | |
| 561 | − __u32 dwMinBitRate; \ | |
| 562 | − __u32 dwMaxBitRate; \ | |
| 563 | − __u32 dwMaxVideoFrameBufferSize; \ | |
| 564 | − __u32 dwDefaultFrameInterval; \ | |
| 565 | − __u8 bFrameIntervalType; \ | |
| 566 | − __u32 dwFrameInterval[n]; \ | |
| 554 | + __u8 bLength; \ | |
| 555 | + __u8 bDescriptorType; \ | |
| 556 | + __u8 bDescriptorSubType; \ | |
| 557 | + __u8 bFrameIndex; \ | |
| 558 | + __u8 bmCapabilities; \ | |
| 559 | + __le16 wWidth; \ | |
| 560 | + __le16 wHeight; \ | |
| 561 | + __le32 dwMinBitRate; \ | |
| 562 | + __le32 dwMaxBitRate; \ | |
| 563 | + __le32 dwMaxVideoFrameBufferSize; \ | |
| 564 | + __le32 dwDefaultFrameInterval; \ | |
| 565 | + __u8 bFrameIntervalType; \ | |
| 566 | + __le32 dwFrameInterval[n]; \ | |
| 567 | 567 | } __attribute__ ((packed)) |
| 568 | 568 | |
| 569 | 569 | #endif /* __LINUX_USB_VIDEO_H */ |
| @@ -402,6 +402,9 @@ enum v4l2_mpeg_video_multi_slice_mode { · 401 unmodified lines | ||
| 402 | 402 | #define V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE (V4L2_CID_MPEG_BASE+228) |
| 403 | 403 | #define V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME (V4L2_CID_MPEG_BASE+229) |
| 404 | 404 | |
| 405 | +#define V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS (V4L2_CID_MPEG_BASE+250) | |
| 406 | +#define V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION (V4L2_CID_MPEG_BASE+251) | |
| 407 | + | |
| 405 | 408 | #define V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (V4L2_CID_MPEG_BASE+300) |
| 406 | 409 | #define V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (V4L2_CID_MPEG_BASE+301) |
| 407 | 410 | #define V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP (V4L2_CID_MPEG_BASE+302) |
| @@ -1092,4 +1095,66 @@ enum v4l2_detect_md_mode { · 684 unmodified lines | ||
| 1092 | 1095 | #define V4L2_CID_DETECT_MD_THRESHOLD_GRID (V4L2_CID_DETECT_CLASS_BASE + 3) |
| 1093 | 1096 | #define V4L2_CID_DETECT_MD_REGION_GRID (V4L2_CID_DETECT_CLASS_BASE + 4) |
| 1094 | 1097 | |
| 1098 | +#define V4L2_MPEG2_PICTURE_CODING_TYPE_I 1 | |
| 1099 | +#define V4L2_MPEG2_PICTURE_CODING_TYPE_P 2 | |
| 1100 | +#define V4L2_MPEG2_PICTURE_CODING_TYPE_B 3 | |
| 1101 | +#define V4L2_MPEG2_PICTURE_CODING_TYPE_D 4 | |
| 1102 | + | |
| 1103 | +struct v4l2_mpeg2_sequence { | |
| 1104 | + /* ISO/IEC 13818-2, ITU-T Rec. H.262: Sequence header */ | |
| 1105 | + __u16 horizontal_size; | |
| 1106 | + __u16 vertical_size; | |
| 1107 | + __u32 vbv_buffer_size; | |
| 1108 | + | |
| 1109 | + /* ISO/IEC 13818-2, ITU-T Rec. H.262: Sequence extension */ | |
| 1110 | + __u8 profile_and_level_indication; | |
| 1111 | + __u8 progressive_sequence; | |
| 1112 | + __u8 chroma_format; | |
| 1113 | +}; | |
| 1114 | + | |
| 1115 | +struct v4l2_mpeg2_picture { | |
| 1116 | + /* ISO/IEC 13818-2, ITU-T Rec. H.262: Picture header */ | |
| 1117 | + __u8 picture_coding_type; | |
| 1118 | + | |
| 1119 | + /* ISO/IEC 13818-2, ITU-T Rec. H.262: Picture coding extension */ | |
| 1120 | + __u8 f_code[2][2]; | |
| 1121 | + __u8 intra_dc_precision; | |
| 1122 | + __u8 picture_structure; | |
| 1123 | + __u8 top_field_first; | |
| 1124 | + __u8 frame_pred_frame_dct; | |
| 1125 | + __u8 concealment_motion_vectors; | |
| 1126 | + __u8 q_scale_type; | |
| 1127 | + __u8 intra_vlc_format; | |
| 1128 | + __u8 alternate_scan; | |
| 1129 | + __u8 repeat_first_field; | |
| 1130 | + __u8 progressive_frame; | |
| 1131 | +}; | |
| 1132 | + | |
| 1133 | +struct v4l2_ctrl_mpeg2_slice_params { | |
| 1134 | + __u32 bit_size; | |
| 1135 | + __u32 data_bit_offset; | |
| 1136 | + | |
| 1137 | + struct v4l2_mpeg2_sequence sequence; | |
| 1138 | + struct v4l2_mpeg2_picture picture; | |
| 1139 | + | |
| 1140 | + /* ISO/IEC 13818-2, ITU-T Rec. H.262: Slice */ | |
| 1141 | + __u8 quantiser_scale_code; | |
| 1142 | + | |
| 1143 | + __u8 backward_ref_index; | |
| 1144 | + __u8 forward_ref_index; | |
| 1145 | +}; | |
| 1146 | + | |
| 1147 | +struct v4l2_ctrl_mpeg2_quantization { | |
| 1148 | + /* ISO/IEC 13818-2, ITU-T Rec. H.262: Quant matrix extension */ | |
| 1149 | + __u8 load_intra_quantiser_matrix; | |
| 1150 | + __u8 load_non_intra_quantiser_matrix; | |
| 1151 | + __u8 load_chroma_intra_quantiser_matrix; | |
| 1152 | + __u8 load_chroma_non_intra_quantiser_matrix; | |
| 1153 | + | |
| 1154 | + __u8 intra_quantiser_matrix[64]; | |
| 1155 | + __u8 non_intra_quantiser_matrix[64]; | |
| 1156 | + __u8 chroma_intra_quantiser_matrix[64]; | |
| 1157 | + __u8 chroma_non_intra_quantiser_matrix[64]; | |
| 1158 | +}; | |
| 1159 | + | |
| 1095 | 1160 | #endif |
| @@ -200,6 +200,7 @@ struct vfio_device_info { · 199 unmodified lines | ||
| 200 | 200 | #define VFIO_DEVICE_FLAGS_PLATFORM (1 << 2) /* vfio-platform device */ |
| 201 | 201 | #define VFIO_DEVICE_FLAGS_AMBA (1 << 3) /* vfio-amba device */ |
| 202 | 202 | #define VFIO_DEVICE_FLAGS_CCW (1 << 4) /* vfio-ccw device */ |
| 203 | +#define VFIO_DEVICE_FLAGS_AP (1 << 5) /* vfio-ap device */ | |
| 203 | 204 | __u32 num_regions; /* Max region index + 1 */ |
| 204 | 205 | __u32 num_irqs; /* Max IRQ index + 1 */ |
| 205 | 206 | }; |
| @@ -215,6 +216,7 @@ struct vfio_device_info { · 9 unmodified lines | ||
| 215 | 216 | #define VFIO_DEVICE_API_PLATFORM_STRING "vfio-platform" |
| 216 | 217 | #define VFIO_DEVICE_API_AMBA_STRING "vfio-amba" |
| 217 | 218 | #define VFIO_DEVICE_API_CCW_STRING "vfio-ccw" |
| 219 | +#define VFIO_DEVICE_API_AP_STRING "vfio-ap" | |
| 218 | 220 | |
| 219 | 221 | /** |
| 220 | 222 | * VFIO_DEVICE_GET_REGION_INFO - _IOWR(VFIO_TYPE, VFIO_BASE + 8, |
| @@ -301,6 +303,56 @@ struct vfio_region_info_cap_type { · 80 unmodified lines | ||
| 301 | 303 | #define VFIO_REGION_SUBTYPE_INTEL_IGD_HOST_CFG (2) |
| 302 | 304 | #define VFIO_REGION_SUBTYPE_INTEL_IGD_LPC_CFG (3) |
| 303 | 305 | |
| 306 | +#define VFIO_REGION_TYPE_GFX (1) | |
| 307 | +#define VFIO_REGION_SUBTYPE_GFX_EDID (1) | |
| 308 | + | |
| 309 | +/** | |
| 310 | + * struct vfio_region_gfx_edid - EDID region layout. | |
| 311 | + * | |
| 312 | + * Set display link state and EDID blob. | |
| 313 | + * | |
| 314 | + * The EDID blob has monitor information such as brand, name, serial | |
| 315 | + * number, physical size, supported video modes and more. | |
| 316 | + * | |
| 317 | + * This special region allows userspace (typically qemu) set a virtual | |
| 318 | + * EDID for the virtual monitor, which allows a flexible display | |
| 319 | + * configuration. | |
| 320 | + * | |
| 321 | + * For the edid blob spec look here: | |
| 322 | + * https://en.wikipedia.org/wiki/Extended_Display_Identification_Data | |
| 323 | + * | |
| 324 | + * On linux systems you can find the EDID blob in sysfs: | |
| 325 | + * /sys/class/drm/${card}/${connector}/edid | |
| 326 | + * | |
| 327 | + * You can use the edid-decode ulility (comes with xorg-x11-utils) to | |
| 328 | + * decode the EDID blob. | |
| 329 | + * | |
| 330 | + * @edid_offset: location of the edid blob, relative to the | |
| 331 | + * start of the region (readonly). | |
| 332 | + * @edid_max_size: max size of the edid blob (readonly). | |
| 333 | + * @edid_size: actual edid size (read/write). | |
| 334 | + * @link_state: display link state (read/write). | |
| 335 | + * VFIO_DEVICE_GFX_LINK_STATE_UP: Monitor is turned on. | |
| 336 | + * VFIO_DEVICE_GFX_LINK_STATE_DOWN: Monitor is turned off. | |
| 337 | + * @max_xres: max display width (0 == no limitation, readonly). | |
| 338 | + * @max_yres: max display height (0 == no limitation, readonly). | |
| 339 | + * | |
| 340 | + * EDID update protocol: | |
| 341 | + * (1) set link-state to down. | |
| 342 | + * (2) update edid blob and size. | |
| 343 | + * (3) set link-state to up. | |
| 344 | + */ | |
| 345 | +struct vfio_region_gfx_edid { | |
| 346 | + __u32 edid_offset; | |
| 347 | + __u32 edid_max_size; | |
| 348 | + __u32 edid_size; | |
| 349 | + __u32 max_xres; | |
| 350 | + __u32 max_yres; | |
| 351 | + __u32 link_state; | |
| 352 | +#define VFIO_DEVICE_GFX_LINK_STATE_UP 1 | |
| 353 | +#define VFIO_DEVICE_GFX_LINK_STATE_DOWN 2 | |
| 354 | +}; | |
| 355 | + | |
| 304 | 356 | /* |
| 305 | 357 | * The MSIX mappable capability informs that MSIX data of a BAR can be mmapped |
| 306 | 358 | * which allows direct access to non-MSIX registers which happened to be within |
| @@ -225,8 +225,8 @@ enum v4l2_colorspace { · 224 unmodified lines | ||
| 225 | 225 | /* For RGB colorspaces such as produces by most webcams. */ |
| 226 | 226 | V4L2_COLORSPACE_SRGB = 8, |
| 227 | 227 | |
| 228 | − /* AdobeRGB colorspace */ | |
| 229 | − V4L2_COLORSPACE_ADOBERGB = 9, | |
| 228 | + /* opRGB colorspace */ | |
| 229 | + V4L2_COLORSPACE_OPRGB = 9, | |
| 230 | 230 | |
| 231 | 231 | /* BT.2020 colorspace, used for UHDTV. */ |
| 232 | 232 | V4L2_COLORSPACE_BT2020 = 10, |
| @@ -258,7 +258,7 @@ enum v4l2_xfer_func { · 25 unmodified lines | ||
| 258 | 258 | * |
| 259 | 259 | * V4L2_COLORSPACE_SRGB, V4L2_COLORSPACE_JPEG: V4L2_XFER_FUNC_SRGB |
| 260 | 260 | * |
| 261 | − * V4L2_COLORSPACE_ADOBERGB: V4L2_XFER_FUNC_ADOBERGB | |
| 261 | + * V4L2_COLORSPACE_OPRGB: V4L2_XFER_FUNC_OPRGB | |
| 262 | 262 | * |
| 263 | 263 | * V4L2_COLORSPACE_SMPTE240M: V4L2_XFER_FUNC_SMPTE240M |
| 264 | 264 | * |
| @@ -269,7 +269,7 @@ enum v4l2_xfer_func { · 4 unmodified lines | ||
| 269 | 269 | V4L2_XFER_FUNC_DEFAULT = 0, |
| 270 | 270 | V4L2_XFER_FUNC_709 = 1, |
| 271 | 271 | V4L2_XFER_FUNC_SRGB = 2, |
| 272 | − V4L2_XFER_FUNC_ADOBERGB = 3, | |
| 272 | + V4L2_XFER_FUNC_OPRGB = 3, | |
| 273 | 273 | V4L2_XFER_FUNC_SMPTE240M = 4, |
| 274 | 274 | V4L2_XFER_FUNC_NONE = 5, |
| 275 | 275 | V4L2_XFER_FUNC_DCI_P3 = 6, |
| @@ -281,7 +281,7 @@ enum v4l2_xfer_func { · 5 unmodified lines | ||
| 281 | 281 | * This depends on the colorspace. |
| 282 | 282 | */ |
| 283 | 283 | #define V4L2_MAP_XFER_FUNC_DEFAULT(colsp) \ |
| 284 | − ((colsp) == V4L2_COLORSPACE_ADOBERGB ? V4L2_XFER_FUNC_ADOBERGB : \ | |
| 284 | + ((colsp) == V4L2_COLORSPACE_OPRGB ? V4L2_XFER_FUNC_OPRGB : \ | |
| 285 | 285 | ((colsp) == V4L2_COLORSPACE_SMPTE240M ? V4L2_XFER_FUNC_SMPTE240M : \ |
| 286 | 286 | ((colsp) == V4L2_COLORSPACE_DCI_P3 ? V4L2_XFER_FUNC_DCI_P3 : \ |
| 287 | 287 | ((colsp) == V4L2_COLORSPACE_RAW ? V4L2_XFER_FUNC_NONE : \ |
| @@ -295,7 +295,7 @@ enum v4l2_ycbcr_encoding { · 7 unmodified lines | ||
| 295 | 295 | * |
| 296 | 296 | * V4L2_COLORSPACE_SMPTE170M, V4L2_COLORSPACE_470_SYSTEM_M, |
| 297 | 297 | * V4L2_COLORSPACE_470_SYSTEM_BG, V4L2_COLORSPACE_SRGB, |
| 298 | − * V4L2_COLORSPACE_ADOBERGB and V4L2_COLORSPACE_JPEG: V4L2_YCBCR_ENC_601 | |
| 298 | + * V4L2_COLORSPACE_OPRGB and V4L2_COLORSPACE_JPEG: V4L2_YCBCR_ENC_601 | |
| 299 | 299 | * |
| 300 | 300 | * V4L2_COLORSPACE_REC709 and V4L2_COLORSPACE_DCI_P3: V4L2_YCBCR_ENC_709 |
| 301 | 301 | * |
| @@ -382,6 +382,17 @@ enum v4l2_quantization { · 80 unmodified lines | ||
| 382 | 382 | (((is_rgb_or_hsv) || (colsp) == V4L2_COLORSPACE_JPEG) ? \ |
| 383 | 383 | V4L2_QUANTIZATION_FULL_RANGE : V4L2_QUANTIZATION_LIM_RANGE)) |
| 384 | 384 | |
| 385 | +/* | |
| 386 | + * Deprecated names for opRGB colorspace (IEC 61966-2-5) | |
| 387 | + * | |
| 388 | + * WARNING: Please don't use these deprecated defines in your code, as | |
| 389 | + * there is a chance we have to remove them in the future. | |
| 390 | + */ | |
| 391 | +#ifndef __KERNEL__ | |
| 392 | +#define V4L2_COLORSPACE_ADOBERGB V4L2_COLORSPACE_OPRGB | |
| 393 | +#define V4L2_XFER_FUNC_ADOBERGB V4L2_XFER_FUNC_OPRGB | |
| 394 | +#endif | |
| 395 | + | |
| 385 | 396 | enum v4l2_priority { |
| 386 | 397 | V4L2_PRIORITY_UNSET = 0, /* not initialized */ |
| 387 | 398 | V4L2_PRIORITY_BACKGROUND = 1, |
| @@ -635,6 +646,7 @@ struct v4l2_pix_format { · 247 unmodified lines | ||
| 635 | 646 | #define V4L2_PIX_FMT_H263 v4l2_fourcc('H', '2', '6', '3') /* H263 */ |
| 636 | 647 | #define V4L2_PIX_FMT_MPEG1 v4l2_fourcc('M', 'P', 'G', '1') /* MPEG-1 ES */ |
| 637 | 648 | #define V4L2_PIX_FMT_MPEG2 v4l2_fourcc('M', 'P', 'G', '2') /* MPEG-2 ES */ |
| 649 | +#define V4L2_PIX_FMT_MPEG2_SLICE v4l2_fourcc('M', 'G', '2', 'S') /* MPEG-2 parsed slice data */ | |
| 638 | 650 | #define V4L2_PIX_FMT_MPEG4 v4l2_fourcc('M', 'P', 'G', '4') /* MPEG-4 part 2 ES */ |
| 639 | 651 | #define V4L2_PIX_FMT_XVID v4l2_fourcc('X', 'V', 'I', 'D') /* Xvid */ |
| 640 | 652 | #define V4L2_PIX_FMT_VC1_ANNEX_G v4l2_fourcc('V', 'C', '1', 'G') /* SMPTE 421M Annex G compliant stream */ |
| @@ -676,6 +688,7 @@ struct v4l2_pix_format { · 35 unmodified lines | ||
| 676 | 688 | #define V4L2_PIX_FMT_Z16 v4l2_fourcc('Z', '1', '6', ' ') /* Depth data 16-bit */ |
| 677 | 689 | #define V4L2_PIX_FMT_MT21C v4l2_fourcc('M', 'T', '2', '1') /* Mediatek compressed block mode */ |
| 678 | 690 | #define V4L2_PIX_FMT_INZI v4l2_fourcc('I', 'N', 'Z', 'I') /* Intel Planar Greyscale 10-bit and Depth 16-bit */ |
| 691 | +#define V4L2_PIX_FMT_SUNXI_TILED_NV12 v4l2_fourcc('S', 'T', '1', '2') /* Sunxi Tiled NV12 Format */ | |
| 679 | 692 | |
| 680 | 693 | /* 10bit raw bayer packed, 32 bytes for every 25 pixels, last LSB 6 bits unused */ |
| 681 | 694 | #define V4L2_PIX_FMT_IPU3_SBGGR10 v4l2_fourcc('i', 'p', '3', 'b') /* IPU3 packed 10-bit BGGR bayer */ |
| @@ -703,6 +716,7 @@ struct v4l2_pix_format { · 21 unmodified lines | ||
| 703 | 716 | #define V4L2_META_FMT_VSP1_HGO v4l2_fourcc('V', 'S', 'P', 'H') /* R-Car VSP1 1-D Histogram */ |
| 704 | 717 | #define V4L2_META_FMT_VSP1_HGT v4l2_fourcc('V', 'S', 'P', 'T') /* R-Car VSP1 2-D Histogram */ |
| 705 | 718 | #define V4L2_META_FMT_UVC v4l2_fourcc('U', 'V', 'C', 'H') /* UVC Payload Header metadata */ |
| 719 | +#define V4L2_META_FMT_D4XX v4l2_fourcc('D', '4', 'X', 'X') /* D4XX Payload Header metadata */ | |
| 706 | 720 | |
| 707 | 721 | /* priv field value to indicates that subsequent fields are valid. */ |
| 708 | 722 | #define V4L2_PIX_FMT_PRIV_MAGIC 0xfeedcafe |
| @@ -856,9 +870,16 @@ struct v4l2_requestbuffers { · 147 unmodified lines | ||
| 856 | 870 | __u32 count; |
| 857 | 871 | __u32 type; /* enum v4l2_buf_type */ |
| 858 | 872 | __u32 memory; /* enum v4l2_memory */ |
| 859 | − __u32 reserved[2]; | |
| 873 | + __u32 capabilities; | |
| 874 | + __u32 reserved[1]; | |
| 860 | 875 | }; |
| 861 | 876 | |
| 877 | +/* capabilities for struct v4l2_requestbuffers and v4l2_create_buffers */ | |
| 878 | +#define V4L2_BUF_CAP_SUPPORTS_MMAP (1 << 0) | |
| 879 | +#define V4L2_BUF_CAP_SUPPORTS_USERPTR (1 << 1) | |
| 880 | +#define V4L2_BUF_CAP_SUPPORTS_DMABUF (1 << 2) | |
| 881 | +#define V4L2_BUF_CAP_SUPPORTS_REQUESTS (1 << 3) | |
| 882 | + | |
| 862 | 883 | /** |
| 863 | 884 | * struct v4l2_plane - plane info for multi-planar buffers |
| 864 | 885 | * @bytesused: number of bytes occupied by data in the plane (payload) |
| @@ -917,6 +938,7 @@ struct v4l2_plane { · 52 unmodified lines | ||
| 917 | 938 | * @length: size in bytes of the buffer (NOT its payload) for single-plane |
| 918 | 939 | * buffers (when type != *_MPLANE); number of elements in the |
| 919 | 940 | * planes array for multi-plane buffers |
| 941 | + * @request_fd: fd of the request that this buffer should use | |
| 920 | 942 | * |
| 921 | 943 | * Contains data exchanged by application and driver using one of the Streaming |
| 922 | 944 | * I/O methods. |
| @@ -941,7 +963,10 @@ struct v4l2_buffer { · 18 unmodified lines | ||
| 941 | 963 | } m; |
| 942 | 964 | __u32 length; |
| 943 | 965 | __u32 reserved2; |
| 944 | − __u32 reserved; | |
| 966 | + union { | |
| 967 | + __s32 request_fd; | |
| 968 | + __u32 reserved; | |
| 969 | + }; | |
| 945 | 970 | }; |
| 946 | 971 | |
| 947 | 972 | /* Flags for 'flags' field */ |
| @@ -959,6 +984,8 @@ struct v4l2_buffer { · 11 unmodified lines | ||
| 959 | 984 | #define V4L2_BUF_FLAG_BFRAME 0x00000020 |
| 960 | 985 | /* Buffer is ready, but the data contained within is corrupted. */ |
| 961 | 986 | #define V4L2_BUF_FLAG_ERROR 0x00000040 |
| 987 | +/* Buffer is added to an unqueued request */ | |
| 988 | +#define V4L2_BUF_FLAG_IN_REQUEST 0x00000080 | |
| 962 | 989 | /* timecode field is valid */ |
| 963 | 990 | #define V4L2_BUF_FLAG_TIMECODE 0x00000100 |
| 964 | 991 | /* Buffer is prepared for queuing */ |
| @@ -977,6 +1004,8 @@ struct v4l2_buffer { · 12 unmodified lines | ||
| 977 | 1004 | #define V4L2_BUF_FLAG_TSTAMP_SRC_SOE 0x00010000 |
| 978 | 1005 | /* mem2mem encoder/decoder */ |
| 979 | 1006 | #define V4L2_BUF_FLAG_LAST 0x00100000 |
| 1007 | +/* request_fd is valid */ | |
| 1008 | +#define V4L2_BUF_FLAG_REQUEST_FD 0x00800000 | |
| 980 | 1009 | |
| 981 | 1010 | /** |
| 982 | 1011 | * struct v4l2_exportbuffer - export of video buffer as DMABUF file descriptor |
| @@ -1400,6 +1429,13 @@ struct v4l2_bt_timings { · 417 unmodified lines | ||
| 1400 | 1429 | * InfoFrame). |
| 1401 | 1430 | */ |
| 1402 | 1431 | #define V4L2_DV_FL_HAS_HDMI_VIC (1 << 8) |
| 1432 | +/* | |
| 1433 | + * CEA-861 specific: only valid for video receivers. | |
| 1434 | + * If set, then HW can detect the difference between regular FPS and | |
| 1435 | + * 1000/1001 FPS. Note: This flag is only valid for HDMI VIC codes with | |
| 1436 | + * the V4L2_DV_FL_CAN_REDUCE_FPS flag set. | |
| 1437 | + */ | |
| 1438 | +#define V4L2_DV_FL_CAN_DETECT_REDUCED_FPS (1 << 9) | |
| 1403 | 1439 | |
| 1404 | 1440 | /* A few useful defines to calculate the total blanking and frame sizes */ |
| 1405 | 1441 | #define V4L2_DV_BT_BLANKING_WIDTH(bt) \ |
| @@ -1586,6 +1622,8 @@ struct v4l2_ext_control { · 180 unmodified lines | ||
| 1586 | 1622 | __u8 __user *p_u8; |
| 1587 | 1623 | __u16 __user *p_u16; |
| 1588 | 1624 | __u32 __user *p_u32; |
| 1625 | + struct v4l2_ctrl_mpeg2_slice_params __user *p_mpeg2_slice_params; | |
| 1626 | + struct v4l2_ctrl_mpeg2_quantization __user *p_mpeg2_quantization; | |
| 1589 | 1627 | void __user *ptr; |
| 1590 | 1628 | }; |
| 1591 | 1629 | } __attribute__ ((packed)); |
| @@ -1599,7 +1637,8 @@ struct v4l2_ext_controls { · 7 unmodified lines | ||
| 1599 | 1637 | }; |
| 1600 | 1638 | __u32 count; |
| 1601 | 1639 | __u32 error_idx; |
| 1602 | − __u32 reserved[2]; | |
| 1640 | + __s32 request_fd; | |
| 1641 | + __u32 reserved[1]; | |
| 1603 | 1642 | struct v4l2_ext_control *controls; |
| 1604 | 1643 | }; |
| 1605 | 1644 | |
| @@ -1612,6 +1651,7 @@ struct v4l2_ext_controls { · 6 unmodified lines | ||
| 1612 | 1651 | #define V4L2_CTRL_MAX_DIMS (4) |
| 1613 | 1652 | #define V4L2_CTRL_WHICH_CUR_VAL 0 |
| 1614 | 1653 | #define V4L2_CTRL_WHICH_DEF_VAL 0x0f000000 |
| 1654 | +#define V4L2_CTRL_WHICH_REQUEST_VAL 0x0f010000 | |
| 1615 | 1655 | |
| 1616 | 1656 | enum v4l2_ctrl_type { |
| 1617 | 1657 | V4L2_CTRL_TYPE_INTEGER = 1, |
| @@ -1629,6 +1669,8 @@ enum v4l2_ctrl_type { · 11 unmodified lines | ||
| 1629 | 1669 | V4L2_CTRL_TYPE_U8 = 0x0100, |
| 1630 | 1670 | V4L2_CTRL_TYPE_U16 = 0x0101, |
| 1631 | 1671 | V4L2_CTRL_TYPE_U32 = 0x0102, |
| 1672 | + V4L2_CTRL_TYPE_MPEG2_SLICE_PARAMS = 0x0103, | |
| 1673 | + V4L2_CTRL_TYPE_MPEG2_QUANTIZATION = 0x0104, | |
| 1632 | 1674 | }; |
| 1633 | 1675 | |
| 1634 | 1676 | /* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */ |
| @@ -2302,6 +2344,7 @@ struct v4l2_dbg_chip_info { · 667 unmodified lines | ||
| 2302 | 2344 | * return: number of created buffers |
| 2303 | 2345 | * @memory: enum v4l2_memory; buffer memory type |
| 2304 | 2346 | * @format: frame format, for which buffers are requested |
| 2347 | + * @capabilities: capabilities of this buffer type. | |
| 2305 | 2348 | * @reserved: future extensions |
| 2306 | 2349 | */ |
| 2307 | 2350 | struct v4l2_create_buffers { |
| @@ -2309,7 +2352,8 @@ struct v4l2_create_buffers { · 1 unmodified line | ||
| 2309 | 2352 | __u32 count; |
| 2310 | 2353 | __u32 memory; |
| 2311 | 2354 | struct v4l2_format format; |
| 2312 | − __u32 reserved[8]; | |
| 2355 | + __u32 capabilities; | |
| 2356 | + __u32 reserved[7]; | |
| 2313 | 2357 | }; |
| 2314 | 2358 | |
| 2315 | 2359 | /* |
| @@ -34,15 +34,23 @@ · 33 unmodified lines | ||
| 34 | 34 | #define VIRTIO_BALLOON_F_MUST_TELL_HOST 0 /* Tell before reclaiming pages */ |
| 35 | 35 | #define VIRTIO_BALLOON_F_STATS_VQ 1 /* Memory Stats virtqueue */ |
| 36 | 36 | #define VIRTIO_BALLOON_F_DEFLATE_ON_OOM 2 /* Deflate balloon on OOM */ |
| 37 | +#define VIRTIO_BALLOON_F_FREE_PAGE_HINT 3 /* VQ to report free pages */ | |
| 38 | +#define VIRTIO_BALLOON_F_PAGE_POISON 4 /* Guest is using page poisoning */ | |
| 37 | 39 | |
| 38 | 40 | /* Size of a PFN in the balloon interface. */ |
| 39 | 41 | #define VIRTIO_BALLOON_PFN_SHIFT 12 |
| 40 | 42 | |
| 43 | +#define VIRTIO_BALLOON_CMD_ID_STOP 0 | |
| 44 | +#define VIRTIO_BALLOON_CMD_ID_DONE 1 | |
| 41 | 45 | struct virtio_balloon_config { |
| 42 | 46 | /* Number of pages host wants Guest to give up. */ |
| 43 | 47 | __u32 num_pages; |
| 44 | 48 | /* Number of pages we've actually got in balloon. */ |
| 45 | 49 | __u32 actual; |
| 50 | + /* Free page report command id, readonly by guest */ | |
| 51 | + __u32 free_page_report_cmd_id; | |
| 52 | + /* Stores PAGE_POISON if page poisoning is in use */ | |
| 53 | + __u32 poison_val; | |
| 46 | 54 | }; |
| 47 | 55 | |
| 48 | 56 | #define VIRTIO_BALLOON_S_SWAP_IN 0 /* Amount of memory swapped in */ |
| @@ -763,10 +763,28 @@ struct ib_uverbs_sge { · 762 unmodified lines | ||
| 763 | 763 | __u32 lkey; |
| 764 | 764 | }; |
| 765 | 765 | |
| 766 | +enum ib_uverbs_wr_opcode { | |
| 767 | + IB_UVERBS_WR_RDMA_WRITE = 0, | |
| 768 | + IB_UVERBS_WR_RDMA_WRITE_WITH_IMM = 1, | |
| 769 | + IB_UVERBS_WR_SEND = 2, | |
| 770 | + IB_UVERBS_WR_SEND_WITH_IMM = 3, | |
| 771 | + IB_UVERBS_WR_RDMA_READ = 4, | |
| 772 | + IB_UVERBS_WR_ATOMIC_CMP_AND_SWP = 5, | |
| 773 | + IB_UVERBS_WR_ATOMIC_FETCH_AND_ADD = 6, | |
| 774 | + IB_UVERBS_WR_LOCAL_INV = 7, | |
| 775 | + IB_UVERBS_WR_BIND_MW = 8, | |
| 776 | + IB_UVERBS_WR_SEND_WITH_INV = 9, | |
| 777 | + IB_UVERBS_WR_TSO = 10, | |
| 778 | + IB_UVERBS_WR_RDMA_READ_WITH_INV = 11, | |
| 779 | + IB_UVERBS_WR_MASKED_ATOMIC_CMP_AND_SWP = 12, | |
| 780 | + IB_UVERBS_WR_MASKED_ATOMIC_FETCH_AND_ADD = 13, | |
| 781 | + /* Review enum ib_wr_opcode before modifying this */ | |
| 782 | +}; | |
| 783 | + | |
| 766 | 784 | struct ib_uverbs_send_wr { |
| 767 | 785 | __aligned_u64 wr_id; |
| 768 | 786 | __u32 num_sge; |
| 769 | − __u32 opcode; | |
| 787 | + __u32 opcode; /* see enum ib_uverbs_wr_opcode */ | |
| 770 | 788 | __u32 send_flags; |
| 771 | 789 | union { |
| 772 | 790 | __be32 imm_data; |
| @@ -45,6 +45,9 @@ enum { · 44 unmodified lines | ||
| 45 | 45 | MLX5_QP_FLAG_BFREG_INDEX = 1 << 3, |
| 46 | 46 | MLX5_QP_FLAG_TYPE_DCT = 1 << 4, |
| 47 | 47 | MLX5_QP_FLAG_TYPE_DCI = 1 << 5, |
| 48 | + MLX5_QP_FLAG_TIR_ALLOW_SELF_LB_UC = 1 << 6, | |
| 49 | + MLX5_QP_FLAG_TIR_ALLOW_SELF_LB_MC = 1 << 7, | |
| 50 | + MLX5_QP_FLAG_ALLOW_SCATTER_CQE = 1 << 8, | |
| 48 | 51 | }; |
| 49 | 52 | |
| 50 | 53 | enum { |
| @@ -349,9 +352,22 @@ struct mlx5_ib_create_qp_rss { · 298 unmodified lines | ||
| 349 | 352 | __u32 flags; |
| 350 | 353 | }; |
| 351 | 354 | |
| 355 | +enum mlx5_ib_create_qp_resp_mask { | |
| 356 | + MLX5_IB_CREATE_QP_RESP_MASK_TIRN = 1UL << 0, | |
| 357 | + MLX5_IB_CREATE_QP_RESP_MASK_TISN = 1UL << 1, | |
| 358 | + MLX5_IB_CREATE_QP_RESP_MASK_RQN = 1UL << 2, | |
| 359 | + MLX5_IB_CREATE_QP_RESP_MASK_SQN = 1UL << 3, | |
| 360 | +}; | |
| 361 | + | |
| 352 | 362 | struct mlx5_ib_create_qp_resp { |
| 353 | 363 | __u32 bfreg_index; |
| 354 | 364 | __u32 reserved; |
| 365 | + __u32 comp_mask; | |
| 366 | + __u32 tirn; | |
| 367 | + __u32 tisn; | |
| 368 | + __u32 rqn; | |
| 369 | + __u32 sqn; | |
| 370 | + __u32 reserved1; | |
| 355 | 371 | }; |
| 356 | 372 | |
| 357 | 373 | struct mlx5_ib_alloc_mw { |
| @@ -125,6 +125,7 @@ enum mlx5_ib_flow_matcher_create_attrs { · 124 unmodified lines | ||
| 125 | 125 | MLX5_IB_ATTR_FLOW_MATCHER_MATCH_MASK, |
| 126 | 126 | MLX5_IB_ATTR_FLOW_MATCHER_FLOW_TYPE, |
| 127 | 127 | MLX5_IB_ATTR_FLOW_MATCHER_MATCH_CRITERIA, |
| 128 | + MLX5_IB_ATTR_FLOW_MATCHER_FLOW_FLAGS, | |
| 128 | 129 | }; |
| 129 | 130 | |
| 130 | 131 | enum mlx5_ib_flow_matcher_destroy_attrs { |
| @@ -155,6 +156,8 @@ enum mlx5_ib_create_flow_attrs { · 24 unmodified lines | ||
| 155 | 156 | MLX5_IB_ATTR_CREATE_FLOW_DEST_QP, |
| 156 | 157 | MLX5_IB_ATTR_CREATE_FLOW_DEST_DEVX, |
| 157 | 158 | MLX5_IB_ATTR_CREATE_FLOW_MATCHER, |
| 159 | + MLX5_IB_ATTR_CREATE_FLOW_ARR_FLOW_ACTIONS, | |
| 160 | + MLX5_IB_ATTR_CREATE_FLOW_TAG, | |
| 158 | 161 | }; |
| 159 | 162 | |
| 160 | 163 | enum mlx5_ib_destoy_flow_attrs { |
| @@ -166,4 +169,22 @@ enum mlx5_ib_flow_methods { · 5 unmodified lines | ||
| 166 | 169 | MLX5_IB_METHOD_DESTROY_FLOW, |
| 167 | 170 | }; |
| 168 | 171 | |
| 172 | +enum mlx5_ib_flow_action_methods { | |
| 173 | + MLX5_IB_METHOD_FLOW_ACTION_CREATE_MODIFY_HEADER = (1U << UVERBS_ID_NS_SHIFT), | |
| 174 | + MLX5_IB_METHOD_FLOW_ACTION_CREATE_PACKET_REFORMAT, | |
| 175 | +}; | |
| 176 | + | |
| 177 | +enum mlx5_ib_create_flow_action_create_modify_header_attrs { | |
| 178 | + MLX5_IB_ATTR_CREATE_MODIFY_HEADER_HANDLE = (1U << UVERBS_ID_NS_SHIFT), | |
| 179 | + MLX5_IB_ATTR_CREATE_MODIFY_HEADER_ACTIONS_PRM, | |
| 180 | + MLX5_IB_ATTR_CREATE_MODIFY_HEADER_FT_TYPE, | |
| 181 | +}; | |
| 182 | + | |
| 183 | +enum mlx5_ib_create_flow_action_create_packet_reformat_attrs { | |
| 184 | + MLX5_IB_ATTR_CREATE_PACKET_REFORMAT_HANDLE = (1U << UVERBS_ID_NS_SHIFT), | |
| 185 | + MLX5_IB_ATTR_CREATE_PACKET_REFORMAT_TYPE, | |
| 186 | + MLX5_IB_ATTR_CREATE_PACKET_REFORMAT_FT_TYPE, | |
| 187 | + MLX5_IB_ATTR_CREATE_PACKET_REFORMAT_DATA_BUF, | |
| 188 | +}; | |
| 189 | + | |
| 169 | 190 | #endif |
| @@ -39,5 +39,17 @@ enum mlx5_ib_uapi_flow_action_flags { · 38 unmodified lines | ||
| 39 | 39 | MLX5_IB_UAPI_FLOW_ACTION_FLAGS_REQUIRE_METADATA = 1 << 0, |
| 40 | 40 | }; |
| 41 | 41 | |
| 42 | +enum mlx5_ib_uapi_flow_table_type { | |
| 43 | + MLX5_IB_UAPI_FLOW_TABLE_TYPE_NIC_RX = 0x0, | |
| 44 | + MLX5_IB_UAPI_FLOW_TABLE_TYPE_NIC_TX = 0x1, | |
| 45 | +}; | |
| 46 | + | |
| 47 | +enum mlx5_ib_uapi_flow_action_packet_reformat_type { | |
| 48 | + MLX5_IB_UAPI_FLOW_ACTION_PACKET_REFORMAT_TYPE_L2_TUNNEL_TO_L2 = 0x0, | |
| 49 | + MLX5_IB_UAPI_FLOW_ACTION_PACKET_REFORMAT_TYPE_L2_TO_L2_TUNNEL = 0x1, | |
| 50 | + MLX5_IB_UAPI_FLOW_ACTION_PACKET_REFORMAT_TYPE_L3_TUNNEL_TO_L2 = 0x2, | |
| 51 | + MLX5_IB_UAPI_FLOW_ACTION_PACKET_REFORMAT_TYPE_L2_TO_L3_TUNNEL = 0x3, | |
| 52 | +}; | |
| 53 | + | |
| 42 | 54 | #endif |
| 43 | 55 | |
| @@ -227,8 +227,9 @@ enum rdma_nldev_command { · 226 unmodified lines | ||
| 227 | 227 | RDMA_NLDEV_CMD_UNSPEC, |
| 228 | 228 | |
| 229 | 229 | RDMA_NLDEV_CMD_GET, /* can dump */ |
| 230 | + RDMA_NLDEV_CMD_SET, | |
| 230 | 231 | |
| 231 | − /* 2 - 4 are free to use */ | |
| 232 | + /* 3 - 4 are free to use */ | |
| 232 | 233 | |
| 233 | 234 | RDMA_NLDEV_CMD_PORT_GET = 5, /* can dump */ |
| 234 | 235 | |
| @@ -53,7 +53,7 @@ enum { · 52 unmodified lines | ||
| 53 | 53 | |
| 54 | 54 | struct ib_uverbs_attr { |
| 55 | 55 | __u16 attr_id; /* command specific type attribute */ |
| 56 | − __u16 len; /* only for pointers */ | |
| 56 | + __u16 len; /* only for pointers and IDRs array */ | |
| 57 | 57 | __u16 flags; /* combination of UVERBS_ATTR_F_XXXX */ |
| 58 | 58 | union { |
| 59 | 59 | struct { |
| @@ -63,7 +63,10 @@ struct ib_uverbs_attr { · 3 unmodified lines | ||
| 63 | 63 | __u16 reserved; |
| 64 | 64 | } attr_data; |
| 65 | 65 | union { |
| 66 | − /* Used by PTR_IN/OUT, ENUM_IN and IDR */ | |
| 66 | + /* | |
| 67 | + * ptr to command, inline data, idr/fd or | |
| 68 | + * ptr to __u32 array of IDRs | |
| 69 | + */ | |
| 67 | 70 | __aligned_u64 data; |
| 68 | 71 | /* Used by FD_IN and FD_OUT */ |
| 69 | 72 | __s64 data_s64; |
| @@ -0,0 +1,106 @@ | ||
| 1 | +/* SPDX-License-Identifier: GPL-2.0 */ | |
| 2 | +/* | |
| 3 | + * UFS Transport SGIO v4 BSG Message Support | |
| 4 | + * | |
| 5 | + * Copyright (C) 2011-2013 Samsung India Software Operations | |
| 6 | + * Copyright (C) 2018 Western Digital Corporation | |
| 7 | + */ | |
| 8 | +#ifndef SCSI_BSG_UFS_H | |
| 9 | +#define SCSI_BSG_UFS_H | |
| 10 | + | |
| 11 | +#include <linux/types.h> | |
| 12 | +/* | |
| 13 | + * This file intended to be included by both kernel and user space | |
| 14 | + */ | |
| 15 | + | |
| 16 | +#define UFS_CDB_SIZE 16 | |
| 17 | +#define UPIU_TRANSACTION_UIC_CMD 0x1F | |
| 18 | +/* uic commands are 4DW long, per UFSHCI V2.1 paragraph 5.6.1 */ | |
| 19 | +#define UIC_CMD_SIZE (sizeof(__u32) * 4) | |
| 20 | + | |
| 21 | +/** | |
| 22 | + * struct utp_upiu_header - UPIU header structure | |
| 23 | + * @dword_0: UPIU header DW-0 | |
| 24 | + * @dword_1: UPIU header DW-1 | |
| 25 | + * @dword_2: UPIU header DW-2 | |
| 26 | + */ | |
| 27 | +struct utp_upiu_header { | |
| 28 | + __be32 dword_0; | |
| 29 | + __be32 dword_1; | |
| 30 | + __be32 dword_2; | |
| 31 | +}; | |
| 32 | + | |
| 33 | +/** | |
| 34 | + * struct utp_upiu_query - upiu request buffer structure for | |
| 35 | + * query request. | |
| 36 | + * @opcode: command to perform B-0 | |
| 37 | + * @idn: a value that indicates the particular type of data B-1 | |
| 38 | + * @index: Index to further identify data B-2 | |
| 39 | + * @selector: Index to further identify data B-3 | |
| 40 | + * @reserved_osf: spec reserved field B-4,5 | |
| 41 | + * @length: number of descriptor bytes to read/write B-6,7 | |
| 42 | + * @value: Attribute value to be written DW-5 | |
| 43 | + * @reserved: spec reserved DW-6,7 | |
| 44 | + */ | |
| 45 | +struct utp_upiu_query { | |
| 46 | + __u8 opcode; | |
| 47 | + __u8 idn; | |
| 48 | + __u8 index; | |
| 49 | + __u8 selector; | |
| 50 | + __be16 reserved_osf; | |
| 51 | + __be16 length; | |
| 52 | + __be32 value; | |
| 53 | + __be32 reserved[2]; | |
| 54 | +}; | |
| 55 | + | |
| 56 | +/** | |
| 57 | + * struct utp_upiu_cmd - Command UPIU structure | |
| 58 | + * @data_transfer_len: Data Transfer Length DW-3 | |
| 59 | + * @cdb: Command Descriptor Block CDB DW-4 to DW-7 | |
| 60 | + */ | |
| 61 | +struct utp_upiu_cmd { | |
| 62 | + __be32 exp_data_transfer_len; | |
| 63 | + __u8 cdb[UFS_CDB_SIZE]; | |
| 64 | +}; | |
| 65 | + | |
| 66 | +/** | |
| 67 | + * struct utp_upiu_req - general upiu request structure | |
| 68 | + * @header:UPIU header structure DW-0 to DW-2 | |
| 69 | + * @sc: fields structure for scsi command DW-3 to DW-7 | |
| 70 | + * @qr: fields structure for query request DW-3 to DW-7 | |
| 71 | + */ | |
| 72 | +struct utp_upiu_req { | |
| 73 | + struct utp_upiu_header header; | |
| 74 | + union { | |
| 75 | + struct utp_upiu_cmd sc; | |
| 76 | + struct utp_upiu_query qr; | |
| 77 | + struct utp_upiu_query tr; | |
| 78 | + /* use utp_upiu_query to host the 4 dwords of uic command */ | |
| 79 | + struct utp_upiu_query uc; | |
| 80 | + }; | |
| 81 | +}; | |
| 82 | + | |
| 83 | +/* request (CDB) structure of the sg_io_v4 */ | |
| 84 | +struct ufs_bsg_request { | |
| 85 | + __u32 msgcode; | |
| 86 | + struct utp_upiu_req upiu_req; | |
| 87 | +}; | |
| 88 | + | |
| 89 | +/* response (request sense data) structure of the sg_io_v4 */ | |
| 90 | +struct ufs_bsg_reply { | |
| 91 | + /* | |
| 92 | + * The completion result. Result exists in two forms: | |
| 93 | + * if negative, it is an -Exxx system errno value. There will | |
| 94 | + * be no further reply information supplied. | |
| 95 | + * else, it's the 4-byte scsi error result, with driver, host, | |
| 96 | + * msg and status fields. The per-msgcode reply structure | |
| 97 | + * will contain valid data. | |
| 98 | + */ | |
| 99 | + __u32 result; | |
| 100 | + | |
| 101 | + /* If there was reply_payload, how much was received? */ | |
| 102 | + __u32 reply_payload_rcv_len; | |
| 103 | + | |
| 104 | + struct utp_upiu_req upiu_rsp; | |
| 105 | +}; | |
| 106 | +#endif /* UFS_BSG_H */ | |
| @@ -752,7 +752,7 @@ struct snd_timer_info { · 751 unmodified lines | ||
| 752 | 752 | #define SNDRV_TIMER_PSFLG_EARLY_EVENT (1<<2) /* write early event to the poll queue */ |
| 753 | 753 | |
| 754 | 754 | struct snd_timer_params { |
| 755 | − unsigned int flags; /* flags - SNDRV_MIXER_PSFLG_* */ | |
| 755 | + unsigned int flags; /* flags - SNDRV_TIMER_PSFLG_* */ | |
| 756 | 756 | unsigned int ticks; /* requested resolution in ticks */ |
| 757 | 757 | unsigned int queue_size; /* total size of queue (32-1024) */ |
| 758 | 758 | unsigned int reserved0; /* reserved, was: failure locations */ |