diff options
Diffstat (limited to 'include/uapi')
68 files changed, 3900 insertions, 552 deletions
diff --git a/include/uapi/asm-generic/signal.h b/include/uapi/asm-generic/signal.h index 6fae30fd16ab..9df61f1edb0f 100644 --- a/include/uapi/asm-generic/signal.h +++ b/include/uapi/asm-generic/signal.h | |||
| @@ -93,6 +93,11 @@ typedef unsigned long old_sigset_t; | |||
| 93 | 93 | ||
| 94 | #include <asm-generic/signal-defs.h> | 94 | #include <asm-generic/signal-defs.h> |
| 95 | 95 | ||
| 96 | #ifdef SA_RESTORER | ||
| 97 | #define __ARCH_HAS_SA_RESTORER | ||
| 98 | #endif | ||
| 99 | |||
| 100 | #ifndef __KERNEL__ | ||
| 96 | struct sigaction { | 101 | struct sigaction { |
| 97 | __sighandler_t sa_handler; | 102 | __sighandler_t sa_handler; |
| 98 | unsigned long sa_flags; | 103 | unsigned long sa_flags; |
| @@ -101,10 +106,7 @@ struct sigaction { | |||
| 101 | #endif | 106 | #endif |
| 102 | sigset_t sa_mask; /* mask last for extensibility */ | 107 | sigset_t sa_mask; /* mask last for extensibility */ |
| 103 | }; | 108 | }; |
| 104 | 109 | #endif | |
| 105 | struct k_sigaction { | ||
| 106 | struct sigaction sa; | ||
| 107 | }; | ||
| 108 | 110 | ||
| 109 | typedef struct sigaltstack { | 111 | typedef struct sigaltstack { |
| 110 | void __user *ss_sp; | 112 | void __user *ss_sp; |
diff --git a/include/uapi/asm-generic/socket.h b/include/uapi/asm-generic/socket.h index 2d32d073a6f9..4ef3acbba5da 100644 --- a/include/uapi/asm-generic/socket.h +++ b/include/uapi/asm-generic/socket.h | |||
| @@ -22,8 +22,7 @@ | |||
| 22 | #define SO_PRIORITY 12 | 22 | #define SO_PRIORITY 12 |
| 23 | #define SO_LINGER 13 | 23 | #define SO_LINGER 13 |
| 24 | #define SO_BSDCOMPAT 14 | 24 | #define SO_BSDCOMPAT 14 |
| 25 | /* To add :#define SO_REUSEPORT 15 */ | 25 | #define SO_REUSEPORT 15 |
| 26 | |||
| 27 | #ifndef SO_PASSCRED /* powerpc only differs in these */ | 26 | #ifndef SO_PASSCRED /* powerpc only differs in these */ |
| 28 | #define SO_PASSCRED 16 | 27 | #define SO_PASSCRED 16 |
| 29 | #define SO_PEERCRED 17 | 28 | #define SO_PEERCRED 17 |
| @@ -73,4 +72,6 @@ | |||
| 73 | /* Instruct lower device to use last 4-bytes of skb data as FCS */ | 72 | /* Instruct lower device to use last 4-bytes of skb data as FCS */ |
| 74 | #define SO_NOFCS 43 | 73 | #define SO_NOFCS 43 |
| 75 | 74 | ||
| 75 | #define SO_LOCK_FILTER 44 | ||
| 76 | |||
| 76 | #endif /* __ASM_GENERIC_SOCKET_H */ | 77 | #endif /* __ASM_GENERIC_SOCKET_H */ |
diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h index 2c531f478410..0cc74c4403e4 100644 --- a/include/uapi/asm-generic/unistd.h +++ b/include/uapi/asm-generic/unistd.h | |||
| @@ -402,9 +402,9 @@ __SC_COMP(__NR_rt_sigsuspend, sys_rt_sigsuspend, compat_sys_rt_sigsuspend) | |||
| 402 | #define __NR_rt_sigaction 134 | 402 | #define __NR_rt_sigaction 134 |
| 403 | __SC_COMP(__NR_rt_sigaction, sys_rt_sigaction, compat_sys_rt_sigaction) | 403 | __SC_COMP(__NR_rt_sigaction, sys_rt_sigaction, compat_sys_rt_sigaction) |
| 404 | #define __NR_rt_sigprocmask 135 | 404 | #define __NR_rt_sigprocmask 135 |
| 405 | __SYSCALL(__NR_rt_sigprocmask, sys_rt_sigprocmask) | 405 | __SC_COMP(__NR_rt_sigprocmask, sys_rt_sigprocmask, compat_sys_rt_sigprocmask) |
| 406 | #define __NR_rt_sigpending 136 | 406 | #define __NR_rt_sigpending 136 |
| 407 | __SYSCALL(__NR_rt_sigpending, sys_rt_sigpending) | 407 | __SC_COMP(__NR_rt_sigpending, sys_rt_sigpending, compat_sys_rt_sigpending) |
| 408 | #define __NR_rt_sigtimedwait 137 | 408 | #define __NR_rt_sigtimedwait 137 |
| 409 | __SC_COMP(__NR_rt_sigtimedwait, sys_rt_sigtimedwait, \ | 409 | __SC_COMP(__NR_rt_sigtimedwait, sys_rt_sigtimedwait, \ |
| 410 | compat_sys_rt_sigtimedwait) | 410 | compat_sys_rt_sigtimedwait) |
diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h index c4d2e9c74002..07d59419fe6b 100644 --- a/include/uapi/drm/i915_drm.h +++ b/include/uapi/drm/i915_drm.h | |||
| @@ -308,6 +308,8 @@ typedef struct drm_i915_irq_wait { | |||
| 308 | #define I915_PARAM_RSVD_FOR_FUTURE_USE 22 | 308 | #define I915_PARAM_RSVD_FOR_FUTURE_USE 22 |
| 309 | #define I915_PARAM_HAS_SECURE_BATCHES 23 | 309 | #define I915_PARAM_HAS_SECURE_BATCHES 23 |
| 310 | #define I915_PARAM_HAS_PINNED_BATCHES 24 | 310 | #define I915_PARAM_HAS_PINNED_BATCHES 24 |
| 311 | #define I915_PARAM_HAS_EXEC_NO_RELOC 25 | ||
| 312 | #define I915_PARAM_HAS_EXEC_HANDLE_LUT 26 | ||
| 311 | 313 | ||
| 312 | typedef struct drm_i915_getparam { | 314 | typedef struct drm_i915_getparam { |
| 313 | int param; | 315 | int param; |
| @@ -628,7 +630,11 @@ struct drm_i915_gem_exec_object2 { | |||
| 628 | __u64 offset; | 630 | __u64 offset; |
| 629 | 631 | ||
| 630 | #define EXEC_OBJECT_NEEDS_FENCE (1<<0) | 632 | #define EXEC_OBJECT_NEEDS_FENCE (1<<0) |
| 633 | #define EXEC_OBJECT_NEEDS_GTT (1<<1) | ||
| 634 | #define EXEC_OBJECT_WRITE (1<<2) | ||
| 635 | #define __EXEC_OBJECT_UNKNOWN_FLAGS -(EXEC_OBJECT_WRITE<<1) | ||
| 631 | __u64 flags; | 636 | __u64 flags; |
| 637 | |||
| 632 | __u64 rsvd1; | 638 | __u64 rsvd1; |
| 633 | __u64 rsvd2; | 639 | __u64 rsvd2; |
| 634 | }; | 640 | }; |
| @@ -687,6 +693,20 @@ struct drm_i915_gem_execbuffer2 { | |||
| 687 | */ | 693 | */ |
| 688 | #define I915_EXEC_IS_PINNED (1<<10) | 694 | #define I915_EXEC_IS_PINNED (1<<10) |
| 689 | 695 | ||
| 696 | /** Provide a hint to the kernel that the command stream and auxilliary | ||
| 697 | * state buffers already holds the correct presumed addresses and so the | ||
| 698 | * relocation process may be skipped if no buffers need to be moved in | ||
| 699 | * preparation for the execbuffer. | ||
| 700 | */ | ||
| 701 | #define I915_EXEC_NO_RELOC (1<<11) | ||
| 702 | |||
| 703 | /** Use the reloc.handle as an index into the exec object array rather | ||
| 704 | * than as the per-file handle. | ||
| 705 | */ | ||
| 706 | #define I915_EXEC_HANDLE_LUT (1<<12) | ||
| 707 | |||
| 708 | #define __I915_EXEC_UNKNOWN_FLAGS -(I915_EXEC_HANDLE_LUT<<1) | ||
| 709 | |||
| 690 | #define I915_EXEC_CONTEXT_ID_MASK (0xffffffff) | 710 | #define I915_EXEC_CONTEXT_ID_MASK (0xffffffff) |
| 691 | #define i915_execbuffer2_set_context_id(eb2, context) \ | 711 | #define i915_execbuffer2_set_context_id(eb2, context) \ |
| 692 | (eb2).rsvd1 = context & I915_EXEC_CONTEXT_ID_MASK | 712 | (eb2).rsvd1 = context & I915_EXEC_CONTEXT_ID_MASK |
diff --git a/include/uapi/drm/omap_drm.h b/include/uapi/drm/omap_drm.h new file mode 100644 index 000000000000..1d0b1172664e --- /dev/null +++ b/include/uapi/drm/omap_drm.h | |||
| @@ -0,0 +1,123 @@ | |||
| 1 | /* | ||
| 2 | * include/uapi/drm/omap_drm.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 2011 Texas Instruments | ||
| 5 | * Author: Rob Clark <rob@ti.com> | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify it | ||
| 8 | * under the terms of the GNU General Public License version 2 as published by | ||
| 9 | * the Free Software Foundation. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
| 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 14 | * more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License along with | ||
| 17 | * this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 18 | */ | ||
| 19 | |||
| 20 | #ifndef __OMAP_DRM_H__ | ||
| 21 | #define __OMAP_DRM_H__ | ||
| 22 | |||
| 23 | #include <drm/drm.h> | ||
| 24 | |||
| 25 | /* Please note that modifications to all structs defined here are | ||
| 26 | * subject to backwards-compatibility constraints. | ||
| 27 | */ | ||
| 28 | |||
| 29 | #define OMAP_PARAM_CHIPSET_ID 1 /* ie. 0x3430, 0x4430, etc */ | ||
| 30 | |||
| 31 | struct drm_omap_param { | ||
| 32 | uint64_t param; /* in */ | ||
| 33 | uint64_t value; /* in (set_param), out (get_param) */ | ||
| 34 | }; | ||
| 35 | |||
| 36 | #define OMAP_BO_SCANOUT 0x00000001 /* scanout capable (phys contiguous) */ | ||
| 37 | #define OMAP_BO_CACHE_MASK 0x00000006 /* cache type mask, see cache modes */ | ||
| 38 | #define OMAP_BO_TILED_MASK 0x00000f00 /* tiled mapping mask, see tiled modes */ | ||
| 39 | |||
| 40 | /* cache modes */ | ||
| 41 | #define OMAP_BO_CACHED 0x00000000 /* default */ | ||
| 42 | #define OMAP_BO_WC 0x00000002 /* write-combine */ | ||
| 43 | #define OMAP_BO_UNCACHED 0x00000004 /* strongly-ordered (uncached) */ | ||
| 44 | |||
| 45 | /* tiled modes */ | ||
| 46 | #define OMAP_BO_TILED_8 0x00000100 | ||
| 47 | #define OMAP_BO_TILED_16 0x00000200 | ||
| 48 | #define OMAP_BO_TILED_32 0x00000300 | ||
| 49 | #define OMAP_BO_TILED (OMAP_BO_TILED_8 | OMAP_BO_TILED_16 | OMAP_BO_TILED_32) | ||
| 50 | |||
| 51 | union omap_gem_size { | ||
| 52 | uint32_t bytes; /* (for non-tiled formats) */ | ||
| 53 | struct { | ||
| 54 | uint16_t width; | ||
| 55 | uint16_t height; | ||
| 56 | } tiled; /* (for tiled formats) */ | ||
| 57 | }; | ||
| 58 | |||
| 59 | struct drm_omap_gem_new { | ||
| 60 | union omap_gem_size size; /* in */ | ||
| 61 | uint32_t flags; /* in */ | ||
| 62 | uint32_t handle; /* out */ | ||
| 63 | uint32_t __pad; | ||
| 64 | }; | ||
| 65 | |||
| 66 | /* mask of operations: */ | ||
| 67 | enum omap_gem_op { | ||
| 68 | OMAP_GEM_READ = 0x01, | ||
| 69 | OMAP_GEM_WRITE = 0x02, | ||
| 70 | }; | ||
| 71 | |||
| 72 | struct drm_omap_gem_cpu_prep { | ||
| 73 | uint32_t handle; /* buffer handle (in) */ | ||
| 74 | uint32_t op; /* mask of omap_gem_op (in) */ | ||
| 75 | }; | ||
| 76 | |||
| 77 | struct drm_omap_gem_cpu_fini { | ||
| 78 | uint32_t handle; /* buffer handle (in) */ | ||
| 79 | uint32_t op; /* mask of omap_gem_op (in) */ | ||
| 80 | /* TODO maybe here we pass down info about what regions are touched | ||
| 81 | * by sw so we can be clever about cache ops? For now a placeholder, | ||
| 82 | * set to zero and we just do full buffer flush.. | ||
| 83 | */ | ||
| 84 | uint32_t nregions; | ||
| 85 | uint32_t __pad; | ||
| 86 | }; | ||
| 87 | |||
| 88 | struct drm_omap_gem_info { | ||
| 89 | uint32_t handle; /* buffer handle (in) */ | ||
| 90 | uint32_t pad; | ||
| 91 | uint64_t offset; /* mmap offset (out) */ | ||
| 92 | /* note: in case of tiled buffers, the user virtual size can be | ||
| 93 | * different from the physical size (ie. how many pages are needed | ||
| 94 | * to back the object) which is returned in DRM_IOCTL_GEM_OPEN.. | ||
| 95 | * This size here is the one that should be used if you want to | ||
| 96 | * mmap() the buffer: | ||
| 97 | */ | ||
| 98 | uint32_t size; /* virtual size for mmap'ing (out) */ | ||
| 99 | uint32_t __pad; | ||
| 100 | }; | ||
| 101 | |||
| 102 | #define DRM_OMAP_GET_PARAM 0x00 | ||
| 103 | #define DRM_OMAP_SET_PARAM 0x01 | ||
| 104 | /* placeholder for plugin-api | ||
| 105 | #define DRM_OMAP_GET_BASE 0x02 | ||
| 106 | */ | ||
| 107 | #define DRM_OMAP_GEM_NEW 0x03 | ||
| 108 | #define DRM_OMAP_GEM_CPU_PREP 0x04 | ||
| 109 | #define DRM_OMAP_GEM_CPU_FINI 0x05 | ||
| 110 | #define DRM_OMAP_GEM_INFO 0x06 | ||
| 111 | #define DRM_OMAP_NUM_IOCTLS 0x07 | ||
| 112 | |||
| 113 | #define DRM_IOCTL_OMAP_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GET_PARAM, struct drm_omap_param) | ||
| 114 | #define DRM_IOCTL_OMAP_SET_PARAM DRM_IOW (DRM_COMMAND_BASE + DRM_OMAP_SET_PARAM, struct drm_omap_param) | ||
| 115 | /* placeholder for plugin-api | ||
| 116 | #define DRM_IOCTL_OMAP_GET_BASE DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GET_BASE, struct drm_omap_get_base) | ||
| 117 | */ | ||
| 118 | #define DRM_IOCTL_OMAP_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GEM_NEW, struct drm_omap_gem_new) | ||
| 119 | #define DRM_IOCTL_OMAP_GEM_CPU_PREP DRM_IOW (DRM_COMMAND_BASE + DRM_OMAP_GEM_CPU_PREP, struct drm_omap_gem_cpu_prep) | ||
| 120 | #define DRM_IOCTL_OMAP_GEM_CPU_FINI DRM_IOW (DRM_COMMAND_BASE + DRM_OMAP_GEM_CPU_FINI, struct drm_omap_gem_cpu_fini) | ||
| 121 | #define DRM_IOCTL_OMAP_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GEM_INFO, struct drm_omap_gem_info) | ||
| 122 | |||
| 123 | #endif /* __OMAP_DRM_H__ */ | ||
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild index 4e67194fd2c3..5c8a1d25e21c 100644 --- a/include/uapi/linux/Kbuild +++ b/include/uapi/linux/Kbuild | |||
| @@ -68,6 +68,7 @@ header-y += blkpg.h | |||
| 68 | header-y += blktrace_api.h | 68 | header-y += blktrace_api.h |
| 69 | header-y += bpqether.h | 69 | header-y += bpqether.h |
| 70 | header-y += bsg.h | 70 | header-y += bsg.h |
| 71 | header-y += btrfs.h | ||
| 71 | header-y += can.h | 72 | header-y += can.h |
| 72 | header-y += capability.h | 73 | header-y += capability.h |
| 73 | header-y += capi.h | 74 | header-y += capi.h |
diff --git a/include/uapi/linux/acct.h b/include/uapi/linux/acct.h index 11b6ca3e0873..df2f9a0bba6a 100644 --- a/include/uapi/linux/acct.h +++ b/include/uapi/linux/acct.h | |||
| @@ -107,10 +107,12 @@ struct acct_v3 | |||
| 107 | #define ACORE 0x08 /* ... dumped core */ | 107 | #define ACORE 0x08 /* ... dumped core */ |
| 108 | #define AXSIG 0x10 /* ... was killed by a signal */ | 108 | #define AXSIG 0x10 /* ... was killed by a signal */ |
| 109 | 109 | ||
| 110 | #ifdef __BIG_ENDIAN | 110 | #if defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN) |
| 111 | #define ACCT_BYTEORDER 0x80 /* accounting file is big endian */ | 111 | #define ACCT_BYTEORDER 0x80 /* accounting file is big endian */ |
| 112 | #else | 112 | #elif defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN) |
| 113 | #define ACCT_BYTEORDER 0x00 /* accounting file is little endian */ | 113 | #define ACCT_BYTEORDER 0x00 /* accounting file is little endian */ |
| 114 | #else | ||
| 115 | #error unspecified endianness | ||
| 114 | #endif | 116 | #endif |
| 115 | 117 | ||
| 116 | #ifndef __KERNEL__ | 118 | #ifndef __KERNEL__ |
diff --git a/include/uapi/linux/aio_abi.h b/include/uapi/linux/aio_abi.h index 86fa7a71336a..bb2554f7fbd1 100644 --- a/include/uapi/linux/aio_abi.h +++ b/include/uapi/linux/aio_abi.h | |||
| @@ -62,9 +62,9 @@ struct io_event { | |||
| 62 | __s64 res2; /* secondary result */ | 62 | __s64 res2; /* secondary result */ |
| 63 | }; | 63 | }; |
| 64 | 64 | ||
| 65 | #if defined(__LITTLE_ENDIAN) | 65 | #if defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN) |
| 66 | #define PADDED(x,y) x, y | 66 | #define PADDED(x,y) x, y |
| 67 | #elif defined(__BIG_ENDIAN) | 67 | #elif defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN) |
| 68 | #define PADDED(x,y) y, x | 68 | #define PADDED(x,y) y, x |
| 69 | #else | 69 | #else |
| 70 | #error edit for your odd byteorder. | 70 | #error edit for your odd byteorder. |
diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h index 76352ac45f24..9f096f1c0907 100644 --- a/include/uapi/linux/audit.h +++ b/include/uapi/linux/audit.h | |||
| @@ -26,7 +26,6 @@ | |||
| 26 | 26 | ||
| 27 | #include <linux/types.h> | 27 | #include <linux/types.h> |
| 28 | #include <linux/elf-em.h> | 28 | #include <linux/elf-em.h> |
| 29 | #include <linux/ptrace.h> | ||
| 30 | 29 | ||
| 31 | /* The netlink messages for the audit system is divided into blocks: | 30 | /* The netlink messages for the audit system is divided into blocks: |
| 32 | * 1000 - 1099 are for commanding the audit system | 31 | * 1000 - 1099 are for commanding the audit system |
| @@ -106,6 +105,7 @@ | |||
| 106 | #define AUDIT_MMAP 1323 /* Record showing descriptor and flags in mmap */ | 105 | #define AUDIT_MMAP 1323 /* Record showing descriptor and flags in mmap */ |
| 107 | #define AUDIT_NETFILTER_PKT 1324 /* Packets traversing netfilter chains */ | 106 | #define AUDIT_NETFILTER_PKT 1324 /* Packets traversing netfilter chains */ |
| 108 | #define AUDIT_NETFILTER_CFG 1325 /* Netfilter chain modifications */ | 107 | #define AUDIT_NETFILTER_CFG 1325 /* Netfilter chain modifications */ |
| 108 | #define AUDIT_SECCOMP 1326 /* Secure Computing event */ | ||
| 109 | 109 | ||
| 110 | #define AUDIT_AVC 1400 /* SE Linux avc denial or grant */ | 110 | #define AUDIT_AVC 1400 /* SE Linux avc denial or grant */ |
| 111 | #define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */ | 111 | #define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */ |
diff --git a/include/uapi/linux/auto_fs.h b/include/uapi/linux/auto_fs.h index 77cdba9df274..bb991dfe134f 100644 --- a/include/uapi/linux/auto_fs.h +++ b/include/uapi/linux/auto_fs.h | |||
| @@ -28,25 +28,16 @@ | |||
| 28 | #define AUTOFS_MIN_PROTO_VERSION AUTOFS_PROTO_VERSION | 28 | #define AUTOFS_MIN_PROTO_VERSION AUTOFS_PROTO_VERSION |
| 29 | 29 | ||
| 30 | /* | 30 | /* |
| 31 | * Architectures where both 32- and 64-bit binaries can be executed | 31 | * The wait_queue_token (autofs_wqt_t) is part of a structure which is passed |
| 32 | * on 64-bit kernels need this. This keeps the structure format | 32 | * back to the kernel via ioctl from userspace. On architectures where 32- and |
| 33 | * uniform, and makes sure the wait_queue_token isn't too big to be | 33 | * 64-bit userspace binaries can be executed it's important that the size of |
| 34 | * passed back down to the kernel. | 34 | * autofs_wqt_t stays constant between 32- and 64-bit Linux kernels so that we |
| 35 | * | 35 | * do not break the binary ABI interface by changing the structure size. |
| 36 | * This assumes that on these architectures: | ||
| 37 | * mode 32 bit 64 bit | ||
| 38 | * ------------------------- | ||
| 39 | * int 32 bit 32 bit | ||
| 40 | * long 32 bit 64 bit | ||
| 41 | * | ||
| 42 | * If so, 32-bit user-space code should be backwards compatible. | ||
| 43 | */ | 36 | */ |
| 44 | 37 | #if defined(__ia64__) || defined(__alpha__) /* pure 64bit architectures */ | |
| 45 | #if defined(__sparc__) || defined(__mips__) || defined(__x86_64__) \ | ||
| 46 | || defined(__powerpc__) || defined(__s390__) | ||
| 47 | typedef unsigned int autofs_wqt_t; | ||
| 48 | #else | ||
| 49 | typedef unsigned long autofs_wqt_t; | 38 | typedef unsigned long autofs_wqt_t; |
| 39 | #else | ||
| 40 | typedef unsigned int autofs_wqt_t; | ||
| 50 | #endif | 41 | #endif |
| 51 | 42 | ||
| 52 | /* Packet types */ | 43 | /* Packet types */ |
diff --git a/include/uapi/linux/btrfs.h b/include/uapi/linux/btrfs.h new file mode 100644 index 000000000000..fa3a5f9338fc --- /dev/null +++ b/include/uapi/linux/btrfs.h | |||
| @@ -0,0 +1,514 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2007 Oracle. All rights reserved. | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or | ||
| 5 | * modify it under the terms of the GNU General Public | ||
| 6 | * License v2 as published by the Free Software Foundation. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 11 | * General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public | ||
| 14 | * License along with this program; if not, write to the | ||
| 15 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
| 16 | * Boston, MA 021110-1307, USA. | ||
| 17 | */ | ||
| 18 | |||
| 19 | #ifndef _UAPI_LINUX_BTRFS_H | ||
| 20 | #define _UAPI_LINUX_BTRFS_H | ||
| 21 | #include <linux/types.h> | ||
| 22 | #include <linux/ioctl.h> | ||
| 23 | |||
| 24 | #define BTRFS_IOCTL_MAGIC 0x94 | ||
| 25 | #define BTRFS_VOL_NAME_MAX 255 | ||
| 26 | |||
| 27 | /* this should be 4k */ | ||
| 28 | #define BTRFS_PATH_NAME_MAX 4087 | ||
| 29 | struct btrfs_ioctl_vol_args { | ||
| 30 | __s64 fd; | ||
| 31 | char name[BTRFS_PATH_NAME_MAX + 1]; | ||
| 32 | }; | ||
| 33 | |||
| 34 | #define BTRFS_DEVICE_PATH_NAME_MAX 1024 | ||
| 35 | |||
| 36 | #define BTRFS_SUBVOL_CREATE_ASYNC (1ULL << 0) | ||
| 37 | #define BTRFS_SUBVOL_RDONLY (1ULL << 1) | ||
| 38 | #define BTRFS_SUBVOL_QGROUP_INHERIT (1ULL << 2) | ||
| 39 | #define BTRFS_FSID_SIZE 16 | ||
| 40 | #define BTRFS_UUID_SIZE 16 | ||
| 41 | |||
| 42 | #define BTRFS_QGROUP_INHERIT_SET_LIMITS (1ULL << 0) | ||
| 43 | |||
| 44 | struct btrfs_qgroup_limit { | ||
| 45 | __u64 flags; | ||
| 46 | __u64 max_rfer; | ||
| 47 | __u64 max_excl; | ||
| 48 | __u64 rsv_rfer; | ||
| 49 | __u64 rsv_excl; | ||
| 50 | }; | ||
| 51 | |||
| 52 | struct btrfs_qgroup_inherit { | ||
| 53 | __u64 flags; | ||
| 54 | __u64 num_qgroups; | ||
| 55 | __u64 num_ref_copies; | ||
| 56 | __u64 num_excl_copies; | ||
| 57 | struct btrfs_qgroup_limit lim; | ||
| 58 | __u64 qgroups[0]; | ||
| 59 | }; | ||
| 60 | |||
| 61 | struct btrfs_ioctl_qgroup_limit_args { | ||
| 62 | __u64 qgroupid; | ||
| 63 | struct btrfs_qgroup_limit lim; | ||
| 64 | }; | ||
| 65 | |||
| 66 | #define BTRFS_SUBVOL_NAME_MAX 4039 | ||
| 67 | struct btrfs_ioctl_vol_args_v2 { | ||
| 68 | __s64 fd; | ||
| 69 | __u64 transid; | ||
| 70 | __u64 flags; | ||
| 71 | union { | ||
| 72 | struct { | ||
| 73 | __u64 size; | ||
| 74 | struct btrfs_qgroup_inherit __user *qgroup_inherit; | ||
| 75 | }; | ||
| 76 | __u64 unused[4]; | ||
| 77 | }; | ||
| 78 | char name[BTRFS_SUBVOL_NAME_MAX + 1]; | ||
| 79 | }; | ||
| 80 | |||
| 81 | /* | ||
| 82 | * structure to report errors and progress to userspace, either as a | ||
| 83 | * result of a finished scrub, a canceled scrub or a progress inquiry | ||
| 84 | */ | ||
| 85 | struct btrfs_scrub_progress { | ||
| 86 | __u64 data_extents_scrubbed; /* # of data extents scrubbed */ | ||
| 87 | __u64 tree_extents_scrubbed; /* # of tree extents scrubbed */ | ||
| 88 | __u64 data_bytes_scrubbed; /* # of data bytes scrubbed */ | ||
| 89 | __u64 tree_bytes_scrubbed; /* # of tree bytes scrubbed */ | ||
| 90 | __u64 read_errors; /* # of read errors encountered (EIO) */ | ||
| 91 | __u64 csum_errors; /* # of failed csum checks */ | ||
| 92 | __u64 verify_errors; /* # of occurences, where the metadata | ||
| 93 | * of a tree block did not match the | ||
| 94 | * expected values, like generation or | ||
| 95 | * logical */ | ||
| 96 | __u64 no_csum; /* # of 4k data block for which no csum | ||
| 97 | * is present, probably the result of | ||
| 98 | * data written with nodatasum */ | ||
| 99 | __u64 csum_discards; /* # of csum for which no data was found | ||
| 100 | * in the extent tree. */ | ||
| 101 | __u64 super_errors; /* # of bad super blocks encountered */ | ||
| 102 | __u64 malloc_errors; /* # of internal kmalloc errors. These | ||
| 103 | * will likely cause an incomplete | ||
| 104 | * scrub */ | ||
| 105 | __u64 uncorrectable_errors; /* # of errors where either no intact | ||
| 106 | * copy was found or the writeback | ||
| 107 | * failed */ | ||
| 108 | __u64 corrected_errors; /* # of errors corrected */ | ||
| 109 | __u64 last_physical; /* last physical address scrubbed. In | ||
| 110 | * case a scrub was aborted, this can | ||
| 111 | * be used to restart the scrub */ | ||
| 112 | __u64 unverified_errors; /* # of occurences where a read for a | ||
| 113 | * full (64k) bio failed, but the re- | ||
| 114 | * check succeeded for each 4k piece. | ||
| 115 | * Intermittent error. */ | ||
| 116 | }; | ||
| 117 | |||
| 118 | #define BTRFS_SCRUB_READONLY 1 | ||
| 119 | struct btrfs_ioctl_scrub_args { | ||
| 120 | __u64 devid; /* in */ | ||
| 121 | __u64 start; /* in */ | ||
| 122 | __u64 end; /* in */ | ||
| 123 | __u64 flags; /* in */ | ||
| 124 | struct btrfs_scrub_progress progress; /* out */ | ||
| 125 | /* pad to 1k */ | ||
| 126 | __u64 unused[(1024-32-sizeof(struct btrfs_scrub_progress))/8]; | ||
| 127 | }; | ||
| 128 | |||
| 129 | #define BTRFS_IOCTL_DEV_REPLACE_CONT_READING_FROM_SRCDEV_MODE_ALWAYS 0 | ||
| 130 | #define BTRFS_IOCTL_DEV_REPLACE_CONT_READING_FROM_SRCDEV_MODE_AVOID 1 | ||
| 131 | struct btrfs_ioctl_dev_replace_start_params { | ||
| 132 | __u64 srcdevid; /* in, if 0, use srcdev_name instead */ | ||
| 133 | __u64 cont_reading_from_srcdev_mode; /* in, see #define | ||
| 134 | * above */ | ||
| 135 | __u8 srcdev_name[BTRFS_DEVICE_PATH_NAME_MAX + 1]; /* in */ | ||
| 136 | __u8 tgtdev_name[BTRFS_DEVICE_PATH_NAME_MAX + 1]; /* in */ | ||
| 137 | }; | ||
| 138 | |||
| 139 | #define BTRFS_IOCTL_DEV_REPLACE_STATE_NEVER_STARTED 0 | ||
| 140 | #define BTRFS_IOCTL_DEV_REPLACE_STATE_STARTED 1 | ||
| 141 | #define BTRFS_IOCTL_DEV_REPLACE_STATE_FINISHED 2 | ||
| 142 | #define BTRFS_IOCTL_DEV_REPLACE_STATE_CANCELED 3 | ||
| 143 | #define BTRFS_IOCTL_DEV_REPLACE_STATE_SUSPENDED 4 | ||
| 144 | struct btrfs_ioctl_dev_replace_status_params { | ||
| 145 | __u64 replace_state; /* out, see #define above */ | ||
| 146 | __u64 progress_1000; /* out, 0 <= x <= 1000 */ | ||
| 147 | __u64 time_started; /* out, seconds since 1-Jan-1970 */ | ||
| 148 | __u64 time_stopped; /* out, seconds since 1-Jan-1970 */ | ||
| 149 | __u64 num_write_errors; /* out */ | ||
| 150 | __u64 num_uncorrectable_read_errors; /* out */ | ||
| 151 | }; | ||
| 152 | |||
| 153 | #define BTRFS_IOCTL_DEV_REPLACE_CMD_START 0 | ||
| 154 | #define BTRFS_IOCTL_DEV_REPLACE_CMD_STATUS 1 | ||
| 155 | #define BTRFS_IOCTL_DEV_REPLACE_CMD_CANCEL 2 | ||
| 156 | #define BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_ERROR 0 | ||
| 157 | #define BTRFS_IOCTL_DEV_REPLACE_RESULT_NOT_STARTED 1 | ||
| 158 | #define BTRFS_IOCTL_DEV_REPLACE_RESULT_ALREADY_STARTED 2 | ||
| 159 | struct btrfs_ioctl_dev_replace_args { | ||
| 160 | __u64 cmd; /* in */ | ||
| 161 | __u64 result; /* out */ | ||
| 162 | |||
| 163 | union { | ||
| 164 | struct btrfs_ioctl_dev_replace_start_params start; | ||
| 165 | struct btrfs_ioctl_dev_replace_status_params status; | ||
| 166 | }; /* in/out */ | ||
| 167 | |||
| 168 | __u64 spare[64]; | ||
| 169 | }; | ||
| 170 | |||
| 171 | struct btrfs_ioctl_dev_info_args { | ||
| 172 | __u64 devid; /* in/out */ | ||
| 173 | __u8 uuid[BTRFS_UUID_SIZE]; /* in/out */ | ||
| 174 | __u64 bytes_used; /* out */ | ||
| 175 | __u64 total_bytes; /* out */ | ||
| 176 | __u64 unused[379]; /* pad to 4k */ | ||
| 177 | __u8 path[BTRFS_DEVICE_PATH_NAME_MAX]; /* out */ | ||
| 178 | }; | ||
| 179 | |||
| 180 | struct btrfs_ioctl_fs_info_args { | ||
| 181 | __u64 max_id; /* out */ | ||
| 182 | __u64 num_devices; /* out */ | ||
| 183 | __u8 fsid[BTRFS_FSID_SIZE]; /* out */ | ||
| 184 | __u64 reserved[124]; /* pad to 1k */ | ||
| 185 | }; | ||
| 186 | |||
| 187 | /* balance control ioctl modes */ | ||
| 188 | #define BTRFS_BALANCE_CTL_PAUSE 1 | ||
| 189 | #define BTRFS_BALANCE_CTL_CANCEL 2 | ||
| 190 | |||
| 191 | /* | ||
| 192 | * this is packed, because it should be exactly the same as its disk | ||
| 193 | * byte order counterpart (struct btrfs_disk_balance_args) | ||
| 194 | */ | ||
| 195 | struct btrfs_balance_args { | ||
| 196 | __u64 profiles; | ||
| 197 | __u64 usage; | ||
| 198 | __u64 devid; | ||
| 199 | __u64 pstart; | ||
| 200 | __u64 pend; | ||
| 201 | __u64 vstart; | ||
| 202 | __u64 vend; | ||
| 203 | |||
| 204 | __u64 target; | ||
| 205 | |||
| 206 | __u64 flags; | ||
| 207 | |||
| 208 | __u64 unused[8]; | ||
| 209 | } __attribute__ ((__packed__)); | ||
| 210 | |||
| 211 | /* report balance progress to userspace */ | ||
| 212 | struct btrfs_balance_progress { | ||
| 213 | __u64 expected; /* estimated # of chunks that will be | ||
| 214 | * relocated to fulfill the request */ | ||
| 215 | __u64 considered; /* # of chunks we have considered so far */ | ||
| 216 | __u64 completed; /* # of chunks relocated so far */ | ||
| 217 | }; | ||
| 218 | |||
| 219 | #define BTRFS_BALANCE_STATE_RUNNING (1ULL << 0) | ||
| 220 | #define BTRFS_BALANCE_STATE_PAUSE_REQ (1ULL << 1) | ||
| 221 | #define BTRFS_BALANCE_STATE_CANCEL_REQ (1ULL << 2) | ||
| 222 | |||
| 223 | struct btrfs_ioctl_balance_args { | ||
| 224 | __u64 flags; /* in/out */ | ||
| 225 | __u64 state; /* out */ | ||
| 226 | |||
| 227 | struct btrfs_balance_args data; /* in/out */ | ||
| 228 | struct btrfs_balance_args meta; /* in/out */ | ||
| 229 | struct btrfs_balance_args sys; /* in/out */ | ||
| 230 | |||
| 231 | struct btrfs_balance_progress stat; /* out */ | ||
| 232 | |||
| 233 | __u64 unused[72]; /* pad to 1k */ | ||
| 234 | }; | ||
| 235 | |||
| 236 | #define BTRFS_INO_LOOKUP_PATH_MAX 4080 | ||
| 237 | struct btrfs_ioctl_ino_lookup_args { | ||
| 238 | __u64 treeid; | ||
| 239 | __u64 objectid; | ||
| 240 | char name[BTRFS_INO_LOOKUP_PATH_MAX]; | ||
| 241 | }; | ||
| 242 | |||
| 243 | struct btrfs_ioctl_search_key { | ||
| 244 | /* which root are we searching. 0 is the tree of tree roots */ | ||
| 245 | __u64 tree_id; | ||
| 246 | |||
| 247 | /* keys returned will be >= min and <= max */ | ||
| 248 | __u64 min_objectid; | ||
| 249 | __u64 max_objectid; | ||
| 250 | |||
| 251 | /* keys returned will be >= min and <= max */ | ||
| 252 | __u64 min_offset; | ||
| 253 | __u64 max_offset; | ||
| 254 | |||
| 255 | /* max and min transids to search for */ | ||
| 256 | __u64 min_transid; | ||
| 257 | __u64 max_transid; | ||
| 258 | |||
| 259 | /* keys returned will be >= min and <= max */ | ||
| 260 | __u32 min_type; | ||
| 261 | __u32 max_type; | ||
| 262 | |||
| 263 | /* | ||
| 264 | * how many items did userland ask for, and how many are we | ||
| 265 | * returning | ||
| 266 | */ | ||
| 267 | __u32 nr_items; | ||
| 268 | |||
| 269 | /* align to 64 bits */ | ||
| 270 | __u32 unused; | ||
| 271 | |||
| 272 | /* some extra for later */ | ||
| 273 | __u64 unused1; | ||
| 274 | __u64 unused2; | ||
| 275 | __u64 unused3; | ||
| 276 | __u64 unused4; | ||
| 277 | }; | ||
| 278 | |||
| 279 | struct btrfs_ioctl_search_header { | ||
| 280 | __u64 transid; | ||
| 281 | __u64 objectid; | ||
| 282 | __u64 offset; | ||
| 283 | __u32 type; | ||
| 284 | __u32 len; | ||
| 285 | }; | ||
| 286 | |||
| 287 | #define BTRFS_SEARCH_ARGS_BUFSIZE (4096 - sizeof(struct btrfs_ioctl_search_key)) | ||
| 288 | /* | ||
| 289 | * the buf is an array of search headers where | ||
| 290 | * each header is followed by the actual item | ||
| 291 | * the type field is expanded to 32 bits for alignment | ||
| 292 | */ | ||
| 293 | struct btrfs_ioctl_search_args { | ||
| 294 | struct btrfs_ioctl_search_key key; | ||
| 295 | char buf[BTRFS_SEARCH_ARGS_BUFSIZE]; | ||
| 296 | }; | ||
| 297 | |||
| 298 | struct btrfs_ioctl_clone_range_args { | ||
| 299 | __s64 src_fd; | ||
| 300 | __u64 src_offset, src_length; | ||
| 301 | __u64 dest_offset; | ||
| 302 | }; | ||
| 303 | |||
| 304 | /* flags for the defrag range ioctl */ | ||
| 305 | #define BTRFS_DEFRAG_RANGE_COMPRESS 1 | ||
| 306 | #define BTRFS_DEFRAG_RANGE_START_IO 2 | ||
| 307 | |||
| 308 | struct btrfs_ioctl_space_info { | ||
| 309 | __u64 flags; | ||
| 310 | __u64 total_bytes; | ||
| 311 | __u64 used_bytes; | ||
| 312 | }; | ||
| 313 | |||
| 314 | struct btrfs_ioctl_space_args { | ||
| 315 | __u64 space_slots; | ||
| 316 | __u64 total_spaces; | ||
| 317 | struct btrfs_ioctl_space_info spaces[0]; | ||
| 318 | }; | ||
| 319 | |||
| 320 | struct btrfs_data_container { | ||
| 321 | __u32 bytes_left; /* out -- bytes not needed to deliver output */ | ||
| 322 | __u32 bytes_missing; /* out -- additional bytes needed for result */ | ||
| 323 | __u32 elem_cnt; /* out */ | ||
| 324 | __u32 elem_missed; /* out */ | ||
| 325 | __u64 val[0]; /* out */ | ||
| 326 | }; | ||
| 327 | |||
| 328 | struct btrfs_ioctl_ino_path_args { | ||
| 329 | __u64 inum; /* in */ | ||
| 330 | __u64 size; /* in */ | ||
| 331 | __u64 reserved[4]; | ||
| 332 | /* struct btrfs_data_container *fspath; out */ | ||
| 333 | __u64 fspath; /* out */ | ||
| 334 | }; | ||
| 335 | |||
| 336 | struct btrfs_ioctl_logical_ino_args { | ||
| 337 | __u64 logical; /* in */ | ||
| 338 | __u64 size; /* in */ | ||
| 339 | __u64 reserved[4]; | ||
| 340 | /* struct btrfs_data_container *inodes; out */ | ||
| 341 | __u64 inodes; | ||
| 342 | }; | ||
| 343 | |||
| 344 | enum btrfs_dev_stat_values { | ||
| 345 | /* disk I/O failure stats */ | ||
| 346 | BTRFS_DEV_STAT_WRITE_ERRS, /* EIO or EREMOTEIO from lower layers */ | ||
| 347 | BTRFS_DEV_STAT_READ_ERRS, /* EIO or EREMOTEIO from lower layers */ | ||
| 348 | BTRFS_DEV_STAT_FLUSH_ERRS, /* EIO or EREMOTEIO from lower layers */ | ||
| 349 | |||
| 350 | /* stats for indirect indications for I/O failures */ | ||
| 351 | BTRFS_DEV_STAT_CORRUPTION_ERRS, /* checksum error, bytenr error or | ||
| 352 | * contents is illegal: this is an | ||
| 353 | * indication that the block was damaged | ||
| 354 | * during read or write, or written to | ||
| 355 | * wrong location or read from wrong | ||
| 356 | * location */ | ||
| 357 | BTRFS_DEV_STAT_GENERATION_ERRS, /* an indication that blocks have not | ||
| 358 | * been written */ | ||
| 359 | |||
| 360 | BTRFS_DEV_STAT_VALUES_MAX | ||
| 361 | }; | ||
| 362 | |||
| 363 | /* Reset statistics after reading; needs SYS_ADMIN capability */ | ||
| 364 | #define BTRFS_DEV_STATS_RESET (1ULL << 0) | ||
| 365 | |||
| 366 | struct btrfs_ioctl_get_dev_stats { | ||
| 367 | __u64 devid; /* in */ | ||
| 368 | __u64 nr_items; /* in/out */ | ||
| 369 | __u64 flags; /* in/out */ | ||
| 370 | |||
| 371 | /* out values: */ | ||
| 372 | __u64 values[BTRFS_DEV_STAT_VALUES_MAX]; | ||
| 373 | |||
| 374 | __u64 unused[128 - 2 - BTRFS_DEV_STAT_VALUES_MAX]; /* pad to 1k */ | ||
| 375 | }; | ||
| 376 | |||
| 377 | #define BTRFS_QUOTA_CTL_ENABLE 1 | ||
| 378 | #define BTRFS_QUOTA_CTL_DISABLE 2 | ||
| 379 | #define BTRFS_QUOTA_CTL_RESCAN 3 | ||
| 380 | struct btrfs_ioctl_quota_ctl_args { | ||
| 381 | __u64 cmd; | ||
| 382 | __u64 status; | ||
| 383 | }; | ||
| 384 | |||
| 385 | struct btrfs_ioctl_qgroup_assign_args { | ||
| 386 | __u64 assign; | ||
| 387 | __u64 src; | ||
| 388 | __u64 dst; | ||
| 389 | }; | ||
| 390 | |||
| 391 | struct btrfs_ioctl_qgroup_create_args { | ||
| 392 | __u64 create; | ||
| 393 | __u64 qgroupid; | ||
| 394 | }; | ||
| 395 | struct btrfs_ioctl_timespec { | ||
| 396 | __u64 sec; | ||
| 397 | __u32 nsec; | ||
| 398 | }; | ||
| 399 | |||
| 400 | struct btrfs_ioctl_received_subvol_args { | ||
| 401 | char uuid[BTRFS_UUID_SIZE]; /* in */ | ||
| 402 | __u64 stransid; /* in */ | ||
| 403 | __u64 rtransid; /* out */ | ||
| 404 | struct btrfs_ioctl_timespec stime; /* in */ | ||
| 405 | struct btrfs_ioctl_timespec rtime; /* out */ | ||
| 406 | __u64 flags; /* in */ | ||
| 407 | __u64 reserved[16]; /* in */ | ||
| 408 | }; | ||
| 409 | |||
| 410 | /* | ||
| 411 | * Caller doesn't want file data in the send stream, even if the | ||
| 412 | * search of clone sources doesn't find an extent. UPDATE_EXTENT | ||
| 413 | * commands will be sent instead of WRITE commands. | ||
| 414 | */ | ||
| 415 | #define BTRFS_SEND_FLAG_NO_FILE_DATA 0x1 | ||
| 416 | |||
| 417 | struct btrfs_ioctl_send_args { | ||
| 418 | __s64 send_fd; /* in */ | ||
| 419 | __u64 clone_sources_count; /* in */ | ||
| 420 | __u64 __user *clone_sources; /* in */ | ||
| 421 | __u64 parent_root; /* in */ | ||
| 422 | __u64 flags; /* in */ | ||
| 423 | __u64 reserved[4]; /* in */ | ||
| 424 | }; | ||
| 425 | |||
| 426 | #define BTRFS_IOC_SNAP_CREATE _IOW(BTRFS_IOCTL_MAGIC, 1, \ | ||
| 427 | struct btrfs_ioctl_vol_args) | ||
| 428 | #define BTRFS_IOC_DEFRAG _IOW(BTRFS_IOCTL_MAGIC, 2, \ | ||
| 429 | struct btrfs_ioctl_vol_args) | ||
| 430 | #define BTRFS_IOC_RESIZE _IOW(BTRFS_IOCTL_MAGIC, 3, \ | ||
| 431 | struct btrfs_ioctl_vol_args) | ||
| 432 | #define BTRFS_IOC_SCAN_DEV _IOW(BTRFS_IOCTL_MAGIC, 4, \ | ||
| 433 | struct btrfs_ioctl_vol_args) | ||
| 434 | /* trans start and trans end are dangerous, and only for | ||
| 435 | * use by applications that know how to avoid the | ||
| 436 | * resulting deadlocks | ||
| 437 | */ | ||
| 438 | #define BTRFS_IOC_TRANS_START _IO(BTRFS_IOCTL_MAGIC, 6) | ||
| 439 | #define BTRFS_IOC_TRANS_END _IO(BTRFS_IOCTL_MAGIC, 7) | ||
| 440 | #define BTRFS_IOC_SYNC _IO(BTRFS_IOCTL_MAGIC, 8) | ||
| 441 | |||
| 442 | #define BTRFS_IOC_CLONE _IOW(BTRFS_IOCTL_MAGIC, 9, int) | ||
| 443 | #define BTRFS_IOC_ADD_DEV _IOW(BTRFS_IOCTL_MAGIC, 10, \ | ||
| 444 | struct btrfs_ioctl_vol_args) | ||
| 445 | #define BTRFS_IOC_RM_DEV _IOW(BTRFS_IOCTL_MAGIC, 11, \ | ||
| 446 | struct btrfs_ioctl_vol_args) | ||
| 447 | #define BTRFS_IOC_BALANCE _IOW(BTRFS_IOCTL_MAGIC, 12, \ | ||
| 448 | struct btrfs_ioctl_vol_args) | ||
| 449 | |||
| 450 | #define BTRFS_IOC_CLONE_RANGE _IOW(BTRFS_IOCTL_MAGIC, 13, \ | ||
| 451 | struct btrfs_ioctl_clone_range_args) | ||
| 452 | |||
| 453 | #define BTRFS_IOC_SUBVOL_CREATE _IOW(BTRFS_IOCTL_MAGIC, 14, \ | ||
| 454 | struct btrfs_ioctl_vol_args) | ||
| 455 | #define BTRFS_IOC_SNAP_DESTROY _IOW(BTRFS_IOCTL_MAGIC, 15, \ | ||
| 456 | struct btrfs_ioctl_vol_args) | ||
| 457 | #define BTRFS_IOC_DEFRAG_RANGE _IOW(BTRFS_IOCTL_MAGIC, 16, \ | ||
| 458 | struct btrfs_ioctl_defrag_range_args) | ||
| 459 | #define BTRFS_IOC_TREE_SEARCH _IOWR(BTRFS_IOCTL_MAGIC, 17, \ | ||
| 460 | struct btrfs_ioctl_search_args) | ||
| 461 | #define BTRFS_IOC_INO_LOOKUP _IOWR(BTRFS_IOCTL_MAGIC, 18, \ | ||
| 462 | struct btrfs_ioctl_ino_lookup_args) | ||
| 463 | #define BTRFS_IOC_DEFAULT_SUBVOL _IOW(BTRFS_IOCTL_MAGIC, 19, u64) | ||
| 464 | #define BTRFS_IOC_SPACE_INFO _IOWR(BTRFS_IOCTL_MAGIC, 20, \ | ||
| 465 | struct btrfs_ioctl_space_args) | ||
| 466 | #define BTRFS_IOC_START_SYNC _IOR(BTRFS_IOCTL_MAGIC, 24, __u64) | ||
| 467 | #define BTRFS_IOC_WAIT_SYNC _IOW(BTRFS_IOCTL_MAGIC, 22, __u64) | ||
| 468 | #define BTRFS_IOC_SNAP_CREATE_V2 _IOW(BTRFS_IOCTL_MAGIC, 23, \ | ||
| 469 | struct btrfs_ioctl_vol_args_v2) | ||
| 470 | #define BTRFS_IOC_SUBVOL_CREATE_V2 _IOW(BTRFS_IOCTL_MAGIC, 24, \ | ||
| 471 | struct btrfs_ioctl_vol_args_v2) | ||
| 472 | #define BTRFS_IOC_SUBVOL_GETFLAGS _IOR(BTRFS_IOCTL_MAGIC, 25, __u64) | ||
| 473 | #define BTRFS_IOC_SUBVOL_SETFLAGS _IOW(BTRFS_IOCTL_MAGIC, 26, __u64) | ||
| 474 | #define BTRFS_IOC_SCRUB _IOWR(BTRFS_IOCTL_MAGIC, 27, \ | ||
| 475 | struct btrfs_ioctl_scrub_args) | ||
| 476 | #define BTRFS_IOC_SCRUB_CANCEL _IO(BTRFS_IOCTL_MAGIC, 28) | ||
| 477 | #define BTRFS_IOC_SCRUB_PROGRESS _IOWR(BTRFS_IOCTL_MAGIC, 29, \ | ||
| 478 | struct btrfs_ioctl_scrub_args) | ||
| 479 | #define BTRFS_IOC_DEV_INFO _IOWR(BTRFS_IOCTL_MAGIC, 30, \ | ||
| 480 | struct btrfs_ioctl_dev_info_args) | ||
| 481 | #define BTRFS_IOC_FS_INFO _IOR(BTRFS_IOCTL_MAGIC, 31, \ | ||
| 482 | struct btrfs_ioctl_fs_info_args) | ||
| 483 | #define BTRFS_IOC_BALANCE_V2 _IOWR(BTRFS_IOCTL_MAGIC, 32, \ | ||
| 484 | struct btrfs_ioctl_balance_args) | ||
| 485 | #define BTRFS_IOC_BALANCE_CTL _IOW(BTRFS_IOCTL_MAGIC, 33, int) | ||
| 486 | #define BTRFS_IOC_BALANCE_PROGRESS _IOR(BTRFS_IOCTL_MAGIC, 34, \ | ||
| 487 | struct btrfs_ioctl_balance_args) | ||
| 488 | #define BTRFS_IOC_INO_PATHS _IOWR(BTRFS_IOCTL_MAGIC, 35, \ | ||
| 489 | struct btrfs_ioctl_ino_path_args) | ||
| 490 | #define BTRFS_IOC_LOGICAL_INO _IOWR(BTRFS_IOCTL_MAGIC, 36, \ | ||
| 491 | struct btrfs_ioctl_ino_path_args) | ||
| 492 | #define BTRFS_IOC_SET_RECEIVED_SUBVOL _IOWR(BTRFS_IOCTL_MAGIC, 37, \ | ||
| 493 | struct btrfs_ioctl_received_subvol_args) | ||
| 494 | #define BTRFS_IOC_SEND _IOW(BTRFS_IOCTL_MAGIC, 38, struct btrfs_ioctl_send_args) | ||
| 495 | #define BTRFS_IOC_DEVICES_READY _IOR(BTRFS_IOCTL_MAGIC, 39, \ | ||
| 496 | struct btrfs_ioctl_vol_args) | ||
| 497 | #define BTRFS_IOC_QUOTA_CTL _IOWR(BTRFS_IOCTL_MAGIC, 40, \ | ||
| 498 | struct btrfs_ioctl_quota_ctl_args) | ||
| 499 | #define BTRFS_IOC_QGROUP_ASSIGN _IOW(BTRFS_IOCTL_MAGIC, 41, \ | ||
| 500 | struct btrfs_ioctl_qgroup_assign_args) | ||
| 501 | #define BTRFS_IOC_QGROUP_CREATE _IOW(BTRFS_IOCTL_MAGIC, 42, \ | ||
| 502 | struct btrfs_ioctl_qgroup_create_args) | ||
| 503 | #define BTRFS_IOC_QGROUP_LIMIT _IOR(BTRFS_IOCTL_MAGIC, 43, \ | ||
| 504 | struct btrfs_ioctl_qgroup_limit_args) | ||
| 505 | #define BTRFS_IOC_GET_FSLABEL _IOR(BTRFS_IOCTL_MAGIC, 49, \ | ||
| 506 | char[BTRFS_LABEL_SIZE]) | ||
| 507 | #define BTRFS_IOC_SET_FSLABEL _IOW(BTRFS_IOCTL_MAGIC, 50, \ | ||
| 508 | char[BTRFS_LABEL_SIZE]) | ||
| 509 | #define BTRFS_IOC_GET_DEV_STATS _IOWR(BTRFS_IOCTL_MAGIC, 52, \ | ||
| 510 | struct btrfs_ioctl_get_dev_stats) | ||
| 511 | #define BTRFS_IOC_DEV_REPLACE _IOWR(BTRFS_IOCTL_MAGIC, 53, \ | ||
| 512 | struct btrfs_ioctl_dev_replace_args) | ||
| 513 | |||
| 514 | #endif /* _UAPI_LINUX_BTRFS_H */ | ||
diff --git a/include/uapi/linux/can/gw.h b/include/uapi/linux/can/gw.h index 8e1db18c3cb6..ae07bec74f4b 100644 --- a/include/uapi/linux/can/gw.h +++ b/include/uapi/linux/can/gw.h | |||
| @@ -44,6 +44,7 @@ enum { | |||
| 44 | CGW_SRC_IF, /* ifindex of source network interface */ | 44 | CGW_SRC_IF, /* ifindex of source network interface */ |
| 45 | CGW_DST_IF, /* ifindex of destination network interface */ | 45 | CGW_DST_IF, /* ifindex of destination network interface */ |
| 46 | CGW_FILTER, /* specify struct can_filter on source CAN device */ | 46 | CGW_FILTER, /* specify struct can_filter on source CAN device */ |
| 47 | CGW_DELETED, /* number of deleted CAN frames (see max_hops param) */ | ||
| 47 | __CGW_MAX | 48 | __CGW_MAX |
| 48 | }; | 49 | }; |
| 49 | 50 | ||
| @@ -51,6 +52,7 @@ enum { | |||
| 51 | 52 | ||
| 52 | #define CGW_FLAGS_CAN_ECHO 0x01 | 53 | #define CGW_FLAGS_CAN_ECHO 0x01 |
| 53 | #define CGW_FLAGS_CAN_SRC_TSTAMP 0x02 | 54 | #define CGW_FLAGS_CAN_SRC_TSTAMP 0x02 |
| 55 | #define CGW_FLAGS_CAN_IIF_TX_OK 0x04 | ||
| 54 | 56 | ||
| 55 | #define CGW_MOD_FUNCS 4 /* AND OR XOR SET */ | 57 | #define CGW_MOD_FUNCS 4 /* AND OR XOR SET */ |
| 56 | 58 | ||
diff --git a/include/uapi/linux/cdrom.h b/include/uapi/linux/cdrom.h index 898b866b300c..bd17ad5aa06d 100644 --- a/include/uapi/linux/cdrom.h +++ b/include/uapi/linux/cdrom.h | |||
| @@ -908,5 +908,39 @@ struct mode_page_header { | |||
| 908 | __be16 desc_length; | 908 | __be16 desc_length; |
| 909 | }; | 909 | }; |
| 910 | 910 | ||
| 911 | /* removable medium feature descriptor */ | ||
| 912 | struct rm_feature_desc { | ||
| 913 | __be16 feature_code; | ||
| 914 | #if defined(__BIG_ENDIAN_BITFIELD) | ||
| 915 | __u8 reserved1:2; | ||
| 916 | __u8 feature_version:4; | ||
| 917 | __u8 persistent:1; | ||
| 918 | __u8 curr:1; | ||
| 919 | #elif defined(__LITTLE_ENDIAN_BITFIELD) | ||
| 920 | __u8 curr:1; | ||
| 921 | __u8 persistent:1; | ||
| 922 | __u8 feature_version:4; | ||
| 923 | __u8 reserved1:2; | ||
| 924 | #endif | ||
| 925 | __u8 add_len; | ||
| 926 | #if defined(__BIG_ENDIAN_BITFIELD) | ||
| 927 | __u8 mech_type:3; | ||
| 928 | __u8 load:1; | ||
| 929 | __u8 eject:1; | ||
| 930 | __u8 pvnt_jmpr:1; | ||
| 931 | __u8 dbml:1; | ||
| 932 | __u8 lock:1; | ||
| 933 | #elif defined(__LITTLE_ENDIAN_BITFIELD) | ||
| 934 | __u8 lock:1; | ||
| 935 | __u8 dbml:1; | ||
| 936 | __u8 pvnt_jmpr:1; | ||
| 937 | __u8 eject:1; | ||
| 938 | __u8 load:1; | ||
| 939 | __u8 mech_type:3; | ||
| 940 | #endif | ||
| 941 | __u8 reserved2; | ||
| 942 | __u8 reserved3; | ||
| 943 | __u8 reserved4; | ||
| 944 | }; | ||
| 911 | 945 | ||
| 912 | #endif /* _UAPI_LINUX_CDROM_H */ | 946 | #endif /* _UAPI_LINUX_CDROM_H */ |
diff --git a/include/uapi/linux/dm-ioctl.h b/include/uapi/linux/dm-ioctl.h index 539b179b349c..7e75b6fd8d45 100644 --- a/include/uapi/linux/dm-ioctl.h +++ b/include/uapi/linux/dm-ioctl.h | |||
| @@ -267,9 +267,9 @@ enum { | |||
| 267 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) | 267 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) |
| 268 | 268 | ||
| 269 | #define DM_VERSION_MAJOR 4 | 269 | #define DM_VERSION_MAJOR 4 |
| 270 | #define DM_VERSION_MINOR 23 | 270 | #define DM_VERSION_MINOR 24 |
| 271 | #define DM_VERSION_PATCHLEVEL 1 | 271 | #define DM_VERSION_PATCHLEVEL 0 |
| 272 | #define DM_VERSION_EXTRA "-ioctl (2012-12-18)" | 272 | #define DM_VERSION_EXTRA "-ioctl (2013-01-15)" |
| 273 | 273 | ||
| 274 | /* Status bits */ | 274 | /* Status bits */ |
| 275 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ | 275 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ |
| @@ -336,4 +336,9 @@ enum { | |||
| 336 | */ | 336 | */ |
| 337 | #define DM_SECURE_DATA_FLAG (1 << 15) /* In */ | 337 | #define DM_SECURE_DATA_FLAG (1 << 15) /* In */ |
| 338 | 338 | ||
| 339 | /* | ||
| 340 | * If set, a message generated output data. | ||
| 341 | */ | ||
| 342 | #define DM_DATA_OUT_FLAG (1 << 16) /* Out */ | ||
| 343 | |||
| 339 | #endif /* _LINUX_DM_IOCTL_H */ | 344 | #endif /* _LINUX_DM_IOCTL_H */ |
diff --git a/include/uapi/linux/elf.h b/include/uapi/linux/elf.h index 126a8175e3e2..8072d352b98f 100644 --- a/include/uapi/linux/elf.h +++ b/include/uapi/linux/elf.h | |||
| @@ -49,14 +49,14 @@ typedef __s64 Elf64_Sxword; | |||
| 49 | * | 49 | * |
| 50 | * Specifications are available in: | 50 | * Specifications are available in: |
| 51 | * | 51 | * |
| 52 | * - Sun microsystems: Linker and Libraries. | 52 | * - Oracle: Linker and Libraries. |
| 53 | * Part No: 817-1984-17, September 2008. | 53 | * Part No: 817–1984–19, August 2011. |
| 54 | * URL: http://docs.sun.com/app/docs/doc/817-1984 | 54 | * http://docs.oracle.com/cd/E18752_01/pdf/817-1984.pdf |
| 55 | * | 55 | * |
| 56 | * - System V ABI AMD64 Architecture Processor Supplement | 56 | * - System V ABI AMD64 Architecture Processor Supplement |
| 57 | * Draft Version 0.99., | 57 | * Draft Version 0.99.4, |
| 58 | * May 11, 2009. | 58 | * January 13, 2010. |
| 59 | * URL: http://www.x86-64.org/ | 59 | * http://www.cs.washington.edu/education/courses/cse351/12wi/supp-docs/abi.pdf |
| 60 | */ | 60 | */ |
| 61 | #define PN_XNUM 0xffff | 61 | #define PN_XNUM 0xffff |
| 62 | 62 | ||
| @@ -395,6 +395,8 @@ typedef struct elf64_shdr { | |||
| 395 | #define NT_ARM_TLS 0x401 /* ARM TLS register */ | 395 | #define NT_ARM_TLS 0x401 /* ARM TLS register */ |
| 396 | #define NT_ARM_HW_BREAK 0x402 /* ARM hardware breakpoint registers */ | 396 | #define NT_ARM_HW_BREAK 0x402 /* ARM hardware breakpoint registers */ |
| 397 | #define NT_ARM_HW_WATCH 0x403 /* ARM hardware watchpoint registers */ | 397 | #define NT_ARM_HW_WATCH 0x403 /* ARM hardware watchpoint registers */ |
| 398 | #define NT_METAG_CBUF 0x500 /* Metag catch buffer registers */ | ||
| 399 | #define NT_METAG_RPIPE 0x501 /* Metag read pipeline state */ | ||
| 398 | 400 | ||
| 399 | 401 | ||
| 400 | /* Note header in a PT_NOTE section */ | 402 | /* Note header in a PT_NOTE section */ |
diff --git a/include/uapi/linux/fs.h b/include/uapi/linux/fs.h index 780d4c6093eb..c7fc1e6517c3 100644 --- a/include/uapi/linux/fs.h +++ b/include/uapi/linux/fs.h | |||
| @@ -86,6 +86,9 @@ struct inodes_stat_t { | |||
| 86 | #define MS_KERNMOUNT (1<<22) /* this is a kern_mount call */ | 86 | #define MS_KERNMOUNT (1<<22) /* this is a kern_mount call */ |
| 87 | #define MS_I_VERSION (1<<23) /* Update inode I_version field */ | 87 | #define MS_I_VERSION (1<<23) /* Update inode I_version field */ |
| 88 | #define MS_STRICTATIME (1<<24) /* Always perform atime updates */ | 88 | #define MS_STRICTATIME (1<<24) /* Always perform atime updates */ |
| 89 | |||
| 90 | /* These sb flags are internal to the kernel */ | ||
| 91 | #define MS_SNAP_STABLE (1<<27) /* Snapshot pages during writeback, if needed */ | ||
| 89 | #define MS_NOSEC (1<<28) | 92 | #define MS_NOSEC (1<<28) |
| 90 | #define MS_BORN (1<<29) | 93 | #define MS_BORN (1<<29) |
| 91 | #define MS_ACTIVE (1<<30) | 94 | #define MS_ACTIVE (1<<30) |
diff --git a/include/uapi/linux/fuse.h b/include/uapi/linux/fuse.h index d8c713e148e3..4c43b4448792 100644 --- a/include/uapi/linux/fuse.h +++ b/include/uapi/linux/fuse.h | |||
| @@ -1,9 +1,35 @@ | |||
| 1 | /* | 1 | /* |
| 2 | FUSE: Filesystem in Userspace | 2 | This file defines the kernel interface of FUSE |
| 3 | Copyright (C) 2001-2008 Miklos Szeredi <miklos@szeredi.hu> | 3 | Copyright (C) 2001-2008 Miklos Szeredi <miklos@szeredi.hu> |
| 4 | 4 | ||
| 5 | This program can be distributed under the terms of the GNU GPL. | 5 | This program can be distributed under the terms of the GNU GPL. |
| 6 | See the file COPYING. | 6 | See the file COPYING. |
| 7 | |||
| 8 | This -- and only this -- header file may also be distributed under | ||
| 9 | the terms of the BSD Licence as follows: | ||
| 10 | |||
| 11 | Copyright (C) 2001-2007 Miklos Szeredi. All rights reserved. | ||
| 12 | |||
| 13 | Redistribution and use in source and binary forms, with or without | ||
| 14 | modification, are permitted provided that the following conditions | ||
| 15 | are met: | ||
| 16 | 1. Redistributions of source code must retain the above copyright | ||
| 17 | notice, this list of conditions and the following disclaimer. | ||
| 18 | 2. Redistributions in binary form must reproduce the above copyright | ||
| 19 | notice, this list of conditions and the following disclaimer in the | ||
| 20 | documentation and/or other materials provided with the distribution. | ||
| 21 | |||
| 22 | THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND | ||
| 23 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 24 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 25 | ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 26 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 27 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 28 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 29 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 30 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 31 | OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 32 | SUCH DAMAGE. | ||
| 7 | */ | 33 | */ |
| 8 | 34 | ||
| 9 | /* | 35 | /* |
| @@ -60,12 +86,25 @@ | |||
| 60 | * | 86 | * |
| 61 | * 7.20 | 87 | * 7.20 |
| 62 | * - add FUSE_AUTO_INVAL_DATA | 88 | * - add FUSE_AUTO_INVAL_DATA |
| 89 | * | ||
| 90 | * 7.21 | ||
| 91 | * - add FUSE_READDIRPLUS | ||
| 92 | * - send the requested events in POLL request | ||
| 63 | */ | 93 | */ |
| 64 | 94 | ||
| 65 | #ifndef _LINUX_FUSE_H | 95 | #ifndef _LINUX_FUSE_H |
| 66 | #define _LINUX_FUSE_H | 96 | #define _LINUX_FUSE_H |
| 67 | 97 | ||
| 98 | #ifdef __linux__ | ||
| 68 | #include <linux/types.h> | 99 | #include <linux/types.h> |
| 100 | #else | ||
| 101 | #include <stdint.h> | ||
| 102 | #define __u64 uint64_t | ||
| 103 | #define __s64 int64_t | ||
| 104 | #define __u32 uint32_t | ||
| 105 | #define __s32 int32_t | ||
| 106 | #define __u16 uint16_t | ||
| 107 | #endif | ||
| 69 | 108 | ||
| 70 | /* | 109 | /* |
| 71 | * Version negotiation: | 110 | * Version negotiation: |
| @@ -91,7 +130,7 @@ | |||
| 91 | #define FUSE_KERNEL_VERSION 7 | 130 | #define FUSE_KERNEL_VERSION 7 |
| 92 | 131 | ||
| 93 | /** Minor version number of this interface */ | 132 | /** Minor version number of this interface */ |
| 94 | #define FUSE_KERNEL_MINOR_VERSION 20 | 133 | #define FUSE_KERNEL_MINOR_VERSION 21 |
| 95 | 134 | ||
| 96 | /** The node ID of the root inode */ | 135 | /** The node ID of the root inode */ |
| 97 | #define FUSE_ROOT_ID 1 | 136 | #define FUSE_ROOT_ID 1 |
| @@ -179,6 +218,8 @@ struct fuse_file_lock { | |||
| 179 | * FUSE_FLOCK_LOCKS: remote locking for BSD style file locks | 218 | * FUSE_FLOCK_LOCKS: remote locking for BSD style file locks |
| 180 | * FUSE_HAS_IOCTL_DIR: kernel supports ioctl on directories | 219 | * FUSE_HAS_IOCTL_DIR: kernel supports ioctl on directories |
| 181 | * FUSE_AUTO_INVAL_DATA: automatically invalidate cached pages | 220 | * FUSE_AUTO_INVAL_DATA: automatically invalidate cached pages |
| 221 | * FUSE_DO_READDIRPLUS: do READDIRPLUS (READDIR+LOOKUP in one) | ||
| 222 | * FUSE_READDIRPLUS_AUTO: adaptive readdirplus | ||
| 182 | */ | 223 | */ |
| 183 | #define FUSE_ASYNC_READ (1 << 0) | 224 | #define FUSE_ASYNC_READ (1 << 0) |
| 184 | #define FUSE_POSIX_LOCKS (1 << 1) | 225 | #define FUSE_POSIX_LOCKS (1 << 1) |
| @@ -193,6 +234,8 @@ struct fuse_file_lock { | |||
| 193 | #define FUSE_FLOCK_LOCKS (1 << 10) | 234 | #define FUSE_FLOCK_LOCKS (1 << 10) |
| 194 | #define FUSE_HAS_IOCTL_DIR (1 << 11) | 235 | #define FUSE_HAS_IOCTL_DIR (1 << 11) |
| 195 | #define FUSE_AUTO_INVAL_DATA (1 << 12) | 236 | #define FUSE_AUTO_INVAL_DATA (1 << 12) |
| 237 | #define FUSE_DO_READDIRPLUS (1 << 13) | ||
| 238 | #define FUSE_READDIRPLUS_AUTO (1 << 14) | ||
| 196 | 239 | ||
| 197 | /** | 240 | /** |
| 198 | * CUSE INIT request/reply flags | 241 | * CUSE INIT request/reply flags |
| @@ -299,6 +342,7 @@ enum fuse_opcode { | |||
| 299 | FUSE_NOTIFY_REPLY = 41, | 342 | FUSE_NOTIFY_REPLY = 41, |
| 300 | FUSE_BATCH_FORGET = 42, | 343 | FUSE_BATCH_FORGET = 42, |
| 301 | FUSE_FALLOCATE = 43, | 344 | FUSE_FALLOCATE = 43, |
| 345 | FUSE_READDIRPLUS = 44, | ||
| 302 | 346 | ||
| 303 | /* CUSE specific operations */ | 347 | /* CUSE specific operations */ |
| 304 | CUSE_INIT = 4096, | 348 | CUSE_INIT = 4096, |
| @@ -580,7 +624,7 @@ struct fuse_poll_in { | |||
| 580 | __u64 fh; | 624 | __u64 fh; |
| 581 | __u64 kh; | 625 | __u64 kh; |
| 582 | __u32 flags; | 626 | __u32 flags; |
| 583 | __u32 padding; | 627 | __u32 events; |
| 584 | }; | 628 | }; |
| 585 | 629 | ||
| 586 | struct fuse_poll_out { | 630 | struct fuse_poll_out { |
| @@ -630,6 +674,16 @@ struct fuse_dirent { | |||
| 630 | #define FUSE_DIRENT_SIZE(d) \ | 674 | #define FUSE_DIRENT_SIZE(d) \ |
| 631 | FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen) | 675 | FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen) |
| 632 | 676 | ||
| 677 | struct fuse_direntplus { | ||
| 678 | struct fuse_entry_out entry_out; | ||
| 679 | struct fuse_dirent dirent; | ||
| 680 | }; | ||
| 681 | |||
| 682 | #define FUSE_NAME_OFFSET_DIRENTPLUS \ | ||
| 683 | offsetof(struct fuse_direntplus, dirent.name) | ||
| 684 | #define FUSE_DIRENTPLUS_SIZE(d) \ | ||
| 685 | FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET_DIRENTPLUS + (d)->dirent.namelen) | ||
| 686 | |||
| 633 | struct fuse_notify_inval_inode_out { | 687 | struct fuse_notify_inval_inode_out { |
| 634 | __u64 ino; | 688 | __u64 ino; |
| 635 | __s64 off; | 689 | __s64 off; |
diff --git a/include/uapi/linux/if_bridge.h b/include/uapi/linux/if_bridge.h index 5db297514aec..2d70d79ce2fd 100644 --- a/include/uapi/linux/if_bridge.h +++ b/include/uapi/linux/if_bridge.h | |||
| @@ -108,15 +108,26 @@ struct __fdb_entry { | |||
| 108 | * [IFLA_AF_SPEC] = { | 108 | * [IFLA_AF_SPEC] = { |
| 109 | * [IFLA_BRIDGE_FLAGS] | 109 | * [IFLA_BRIDGE_FLAGS] |
| 110 | * [IFLA_BRIDGE_MODE] | 110 | * [IFLA_BRIDGE_MODE] |
| 111 | * [IFLA_BRIDGE_VLAN_INFO] | ||
| 111 | * } | 112 | * } |
| 112 | */ | 113 | */ |
| 113 | enum { | 114 | enum { |
| 114 | IFLA_BRIDGE_FLAGS, | 115 | IFLA_BRIDGE_FLAGS, |
| 115 | IFLA_BRIDGE_MODE, | 116 | IFLA_BRIDGE_MODE, |
| 117 | IFLA_BRIDGE_VLAN_INFO, | ||
| 116 | __IFLA_BRIDGE_MAX, | 118 | __IFLA_BRIDGE_MAX, |
| 117 | }; | 119 | }; |
| 118 | #define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1) | 120 | #define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1) |
| 119 | 121 | ||
| 122 | #define BRIDGE_VLAN_INFO_MASTER (1<<0) /* Operate on Bridge device as well */ | ||
| 123 | #define BRIDGE_VLAN_INFO_PVID (1<<1) /* VLAN is PVID, ingress untagged */ | ||
| 124 | #define BRIDGE_VLAN_INFO_UNTAGGED (1<<2) /* VLAN egresses untagged */ | ||
| 125 | |||
| 126 | struct bridge_vlan_info { | ||
| 127 | __u16 flags; | ||
| 128 | __u16 vid; | ||
| 129 | }; | ||
| 130 | |||
| 120 | /* Bridge multicast database attributes | 131 | /* Bridge multicast database attributes |
| 121 | * [MDBA_MDB] = { | 132 | * [MDBA_MDB] = { |
| 122 | * [MDBA_MDB_ENTRY] = { | 133 | * [MDBA_MDB_ENTRY] = { |
diff --git a/include/uapi/linux/if_ether.h b/include/uapi/linux/if_ether.h index 67fb87ca1094..798032d01112 100644 --- a/include/uapi/linux/if_ether.h +++ b/include/uapi/linux/if_ether.h | |||
| @@ -83,6 +83,7 @@ | |||
| 83 | #define ETH_P_802_EX1 0x88B5 /* 802.1 Local Experimental 1. */ | 83 | #define ETH_P_802_EX1 0x88B5 /* 802.1 Local Experimental 1. */ |
| 84 | #define ETH_P_TIPC 0x88CA /* TIPC */ | 84 | #define ETH_P_TIPC 0x88CA /* TIPC */ |
| 85 | #define ETH_P_8021AH 0x88E7 /* 802.1ah Backbone Service Tag */ | 85 | #define ETH_P_8021AH 0x88E7 /* 802.1ah Backbone Service Tag */ |
| 86 | #define ETH_P_MVRP 0x88F5 /* 802.1Q MVRP */ | ||
| 86 | #define ETH_P_1588 0x88F7 /* IEEE 1588 Timesync */ | 87 | #define ETH_P_1588 0x88F7 /* IEEE 1588 Timesync */ |
| 87 | #define ETH_P_FCOE 0x8906 /* Fibre Channel over Ethernet */ | 88 | #define ETH_P_FCOE 0x8906 /* Fibre Channel over Ethernet */ |
| 88 | #define ETH_P_TDLS 0x890D /* TDLS */ | 89 | #define ETH_P_TDLS 0x890D /* TDLS */ |
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h index 60f3b6b90602..c4edfe11f1f7 100644 --- a/include/uapi/linux/if_link.h +++ b/include/uapi/linux/if_link.h | |||
| @@ -142,6 +142,7 @@ enum { | |||
| 142 | #define IFLA_PROMISCUITY IFLA_PROMISCUITY | 142 | #define IFLA_PROMISCUITY IFLA_PROMISCUITY |
| 143 | IFLA_NUM_TX_QUEUES, | 143 | IFLA_NUM_TX_QUEUES, |
| 144 | IFLA_NUM_RX_QUEUES, | 144 | IFLA_NUM_RX_QUEUES, |
| 145 | IFLA_CARRIER, | ||
| 145 | __IFLA_MAX | 146 | __IFLA_MAX |
| 146 | }; | 147 | }; |
| 147 | 148 | ||
diff --git a/include/uapi/linux/if_vlan.h b/include/uapi/linux/if_vlan.h index 0744f8e65d15..7e5e6b397332 100644 --- a/include/uapi/linux/if_vlan.h +++ b/include/uapi/linux/if_vlan.h | |||
| @@ -34,6 +34,7 @@ enum vlan_flags { | |||
| 34 | VLAN_FLAG_REORDER_HDR = 0x1, | 34 | VLAN_FLAG_REORDER_HDR = 0x1, |
| 35 | VLAN_FLAG_GVRP = 0x2, | 35 | VLAN_FLAG_GVRP = 0x2, |
| 36 | VLAN_FLAG_LOOSE_BINDING = 0x4, | 36 | VLAN_FLAG_LOOSE_BINDING = 0x4, |
| 37 | VLAN_FLAG_MVRP = 0x8, | ||
| 37 | }; | 38 | }; |
| 38 | 39 | ||
| 39 | enum vlan_name_types { | 40 | enum vlan_name_types { |
diff --git a/include/uapi/linux/in6.h b/include/uapi/linux/in6.h index f79c3721da6e..53b1d56a6e7f 100644 --- a/include/uapi/linux/in6.h +++ b/include/uapi/linux/in6.h | |||
| @@ -38,11 +38,6 @@ struct in6_addr { | |||
| 38 | #define s6_addr32 in6_u.u6_addr32 | 38 | #define s6_addr32 in6_u.u6_addr32 |
| 39 | }; | 39 | }; |
| 40 | 40 | ||
| 41 | /* IPv6 Wildcard Address (::) and Loopback Address (::1) defined in RFC2553 | ||
| 42 | * NOTE: Be aware the IN6ADDR_* constants and in6addr_* externals are defined | ||
| 43 | * in network byte order, not in host byte order as are the IPv4 equivalents | ||
| 44 | */ | ||
| 45 | |||
| 46 | struct sockaddr_in6 { | 41 | struct sockaddr_in6 { |
| 47 | unsigned short int sin6_family; /* AF_INET6 */ | 42 | unsigned short int sin6_family; /* AF_INET6 */ |
| 48 | __be16 sin6_port; /* Transport layer port # */ | 43 | __be16 sin6_port; /* Transport layer port # */ |
| @@ -264,17 +259,10 @@ struct in6_flowlabel_req { | |||
| 264 | 259 | ||
| 265 | /* | 260 | /* |
| 266 | * Multicast Routing: | 261 | * Multicast Routing: |
| 267 | * see include/linux/mroute6.h. | 262 | * see include/uapi/linux/mroute6.h. |
| 268 | * | 263 | * |
| 269 | * MRT6_INIT 200 | 264 | * MRT6_BASE 200 |
| 270 | * MRT6_DONE 201 | 265 | * ... |
| 271 | * MRT6_ADD_MIF 202 | 266 | * MRT6_MAX |
| 272 | * MRT6_DEL_MIF 203 | ||
| 273 | * MRT6_ADD_MFC 204 | ||
| 274 | * MRT6_DEL_MFC 205 | ||
| 275 | * MRT6_VERSION 206 | ||
| 276 | * MRT6_ASSERT 207 | ||
| 277 | * MRT6_PIM 208 | ||
| 278 | * (reserved) 209 | ||
| 279 | */ | 267 | */ |
| 280 | #endif /* _UAPI_LINUX_IN6_H */ | 268 | #endif /* _UAPI_LINUX_IN6_H */ |
diff --git a/include/uapi/linux/ipmi.h b/include/uapi/linux/ipmi.h index 33fbc99b3812..7b26a62e5707 100644 --- a/include/uapi/linux/ipmi.h +++ b/include/uapi/linux/ipmi.h | |||
| @@ -59,15 +59,7 @@ | |||
| 59 | * if it becomes full and it is queried once a second to see if | 59 | * if it becomes full and it is queried once a second to see if |
| 60 | * anything is in it. Incoming commands to the driver will get | 60 | * anything is in it. Incoming commands to the driver will get |
| 61 | * delivered as commands. | 61 | * delivered as commands. |
| 62 | * | 62 | */ |
| 63 | * This driver provides two main interfaces: one for in-kernel | ||
| 64 | * applications and another for userland applications. The | ||
| 65 | * capabilities are basically the same for both interface, although | ||
| 66 | * the interfaces are somewhat different. The stuff in the | ||
| 67 | * #ifdef __KERNEL__ below is the in-kernel interface. The userland | ||
| 68 | * interface is defined later in the file. */ | ||
| 69 | |||
| 70 | |||
| 71 | 63 | ||
| 72 | /* | 64 | /* |
| 73 | * This is an overlay for all the address types, so it's easy to | 65 | * This is an overlay for all the address types, so it's easy to |
diff --git a/include/uapi/linux/ipv6.h b/include/uapi/linux/ipv6.h index 5a2991cf0251..4bda4cf5b0f5 100644 --- a/include/uapi/linux/ipv6.h +++ b/include/uapi/linux/ipv6.h | |||
| @@ -63,6 +63,8 @@ struct ipv6_opt_hdr { | |||
| 63 | #define ipv6_destopt_hdr ipv6_opt_hdr | 63 | #define ipv6_destopt_hdr ipv6_opt_hdr |
| 64 | #define ipv6_hopopt_hdr ipv6_opt_hdr | 64 | #define ipv6_hopopt_hdr ipv6_opt_hdr |
| 65 | 65 | ||
| 66 | /* Router Alert option values (RFC2711) */ | ||
| 67 | #define IPV6_OPT_ROUTERALERT_MLD 0x0000 /* MLD(RFC2710) */ | ||
| 66 | 68 | ||
| 67 | /* | 69 | /* |
| 68 | * routing header type 0 (used in cmsghdr struct) | 70 | * routing header type 0 (used in cmsghdr struct) |
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h index e6e5d4b13708..3c56ba3d80c1 100644 --- a/include/uapi/linux/kvm.h +++ b/include/uapi/linux/kvm.h | |||
| @@ -115,6 +115,7 @@ struct kvm_irq_level { | |||
| 115 | * ACPI gsi notion of irq. | 115 | * ACPI gsi notion of irq. |
| 116 | * For IA-64 (APIC model) IOAPIC0: irq 0-23; IOAPIC1: irq 24-47.. | 116 | * For IA-64 (APIC model) IOAPIC0: irq 0-23; IOAPIC1: irq 24-47.. |
| 117 | * For X86 (standard AT mode) PIC0/1: irq 0-15. IOAPIC0: 0-23.. | 117 | * For X86 (standard AT mode) PIC0/1: irq 0-15. IOAPIC0: 0-23.. |
| 118 | * For ARM: See Documentation/virtual/kvm/api.txt | ||
| 118 | */ | 119 | */ |
| 119 | union { | 120 | union { |
| 120 | __u32 irq; | 121 | __u32 irq; |
| @@ -168,6 +169,8 @@ struct kvm_pit_config { | |||
| 168 | #define KVM_EXIT_PAPR_HCALL 19 | 169 | #define KVM_EXIT_PAPR_HCALL 19 |
| 169 | #define KVM_EXIT_S390_UCONTROL 20 | 170 | #define KVM_EXIT_S390_UCONTROL 20 |
| 170 | #define KVM_EXIT_WATCHDOG 21 | 171 | #define KVM_EXIT_WATCHDOG 21 |
| 172 | #define KVM_EXIT_S390_TSCH 22 | ||
| 173 | #define KVM_EXIT_EPR 23 | ||
| 171 | 174 | ||
| 172 | /* For KVM_EXIT_INTERNAL_ERROR */ | 175 | /* For KVM_EXIT_INTERNAL_ERROR */ |
| 173 | /* Emulate instruction failed. */ | 176 | /* Emulate instruction failed. */ |
| @@ -285,6 +288,19 @@ struct kvm_run { | |||
| 285 | __u64 ret; | 288 | __u64 ret; |
| 286 | __u64 args[9]; | 289 | __u64 args[9]; |
| 287 | } papr_hcall; | 290 | } papr_hcall; |
| 291 | /* KVM_EXIT_S390_TSCH */ | ||
| 292 | struct { | ||
| 293 | __u16 subchannel_id; | ||
| 294 | __u16 subchannel_nr; | ||
| 295 | __u32 io_int_parm; | ||
| 296 | __u32 io_int_word; | ||
| 297 | __u32 ipb; | ||
| 298 | __u8 dequeued; | ||
| 299 | } s390_tsch; | ||
| 300 | /* KVM_EXIT_EPR */ | ||
| 301 | struct { | ||
| 302 | __u32 epr; | ||
| 303 | } epr; | ||
| 288 | /* Fix the size of the union. */ | 304 | /* Fix the size of the union. */ |
| 289 | char padding[256]; | 305 | char padding[256]; |
| 290 | }; | 306 | }; |
| @@ -397,10 +413,20 @@ struct kvm_s390_psw { | |||
| 397 | #define KVM_S390_PROGRAM_INT 0xfffe0001u | 413 | #define KVM_S390_PROGRAM_INT 0xfffe0001u |
| 398 | #define KVM_S390_SIGP_SET_PREFIX 0xfffe0002u | 414 | #define KVM_S390_SIGP_SET_PREFIX 0xfffe0002u |
| 399 | #define KVM_S390_RESTART 0xfffe0003u | 415 | #define KVM_S390_RESTART 0xfffe0003u |
| 416 | #define KVM_S390_MCHK 0xfffe1000u | ||
| 400 | #define KVM_S390_INT_VIRTIO 0xffff2603u | 417 | #define KVM_S390_INT_VIRTIO 0xffff2603u |
| 401 | #define KVM_S390_INT_SERVICE 0xffff2401u | 418 | #define KVM_S390_INT_SERVICE 0xffff2401u |
| 402 | #define KVM_S390_INT_EMERGENCY 0xffff1201u | 419 | #define KVM_S390_INT_EMERGENCY 0xffff1201u |
| 403 | #define KVM_S390_INT_EXTERNAL_CALL 0xffff1202u | 420 | #define KVM_S390_INT_EXTERNAL_CALL 0xffff1202u |
| 421 | /* Anything below 0xfffe0000u is taken by INT_IO */ | ||
| 422 | #define KVM_S390_INT_IO(ai,cssid,ssid,schid) \ | ||
| 423 | (((schid)) | \ | ||
| 424 | ((ssid) << 16) | \ | ||
| 425 | ((cssid) << 18) | \ | ||
| 426 | ((ai) << 26)) | ||
| 427 | #define KVM_S390_INT_IO_MIN 0x00000000u | ||
| 428 | #define KVM_S390_INT_IO_MAX 0xfffdffffu | ||
| 429 | |||
| 404 | 430 | ||
| 405 | struct kvm_s390_interrupt { | 431 | struct kvm_s390_interrupt { |
| 406 | __u32 type; | 432 | __u32 type; |
| @@ -635,6 +661,10 @@ struct kvm_ppc_smmu_info { | |||
| 635 | #define KVM_CAP_IRQFD_RESAMPLE 82 | 661 | #define KVM_CAP_IRQFD_RESAMPLE 82 |
| 636 | #define KVM_CAP_PPC_BOOKE_WATCHDOG 83 | 662 | #define KVM_CAP_PPC_BOOKE_WATCHDOG 83 |
| 637 | #define KVM_CAP_PPC_HTAB_FD 84 | 663 | #define KVM_CAP_PPC_HTAB_FD 84 |
| 664 | #define KVM_CAP_S390_CSS_SUPPORT 85 | ||
| 665 | #define KVM_CAP_PPC_EPR 86 | ||
| 666 | #define KVM_CAP_ARM_PSCI 87 | ||
| 667 | #define KVM_CAP_ARM_SET_DEVICE_ADDR 88 | ||
| 638 | 668 | ||
| 639 | #ifdef KVM_CAP_IRQ_ROUTING | 669 | #ifdef KVM_CAP_IRQ_ROUTING |
| 640 | 670 | ||
| @@ -764,6 +794,11 @@ struct kvm_dirty_tlb { | |||
| 764 | #define KVM_REG_SIZE_U512 0x0060000000000000ULL | 794 | #define KVM_REG_SIZE_U512 0x0060000000000000ULL |
| 765 | #define KVM_REG_SIZE_U1024 0x0070000000000000ULL | 795 | #define KVM_REG_SIZE_U1024 0x0070000000000000ULL |
| 766 | 796 | ||
| 797 | struct kvm_reg_list { | ||
| 798 | __u64 n; /* number of regs */ | ||
| 799 | __u64 reg[0]; | ||
| 800 | }; | ||
| 801 | |||
| 767 | struct kvm_one_reg { | 802 | struct kvm_one_reg { |
| 768 | __u64 id; | 803 | __u64 id; |
| 769 | __u64 addr; | 804 | __u64 addr; |
| @@ -777,6 +812,11 @@ struct kvm_msi { | |||
| 777 | __u8 pad[16]; | 812 | __u8 pad[16]; |
| 778 | }; | 813 | }; |
| 779 | 814 | ||
| 815 | struct kvm_arm_device_addr { | ||
| 816 | __u64 id; | ||
| 817 | __u64 addr; | ||
| 818 | }; | ||
| 819 | |||
| 780 | /* | 820 | /* |
| 781 | * ioctls for VM fds | 821 | * ioctls for VM fds |
| 782 | */ | 822 | */ |
| @@ -862,6 +902,8 @@ struct kvm_s390_ucas_mapping { | |||
| 862 | #define KVM_ALLOCATE_RMA _IOR(KVMIO, 0xa9, struct kvm_allocate_rma) | 902 | #define KVM_ALLOCATE_RMA _IOR(KVMIO, 0xa9, struct kvm_allocate_rma) |
| 863 | /* Available with KVM_CAP_PPC_HTAB_FD */ | 903 | /* Available with KVM_CAP_PPC_HTAB_FD */ |
| 864 | #define KVM_PPC_GET_HTAB_FD _IOW(KVMIO, 0xaa, struct kvm_get_htab_fd) | 904 | #define KVM_PPC_GET_HTAB_FD _IOW(KVMIO, 0xaa, struct kvm_get_htab_fd) |
| 905 | /* Available with KVM_CAP_ARM_SET_DEVICE_ADDR */ | ||
| 906 | #define KVM_ARM_SET_DEVICE_ADDR _IOW(KVMIO, 0xab, struct kvm_arm_device_addr) | ||
| 865 | 907 | ||
| 866 | /* | 908 | /* |
| 867 | * ioctls for vcpu fds | 909 | * ioctls for vcpu fds |
| @@ -932,6 +974,8 @@ struct kvm_s390_ucas_mapping { | |||
| 932 | #define KVM_SET_ONE_REG _IOW(KVMIO, 0xac, struct kvm_one_reg) | 974 | #define KVM_SET_ONE_REG _IOW(KVMIO, 0xac, struct kvm_one_reg) |
| 933 | /* VM is being stopped by host */ | 975 | /* VM is being stopped by host */ |
| 934 | #define KVM_KVMCLOCK_CTRL _IO(KVMIO, 0xad) | 976 | #define KVM_KVMCLOCK_CTRL _IO(KVMIO, 0xad) |
| 977 | #define KVM_ARM_VCPU_INIT _IOW(KVMIO, 0xae, struct kvm_vcpu_init) | ||
| 978 | #define KVM_GET_REG_LIST _IOWR(KVMIO, 0xb0, struct kvm_reg_list) | ||
| 935 | 979 | ||
| 936 | #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) | 980 | #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) |
| 937 | #define KVM_DEV_ASSIGN_PCI_2_3 (1 << 1) | 981 | #define KVM_DEV_ASSIGN_PCI_2_3 (1 << 1) |
diff --git a/include/uapi/linux/mroute.h b/include/uapi/linux/mroute.h index 16929993acc4..a382d2c04a42 100644 --- a/include/uapi/linux/mroute.h +++ b/include/uapi/linux/mroute.h | |||
| @@ -26,6 +26,9 @@ | |||
| 26 | #define MRT_ASSERT (MRT_BASE+7) /* Activate PIM assert mode */ | 26 | #define MRT_ASSERT (MRT_BASE+7) /* Activate PIM assert mode */ |
| 27 | #define MRT_PIM (MRT_BASE+8) /* enable PIM code */ | 27 | #define MRT_PIM (MRT_BASE+8) /* enable PIM code */ |
| 28 | #define MRT_TABLE (MRT_BASE+9) /* Specify mroute table ID */ | 28 | #define MRT_TABLE (MRT_BASE+9) /* Specify mroute table ID */ |
| 29 | #define MRT_ADD_MFC_PROXY (MRT_BASE+10) /* Add a (*,*|G) mfc entry */ | ||
| 30 | #define MRT_DEL_MFC_PROXY (MRT_BASE+11) /* Del a (*,*|G) mfc entry */ | ||
| 31 | #define MRT_MAX (MRT_BASE+11) | ||
| 29 | 32 | ||
| 30 | #define SIOCGETVIFCNT SIOCPROTOPRIVATE /* IP protocol privates */ | 33 | #define SIOCGETVIFCNT SIOCPROTOPRIVATE /* IP protocol privates */ |
| 31 | #define SIOCGETSGCNT (SIOCPROTOPRIVATE+1) | 34 | #define SIOCGETSGCNT (SIOCPROTOPRIVATE+1) |
diff --git a/include/uapi/linux/mroute6.h b/include/uapi/linux/mroute6.h index 3e89b5e7f9e3..ce91215cf7e6 100644 --- a/include/uapi/linux/mroute6.h +++ b/include/uapi/linux/mroute6.h | |||
| @@ -26,6 +26,9 @@ | |||
| 26 | #define MRT6_ASSERT (MRT6_BASE+7) /* Activate PIM assert mode */ | 26 | #define MRT6_ASSERT (MRT6_BASE+7) /* Activate PIM assert mode */ |
| 27 | #define MRT6_PIM (MRT6_BASE+8) /* enable PIM code */ | 27 | #define MRT6_PIM (MRT6_BASE+8) /* enable PIM code */ |
| 28 | #define MRT6_TABLE (MRT6_BASE+9) /* Specify mroute table ID */ | 28 | #define MRT6_TABLE (MRT6_BASE+9) /* Specify mroute table ID */ |
| 29 | #define MRT6_ADD_MFC_PROXY (MRT6_BASE+10) /* Add a (*,*|G) mfc entry */ | ||
| 30 | #define MRT6_DEL_MFC_PROXY (MRT6_BASE+11) /* Del a (*,*|G) mfc entry */ | ||
| 31 | #define MRT6_MAX (MRT6_BASE+11) | ||
| 29 | 32 | ||
| 30 | #define SIOCGETMIFCNT_IN6 SIOCPROTOPRIVATE /* IP protocol privates */ | 33 | #define SIOCGETMIFCNT_IN6 SIOCPROTOPRIVATE /* IP protocol privates */ |
| 31 | #define SIOCGETSGCNT_IN6 (SIOCPROTOPRIVATE+1) | 34 | #define SIOCGETSGCNT_IN6 (SIOCPROTOPRIVATE+1) |
diff --git a/include/uapi/linux/msdos_fs.h b/include/uapi/linux/msdos_fs.h index 996719f82e28..f055e58b3147 100644 --- a/include/uapi/linux/msdos_fs.h +++ b/include/uapi/linux/msdos_fs.h | |||
| @@ -87,6 +87,8 @@ | |||
| 87 | #define IS_FSINFO(x) (le32_to_cpu((x)->signature1) == FAT_FSINFO_SIG1 \ | 87 | #define IS_FSINFO(x) (le32_to_cpu((x)->signature1) == FAT_FSINFO_SIG1 \ |
| 88 | && le32_to_cpu((x)->signature2) == FAT_FSINFO_SIG2) | 88 | && le32_to_cpu((x)->signature2) == FAT_FSINFO_SIG2) |
| 89 | 89 | ||
| 90 | #define FAT_STATE_DIRTY 0x01 | ||
| 91 | |||
| 90 | struct __fat_dirent { | 92 | struct __fat_dirent { |
| 91 | long d_ino; | 93 | long d_ino; |
| 92 | __kernel_off_t d_off; | 94 | __kernel_off_t d_off; |
| @@ -120,14 +122,34 @@ struct fat_boot_sector { | |||
| 120 | __le32 hidden; /* hidden sectors (unused) */ | 122 | __le32 hidden; /* hidden sectors (unused) */ |
| 121 | __le32 total_sect; /* number of sectors (if sectors == 0) */ | 123 | __le32 total_sect; /* number of sectors (if sectors == 0) */ |
| 122 | 124 | ||
| 123 | /* The following fields are only used by FAT32 */ | 125 | union { |
| 124 | __le32 fat32_length; /* sectors/FAT */ | 126 | struct { |
| 125 | __le16 flags; /* bit 8: fat mirroring, low 4: active fat */ | 127 | /* Extended BPB Fields for FAT16 */ |
| 126 | __u8 version[2]; /* major, minor filesystem version */ | 128 | __u8 drive_number; /* Physical drive number */ |
| 127 | __le32 root_cluster; /* first cluster in root directory */ | 129 | __u8 state; /* undocumented, but used |
| 128 | __le16 info_sector; /* filesystem info sector */ | 130 | for mount state. */ |
| 129 | __le16 backup_boot; /* backup boot sector */ | 131 | /* other fiealds are not added here */ |
| 130 | __le16 reserved2[6]; /* Unused */ | 132 | } fat16; |
| 133 | |||
| 134 | struct { | ||
| 135 | /* only used by FAT32 */ | ||
| 136 | __le32 length; /* sectors/FAT */ | ||
| 137 | __le16 flags; /* bit 8: fat mirroring, | ||
| 138 | low 4: active fat */ | ||
| 139 | __u8 version[2]; /* major, minor filesystem | ||
| 140 | version */ | ||
| 141 | __le32 root_cluster; /* first cluster in | ||
| 142 | root directory */ | ||
| 143 | __le16 info_sector; /* filesystem info sector */ | ||
| 144 | __le16 backup_boot; /* backup boot sector */ | ||
| 145 | __le16 reserved2[6]; /* Unused */ | ||
| 146 | /* Extended BPB Fields for FAT32 */ | ||
| 147 | __u8 drive_number; /* Physical drive number */ | ||
| 148 | __u8 state; /* undocumented, but used | ||
| 149 | for mount state. */ | ||
| 150 | /* other fiealds are not added here */ | ||
| 151 | } fat32; | ||
| 152 | }; | ||
| 131 | }; | 153 | }; |
| 132 | 154 | ||
| 133 | struct fat_boot_fsinfo { | 155 | struct fat_boot_fsinfo { |
diff --git a/include/uapi/linux/nbd.h b/include/uapi/linux/nbd.h index dfb514472cbc..4f52549b23ff 100644 --- a/include/uapi/linux/nbd.h +++ b/include/uapi/linux/nbd.h | |||
| @@ -33,13 +33,14 @@ enum { | |||
| 33 | NBD_CMD_READ = 0, | 33 | NBD_CMD_READ = 0, |
| 34 | NBD_CMD_WRITE = 1, | 34 | NBD_CMD_WRITE = 1, |
| 35 | NBD_CMD_DISC = 2, | 35 | NBD_CMD_DISC = 2, |
| 36 | /* there is a gap here to match userspace */ | 36 | NBD_CMD_FLUSH = 3, |
| 37 | NBD_CMD_TRIM = 4 | 37 | NBD_CMD_TRIM = 4 |
| 38 | }; | 38 | }; |
| 39 | 39 | ||
| 40 | /* values for flags field */ | 40 | /* values for flags field */ |
| 41 | #define NBD_FLAG_HAS_FLAGS (1 << 0) /* nbd-server supports flags */ | 41 | #define NBD_FLAG_HAS_FLAGS (1 << 0) /* nbd-server supports flags */ |
| 42 | #define NBD_FLAG_READ_ONLY (1 << 1) /* device is read-only */ | 42 | #define NBD_FLAG_READ_ONLY (1 << 1) /* device is read-only */ |
| 43 | #define NBD_FLAG_SEND_FLUSH (1 << 2) /* can flush writeback cache */ | ||
| 43 | /* there is a gap here to match userspace */ | 44 | /* there is a gap here to match userspace */ |
| 44 | #define NBD_FLAG_SEND_TRIM (1 << 5) /* send trim/discard */ | 45 | #define NBD_FLAG_SEND_TRIM (1 << 5) /* send trim/discard */ |
| 45 | 46 | ||
diff --git a/include/uapi/linux/neighbour.h b/include/uapi/linux/neighbour.h index 275e5d65dcb2..adb068c53c4e 100644 --- a/include/uapi/linux/neighbour.h +++ b/include/uapi/linux/neighbour.h | |||
| @@ -20,6 +20,7 @@ enum { | |||
| 20 | NDA_LLADDR, | 20 | NDA_LLADDR, |
| 21 | NDA_CACHEINFO, | 21 | NDA_CACHEINFO, |
| 22 | NDA_PROBES, | 22 | NDA_PROBES, |
| 23 | NDA_VLAN, | ||
| 23 | __NDA_MAX | 24 | __NDA_MAX |
| 24 | }; | 25 | }; |
| 25 | 26 | ||
diff --git a/include/uapi/linux/netfilter/Kbuild b/include/uapi/linux/netfilter/Kbuild index 08f555fef13f..41115776d76f 100644 --- a/include/uapi/linux/netfilter/Kbuild +++ b/include/uapi/linux/netfilter/Kbuild | |||
| @@ -35,9 +35,11 @@ header-y += xt_TCPOPTSTRIP.h | |||
| 35 | header-y += xt_TEE.h | 35 | header-y += xt_TEE.h |
| 36 | header-y += xt_TPROXY.h | 36 | header-y += xt_TPROXY.h |
| 37 | header-y += xt_addrtype.h | 37 | header-y += xt_addrtype.h |
| 38 | header-y += xt_bpf.h | ||
| 38 | header-y += xt_cluster.h | 39 | header-y += xt_cluster.h |
| 39 | header-y += xt_comment.h | 40 | header-y += xt_comment.h |
| 40 | header-y += xt_connbytes.h | 41 | header-y += xt_connbytes.h |
| 42 | header-y += xt_connlabel.h | ||
| 41 | header-y += xt_connlimit.h | 43 | header-y += xt_connlimit.h |
| 42 | header-y += xt_connmark.h | 44 | header-y += xt_connmark.h |
| 43 | header-y += xt_conntrack.h | 45 | header-y += xt_conntrack.h |
diff --git a/include/uapi/linux/netfilter/nf_conntrack_common.h b/include/uapi/linux/netfilter/nf_conntrack_common.h index 1644cdd8be91..d69483fb3825 100644 --- a/include/uapi/linux/netfilter/nf_conntrack_common.h +++ b/include/uapi/linux/netfilter/nf_conntrack_common.h | |||
| @@ -101,6 +101,7 @@ enum ip_conntrack_events { | |||
| 101 | IPCT_MARK, /* new mark has been set */ | 101 | IPCT_MARK, /* new mark has been set */ |
| 102 | IPCT_NATSEQADJ, /* NAT is doing sequence adjustment */ | 102 | IPCT_NATSEQADJ, /* NAT is doing sequence adjustment */ |
| 103 | IPCT_SECMARK, /* new security mark has been set */ | 103 | IPCT_SECMARK, /* new security mark has been set */ |
| 104 | IPCT_LABEL, /* new connlabel has been set */ | ||
| 104 | }; | 105 | }; |
| 105 | 106 | ||
| 106 | enum ip_conntrack_expect_events { | 107 | enum ip_conntrack_expect_events { |
diff --git a/include/uapi/linux/netfilter/nfnetlink_conntrack.h b/include/uapi/linux/netfilter/nfnetlink_conntrack.h index 86e930cf3dfb..08fabc6c93f3 100644 --- a/include/uapi/linux/netfilter/nfnetlink_conntrack.h +++ b/include/uapi/linux/netfilter/nfnetlink_conntrack.h | |||
| @@ -49,6 +49,8 @@ enum ctattr_type { | |||
| 49 | CTA_SECCTX, | 49 | CTA_SECCTX, |
| 50 | CTA_TIMESTAMP, | 50 | CTA_TIMESTAMP, |
| 51 | CTA_MARK_MASK, | 51 | CTA_MARK_MASK, |
| 52 | CTA_LABELS, | ||
| 53 | CTA_LABELS_MASK, | ||
| 52 | __CTA_MAX | 54 | __CTA_MAX |
| 53 | }; | 55 | }; |
| 54 | #define CTA_MAX (__CTA_MAX - 1) | 56 | #define CTA_MAX (__CTA_MAX - 1) |
diff --git a/include/uapi/linux/netfilter/xt_CT.h b/include/uapi/linux/netfilter/xt_CT.h index a064b8af360c..5a688c1ca4d7 100644 --- a/include/uapi/linux/netfilter/xt_CT.h +++ b/include/uapi/linux/netfilter/xt_CT.h | |||
| @@ -3,7 +3,11 @@ | |||
| 3 | 3 | ||
| 4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
| 5 | 5 | ||
| 6 | #define XT_CT_NOTRACK 0x1 | 6 | enum { |
| 7 | XT_CT_NOTRACK = 1 << 0, | ||
| 8 | XT_CT_NOTRACK_ALIAS = 1 << 1, | ||
| 9 | XT_CT_MASK = XT_CT_NOTRACK | XT_CT_NOTRACK_ALIAS, | ||
| 10 | }; | ||
| 7 | 11 | ||
| 8 | struct xt_ct_target_info { | 12 | struct xt_ct_target_info { |
| 9 | __u16 flags; | 13 | __u16 flags; |
diff --git a/include/uapi/linux/netfilter/xt_bpf.h b/include/uapi/linux/netfilter/xt_bpf.h new file mode 100644 index 000000000000..5dda450eb55b --- /dev/null +++ b/include/uapi/linux/netfilter/xt_bpf.h | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | #ifndef _XT_BPF_H | ||
| 2 | #define _XT_BPF_H | ||
| 3 | |||
| 4 | #include <linux/filter.h> | ||
| 5 | #include <linux/types.h> | ||
| 6 | |||
| 7 | #define XT_BPF_MAX_NUM_INSTR 64 | ||
| 8 | |||
| 9 | struct xt_bpf_info { | ||
| 10 | __u16 bpf_program_num_elem; | ||
| 11 | struct sock_filter bpf_program[XT_BPF_MAX_NUM_INSTR]; | ||
| 12 | |||
| 13 | /* only used in the kernel */ | ||
| 14 | struct sk_filter *filter __attribute__((aligned(8))); | ||
| 15 | }; | ||
| 16 | |||
| 17 | #endif /*_XT_BPF_H */ | ||
diff --git a/include/uapi/linux/netfilter/xt_connlabel.h b/include/uapi/linux/netfilter/xt_connlabel.h new file mode 100644 index 000000000000..c4bc9ee9b330 --- /dev/null +++ b/include/uapi/linux/netfilter/xt_connlabel.h | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | #include <linux/types.h> | ||
| 2 | |||
| 3 | #define XT_CONNLABEL_MAXBIT 127 | ||
| 4 | enum xt_connlabel_mtopts { | ||
| 5 | XT_CONNLABEL_OP_INVERT = 1 << 0, | ||
| 6 | XT_CONNLABEL_OP_SET = 1 << 1, | ||
| 7 | }; | ||
| 8 | |||
| 9 | struct xt_connlabel_mtinfo { | ||
| 10 | __u16 bit; | ||
| 11 | __u16 options; | ||
| 12 | }; | ||
diff --git a/include/uapi/linux/netfilter/xt_conntrack.h b/include/uapi/linux/netfilter/xt_conntrack.h index e3c041d54020..e5bd3083a843 100644 --- a/include/uapi/linux/netfilter/xt_conntrack.h +++ b/include/uapi/linux/netfilter/xt_conntrack.h | |||
| @@ -31,6 +31,7 @@ enum { | |||
| 31 | XT_CONNTRACK_REPLSRC_PORT = 1 << 10, | 31 | XT_CONNTRACK_REPLSRC_PORT = 1 << 10, |
| 32 | XT_CONNTRACK_REPLDST_PORT = 1 << 11, | 32 | XT_CONNTRACK_REPLDST_PORT = 1 << 11, |
| 33 | XT_CONNTRACK_DIRECTION = 1 << 12, | 33 | XT_CONNTRACK_DIRECTION = 1 << 12, |
| 34 | XT_CONNTRACK_STATE_ALIAS = 1 << 13, | ||
| 34 | }; | 35 | }; |
| 35 | 36 | ||
| 36 | struct xt_conntrack_mtinfo1 { | 37 | struct xt_conntrack_mtinfo1 { |
diff --git a/include/uapi/linux/nfc.h b/include/uapi/linux/nfc.h index 0e63cee8d810..7969f46f1bb3 100644 --- a/include/uapi/linux/nfc.h +++ b/include/uapi/linux/nfc.h | |||
| @@ -5,20 +5,17 @@ | |||
| 5 | * Lauro Ramos Venancio <lauro.venancio@openbossa.org> | 5 | * Lauro Ramos Venancio <lauro.venancio@openbossa.org> |
| 6 | * Aloisio Almeida Jr <aloisio.almeida@openbossa.org> | 6 | * Aloisio Almeida Jr <aloisio.almeida@openbossa.org> |
| 7 | * | 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify | 8 | * Permission to use, copy, modify, and/or distribute this software for any |
| 9 | * it under the terms of the GNU General Public License as published by | 9 | * purpose with or without fee is hereby granted, provided that the above |
| 10 | * the Free Software Foundation; either version 2 of the License, or | 10 | * copyright notice and this permission notice appear in all copies. |
| 11 | * (at your option) any later version. | ||
| 12 | * | 11 | * |
| 13 | * This program is distributed in the hope that it will be useful, | 12 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
| 16 | * GNU General Public License for more details. | 15 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| 17 | * | 16 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
| 18 | * You should have received a copy of the GNU General Public License | 17 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
| 19 | * along with this program; if not, write to the | 18 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 20 | * Free Software Foundation, Inc., | ||
| 21 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
| 22 | */ | 19 | */ |
| 23 | 20 | ||
| 24 | #ifndef __LINUX_NFC_H | 21 | #ifndef __LINUX_NFC_H |
| @@ -67,6 +64,11 @@ | |||
| 67 | * subsequent CONNECT and CC messages. | 64 | * subsequent CONNECT and CC messages. |
| 68 | * If one of the passed parameters is wrong none is set and -EINVAL is | 65 | * If one of the passed parameters is wrong none is set and -EINVAL is |
| 69 | * returned. | 66 | * returned. |
| 67 | * @NFC_CMD_ENABLE_SE: Enable the physical link to a specific secure element. | ||
| 68 | * Once enabled a secure element will handle card emulation mode, i.e. | ||
| 69 | * starting a poll from a device which has a secure element enabled means | ||
| 70 | * we want to do SE based card emulation. | ||
| 71 | * @NFC_CMD_DISABLE_SE: Disable the physical link to a specific secure element. | ||
| 70 | */ | 72 | */ |
| 71 | enum nfc_commands { | 73 | enum nfc_commands { |
| 72 | NFC_CMD_UNSPEC, | 74 | NFC_CMD_UNSPEC, |
| @@ -86,6 +88,8 @@ enum nfc_commands { | |||
| 86 | NFC_EVENT_TM_DEACTIVATED, | 88 | NFC_EVENT_TM_DEACTIVATED, |
| 87 | NFC_CMD_LLC_GET_PARAMS, | 89 | NFC_CMD_LLC_GET_PARAMS, |
| 88 | NFC_CMD_LLC_SET_PARAMS, | 90 | NFC_CMD_LLC_SET_PARAMS, |
| 91 | NFC_CMD_ENABLE_SE, | ||
| 92 | NFC_CMD_DISABLE_SE, | ||
| 89 | /* private: internal use only */ | 93 | /* private: internal use only */ |
| 90 | __NFC_CMD_AFTER_LAST | 94 | __NFC_CMD_AFTER_LAST |
| 91 | }; | 95 | }; |
| @@ -114,6 +118,7 @@ enum nfc_commands { | |||
| 114 | * @NFC_ATTR_LLC_PARAM_LTO: Link TimeOut parameter | 118 | * @NFC_ATTR_LLC_PARAM_LTO: Link TimeOut parameter |
| 115 | * @NFC_ATTR_LLC_PARAM_RW: Receive Window size parameter | 119 | * @NFC_ATTR_LLC_PARAM_RW: Receive Window size parameter |
| 116 | * @NFC_ATTR_LLC_PARAM_MIUX: MIU eXtension parameter | 120 | * @NFC_ATTR_LLC_PARAM_MIUX: MIU eXtension parameter |
| 121 | * @NFC_ATTR_SE: Available Secure Elements | ||
| 117 | */ | 122 | */ |
| 118 | enum nfc_attrs { | 123 | enum nfc_attrs { |
| 119 | NFC_ATTR_UNSPEC, | 124 | NFC_ATTR_UNSPEC, |
| @@ -134,6 +139,7 @@ enum nfc_attrs { | |||
| 134 | NFC_ATTR_LLC_PARAM_LTO, | 139 | NFC_ATTR_LLC_PARAM_LTO, |
| 135 | NFC_ATTR_LLC_PARAM_RW, | 140 | NFC_ATTR_LLC_PARAM_RW, |
| 136 | NFC_ATTR_LLC_PARAM_MIUX, | 141 | NFC_ATTR_LLC_PARAM_MIUX, |
| 142 | NFC_ATTR_SE, | ||
| 137 | /* private: internal use only */ | 143 | /* private: internal use only */ |
| 138 | __NFC_ATTR_AFTER_LAST | 144 | __NFC_ATTR_AFTER_LAST |
| 139 | }; | 145 | }; |
| @@ -172,6 +178,11 @@ enum nfc_attrs { | |||
| 172 | #define NFC_PROTO_NFC_DEP_MASK (1 << NFC_PROTO_NFC_DEP) | 178 | #define NFC_PROTO_NFC_DEP_MASK (1 << NFC_PROTO_NFC_DEP) |
| 173 | #define NFC_PROTO_ISO14443_B_MASK (1 << NFC_PROTO_ISO14443_B) | 179 | #define NFC_PROTO_ISO14443_B_MASK (1 << NFC_PROTO_ISO14443_B) |
| 174 | 180 | ||
| 181 | /* NFC Secure Elements */ | ||
| 182 | #define NFC_SE_NONE 0x0 | ||
| 183 | #define NFC_SE_UICC 0x1 | ||
| 184 | #define NFC_SE_EMBEDDED 0x2 | ||
| 185 | |||
| 175 | struct sockaddr_nfc { | 186 | struct sockaddr_nfc { |
| 176 | sa_family_t sa_family; | 187 | sa_family_t sa_family; |
| 177 | __u32 dev_idx; | 188 | __u32 dev_idx; |
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index e3e19f8b16f2..c46bb016f4e4 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h | |||
| @@ -170,7 +170,8 @@ | |||
| 170 | * %NL80211_ATTR_HIDDEN_SSID, %NL80211_ATTR_CIPHERS_PAIRWISE, | 170 | * %NL80211_ATTR_HIDDEN_SSID, %NL80211_ATTR_CIPHERS_PAIRWISE, |
| 171 | * %NL80211_ATTR_CIPHER_GROUP, %NL80211_ATTR_WPA_VERSIONS, | 171 | * %NL80211_ATTR_CIPHER_GROUP, %NL80211_ATTR_WPA_VERSIONS, |
| 172 | * %NL80211_ATTR_AKM_SUITES, %NL80211_ATTR_PRIVACY, | 172 | * %NL80211_ATTR_AKM_SUITES, %NL80211_ATTR_PRIVACY, |
| 173 | * %NL80211_ATTR_AUTH_TYPE and %NL80211_ATTR_INACTIVITY_TIMEOUT. | 173 | * %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_INACTIVITY_TIMEOUT, |
| 174 | * %NL80211_ATTR_ACL_POLICY and %NL80211_ATTR_MAC_ADDRS. | ||
| 174 | * The channel to use can be set on the interface or be given using the | 175 | * The channel to use can be set on the interface or be given using the |
| 175 | * %NL80211_ATTR_WIPHY_FREQ and the attributes determining channel width. | 176 | * %NL80211_ATTR_WIPHY_FREQ and the attributes determining channel width. |
| 176 | * @NL80211_CMD_NEW_BEACON: old alias for %NL80211_CMD_START_AP | 177 | * @NL80211_CMD_NEW_BEACON: old alias for %NL80211_CMD_START_AP |
| @@ -374,8 +375,8 @@ | |||
| 374 | * requests to connect to a specified network but without separating | 375 | * requests to connect to a specified network but without separating |
| 375 | * auth and assoc steps. For this, you need to specify the SSID in a | 376 | * auth and assoc steps. For this, you need to specify the SSID in a |
| 376 | * %NL80211_ATTR_SSID attribute, and can optionally specify the association | 377 | * %NL80211_ATTR_SSID attribute, and can optionally specify the association |
| 377 | * IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_MAC, | 378 | * IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_USE_MFP, |
| 378 | * %NL80211_ATTR_WIPHY_FREQ, %NL80211_ATTR_CONTROL_PORT, | 379 | * %NL80211_ATTR_MAC, %NL80211_ATTR_WIPHY_FREQ, %NL80211_ATTR_CONTROL_PORT, |
| 379 | * %NL80211_ATTR_CONTROL_PORT_ETHERTYPE and | 380 | * %NL80211_ATTR_CONTROL_PORT_ETHERTYPE and |
| 380 | * %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT. | 381 | * %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT. |
| 381 | * Background scan period can optionally be | 382 | * Background scan period can optionally be |
| @@ -512,6 +513,12 @@ | |||
| 512 | * command with the %NL80211_ATTR_WOWLAN_TRIGGERS attribute. For | 513 | * command with the %NL80211_ATTR_WOWLAN_TRIGGERS attribute. For |
| 513 | * more background information, see | 514 | * more background information, see |
| 514 | * http://wireless.kernel.org/en/users/Documentation/WoWLAN. | 515 | * http://wireless.kernel.org/en/users/Documentation/WoWLAN. |
| 516 | * The @NL80211_CMD_SET_WOWLAN command can also be used as a notification | ||
| 517 | * from the driver reporting the wakeup reason. In this case, the | ||
| 518 | * @NL80211_ATTR_WOWLAN_TRIGGERS attribute will contain the reason | ||
| 519 | * for the wakeup, if it was caused by wireless. If it is not present | ||
| 520 | * in the wakeup notification, the wireless device didn't cause the | ||
| 521 | * wakeup but reports that it was woken up. | ||
| 515 | * | 522 | * |
| 516 | * @NL80211_CMD_SET_REKEY_OFFLOAD: This command is used give the driver | 523 | * @NL80211_CMD_SET_REKEY_OFFLOAD: This command is used give the driver |
| 517 | * the necessary information for supporting GTK rekey offload. This | 524 | * the necessary information for supporting GTK rekey offload. This |
| @@ -586,6 +593,24 @@ | |||
| 586 | * @NL80211_CMD_SET_MCAST_RATE: Change the rate used to send multicast frames | 593 | * @NL80211_CMD_SET_MCAST_RATE: Change the rate used to send multicast frames |
| 587 | * for IBSS or MESH vif. | 594 | * for IBSS or MESH vif. |
| 588 | * | 595 | * |
| 596 | * @NL80211_CMD_SET_MAC_ACL: sets ACL for MAC address based access control. | ||
| 597 | * This is to be used with the drivers advertising the support of MAC | ||
| 598 | * address based access control. List of MAC addresses is passed in | ||
| 599 | * %NL80211_ATTR_MAC_ADDRS and ACL policy is passed in | ||
| 600 | * %NL80211_ATTR_ACL_POLICY. Driver will enable ACL with this list, if it | ||
| 601 | * is not already done. The new list will replace any existing list. Driver | ||
| 602 | * will clear its ACL when the list of MAC addresses passed is empty. This | ||
| 603 | * command is used in AP/P2P GO mode. Driver has to make sure to clear its | ||
| 604 | * ACL list during %NL80211_CMD_STOP_AP. | ||
| 605 | * | ||
| 606 | * @NL80211_CMD_RADAR_DETECT: Start a Channel availability check (CAC). Once | ||
| 607 | * a radar is detected or the channel availability scan (CAC) has finished | ||
| 608 | * or was aborted, or a radar was detected, usermode will be notified with | ||
| 609 | * this event. This command is also used to notify userspace about radars | ||
| 610 | * while operating on this channel. | ||
| 611 | * %NL80211_ATTR_RADAR_EVENT is used to inform about the type of the | ||
| 612 | * event. | ||
| 613 | * | ||
| 589 | * @NL80211_CMD_MAX: highest used command number | 614 | * @NL80211_CMD_MAX: highest used command number |
| 590 | * @__NL80211_CMD_AFTER_LAST: internal use | 615 | * @__NL80211_CMD_AFTER_LAST: internal use |
| 591 | */ | 616 | */ |
| @@ -736,6 +761,10 @@ enum nl80211_commands { | |||
| 736 | 761 | ||
| 737 | NL80211_CMD_SET_MCAST_RATE, | 762 | NL80211_CMD_SET_MCAST_RATE, |
| 738 | 763 | ||
| 764 | NL80211_CMD_SET_MAC_ACL, | ||
| 765 | |||
| 766 | NL80211_CMD_RADAR_DETECT, | ||
| 767 | |||
| 739 | /* add new commands above here */ | 768 | /* add new commands above here */ |
| 740 | 769 | ||
| 741 | /* used to define NL80211_CMD_MAX below */ | 770 | /* used to define NL80211_CMD_MAX below */ |
| @@ -958,7 +987,7 @@ enum nl80211_commands { | |||
| 958 | * @NL80211_ATTR_USE_MFP: Whether management frame protection (IEEE 802.11w) is | 987 | * @NL80211_ATTR_USE_MFP: Whether management frame protection (IEEE 802.11w) is |
| 959 | * used for the association (&enum nl80211_mfp, represented as a u32); | 988 | * used for the association (&enum nl80211_mfp, represented as a u32); |
| 960 | * this attribute can be used | 989 | * this attribute can be used |
| 961 | * with %NL80211_CMD_ASSOCIATE request | 990 | * with %NL80211_CMD_ASSOCIATE and %NL80211_CMD_CONNECT requests |
| 962 | * | 991 | * |
| 963 | * @NL80211_ATTR_STA_FLAGS2: Attribute containing a | 992 | * @NL80211_ATTR_STA_FLAGS2: Attribute containing a |
| 964 | * &struct nl80211_sta_flag_update. | 993 | * &struct nl80211_sta_flag_update. |
| @@ -1310,6 +1339,35 @@ enum nl80211_commands { | |||
| 1310 | * if not given in START_AP 0 is assumed, if not given in SET_BSS | 1339 | * if not given in START_AP 0 is assumed, if not given in SET_BSS |
| 1311 | * no change is made. | 1340 | * no change is made. |
| 1312 | * | 1341 | * |
| 1342 | * @NL80211_ATTR_LOCAL_MESH_POWER_MODE: local mesh STA link-specific power mode | ||
| 1343 | * defined in &enum nl80211_mesh_power_mode. | ||
| 1344 | * | ||
| 1345 | * @NL80211_ATTR_ACL_POLICY: ACL policy, see &enum nl80211_acl_policy, | ||
| 1346 | * carried in a u32 attribute | ||
| 1347 | * | ||
| 1348 | * @NL80211_ATTR_MAC_ADDRS: Array of nested MAC addresses, used for | ||
| 1349 | * MAC ACL. | ||
| 1350 | * | ||
| 1351 | * @NL80211_ATTR_MAC_ACL_MAX: u32 attribute to advertise the maximum | ||
| 1352 | * number of MAC addresses that a device can support for MAC | ||
| 1353 | * ACL. | ||
| 1354 | * | ||
| 1355 | * @NL80211_ATTR_RADAR_EVENT: Type of radar event for notification to userspace, | ||
| 1356 | * contains a value of enum nl80211_radar_event (u32). | ||
| 1357 | * | ||
| 1358 | * @NL80211_ATTR_EXT_CAPA: 802.11 extended capabilities that the kernel driver | ||
| 1359 | * has and handles. The format is the same as the IE contents. See | ||
| 1360 | * 802.11-2012 8.4.2.29 for more information. | ||
| 1361 | * @NL80211_ATTR_EXT_CAPA_MASK: Extended capabilities that the kernel driver | ||
| 1362 | * has set in the %NL80211_ATTR_EXT_CAPA value, for multibit fields. | ||
| 1363 | * | ||
| 1364 | * @NL80211_ATTR_STA_CAPABILITY: Station capabilities (u16) are advertised to | ||
| 1365 | * the driver, e.g., to enable TDLS power save (PU-APSD). | ||
| 1366 | * | ||
| 1367 | * @NL80211_ATTR_STA_EXT_CAPABILITY: Station extended capabilities are | ||
| 1368 | * advertised to the driver, e.g., to enable TDLS off channel operations | ||
| 1369 | * and PU-APSD. | ||
| 1370 | * | ||
| 1313 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 1371 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
| 1314 | * @__NL80211_ATTR_AFTER_LAST: internal use | 1372 | * @__NL80211_ATTR_AFTER_LAST: internal use |
| 1315 | */ | 1373 | */ |
| @@ -1580,6 +1638,22 @@ enum nl80211_attrs { | |||
| 1580 | NL80211_ATTR_P2P_CTWINDOW, | 1638 | NL80211_ATTR_P2P_CTWINDOW, |
| 1581 | NL80211_ATTR_P2P_OPPPS, | 1639 | NL80211_ATTR_P2P_OPPPS, |
| 1582 | 1640 | ||
| 1641 | NL80211_ATTR_LOCAL_MESH_POWER_MODE, | ||
| 1642 | |||
| 1643 | NL80211_ATTR_ACL_POLICY, | ||
| 1644 | |||
| 1645 | NL80211_ATTR_MAC_ADDRS, | ||
| 1646 | |||
| 1647 | NL80211_ATTR_MAC_ACL_MAX, | ||
| 1648 | |||
| 1649 | NL80211_ATTR_RADAR_EVENT, | ||
| 1650 | |||
| 1651 | NL80211_ATTR_EXT_CAPA, | ||
| 1652 | NL80211_ATTR_EXT_CAPA_MASK, | ||
| 1653 | |||
| 1654 | NL80211_ATTR_STA_CAPABILITY, | ||
| 1655 | NL80211_ATTR_STA_EXT_CAPABILITY, | ||
| 1656 | |||
| 1583 | /* add attributes here, update the policy in nl80211.c */ | 1657 | /* add attributes here, update the policy in nl80211.c */ |
| 1584 | 1658 | ||
| 1585 | __NL80211_ATTR_AFTER_LAST, | 1659 | __NL80211_ATTR_AFTER_LAST, |
| @@ -1697,6 +1771,9 @@ enum nl80211_iftype { | |||
| 1697 | * flag can't be changed, it is only valid while adding a station, and | 1771 | * flag can't be changed, it is only valid while adding a station, and |
| 1698 | * attempts to change it will silently be ignored (rather than rejected | 1772 | * attempts to change it will silently be ignored (rather than rejected |
| 1699 | * as errors.) | 1773 | * as errors.) |
| 1774 | * @NL80211_STA_FLAG_ASSOCIATED: station is associated; used with drivers | ||
| 1775 | * that support %NL80211_FEATURE_FULL_AP_CLIENT_STATE to transition a | ||
| 1776 | * previously added station into associated state | ||
| 1700 | * @NL80211_STA_FLAG_MAX: highest station flag number currently defined | 1777 | * @NL80211_STA_FLAG_MAX: highest station flag number currently defined |
| 1701 | * @__NL80211_STA_FLAG_AFTER_LAST: internal use | 1778 | * @__NL80211_STA_FLAG_AFTER_LAST: internal use |
| 1702 | */ | 1779 | */ |
| @@ -1708,6 +1785,7 @@ enum nl80211_sta_flags { | |||
| 1708 | NL80211_STA_FLAG_MFP, | 1785 | NL80211_STA_FLAG_MFP, |
| 1709 | NL80211_STA_FLAG_AUTHENTICATED, | 1786 | NL80211_STA_FLAG_AUTHENTICATED, |
| 1710 | NL80211_STA_FLAG_TDLS_PEER, | 1787 | NL80211_STA_FLAG_TDLS_PEER, |
| 1788 | NL80211_STA_FLAG_ASSOCIATED, | ||
| 1711 | 1789 | ||
| 1712 | /* keep last */ | 1790 | /* keep last */ |
| 1713 | __NL80211_STA_FLAG_AFTER_LAST, | 1791 | __NL80211_STA_FLAG_AFTER_LAST, |
| @@ -1813,6 +1891,8 @@ enum nl80211_sta_bss_param { | |||
| 1813 | * @NL80211_STA_INFO_INACTIVE_TIME: time since last activity (u32, msecs) | 1891 | * @NL80211_STA_INFO_INACTIVE_TIME: time since last activity (u32, msecs) |
| 1814 | * @NL80211_STA_INFO_RX_BYTES: total received bytes (u32, from this station) | 1892 | * @NL80211_STA_INFO_RX_BYTES: total received bytes (u32, from this station) |
| 1815 | * @NL80211_STA_INFO_TX_BYTES: total transmitted bytes (u32, to this station) | 1893 | * @NL80211_STA_INFO_TX_BYTES: total transmitted bytes (u32, to this station) |
| 1894 | * @NL80211_STA_INFO_RX_BYTES64: total received bytes (u64, from this station) | ||
| 1895 | * @NL80211_STA_INFO_TX_BYTES64: total transmitted bytes (u64, to this station) | ||
| 1816 | * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm) | 1896 | * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm) |
| 1817 | * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute | 1897 | * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute |
| 1818 | * containing info as possible, see &enum nl80211_rate_info | 1898 | * containing info as possible, see &enum nl80211_rate_info |
| @@ -1834,6 +1914,10 @@ enum nl80211_sta_bss_param { | |||
| 1834 | * @NL80211_STA_INFO_STA_FLAGS: Contains a struct nl80211_sta_flag_update. | 1914 | * @NL80211_STA_INFO_STA_FLAGS: Contains a struct nl80211_sta_flag_update. |
| 1835 | * @NL80211_STA_INFO_BEACON_LOSS: count of times beacon loss was detected (u32) | 1915 | * @NL80211_STA_INFO_BEACON_LOSS: count of times beacon loss was detected (u32) |
| 1836 | * @NL80211_STA_INFO_T_OFFSET: timing offset with respect to this STA (s64) | 1916 | * @NL80211_STA_INFO_T_OFFSET: timing offset with respect to this STA (s64) |
| 1917 | * @NL80211_STA_INFO_LOCAL_PM: local mesh STA link-specific power mode | ||
| 1918 | * @NL80211_STA_INFO_PEER_PM: peer mesh STA link-specific power mode | ||
| 1919 | * @NL80211_STA_INFO_NONPEER_PM: neighbor mesh STA power save mode towards | ||
| 1920 | * non-peer STA | ||
| 1837 | * @__NL80211_STA_INFO_AFTER_LAST: internal | 1921 | * @__NL80211_STA_INFO_AFTER_LAST: internal |
| 1838 | * @NL80211_STA_INFO_MAX: highest possible station info attribute | 1922 | * @NL80211_STA_INFO_MAX: highest possible station info attribute |
| 1839 | */ | 1923 | */ |
| @@ -1858,6 +1942,11 @@ enum nl80211_sta_info { | |||
| 1858 | NL80211_STA_INFO_STA_FLAGS, | 1942 | NL80211_STA_INFO_STA_FLAGS, |
| 1859 | NL80211_STA_INFO_BEACON_LOSS, | 1943 | NL80211_STA_INFO_BEACON_LOSS, |
| 1860 | NL80211_STA_INFO_T_OFFSET, | 1944 | NL80211_STA_INFO_T_OFFSET, |
| 1945 | NL80211_STA_INFO_LOCAL_PM, | ||
| 1946 | NL80211_STA_INFO_PEER_PM, | ||
| 1947 | NL80211_STA_INFO_NONPEER_PM, | ||
| 1948 | NL80211_STA_INFO_RX_BYTES64, | ||
| 1949 | NL80211_STA_INFO_TX_BYTES64, | ||
| 1861 | 1950 | ||
| 1862 | /* keep last */ | 1951 | /* keep last */ |
| 1863 | __NL80211_STA_INFO_AFTER_LAST, | 1952 | __NL80211_STA_INFO_AFTER_LAST, |
| @@ -1967,6 +2056,20 @@ enum nl80211_band_attr { | |||
| 1967 | * on this channel in current regulatory domain. | 2056 | * on this channel in current regulatory domain. |
| 1968 | * @NL80211_FREQUENCY_ATTR_MAX_TX_POWER: Maximum transmission power in mBm | 2057 | * @NL80211_FREQUENCY_ATTR_MAX_TX_POWER: Maximum transmission power in mBm |
| 1969 | * (100 * dBm). | 2058 | * (100 * dBm). |
| 2059 | * @NL80211_FREQUENCY_ATTR_DFS_STATE: current state for DFS | ||
| 2060 | * (enum nl80211_dfs_state) | ||
| 2061 | * @NL80211_FREQUENCY_ATTR_DFS_TIME: time in miliseconds for how long | ||
| 2062 | * this channel is in this DFS state. | ||
| 2063 | * @NL80211_FREQUENCY_ATTR_NO_HT40_MINUS: HT40- isn't possible with this | ||
| 2064 | * channel as the control channel | ||
| 2065 | * @NL80211_FREQUENCY_ATTR_NO_HT40_PLUS: HT40+ isn't possible with this | ||
| 2066 | * channel as the control channel | ||
| 2067 | * @NL80211_FREQUENCY_ATTR_NO_80MHZ: any 80 MHz channel using this channel | ||
| 2068 | * as the primary or any of the secondary channels isn't possible, | ||
| 2069 | * this includes 80+80 channels | ||
| 2070 | * @NL80211_FREQUENCY_ATTR_NO_160MHZ: any 160 MHz (but not 80+80) channel | ||
| 2071 | * using this channel as the primary or any of the secondary channels | ||
| 2072 | * isn't possible | ||
| 1970 | * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number | 2073 | * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number |
| 1971 | * currently defined | 2074 | * currently defined |
| 1972 | * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use | 2075 | * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use |
| @@ -1979,6 +2082,12 @@ enum nl80211_frequency_attr { | |||
| 1979 | NL80211_FREQUENCY_ATTR_NO_IBSS, | 2082 | NL80211_FREQUENCY_ATTR_NO_IBSS, |
| 1980 | NL80211_FREQUENCY_ATTR_RADAR, | 2083 | NL80211_FREQUENCY_ATTR_RADAR, |
| 1981 | NL80211_FREQUENCY_ATTR_MAX_TX_POWER, | 2084 | NL80211_FREQUENCY_ATTR_MAX_TX_POWER, |
| 2085 | NL80211_FREQUENCY_ATTR_DFS_STATE, | ||
| 2086 | NL80211_FREQUENCY_ATTR_DFS_TIME, | ||
| 2087 | NL80211_FREQUENCY_ATTR_NO_HT40_MINUS, | ||
| 2088 | NL80211_FREQUENCY_ATTR_NO_HT40_PLUS, | ||
| 2089 | NL80211_FREQUENCY_ATTR_NO_80MHZ, | ||
| 2090 | NL80211_FREQUENCY_ATTR_NO_160MHZ, | ||
| 1982 | 2091 | ||
| 1983 | /* keep last */ | 2092 | /* keep last */ |
| 1984 | __NL80211_FREQUENCY_ATTR_AFTER_LAST, | 2093 | __NL80211_FREQUENCY_ATTR_AFTER_LAST, |
| @@ -2249,6 +2358,34 @@ enum nl80211_mntr_flags { | |||
| 2249 | }; | 2358 | }; |
| 2250 | 2359 | ||
| 2251 | /** | 2360 | /** |
| 2361 | * enum nl80211_mesh_power_mode - mesh power save modes | ||
| 2362 | * | ||
| 2363 | * @NL80211_MESH_POWER_UNKNOWN: The mesh power mode of the mesh STA is | ||
| 2364 | * not known or has not been set yet. | ||
| 2365 | * @NL80211_MESH_POWER_ACTIVE: Active mesh power mode. The mesh STA is | ||
| 2366 | * in Awake state all the time. | ||
| 2367 | * @NL80211_MESH_POWER_LIGHT_SLEEP: Light sleep mode. The mesh STA will | ||
| 2368 | * alternate between Active and Doze states, but will wake up for | ||
| 2369 | * neighbor's beacons. | ||
| 2370 | * @NL80211_MESH_POWER_DEEP_SLEEP: Deep sleep mode. The mesh STA will | ||
| 2371 | * alternate between Active and Doze states, but may not wake up | ||
| 2372 | * for neighbor's beacons. | ||
| 2373 | * | ||
| 2374 | * @__NL80211_MESH_POWER_AFTER_LAST - internal use | ||
| 2375 | * @NL80211_MESH_POWER_MAX - highest possible power save level | ||
| 2376 | */ | ||
| 2377 | |||
| 2378 | enum nl80211_mesh_power_mode { | ||
| 2379 | NL80211_MESH_POWER_UNKNOWN, | ||
| 2380 | NL80211_MESH_POWER_ACTIVE, | ||
| 2381 | NL80211_MESH_POWER_LIGHT_SLEEP, | ||
| 2382 | NL80211_MESH_POWER_DEEP_SLEEP, | ||
| 2383 | |||
| 2384 | __NL80211_MESH_POWER_AFTER_LAST, | ||
| 2385 | NL80211_MESH_POWER_MAX = __NL80211_MESH_POWER_AFTER_LAST - 1 | ||
| 2386 | }; | ||
| 2387 | |||
| 2388 | /** | ||
| 2252 | * enum nl80211_meshconf_params - mesh configuration parameters | 2389 | * enum nl80211_meshconf_params - mesh configuration parameters |
| 2253 | * | 2390 | * |
| 2254 | * Mesh configuration parameters. These can be changed while the mesh is | 2391 | * Mesh configuration parameters. These can be changed while the mesh is |
| @@ -2342,6 +2479,11 @@ enum nl80211_mntr_flags { | |||
| 2342 | * (in TUs) during which a mesh STA can send only one Action frame | 2479 | * (in TUs) during which a mesh STA can send only one Action frame |
| 2343 | * containing a PREQ element for root path confirmation. | 2480 | * containing a PREQ element for root path confirmation. |
| 2344 | * | 2481 | * |
| 2482 | * @NL80211_MESHCONF_POWER_MODE: Default mesh power mode for new peer links. | ||
| 2483 | * type &enum nl80211_mesh_power_mode (u32) | ||
| 2484 | * | ||
| 2485 | * @NL80211_MESHCONF_AWAKE_WINDOW: awake window duration (in TUs) | ||
| 2486 | * | ||
| 2345 | * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use | 2487 | * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use |
| 2346 | */ | 2488 | */ |
| 2347 | enum nl80211_meshconf_params { | 2489 | enum nl80211_meshconf_params { |
| @@ -2371,6 +2513,8 @@ enum nl80211_meshconf_params { | |||
| 2371 | NL80211_MESHCONF_HWMP_PATH_TO_ROOT_TIMEOUT, | 2513 | NL80211_MESHCONF_HWMP_PATH_TO_ROOT_TIMEOUT, |
| 2372 | NL80211_MESHCONF_HWMP_ROOT_INTERVAL, | 2514 | NL80211_MESHCONF_HWMP_ROOT_INTERVAL, |
| 2373 | NL80211_MESHCONF_HWMP_CONFIRMATION_INTERVAL, | 2515 | NL80211_MESHCONF_HWMP_CONFIRMATION_INTERVAL, |
| 2516 | NL80211_MESHCONF_POWER_MODE, | ||
| 2517 | NL80211_MESHCONF_AWAKE_WINDOW, | ||
| 2374 | 2518 | ||
| 2375 | /* keep last */ | 2519 | /* keep last */ |
| 2376 | __NL80211_MESHCONF_ATTR_AFTER_LAST, | 2520 | __NL80211_MESHCONF_ATTR_AFTER_LAST, |
| @@ -2816,10 +2960,12 @@ enum nl80211_tx_power_setting { | |||
| 2816 | * corresponds to the lowest-order bit in the second byte of the mask. | 2960 | * corresponds to the lowest-order bit in the second byte of the mask. |
| 2817 | * For example: The match 00:xx:00:00:xx:00:00:00:00:xx:xx:xx (where | 2961 | * For example: The match 00:xx:00:00:xx:00:00:00:00:xx:xx:xx (where |
| 2818 | * xx indicates "don't care") would be represented by a pattern of | 2962 | * xx indicates "don't care") would be represented by a pattern of |
| 2819 | * twelve zero bytes, and a mask of "0xed,0x07". | 2963 | * twelve zero bytes, and a mask of "0xed,0x01". |
| 2820 | * Note that the pattern matching is done as though frames were not | 2964 | * Note that the pattern matching is done as though frames were not |
| 2821 | * 802.11 frames but 802.3 frames, i.e. the frame is fully unpacked | 2965 | * 802.11 frames but 802.3 frames, i.e. the frame is fully unpacked |
| 2822 | * first (including SNAP header unpacking) and then matched. | 2966 | * first (including SNAP header unpacking) and then matched. |
| 2967 | * @NL80211_WOWLAN_PKTPAT_OFFSET: packet offset, pattern is matched after | ||
| 2968 | * these fixed number of bytes of received packet | ||
| 2823 | * @NUM_NL80211_WOWLAN_PKTPAT: number of attributes | 2969 | * @NUM_NL80211_WOWLAN_PKTPAT: number of attributes |
| 2824 | * @MAX_NL80211_WOWLAN_PKTPAT: max attribute number | 2970 | * @MAX_NL80211_WOWLAN_PKTPAT: max attribute number |
| 2825 | */ | 2971 | */ |
| @@ -2827,6 +2973,7 @@ enum nl80211_wowlan_packet_pattern_attr { | |||
| 2827 | __NL80211_WOWLAN_PKTPAT_INVALID, | 2973 | __NL80211_WOWLAN_PKTPAT_INVALID, |
| 2828 | NL80211_WOWLAN_PKTPAT_MASK, | 2974 | NL80211_WOWLAN_PKTPAT_MASK, |
| 2829 | NL80211_WOWLAN_PKTPAT_PATTERN, | 2975 | NL80211_WOWLAN_PKTPAT_PATTERN, |
| 2976 | NL80211_WOWLAN_PKTPAT_OFFSET, | ||
| 2830 | 2977 | ||
| 2831 | NUM_NL80211_WOWLAN_PKTPAT, | 2978 | NUM_NL80211_WOWLAN_PKTPAT, |
| 2832 | MAX_NL80211_WOWLAN_PKTPAT = NUM_NL80211_WOWLAN_PKTPAT - 1, | 2979 | MAX_NL80211_WOWLAN_PKTPAT = NUM_NL80211_WOWLAN_PKTPAT - 1, |
| @@ -2837,6 +2984,7 @@ enum nl80211_wowlan_packet_pattern_attr { | |||
| 2837 | * @max_patterns: maximum number of patterns supported | 2984 | * @max_patterns: maximum number of patterns supported |
| 2838 | * @min_pattern_len: minimum length of each pattern | 2985 | * @min_pattern_len: minimum length of each pattern |
| 2839 | * @max_pattern_len: maximum length of each pattern | 2986 | * @max_pattern_len: maximum length of each pattern |
| 2987 | * @max_pkt_offset: maximum Rx packet offset | ||
| 2840 | * | 2988 | * |
| 2841 | * This struct is carried in %NL80211_WOWLAN_TRIG_PKT_PATTERN when | 2989 | * This struct is carried in %NL80211_WOWLAN_TRIG_PKT_PATTERN when |
| 2842 | * that is part of %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED in the | 2990 | * that is part of %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED in the |
| @@ -2846,6 +2994,7 @@ struct nl80211_wowlan_pattern_support { | |||
| 2846 | __u32 max_patterns; | 2994 | __u32 max_patterns; |
| 2847 | __u32 min_pattern_len; | 2995 | __u32 min_pattern_len; |
| 2848 | __u32 max_pattern_len; | 2996 | __u32 max_pattern_len; |
| 2997 | __u32 max_pkt_offset; | ||
| 2849 | } __attribute__((packed)); | 2998 | } __attribute__((packed)); |
| 2850 | 2999 | ||
| 2851 | /** | 3000 | /** |
| @@ -2861,12 +3010,17 @@ struct nl80211_wowlan_pattern_support { | |||
| 2861 | * @NL80211_WOWLAN_TRIG_PKT_PATTERN: wake up on the specified packet patterns | 3010 | * @NL80211_WOWLAN_TRIG_PKT_PATTERN: wake up on the specified packet patterns |
| 2862 | * which are passed in an array of nested attributes, each nested attribute | 3011 | * which are passed in an array of nested attributes, each nested attribute |
| 2863 | * defining a with attributes from &struct nl80211_wowlan_trig_pkt_pattern. | 3012 | * defining a with attributes from &struct nl80211_wowlan_trig_pkt_pattern. |
| 2864 | * Each pattern defines a wakeup packet. The matching is done on the MSDU, | 3013 | * Each pattern defines a wakeup packet. Packet offset is associated with |
| 2865 | * i.e. as though the packet was an 802.3 packet, so the pattern matching | 3014 | * each pattern which is used while matching the pattern. The matching is |
| 2866 | * is done after the packet is converted to the MSDU. | 3015 | * done on the MSDU, i.e. as though the packet was an 802.3 packet, so the |
| 3016 | * pattern matching is done after the packet is converted to the MSDU. | ||
| 2867 | * | 3017 | * |
| 2868 | * In %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED, it is a binary attribute | 3018 | * In %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED, it is a binary attribute |
| 2869 | * carrying a &struct nl80211_wowlan_pattern_support. | 3019 | * carrying a &struct nl80211_wowlan_pattern_support. |
| 3020 | * | ||
| 3021 | * When reporting wakeup. it is a u32 attribute containing the 0-based | ||
| 3022 | * index of the pattern that caused the wakeup, in the patterns passed | ||
| 3023 | * to the kernel when configuring. | ||
| 2870 | * @NL80211_WOWLAN_TRIG_GTK_REKEY_SUPPORTED: Not a real trigger, and cannot be | 3024 | * @NL80211_WOWLAN_TRIG_GTK_REKEY_SUPPORTED: Not a real trigger, and cannot be |
| 2871 | * used when setting, used only to indicate that GTK rekeying is supported | 3025 | * used when setting, used only to indicate that GTK rekeying is supported |
| 2872 | * by the device (flag) | 3026 | * by the device (flag) |
| @@ -2877,8 +3031,36 @@ struct nl80211_wowlan_pattern_support { | |||
| 2877 | * @NL80211_WOWLAN_TRIG_4WAY_HANDSHAKE: wake up on 4-way handshake (flag) | 3031 | * @NL80211_WOWLAN_TRIG_4WAY_HANDSHAKE: wake up on 4-way handshake (flag) |
| 2878 | * @NL80211_WOWLAN_TRIG_RFKILL_RELEASE: wake up when rfkill is released | 3032 | * @NL80211_WOWLAN_TRIG_RFKILL_RELEASE: wake up when rfkill is released |
| 2879 | * (on devices that have rfkill in the device) (flag) | 3033 | * (on devices that have rfkill in the device) (flag) |
| 3034 | * @NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211: For wakeup reporting only, contains | ||
| 3035 | * the 802.11 packet that caused the wakeup, e.g. a deauth frame. The frame | ||
| 3036 | * may be truncated, the @NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211_LEN | ||
| 3037 | * attribute contains the original length. | ||
| 3038 | * @NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211_LEN: Original length of the 802.11 | ||
| 3039 | * packet, may be bigger than the @NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211 | ||
| 3040 | * attribute if the packet was truncated somewhere. | ||
| 3041 | * @NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023: For wakeup reporting only, contains the | ||
| 3042 | * 802.11 packet that caused the wakeup, e.g. a magic packet. The frame may | ||
| 3043 | * be truncated, the @NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023_LEN attribute | ||
| 3044 | * contains the original length. | ||
| 3045 | * @NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023_LEN: Original length of the 802.3 | ||
| 3046 | * packet, may be bigger than the @NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023 | ||
| 3047 | * attribute if the packet was truncated somewhere. | ||
| 3048 | * @NL80211_WOWLAN_TRIG_TCP_CONNECTION: TCP connection wake, see DOC section | ||
| 3049 | * "TCP connection wakeup" for more details. This is a nested attribute | ||
| 3050 | * containing the exact information for establishing and keeping alive | ||
| 3051 | * the TCP connection. | ||
| 3052 | * @NL80211_WOWLAN_TRIG_TCP_WAKEUP_MATCH: For wakeup reporting only, the | ||
| 3053 | * wakeup packet was received on the TCP connection | ||
| 3054 | * @NL80211_WOWLAN_TRIG_WAKEUP_TCP_CONNLOST: For wakeup reporting only, the | ||
| 3055 | * TCP connection was lost or failed to be established | ||
| 3056 | * @NL80211_WOWLAN_TRIG_WAKEUP_TCP_NOMORETOKENS: For wakeup reporting only, | ||
| 3057 | * the TCP connection ran out of tokens to use for data to send to the | ||
| 3058 | * service | ||
| 2880 | * @NUM_NL80211_WOWLAN_TRIG: number of wake on wireless triggers | 3059 | * @NUM_NL80211_WOWLAN_TRIG: number of wake on wireless triggers |
| 2881 | * @MAX_NL80211_WOWLAN_TRIG: highest wowlan trigger attribute number | 3060 | * @MAX_NL80211_WOWLAN_TRIG: highest wowlan trigger attribute number |
| 3061 | * | ||
| 3062 | * These nested attributes are used to configure the wakeup triggers and | ||
| 3063 | * to report the wakeup reason(s). | ||
| 2882 | */ | 3064 | */ |
| 2883 | enum nl80211_wowlan_triggers { | 3065 | enum nl80211_wowlan_triggers { |
| 2884 | __NL80211_WOWLAN_TRIG_INVALID, | 3066 | __NL80211_WOWLAN_TRIG_INVALID, |
| @@ -2891,6 +3073,14 @@ enum nl80211_wowlan_triggers { | |||
| 2891 | NL80211_WOWLAN_TRIG_EAP_IDENT_REQUEST, | 3073 | NL80211_WOWLAN_TRIG_EAP_IDENT_REQUEST, |
| 2892 | NL80211_WOWLAN_TRIG_4WAY_HANDSHAKE, | 3074 | NL80211_WOWLAN_TRIG_4WAY_HANDSHAKE, |
| 2893 | NL80211_WOWLAN_TRIG_RFKILL_RELEASE, | 3075 | NL80211_WOWLAN_TRIG_RFKILL_RELEASE, |
| 3076 | NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211, | ||
| 3077 | NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211_LEN, | ||
| 3078 | NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023, | ||
| 3079 | NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023_LEN, | ||
| 3080 | NL80211_WOWLAN_TRIG_TCP_CONNECTION, | ||
| 3081 | NL80211_WOWLAN_TRIG_WAKEUP_TCP_MATCH, | ||
| 3082 | NL80211_WOWLAN_TRIG_WAKEUP_TCP_CONNLOST, | ||
| 3083 | NL80211_WOWLAN_TRIG_WAKEUP_TCP_NOMORETOKENS, | ||
| 2894 | 3084 | ||
| 2895 | /* keep last */ | 3085 | /* keep last */ |
| 2896 | NUM_NL80211_WOWLAN_TRIG, | 3086 | NUM_NL80211_WOWLAN_TRIG, |
| @@ -2898,6 +3088,116 @@ enum nl80211_wowlan_triggers { | |||
| 2898 | }; | 3088 | }; |
| 2899 | 3089 | ||
| 2900 | /** | 3090 | /** |
| 3091 | * DOC: TCP connection wakeup | ||
| 3092 | * | ||
| 3093 | * Some devices can establish a TCP connection in order to be woken up by a | ||
| 3094 | * packet coming in from outside their network segment, or behind NAT. If | ||
| 3095 | * configured, the device will establish a TCP connection to the given | ||
| 3096 | * service, and periodically send data to that service. The first data | ||
| 3097 | * packet is usually transmitted after SYN/ACK, also ACKing the SYN/ACK. | ||
| 3098 | * The data packets can optionally include a (little endian) sequence | ||
| 3099 | * number (in the TCP payload!) that is generated by the device, and, also | ||
| 3100 | * optionally, a token from a list of tokens. This serves as a keep-alive | ||
| 3101 | * with the service, and for NATed connections, etc. | ||
| 3102 | * | ||
| 3103 | * During this keep-alive period, the server doesn't send any data to the | ||
| 3104 | * client. When receiving data, it is compared against the wakeup pattern | ||
| 3105 | * (and mask) and if it matches, the host is woken up. Similarly, if the | ||
| 3106 | * connection breaks or cannot be established to start with, the host is | ||
| 3107 | * also woken up. | ||
| 3108 | * | ||
| 3109 | * Developer's note: ARP offload is required for this, otherwise TCP | ||
| 3110 | * response packets might not go through correctly. | ||
| 3111 | */ | ||
| 3112 | |||
| 3113 | /** | ||
| 3114 | * struct nl80211_wowlan_tcp_data_seq - WoWLAN TCP data sequence | ||
| 3115 | * @start: starting value | ||
| 3116 | * @offset: offset of sequence number in packet | ||
| 3117 | * @len: length of the sequence value to write, 1 through 4 | ||
| 3118 | * | ||
| 3119 | * Note: don't confuse with the TCP sequence number(s), this is for the | ||
| 3120 | * keepalive packet payload. The actual value is written into the packet | ||
| 3121 | * in little endian. | ||
| 3122 | */ | ||
| 3123 | struct nl80211_wowlan_tcp_data_seq { | ||
| 3124 | __u32 start, offset, len; | ||
| 3125 | }; | ||
| 3126 | |||
| 3127 | /** | ||
| 3128 | * struct nl80211_wowlan_tcp_data_token - WoWLAN TCP data token config | ||
| 3129 | * @offset: offset of token in packet | ||
| 3130 | * @len: length of each token | ||
| 3131 | * @token_stream: stream of data to be used for the tokens, the length must | ||
| 3132 | * be a multiple of @len for this to make sense | ||
| 3133 | */ | ||
| 3134 | struct nl80211_wowlan_tcp_data_token { | ||
| 3135 | __u32 offset, len; | ||
| 3136 | __u8 token_stream[]; | ||
| 3137 | }; | ||
| 3138 | |||
| 3139 | /** | ||
| 3140 | * struct nl80211_wowlan_tcp_data_token_feature - data token features | ||
| 3141 | * @min_len: minimum token length | ||
| 3142 | * @max_len: maximum token length | ||
| 3143 | * @bufsize: total available token buffer size (max size of @token_stream) | ||
| 3144 | */ | ||
| 3145 | struct nl80211_wowlan_tcp_data_token_feature { | ||
| 3146 | __u32 min_len, max_len, bufsize; | ||
| 3147 | }; | ||
| 3148 | |||
| 3149 | /** | ||
| 3150 | * enum nl80211_wowlan_tcp_attrs - WoWLAN TCP connection parameters | ||
| 3151 | * @__NL80211_WOWLAN_TCP_INVALID: invalid number for nested attributes | ||
| 3152 | * @NL80211_WOWLAN_TCP_SRC_IPV4: source IPv4 address (in network byte order) | ||
| 3153 | * @NL80211_WOWLAN_TCP_DST_IPV4: destination IPv4 address | ||
| 3154 | * (in network byte order) | ||
| 3155 | * @NL80211_WOWLAN_TCP_DST_MAC: destination MAC address, this is given because | ||
| 3156 | * route lookup when configured might be invalid by the time we suspend, | ||
| 3157 | * and doing a route lookup when suspending is no longer possible as it | ||
| 3158 | * might require ARP querying. | ||
| 3159 | * @NL80211_WOWLAN_TCP_SRC_PORT: source port (u16); optional, if not given a | ||
| 3160 | * socket and port will be allocated | ||
| 3161 | * @NL80211_WOWLAN_TCP_DST_PORT: destination port (u16) | ||
| 3162 | * @NL80211_WOWLAN_TCP_DATA_PAYLOAD: data packet payload, at least one byte. | ||
| 3163 | * For feature advertising, a u32 attribute holding the maximum length | ||
| 3164 | * of the data payload. | ||
| 3165 | * @NL80211_WOWLAN_TCP_DATA_PAYLOAD_SEQ: data packet sequence configuration | ||
| 3166 | * (if desired), a &struct nl80211_wowlan_tcp_data_seq. For feature | ||
| 3167 | * advertising it is just a flag | ||
| 3168 | * @NL80211_WOWLAN_TCP_DATA_PAYLOAD_TOKEN: data packet token configuration, | ||
| 3169 | * see &struct nl80211_wowlan_tcp_data_token and for advertising see | ||
| 3170 | * &struct nl80211_wowlan_tcp_data_token_feature. | ||
| 3171 | * @NL80211_WOWLAN_TCP_DATA_INTERVAL: data interval in seconds, maximum | ||
| 3172 | * interval in feature advertising (u32) | ||
| 3173 | * @NL80211_WOWLAN_TCP_WAKE_PAYLOAD: wake packet payload, for advertising a | ||
| 3174 | * u32 attribute holding the maximum length | ||
| 3175 | * @NL80211_WOWLAN_TCP_WAKE_MASK: Wake packet payload mask, not used for | ||
| 3176 | * feature advertising. The mask works like @NL80211_WOWLAN_PKTPAT_MASK | ||
| 3177 | * but on the TCP payload only. | ||
| 3178 | * @NUM_NL80211_WOWLAN_TCP: number of TCP attributes | ||
| 3179 | * @MAX_NL80211_WOWLAN_TCP: highest attribute number | ||
| 3180 | */ | ||
| 3181 | enum nl80211_wowlan_tcp_attrs { | ||
| 3182 | __NL80211_WOWLAN_TCP_INVALID, | ||
| 3183 | NL80211_WOWLAN_TCP_SRC_IPV4, | ||
| 3184 | NL80211_WOWLAN_TCP_DST_IPV4, | ||
| 3185 | NL80211_WOWLAN_TCP_DST_MAC, | ||
| 3186 | NL80211_WOWLAN_TCP_SRC_PORT, | ||
| 3187 | NL80211_WOWLAN_TCP_DST_PORT, | ||
| 3188 | NL80211_WOWLAN_TCP_DATA_PAYLOAD, | ||
| 3189 | NL80211_WOWLAN_TCP_DATA_PAYLOAD_SEQ, | ||
| 3190 | NL80211_WOWLAN_TCP_DATA_PAYLOAD_TOKEN, | ||
| 3191 | NL80211_WOWLAN_TCP_DATA_INTERVAL, | ||
| 3192 | NL80211_WOWLAN_TCP_WAKE_PAYLOAD, | ||
| 3193 | NL80211_WOWLAN_TCP_WAKE_MASK, | ||
| 3194 | |||
| 3195 | /* keep last */ | ||
| 3196 | NUM_NL80211_WOWLAN_TCP, | ||
| 3197 | MAX_NL80211_WOWLAN_TCP = NUM_NL80211_WOWLAN_TCP - 1 | ||
| 3198 | }; | ||
| 3199 | |||
| 3200 | /** | ||
| 2901 | * enum nl80211_iface_limit_attrs - limit attributes | 3201 | * enum nl80211_iface_limit_attrs - limit attributes |
| 2902 | * @NL80211_IFACE_LIMIT_UNSPEC: (reserved) | 3202 | * @NL80211_IFACE_LIMIT_UNSPEC: (reserved) |
| 2903 | * @NL80211_IFACE_LIMIT_MAX: maximum number of interfaces that | 3203 | * @NL80211_IFACE_LIMIT_MAX: maximum number of interfaces that |
| @@ -2933,6 +3233,8 @@ enum nl80211_iface_limit_attrs { | |||
| 2933 | * the infrastructure network's beacon interval. | 3233 | * the infrastructure network's beacon interval. |
| 2934 | * @NL80211_IFACE_COMB_NUM_CHANNELS: u32 attribute specifying how many | 3234 | * @NL80211_IFACE_COMB_NUM_CHANNELS: u32 attribute specifying how many |
| 2935 | * different channels may be used within this group. | 3235 | * different channels may be used within this group. |
| 3236 | * @NL80211_IFACE_COMB_RADAR_DETECT_WIDTHS: u32 attribute containing the bitmap | ||
| 3237 | * of supported channel widths for radar detection. | ||
| 2936 | * @NUM_NL80211_IFACE_COMB: number of attributes | 3238 | * @NUM_NL80211_IFACE_COMB: number of attributes |
| 2937 | * @MAX_NL80211_IFACE_COMB: highest attribute number | 3239 | * @MAX_NL80211_IFACE_COMB: highest attribute number |
| 2938 | * | 3240 | * |
| @@ -2965,6 +3267,7 @@ enum nl80211_if_combination_attrs { | |||
| 2965 | NL80211_IFACE_COMB_MAXNUM, | 3267 | NL80211_IFACE_COMB_MAXNUM, |
| 2966 | NL80211_IFACE_COMB_STA_AP_BI_MATCH, | 3268 | NL80211_IFACE_COMB_STA_AP_BI_MATCH, |
| 2967 | NL80211_IFACE_COMB_NUM_CHANNELS, | 3269 | NL80211_IFACE_COMB_NUM_CHANNELS, |
| 3270 | NL80211_IFACE_COMB_RADAR_DETECT_WIDTHS, | ||
| 2968 | 3271 | ||
| 2969 | /* keep last */ | 3272 | /* keep last */ |
| 2970 | NUM_NL80211_IFACE_COMB, | 3273 | NUM_NL80211_IFACE_COMB, |
| @@ -3140,6 +3443,19 @@ enum nl80211_ap_sme_features { | |||
| 3140 | * setting | 3443 | * setting |
| 3141 | * @NL80211_FEATURE_P2P_GO_OPPPS: P2P GO implementation supports opportunistic | 3444 | * @NL80211_FEATURE_P2P_GO_OPPPS: P2P GO implementation supports opportunistic |
| 3142 | * powersave | 3445 | * powersave |
| 3446 | * @NL80211_FEATURE_FULL_AP_CLIENT_STATE: The driver supports full state | ||
| 3447 | * transitions for AP clients. Without this flag (and if the driver | ||
| 3448 | * doesn't have the AP SME in the device) the driver supports adding | ||
| 3449 | * stations only when they're associated and adds them in associated | ||
| 3450 | * state (to later be transitioned into authorized), with this flag | ||
| 3451 | * they should be added before even sending the authentication reply | ||
| 3452 | * and then transitioned into authenticated, associated and authorized | ||
| 3453 | * states using station flags. | ||
| 3454 | * Note that even for drivers that support this, the default is to add | ||
| 3455 | * stations in authenticated/associated state, so to add unauthenticated | ||
| 3456 | * stations the authenticated/associated bits have to be set in the mask. | ||
| 3457 | * @NL80211_FEATURE_ADVERTISE_CHAN_LIMITS: cfg80211 advertises channel limits | ||
| 3458 | * (HT40, VHT 80/160 MHz) if this flag is set | ||
| 3143 | */ | 3459 | */ |
| 3144 | enum nl80211_feature_flags { | 3460 | enum nl80211_feature_flags { |
| 3145 | NL80211_FEATURE_SK_TX_STATUS = 1 << 0, | 3461 | NL80211_FEATURE_SK_TX_STATUS = 1 << 0, |
| @@ -3155,6 +3471,9 @@ enum nl80211_feature_flags { | |||
| 3155 | NL80211_FEATURE_NEED_OBSS_SCAN = 1 << 10, | 3471 | NL80211_FEATURE_NEED_OBSS_SCAN = 1 << 10, |
| 3156 | NL80211_FEATURE_P2P_GO_CTWIN = 1 << 11, | 3472 | NL80211_FEATURE_P2P_GO_CTWIN = 1 << 11, |
| 3157 | NL80211_FEATURE_P2P_GO_OPPPS = 1 << 12, | 3473 | NL80211_FEATURE_P2P_GO_OPPPS = 1 << 12, |
| 3474 | /* bit 13 is reserved */ | ||
| 3475 | NL80211_FEATURE_ADVERTISE_CHAN_LIMITS = 1 << 14, | ||
| 3476 | NL80211_FEATURE_FULL_AP_CLIENT_STATE = 1 << 15, | ||
| 3158 | }; | 3477 | }; |
| 3159 | 3478 | ||
| 3160 | /** | 3479 | /** |
| @@ -3182,7 +3501,7 @@ enum nl80211_probe_resp_offload_support_attr { | |||
| 3182 | * enum nl80211_connect_failed_reason - connection request failed reasons | 3501 | * enum nl80211_connect_failed_reason - connection request failed reasons |
| 3183 | * @NL80211_CONN_FAIL_MAX_CLIENTS: Maximum number of clients that can be | 3502 | * @NL80211_CONN_FAIL_MAX_CLIENTS: Maximum number of clients that can be |
| 3184 | * handled by the AP is reached. | 3503 | * handled by the AP is reached. |
| 3185 | * @NL80211_CONN_FAIL_BLOCKED_CLIENT: Client's MAC is in the AP's blocklist. | 3504 | * @NL80211_CONN_FAIL_BLOCKED_CLIENT: Connection request is rejected due to ACL. |
| 3186 | */ | 3505 | */ |
| 3187 | enum nl80211_connect_failed_reason { | 3506 | enum nl80211_connect_failed_reason { |
| 3188 | NL80211_CONN_FAIL_MAX_CLIENTS, | 3507 | NL80211_CONN_FAIL_MAX_CLIENTS, |
| @@ -3210,4 +3529,62 @@ enum nl80211_scan_flags { | |||
| 3210 | NL80211_SCAN_FLAG_AP = 1<<2, | 3529 | NL80211_SCAN_FLAG_AP = 1<<2, |
| 3211 | }; | 3530 | }; |
| 3212 | 3531 | ||
| 3532 | /** | ||
| 3533 | * enum nl80211_acl_policy - access control policy | ||
| 3534 | * | ||
| 3535 | * Access control policy is applied on a MAC list set by | ||
| 3536 | * %NL80211_CMD_START_AP and %NL80211_CMD_SET_MAC_ACL, to | ||
| 3537 | * be used with %NL80211_ATTR_ACL_POLICY. | ||
| 3538 | * | ||
| 3539 | * @NL80211_ACL_POLICY_ACCEPT_UNLESS_LISTED: Deny stations which are | ||
| 3540 | * listed in ACL, i.e. allow all the stations which are not listed | ||
| 3541 | * in ACL to authenticate. | ||
| 3542 | * @NL80211_ACL_POLICY_DENY_UNLESS_LISTED: Allow the stations which are listed | ||
| 3543 | * in ACL, i.e. deny all the stations which are not listed in ACL. | ||
| 3544 | */ | ||
| 3545 | enum nl80211_acl_policy { | ||
| 3546 | NL80211_ACL_POLICY_ACCEPT_UNLESS_LISTED, | ||
| 3547 | NL80211_ACL_POLICY_DENY_UNLESS_LISTED, | ||
| 3548 | }; | ||
| 3549 | |||
| 3550 | /** | ||
| 3551 | * enum nl80211_radar_event - type of radar event for DFS operation | ||
| 3552 | * | ||
| 3553 | * Type of event to be used with NL80211_ATTR_RADAR_EVENT to inform userspace | ||
| 3554 | * about detected radars or success of the channel available check (CAC) | ||
| 3555 | * | ||
| 3556 | * @NL80211_RADAR_DETECTED: A radar pattern has been detected. The channel is | ||
| 3557 | * now unusable. | ||
| 3558 | * @NL80211_RADAR_CAC_FINISHED: Channel Availability Check has been finished, | ||
| 3559 | * the channel is now available. | ||
| 3560 | * @NL80211_RADAR_CAC_ABORTED: Channel Availability Check has been aborted, no | ||
| 3561 | * change to the channel status. | ||
| 3562 | * @NL80211_RADAR_NOP_FINISHED: The Non-Occupancy Period for this channel is | ||
| 3563 | * over, channel becomes usable. | ||
| 3564 | */ | ||
| 3565 | enum nl80211_radar_event { | ||
| 3566 | NL80211_RADAR_DETECTED, | ||
| 3567 | NL80211_RADAR_CAC_FINISHED, | ||
| 3568 | NL80211_RADAR_CAC_ABORTED, | ||
| 3569 | NL80211_RADAR_NOP_FINISHED, | ||
| 3570 | }; | ||
| 3571 | |||
| 3572 | /** | ||
| 3573 | * enum nl80211_dfs_state - DFS states for channels | ||
| 3574 | * | ||
| 3575 | * Channel states used by the DFS code. | ||
| 3576 | * | ||
| 3577 | * @IEEE80211_DFS_USABLE: The channel can be used, but channel availability | ||
| 3578 | * check (CAC) must be performed before using it for AP or IBSS. | ||
| 3579 | * @IEEE80211_DFS_UNAVAILABLE: A radar has been detected on this channel, it | ||
| 3580 | * is therefore marked as not available. | ||
| 3581 | * @IEEE80211_DFS_AVAILABLE: The channel has been CAC checked and is available. | ||
| 3582 | */ | ||
| 3583 | |||
| 3584 | enum nl80211_dfs_state { | ||
| 3585 | NL80211_DFS_USABLE, | ||
| 3586 | NL80211_DFS_UNAVAILABLE, | ||
| 3587 | NL80211_DFS_AVAILABLE, | ||
| 3588 | }; | ||
| 3589 | |||
| 3213 | #endif /* __LINUX_NL80211_H */ | 3590 | #endif /* __LINUX_NL80211_H */ |
diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h index 4f63c05d27c9..9fa9c622a7f4 100644 --- a/include/uapi/linux/perf_event.h +++ b/include/uapi/linux/perf_event.h | |||
| @@ -579,7 +579,8 @@ enum perf_event_type { | |||
| 579 | * { u32 size; | 579 | * { u32 size; |
| 580 | * char data[size];}&& PERF_SAMPLE_RAW | 580 | * char data[size];}&& PERF_SAMPLE_RAW |
| 581 | * | 581 | * |
| 582 | * { u64 from, to, flags } lbr[nr];} && PERF_SAMPLE_BRANCH_STACK | 582 | * { u64 nr; |
| 583 | * { u64 from, to, flags } lbr[nr];} && PERF_SAMPLE_BRANCH_STACK | ||
| 583 | * | 584 | * |
| 584 | * { u64 abi; # enum perf_sample_regs_abi | 585 | * { u64 abi; # enum perf_sample_regs_abi |
| 585 | * u64 regs[weight(mask)]; } && PERF_SAMPLE_REGS_USER | 586 | * u64 regs[weight(mask)]; } && PERF_SAMPLE_REGS_USER |
diff --git a/include/uapi/linux/raid/md_p.h b/include/uapi/linux/raid/md_p.h index ee753536ab70..fe1a5406d4d9 100644 --- a/include/uapi/linux/raid/md_p.h +++ b/include/uapi/linux/raid/md_p.h | |||
| @@ -145,16 +145,18 @@ typedef struct mdp_superblock_s { | |||
| 145 | __u32 failed_disks; /* 4 Number of failed disks */ | 145 | __u32 failed_disks; /* 4 Number of failed disks */ |
| 146 | __u32 spare_disks; /* 5 Number of spare disks */ | 146 | __u32 spare_disks; /* 5 Number of spare disks */ |
| 147 | __u32 sb_csum; /* 6 checksum of the whole superblock */ | 147 | __u32 sb_csum; /* 6 checksum of the whole superblock */ |
| 148 | #ifdef __BIG_ENDIAN | 148 | #if defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN) |
| 149 | __u32 events_hi; /* 7 high-order of superblock update count */ | 149 | __u32 events_hi; /* 7 high-order of superblock update count */ |
| 150 | __u32 events_lo; /* 8 low-order of superblock update count */ | 150 | __u32 events_lo; /* 8 low-order of superblock update count */ |
| 151 | __u32 cp_events_hi; /* 9 high-order of checkpoint update count */ | 151 | __u32 cp_events_hi; /* 9 high-order of checkpoint update count */ |
| 152 | __u32 cp_events_lo; /* 10 low-order of checkpoint update count */ | 152 | __u32 cp_events_lo; /* 10 low-order of checkpoint update count */ |
| 153 | #else | 153 | #elif defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN) |
| 154 | __u32 events_lo; /* 7 low-order of superblock update count */ | 154 | __u32 events_lo; /* 7 low-order of superblock update count */ |
| 155 | __u32 events_hi; /* 8 high-order of superblock update count */ | 155 | __u32 events_hi; /* 8 high-order of superblock update count */ |
| 156 | __u32 cp_events_lo; /* 9 low-order of checkpoint update count */ | 156 | __u32 cp_events_lo; /* 9 low-order of checkpoint update count */ |
| 157 | __u32 cp_events_hi; /* 10 high-order of checkpoint update count */ | 157 | __u32 cp_events_hi; /* 10 high-order of checkpoint update count */ |
| 158 | #else | ||
| 159 | #error unspecified endianness | ||
| 158 | #endif | 160 | #endif |
| 159 | __u32 recovery_cp; /* 11 recovery checkpoint sector count */ | 161 | __u32 recovery_cp; /* 11 recovery checkpoint sector count */ |
| 160 | /* There are only valid for minor_version > 90 */ | 162 | /* There are only valid for minor_version > 90 */ |
diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h index 7a5eb196ade9..7a2144e1afae 100644 --- a/include/uapi/linux/rtnetlink.h +++ b/include/uapi/linux/rtnetlink.h | |||
| @@ -630,6 +630,7 @@ struct tcamsg { | |||
| 630 | 630 | ||
| 631 | /* New extended info filters for IFLA_EXT_MASK */ | 631 | /* New extended info filters for IFLA_EXT_MASK */ |
| 632 | #define RTEXT_FILTER_VF (1 << 0) | 632 | #define RTEXT_FILTER_VF (1 << 0) |
| 633 | #define RTEXT_FILTER_BRVLAN (1 << 1) | ||
| 633 | 634 | ||
| 634 | /* End of information exported to user level */ | 635 | /* End of information exported to user level */ |
| 635 | 636 | ||
diff --git a/include/uapi/linux/serial_core.h b/include/uapi/linux/serial_core.h index 78f99d97475b..74c2bf7211f8 100644 --- a/include/uapi/linux/serial_core.h +++ b/include/uapi/linux/serial_core.h | |||
| @@ -50,7 +50,11 @@ | |||
| 50 | #define PORT_LPC3220 22 /* NXP LPC32xx SoC "Standard" UART */ | 50 | #define PORT_LPC3220 22 /* NXP LPC32xx SoC "Standard" UART */ |
| 51 | #define PORT_8250_CIR 23 /* CIR infrared port, has its own driver */ | 51 | #define PORT_8250_CIR 23 /* CIR infrared port, has its own driver */ |
| 52 | #define PORT_XR17V35X 24 /* Exar XR17V35x UARTs */ | 52 | #define PORT_XR17V35X 24 /* Exar XR17V35x UARTs */ |
| 53 | #define PORT_MAX_8250 24 /* max port ID */ | 53 | #define PORT_BRCM_TRUMANAGE 25 |
| 54 | #define PORT_ALTR_16550_F32 26 /* Altera 16550 UART with 32 FIFOs */ | ||
| 55 | #define PORT_ALTR_16550_F64 27 /* Altera 16550 UART with 64 FIFOs */ | ||
| 56 | #define PORT_ALTR_16550_F128 28 /* Altera 16550 UART with 128 FIFOs */ | ||
| 57 | #define PORT_MAX_8250 28 /* max port ID */ | ||
| 54 | 58 | ||
| 55 | /* | 59 | /* |
| 56 | * ARM specific type numbers. These are not currently guaranteed | 60 | * ARM specific type numbers. These are not currently guaranteed |
| @@ -219,4 +223,7 @@ | |||
| 219 | /* ARC (Synopsys) on-chip UART */ | 223 | /* ARC (Synopsys) on-chip UART */ |
| 220 | #define PORT_ARC 101 | 224 | #define PORT_ARC 101 |
| 221 | 225 | ||
| 226 | /* Rocketport EXPRESS/INFINITY */ | ||
| 227 | #define PORT_RP2 102 | ||
| 228 | |||
| 222 | #endif /* _UAPILINUX_SERIAL_CORE_H */ | 229 | #endif /* _UAPILINUX_SERIAL_CORE_H */ |
diff --git a/include/uapi/linux/snmp.h b/include/uapi/linux/snmp.h index fdfba235f9f1..b49eab89c9fd 100644 --- a/include/uapi/linux/snmp.h +++ b/include/uapi/linux/snmp.h | |||
| @@ -278,6 +278,7 @@ enum | |||
| 278 | LINUX_MIB_XFRMOUTPOLDEAD, /* XfrmOutPolDead */ | 278 | LINUX_MIB_XFRMOUTPOLDEAD, /* XfrmOutPolDead */ |
| 279 | LINUX_MIB_XFRMOUTPOLERROR, /* XfrmOutPolError */ | 279 | LINUX_MIB_XFRMOUTPOLERROR, /* XfrmOutPolError */ |
| 280 | LINUX_MIB_XFRMFWDHDRERROR, /* XfrmFwdHdrError*/ | 280 | LINUX_MIB_XFRMFWDHDRERROR, /* XfrmFwdHdrError*/ |
| 281 | LINUX_MIB_XFRMOUTSTATEINVALID, /* XfrmOutStateInvalid */ | ||
| 281 | __LINUX_MIB_XFRMMAX | 282 | __LINUX_MIB_XFRMMAX |
| 282 | }; | 283 | }; |
| 283 | 284 | ||
diff --git a/include/uapi/linux/tcp.h b/include/uapi/linux/tcp.h index e962faa5ab0d..6b1ead0b0c9d 100644 --- a/include/uapi/linux/tcp.h +++ b/include/uapi/linux/tcp.h | |||
| @@ -111,6 +111,7 @@ enum { | |||
| 111 | #define TCP_QUEUE_SEQ 21 | 111 | #define TCP_QUEUE_SEQ 21 |
| 112 | #define TCP_REPAIR_OPTIONS 22 | 112 | #define TCP_REPAIR_OPTIONS 22 |
| 113 | #define TCP_FASTOPEN 23 /* Enable FastOpen on listeners */ | 113 | #define TCP_FASTOPEN 23 /* Enable FastOpen on listeners */ |
| 114 | #define TCP_TIMESTAMP 24 | ||
| 114 | 115 | ||
| 115 | struct tcp_repair_opt { | 116 | struct tcp_repair_opt { |
| 116 | __u32 opt_code; | 117 | __u32 opt_code; |
diff --git a/include/uapi/linux/uhid.h b/include/uapi/linux/uhid.h index 9c6974f16966..e9ed951e2b09 100644 --- a/include/uapi/linux/uhid.h +++ b/include/uapi/linux/uhid.h | |||
| @@ -86,7 +86,7 @@ struct uhid_feature_answer_req { | |||
| 86 | __u16 err; | 86 | __u16 err; |
| 87 | __u16 size; | 87 | __u16 size; |
| 88 | __u8 data[UHID_DATA_MAX]; | 88 | __u8 data[UHID_DATA_MAX]; |
| 89 | }; | 89 | } __attribute__((__packed__)); |
| 90 | 90 | ||
| 91 | struct uhid_event { | 91 | struct uhid_event { |
| 92 | __u32 type; | 92 | __u32 type; |
diff --git a/include/uapi/linux/usb/audio.h b/include/uapi/linux/usb/audio.h index ac90037894d9..d2314be4f0c0 100644 --- a/include/uapi/linux/usb/audio.h +++ b/include/uapi/linux/usb/audio.h | |||
| @@ -384,14 +384,16 @@ static inline __u8 uac_processing_unit_iProcessing(struct uac_processing_unit_de | |||
| 384 | int protocol) | 384 | int protocol) |
| 385 | { | 385 | { |
| 386 | __u8 control_size = uac_processing_unit_bControlSize(desc, protocol); | 386 | __u8 control_size = uac_processing_unit_bControlSize(desc, protocol); |
| 387 | return desc->baSourceID[desc->bNrInPins + control_size]; | 387 | return *(uac_processing_unit_bmControls(desc, protocol) |
| 388 | + control_size); | ||
| 388 | } | 389 | } |
| 389 | 390 | ||
| 390 | static inline __u8 *uac_processing_unit_specific(struct uac_processing_unit_descriptor *desc, | 391 | static inline __u8 *uac_processing_unit_specific(struct uac_processing_unit_descriptor *desc, |
| 391 | int protocol) | 392 | int protocol) |
| 392 | { | 393 | { |
| 393 | __u8 control_size = uac_processing_unit_bControlSize(desc, protocol); | 394 | __u8 control_size = uac_processing_unit_bControlSize(desc, protocol); |
| 394 | return &desc->baSourceID[desc->bNrInPins + control_size + 1]; | 395 | return uac_processing_unit_bmControls(desc, protocol) |
| 396 | + control_size + 1; | ||
| 395 | } | 397 | } |
| 396 | 398 | ||
| 397 | /* 4.5.2 Class-Specific AS Interface Descriptor */ | 399 | /* 4.5.2 Class-Specific AS Interface Descriptor */ |
diff --git a/include/uapi/linux/usb/ch9.h b/include/uapi/linux/usb/ch9.h index 50598472dc41..f738e25377ff 100644 --- a/include/uapi/linux/usb/ch9.h +++ b/include/uapi/linux/usb/ch9.h | |||
| @@ -152,6 +152,12 @@ | |||
| 152 | #define USB_INTRF_FUNC_SUSPEND_LP (1 << (8 + 0)) | 152 | #define USB_INTRF_FUNC_SUSPEND_LP (1 << (8 + 0)) |
| 153 | #define USB_INTRF_FUNC_SUSPEND_RW (1 << (8 + 1)) | 153 | #define USB_INTRF_FUNC_SUSPEND_RW (1 << (8 + 1)) |
| 154 | 154 | ||
| 155 | /* | ||
| 156 | * Interface status, Figure 9-5 USB 3.0 spec | ||
| 157 | */ | ||
| 158 | #define USB_INTRF_STAT_FUNC_RW_CAP 1 | ||
| 159 | #define USB_INTRF_STAT_FUNC_RW 2 | ||
| 160 | |||
| 155 | #define USB_ENDPOINT_HALT 0 /* IN/OUT will STALL */ | 161 | #define USB_ENDPOINT_HALT 0 /* IN/OUT will STALL */ |
| 156 | 162 | ||
| 157 | /* Bit array elements as returned by the USB_REQ_GET_STATUS request. */ | 163 | /* Bit array elements as returned by the USB_REQ_GET_STATUS request. */ |
diff --git a/include/uapi/linux/vfio.h b/include/uapi/linux/vfio.h index 4758d1bfcf41..4f41f309911e 100644 --- a/include/uapi/linux/vfio.h +++ b/include/uapi/linux/vfio.h | |||
| @@ -303,6 +303,15 @@ enum { | |||
| 303 | VFIO_PCI_BAR5_REGION_INDEX, | 303 | VFIO_PCI_BAR5_REGION_INDEX, |
| 304 | VFIO_PCI_ROM_REGION_INDEX, | 304 | VFIO_PCI_ROM_REGION_INDEX, |
| 305 | VFIO_PCI_CONFIG_REGION_INDEX, | 305 | VFIO_PCI_CONFIG_REGION_INDEX, |
| 306 | /* | ||
| 307 | * Expose VGA regions defined for PCI base class 03, subclass 00. | ||
| 308 | * This includes I/O port ranges 0x3b0 to 0x3bb and 0x3c0 to 0x3df | ||
| 309 | * as well as the MMIO range 0xa0000 to 0xbffff. Each implemented | ||
| 310 | * range is found at it's identity mapped offset from the region | ||
| 311 | * offset, for example 0x3b0 is region_info.offset + 0x3b0. Areas | ||
| 312 | * between described ranges are unimplemented. | ||
| 313 | */ | ||
| 314 | VFIO_PCI_VGA_REGION_INDEX, | ||
| 306 | VFIO_PCI_NUM_REGIONS | 315 | VFIO_PCI_NUM_REGIONS |
| 307 | }; | 316 | }; |
| 308 | 317 | ||
diff --git a/include/uapi/linux/virtio_net.h b/include/uapi/linux/virtio_net.h index 848e3584d7c8..a5a8c88753b9 100644 --- a/include/uapi/linux/virtio_net.h +++ b/include/uapi/linux/virtio_net.h | |||
| @@ -53,6 +53,7 @@ | |||
| 53 | * network */ | 53 | * network */ |
| 54 | #define VIRTIO_NET_F_MQ 22 /* Device supports Receive Flow | 54 | #define VIRTIO_NET_F_MQ 22 /* Device supports Receive Flow |
| 55 | * Steering */ | 55 | * Steering */ |
| 56 | #define VIRTIO_NET_F_CTRL_MAC_ADDR 23 /* Set MAC address */ | ||
| 56 | 57 | ||
| 57 | #define VIRTIO_NET_S_LINK_UP 1 /* Link is up */ | 58 | #define VIRTIO_NET_S_LINK_UP 1 /* Link is up */ |
| 58 | #define VIRTIO_NET_S_ANNOUNCE 2 /* Announcement is needed */ | 59 | #define VIRTIO_NET_S_ANNOUNCE 2 /* Announcement is needed */ |
| @@ -127,7 +128,7 @@ typedef __u8 virtio_net_ctrl_ack; | |||
| 127 | #define VIRTIO_NET_CTRL_RX_NOBCAST 5 | 128 | #define VIRTIO_NET_CTRL_RX_NOBCAST 5 |
| 128 | 129 | ||
| 129 | /* | 130 | /* |
| 130 | * Control the MAC filter table. | 131 | * Control the MAC |
| 131 | * | 132 | * |
| 132 | * The MAC filter table is managed by the hypervisor, the guest should | 133 | * The MAC filter table is managed by the hypervisor, the guest should |
| 133 | * assume the size is infinite. Filtering should be considered | 134 | * assume the size is infinite. Filtering should be considered |
| @@ -140,6 +141,10 @@ typedef __u8 virtio_net_ctrl_ack; | |||
| 140 | * first sg list contains unicast addresses, the second is for multicast. | 141 | * first sg list contains unicast addresses, the second is for multicast. |
| 141 | * This functionality is present if the VIRTIO_NET_F_CTRL_RX feature | 142 | * This functionality is present if the VIRTIO_NET_F_CTRL_RX feature |
| 142 | * is available. | 143 | * is available. |
| 144 | * | ||
| 145 | * The ADDR_SET command requests one out scatterlist, it contains a | ||
| 146 | * 6 bytes MAC address. This functionality is present if the | ||
| 147 | * VIRTIO_NET_F_CTRL_MAC_ADDR feature is available. | ||
| 143 | */ | 148 | */ |
| 144 | struct virtio_net_ctrl_mac { | 149 | struct virtio_net_ctrl_mac { |
| 145 | __u32 entries; | 150 | __u32 entries; |
| @@ -148,6 +153,7 @@ struct virtio_net_ctrl_mac { | |||
| 148 | 153 | ||
| 149 | #define VIRTIO_NET_CTRL_MAC 1 | 154 | #define VIRTIO_NET_CTRL_MAC 1 |
| 150 | #define VIRTIO_NET_CTRL_MAC_TABLE_SET 0 | 155 | #define VIRTIO_NET_CTRL_MAC_TABLE_SET 0 |
| 156 | #define VIRTIO_NET_CTRL_MAC_ADDR_SET 1 | ||
| 151 | 157 | ||
| 152 | /* | 158 | /* |
| 153 | * Control VLAN filtering | 159 | * Control VLAN filtering |
diff --git a/include/uapi/linux/vm_sockets.h b/include/uapi/linux/vm_sockets.h new file mode 100644 index 000000000000..df91301847ec --- /dev/null +++ b/include/uapi/linux/vm_sockets.h | |||
| @@ -0,0 +1,163 @@ | |||
| 1 | /* | ||
| 2 | * VMware vSockets Driver | ||
| 3 | * | ||
| 4 | * Copyright (C) 2007-2013 VMware, Inc. All rights reserved. | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify it | ||
| 7 | * under the terms of the GNU General Public License as published by the Free | ||
| 8 | * Software Foundation version 2 and no later version. | ||
| 9 | * | ||
| 10 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
| 11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 13 | * more details. | ||
| 14 | */ | ||
| 15 | |||
| 16 | #ifndef _VM_SOCKETS_H_ | ||
| 17 | #define _VM_SOCKETS_H_ | ||
| 18 | |||
| 19 | #if !defined(__KERNEL__) | ||
| 20 | #include <sys/socket.h> | ||
| 21 | #endif | ||
| 22 | |||
| 23 | /* Option name for STREAM socket buffer size. Use as the option name in | ||
| 24 | * setsockopt(3) or getsockopt(3) to set or get an unsigned long long that | ||
| 25 | * specifies the size of the buffer underlying a vSockets STREAM socket. | ||
| 26 | * Value is clamped to the MIN and MAX. | ||
| 27 | */ | ||
| 28 | |||
| 29 | #define SO_VM_SOCKETS_BUFFER_SIZE 0 | ||
| 30 | |||
| 31 | /* Option name for STREAM socket minimum buffer size. Use as the option name | ||
| 32 | * in setsockopt(3) or getsockopt(3) to set or get an unsigned long long that | ||
| 33 | * specifies the minimum size allowed for the buffer underlying a vSockets | ||
| 34 | * STREAM socket. | ||
| 35 | */ | ||
| 36 | |||
| 37 | #define SO_VM_SOCKETS_BUFFER_MIN_SIZE 1 | ||
| 38 | |||
| 39 | /* Option name for STREAM socket maximum buffer size. Use as the option name | ||
| 40 | * in setsockopt(3) or getsockopt(3) to set or get an unsigned long long | ||
| 41 | * that specifies the maximum size allowed for the buffer underlying a | ||
| 42 | * vSockets STREAM socket. | ||
| 43 | */ | ||
| 44 | |||
| 45 | #define SO_VM_SOCKETS_BUFFER_MAX_SIZE 2 | ||
| 46 | |||
| 47 | /* Option name for socket peer's host-specific VM ID. Use as the option name | ||
| 48 | * in getsockopt(3) to get a host-specific identifier for the peer endpoint's | ||
| 49 | * VM. The identifier is a signed integer. | ||
| 50 | * Only available for hypervisor endpoints. | ||
| 51 | */ | ||
| 52 | |||
| 53 | #define SO_VM_SOCKETS_PEER_HOST_VM_ID 3 | ||
| 54 | |||
| 55 | /* Option name for determining if a socket is trusted. Use as the option name | ||
| 56 | * in getsockopt(3) to determine if a socket is trusted. The value is a | ||
| 57 | * signed integer. | ||
| 58 | */ | ||
| 59 | |||
| 60 | #define SO_VM_SOCKETS_TRUSTED 5 | ||
| 61 | |||
| 62 | /* Option name for STREAM socket connection timeout. Use as the option name | ||
| 63 | * in setsockopt(3) or getsockopt(3) to set or get the connection | ||
| 64 | * timeout for a STREAM socket. | ||
| 65 | */ | ||
| 66 | |||
| 67 | #define SO_VM_SOCKETS_CONNECT_TIMEOUT 6 | ||
| 68 | |||
| 69 | /* Option name for using non-blocking send/receive. Use as the option name | ||
| 70 | * for setsockopt(3) or getsockopt(3) to set or get the non-blocking | ||
| 71 | * transmit/receive flag for a STREAM socket. This flag determines whether | ||
| 72 | * send() and recv() can be called in non-blocking contexts for the given | ||
| 73 | * socket. The value is a signed integer. | ||
| 74 | * | ||
| 75 | * This option is only relevant to kernel endpoints, where descheduling the | ||
| 76 | * thread of execution is not allowed, for example, while holding a spinlock. | ||
| 77 | * It is not to be confused with conventional non-blocking socket operations. | ||
| 78 | * | ||
| 79 | * Only available for hypervisor endpoints. | ||
| 80 | */ | ||
| 81 | |||
| 82 | #define SO_VM_SOCKETS_NONBLOCK_TXRX 7 | ||
| 83 | |||
| 84 | /* The vSocket equivalent of INADDR_ANY. This works for the svm_cid field of | ||
| 85 | * sockaddr_vm and indicates the context ID of the current endpoint. | ||
| 86 | */ | ||
| 87 | |||
| 88 | #define VMADDR_CID_ANY -1U | ||
| 89 | |||
| 90 | /* Bind to any available port. Works for the svm_port field of | ||
| 91 | * sockaddr_vm. | ||
| 92 | */ | ||
| 93 | |||
| 94 | #define VMADDR_PORT_ANY -1U | ||
| 95 | |||
| 96 | /* Use this as the destination CID in an address when referring to the | ||
| 97 | * hypervisor. VMCI relies on it being 0, but this would be useful for other | ||
| 98 | * transports too. | ||
| 99 | */ | ||
| 100 | |||
| 101 | #define VMADDR_CID_HYPERVISOR 0 | ||
| 102 | |||
| 103 | /* This CID is specific to VMCI and can be considered reserved (even VMCI | ||
| 104 | * doesn't use it anymore, it's a legacy value from an older release). | ||
| 105 | */ | ||
| 106 | |||
| 107 | #define VMADDR_CID_RESERVED 1 | ||
| 108 | |||
| 109 | /* Use this as the destination CID in an address when referring to the host | ||
| 110 | * (any process other than the hypervisor). VMCI relies on it being 2, but | ||
| 111 | * this would be useful for other transports too. | ||
| 112 | */ | ||
| 113 | |||
| 114 | #define VMADDR_CID_HOST 2 | ||
| 115 | |||
| 116 | /* Invalid vSockets version. */ | ||
| 117 | |||
| 118 | #define VM_SOCKETS_INVALID_VERSION -1U | ||
| 119 | |||
| 120 | /* The epoch (first) component of the vSockets version. A single byte | ||
| 121 | * representing the epoch component of the vSockets version. | ||
| 122 | */ | ||
| 123 | |||
| 124 | #define VM_SOCKETS_VERSION_EPOCH(_v) (((_v) & 0xFF000000) >> 24) | ||
| 125 | |||
| 126 | /* The major (second) component of the vSockets version. A single byte | ||
| 127 | * representing the major component of the vSockets version. Typically | ||
| 128 | * changes for every major release of a product. | ||
| 129 | */ | ||
| 130 | |||
| 131 | #define VM_SOCKETS_VERSION_MAJOR(_v) (((_v) & 0x00FF0000) >> 16) | ||
| 132 | |||
| 133 | /* The minor (third) component of the vSockets version. Two bytes representing | ||
| 134 | * the minor component of the vSockets version. | ||
| 135 | */ | ||
| 136 | |||
| 137 | #define VM_SOCKETS_VERSION_MINOR(_v) (((_v) & 0x0000FFFF)) | ||
| 138 | |||
| 139 | /* Address structure for vSockets. The address family should be set to | ||
| 140 | * whatever vmci_sock_get_af_value_fd() returns. The structure members should | ||
| 141 | * all align on their natural boundaries without resorting to compiler packing | ||
| 142 | * directives. The total size of this structure should be exactly the same as | ||
| 143 | * that of struct sockaddr. | ||
| 144 | */ | ||
| 145 | |||
| 146 | struct sockaddr_vm { | ||
| 147 | sa_family_t svm_family; | ||
| 148 | unsigned short svm_reserved1; | ||
| 149 | unsigned int svm_port; | ||
| 150 | unsigned int svm_cid; | ||
| 151 | unsigned char svm_zero[sizeof(struct sockaddr) - | ||
| 152 | sizeof(sa_family_t) - | ||
| 153 | sizeof(unsigned short) - | ||
| 154 | sizeof(unsigned int) - sizeof(unsigned int)]; | ||
| 155 | }; | ||
| 156 | |||
| 157 | #define IOCTL_VM_SOCKETS_GET_LOCAL_CID _IO(7, 0xb9) | ||
| 158 | |||
| 159 | #if defined(__KERNEL__) | ||
| 160 | int vm_sockets_get_local_cid(void); | ||
| 161 | #endif | ||
| 162 | |||
| 163 | #endif | ||
diff --git a/include/uapi/linux/wanrouter.h b/include/uapi/linux/wanrouter.h index 7617df2833d5..498d6c12c666 100644 --- a/include/uapi/linux/wanrouter.h +++ b/include/uapi/linux/wanrouter.h | |||
| @@ -1,363 +1,9 @@ | |||
| 1 | /***************************************************************************** | ||
| 2 | * wanrouter.h Definitions for the WAN Multiprotocol Router Module. | ||
| 3 | * This module provides API and common services for WAN Link | ||
| 4 | * Drivers and is completely hardware-independent. | ||
| 5 | * | ||
| 6 | * Author: Nenad Corbic <ncorbic@sangoma.com> | ||
| 7 | * Gideon Hack | ||
| 8 | * Additions: Arnaldo Melo | ||
| 9 | * | ||
| 10 | * Copyright: (c) 1995-2000 Sangoma Technologies Inc. | ||
| 11 | * | ||
| 12 | * This program is free software; you can redistribute it and/or | ||
| 13 | * modify it under the terms of the GNU General Public License | ||
| 14 | * as published by the Free Software Foundation; either version | ||
| 15 | * 2 of the License, or (at your option) any later version. | ||
| 16 | * ============================================================================ | ||
| 17 | * Jul 21, 2000 Nenad Corbic Added WAN_FT1_READY State | ||
| 18 | * Feb 24, 2000 Nenad Corbic Added support for socket based x25api | ||
| 19 | * Jan 28, 2000 Nenad Corbic Added support for the ASYNC protocol. | ||
| 20 | * Oct 04, 1999 Nenad Corbic Updated for 2.1.0 release | ||
| 21 | * Jun 02, 1999 Gideon Hack Added support for the S514 adapter. | ||
| 22 | * May 23, 1999 Arnaldo Melo Added local_addr to wanif_conf_t | ||
| 23 | * WAN_DISCONNECTING state added | ||
| 24 | * Jul 20, 1998 David Fong Added Inverse ARP options to 'wanif_conf_t' | ||
| 25 | * Jun 12, 1998 David Fong Added Cisco HDLC support. | ||
| 26 | * Dec 16, 1997 Jaspreet Singh Moved 'enable_IPX' and 'network_number' to | ||
| 27 | * 'wanif_conf_t' | ||
| 28 | * Dec 05, 1997 Jaspreet Singh Added 'pap', 'chap' to 'wanif_conf_t' | ||
| 29 | * Added 'authenticator' to 'wan_ppp_conf_t' | ||
| 30 | * Nov 06, 1997 Jaspreet Singh Changed Router Driver version to 1.1 from 1.0 | ||
| 31 | * Oct 20, 1997 Jaspreet Singh Added 'cir','bc','be' and 'mc' to 'wanif_conf_t' | ||
| 32 | * Added 'enable_IPX' and 'network_number' to | ||
| 33 | * 'wan_device_t'. Also added defines for | ||
| 34 | * UDP PACKET TYPE, Interrupt test, critical values | ||
| 35 | * for RACE conditions. | ||
| 36 | * Oct 05, 1997 Jaspreet Singh Added 'dlci_num' and 'dlci[100]' to | ||
| 37 | * 'wan_fr_conf_t' to configure a list of dlci(s) | ||
| 38 | * for a NODE | ||
| 39 | * Jul 07, 1997 Jaspreet Singh Added 'ttl' to 'wandev_conf_t' & 'wan_device_t' | ||
| 40 | * May 29, 1997 Jaspreet Singh Added 'tx_int_enabled' to 'wan_device_t' | ||
| 41 | * May 21, 1997 Jaspreet Singh Added 'udp_port' to 'wan_device_t' | ||
| 42 | * Apr 25, 1997 Farhan Thawar Added 'udp_port' to 'wandev_conf_t' | ||
| 43 | * Jan 16, 1997 Gene Kozin router_devlist made public | ||
| 44 | * Jan 02, 1997 Gene Kozin Initial version (based on wanpipe.h). | ||
| 45 | *****************************************************************************/ | ||
| 46 | |||
| 47 | #ifndef _UAPI_ROUTER_H | ||
| 48 | #define _UAPI_ROUTER_H | ||
| 49 | |||
| 50 | #define ROUTER_NAME "wanrouter" /* in case we ever change it */ | ||
| 51 | #define ROUTER_VERSION 1 /* version number */ | ||
| 52 | #define ROUTER_RELEASE 1 /* release (minor version) number */ | ||
| 53 | #define ROUTER_IOCTL 'W' /* for IOCTL calls */ | ||
| 54 | #define ROUTER_MAGIC 0x524D4157L /* signature: 'WANR' reversed */ | ||
| 55 | |||
| 56 | /* IOCTL codes for /proc/router/<device> entries (up to 255) */ | ||
| 57 | enum router_ioctls | ||
| 58 | { | ||
| 59 | ROUTER_SETUP = ROUTER_IOCTL<<8, /* configure device */ | ||
| 60 | ROUTER_DOWN, /* shut down device */ | ||
| 61 | ROUTER_STAT, /* get device status */ | ||
| 62 | ROUTER_IFNEW, /* add interface */ | ||
| 63 | ROUTER_IFDEL, /* delete interface */ | ||
| 64 | ROUTER_IFSTAT, /* get interface status */ | ||
| 65 | ROUTER_USER = (ROUTER_IOCTL<<8)+16, /* driver-specific calls */ | ||
| 66 | ROUTER_USER_MAX = (ROUTER_IOCTL<<8)+31 | ||
| 67 | }; | ||
| 68 | |||
| 69 | /* identifiers for displaying proc file data for dual port adapters */ | ||
| 70 | #define PROC_DATA_PORT_0 0x8000 /* the data is for port 0 */ | ||
| 71 | #define PROC_DATA_PORT_1 0x8001 /* the data is for port 1 */ | ||
| 72 | |||
| 73 | /* NLPID for packet encapsulation (ISO/IEC TR 9577) */ | ||
| 74 | #define NLPID_IP 0xCC /* Internet Protocol Datagram */ | ||
| 75 | #define NLPID_SNAP 0x80 /* IEEE Subnetwork Access Protocol */ | ||
| 76 | #define NLPID_CLNP 0x81 /* ISO/IEC 8473 */ | ||
| 77 | #define NLPID_ESIS 0x82 /* ISO/IEC 9542 */ | ||
| 78 | #define NLPID_ISIS 0x83 /* ISO/IEC ISIS */ | ||
| 79 | #define NLPID_Q933 0x08 /* CCITT Q.933 */ | ||
| 80 | |||
| 81 | /* Miscellaneous */ | ||
| 82 | #define WAN_IFNAME_SZ 15 /* max length of the interface name */ | ||
| 83 | #define WAN_DRVNAME_SZ 15 /* max length of the link driver name */ | ||
| 84 | #define WAN_ADDRESS_SZ 31 /* max length of the WAN media address */ | ||
| 85 | #define USED_BY_FIELD 8 /* max length of the used by field */ | ||
| 86 | |||
| 87 | /* Defines for UDP PACKET TYPE */ | ||
| 88 | #define UDP_PTPIPE_TYPE 0x01 | ||
| 89 | #define UDP_FPIPE_TYPE 0x02 | ||
| 90 | #define UDP_CPIPE_TYPE 0x03 | ||
| 91 | #define UDP_DRVSTATS_TYPE 0x04 | ||
| 92 | #define UDP_INVALID_TYPE 0x05 | ||
| 93 | |||
| 94 | /* Command return code */ | ||
| 95 | #define CMD_OK 0 /* normal firmware return code */ | ||
| 96 | #define CMD_TIMEOUT 0xFF /* firmware command timed out */ | ||
| 97 | |||
| 98 | /* UDP Packet Management */ | ||
| 99 | #define UDP_PKT_FRM_STACK 0x00 | ||
| 100 | #define UDP_PKT_FRM_NETWORK 0x01 | ||
| 101 | |||
| 102 | /* Maximum interrupt test counter */ | ||
| 103 | #define MAX_INTR_TEST_COUNTER 100 | ||
| 104 | |||
| 105 | /* Critical Values for RACE conditions*/ | ||
| 106 | #define CRITICAL_IN_ISR 0xA1 | ||
| 107 | #define CRITICAL_INTR_HANDLED 0xB1 | ||
| 108 | |||
| 109 | /****** Data Types **********************************************************/ | ||
| 110 | |||
| 111 | /*---------------------------------------------------------------------------- | ||
| 112 | * X.25-specific link-level configuration. | ||
| 113 | */ | ||
| 114 | typedef struct wan_x25_conf | ||
| 115 | { | ||
| 116 | unsigned lo_pvc; /* lowest permanent circuit number */ | ||
| 117 | unsigned hi_pvc; /* highest permanent circuit number */ | ||
| 118 | unsigned lo_svc; /* lowest switched circuit number */ | ||
| 119 | unsigned hi_svc; /* highest switched circuit number */ | ||
| 120 | unsigned hdlc_window; /* HDLC window size (1..7) */ | ||
| 121 | unsigned pkt_window; /* X.25 packet window size (1..7) */ | ||
| 122 | unsigned t1; /* HDLC timer T1, sec (1..30) */ | ||
| 123 | unsigned t2; /* HDLC timer T2, sec (0..29) */ | ||
| 124 | unsigned t4; /* HDLC supervisory frame timer = T4 * T1 */ | ||
| 125 | unsigned n2; /* HDLC retransmission limit (1..30) */ | ||
| 126 | unsigned t10_t20; /* X.25 RESTART timeout, sec (1..255) */ | ||
| 127 | unsigned t11_t21; /* X.25 CALL timeout, sec (1..255) */ | ||
| 128 | unsigned t12_t22; /* X.25 RESET timeout, sec (1..255) */ | ||
| 129 | unsigned t13_t23; /* X.25 CLEAR timeout, sec (1..255) */ | ||
| 130 | unsigned t16_t26; /* X.25 INTERRUPT timeout, sec (1..255) */ | ||
| 131 | unsigned t28; /* X.25 REGISTRATION timeout, sec (1..255) */ | ||
| 132 | unsigned r10_r20; /* RESTART retransmission limit (0..250) */ | ||
| 133 | unsigned r12_r22; /* RESET retransmission limit (0..250) */ | ||
| 134 | unsigned r13_r23; /* CLEAR retransmission limit (0..250) */ | ||
| 135 | unsigned ccitt_compat; /* compatibility mode: 1988/1984/1980 */ | ||
| 136 | unsigned x25_conf_opt; /* User defined x25 config optoins */ | ||
| 137 | unsigned char LAPB_hdlc_only; /* Run in HDLC only mode */ | ||
| 138 | unsigned char logging; /* Control connection logging */ | ||
| 139 | unsigned char oob_on_modem; /* Whether to send modem status to the user app */ | ||
| 140 | } wan_x25_conf_t; | ||
| 141 | |||
| 142 | /*---------------------------------------------------------------------------- | ||
| 143 | * Frame relay specific link-level configuration. | ||
| 144 | */ | ||
| 145 | typedef struct wan_fr_conf | ||
| 146 | { | ||
| 147 | unsigned signalling; /* local in-channel signalling type */ | ||
| 148 | unsigned t391; /* link integrity verification timer */ | ||
| 149 | unsigned t392; /* polling verification timer */ | ||
| 150 | unsigned n391; /* full status polling cycle counter */ | ||
| 151 | unsigned n392; /* error threshold counter */ | ||
| 152 | unsigned n393; /* monitored events counter */ | ||
| 153 | unsigned dlci_num; /* number of DLCs (access node) */ | ||
| 154 | unsigned dlci[100]; /* List of all DLCIs */ | ||
| 155 | } wan_fr_conf_t; | ||
| 156 | |||
| 157 | /*---------------------------------------------------------------------------- | ||
| 158 | * PPP-specific link-level configuration. | ||
| 159 | */ | ||
| 160 | typedef struct wan_ppp_conf | ||
| 161 | { | ||
| 162 | unsigned restart_tmr; /* restart timer */ | ||
| 163 | unsigned auth_rsrt_tmr; /* authentication timer */ | ||
| 164 | unsigned auth_wait_tmr; /* authentication timer */ | ||
| 165 | unsigned mdm_fail_tmr; /* modem failure timer */ | ||
| 166 | unsigned dtr_drop_tmr; /* DTR drop timer */ | ||
| 167 | unsigned connect_tmout; /* connection timeout */ | ||
| 168 | unsigned conf_retry; /* max. retry */ | ||
| 169 | unsigned term_retry; /* max. retry */ | ||
| 170 | unsigned fail_retry; /* max. retry */ | ||
| 171 | unsigned auth_retry; /* max. retry */ | ||
| 172 | unsigned auth_options; /* authentication opt. */ | ||
| 173 | unsigned ip_options; /* IP options */ | ||
| 174 | char authenticator; /* AUTHENTICATOR or not */ | ||
| 175 | char ip_mode; /* Static/Host/Peer */ | ||
| 176 | } wan_ppp_conf_t; | ||
| 177 | |||
| 178 | /*---------------------------------------------------------------------------- | ||
| 179 | * CHDLC-specific link-level configuration. | ||
| 180 | */ | ||
| 181 | typedef struct wan_chdlc_conf | ||
| 182 | { | ||
| 183 | unsigned char ignore_dcd; /* Protocol options: */ | ||
| 184 | unsigned char ignore_cts; /* Ignore these to determine */ | ||
| 185 | unsigned char ignore_keepalive; /* link status (Yes or No) */ | ||
| 186 | unsigned char hdlc_streaming; /* hdlc_streaming mode (Y/N) */ | ||
| 187 | unsigned char receive_only; /* no transmit buffering (Y/N) */ | ||
| 188 | unsigned keepalive_tx_tmr; /* transmit keepalive timer */ | ||
| 189 | unsigned keepalive_rx_tmr; /* receive keepalive timer */ | ||
| 190 | unsigned keepalive_err_margin; /* keepalive_error_tolerance */ | ||
| 191 | unsigned slarp_timer; /* SLARP request timer */ | ||
| 192 | } wan_chdlc_conf_t; | ||
| 193 | |||
| 194 | |||
| 195 | /*---------------------------------------------------------------------------- | ||
| 196 | * WAN device configuration. Passed to ROUTER_SETUP IOCTL. | ||
| 197 | */ | ||
| 198 | typedef struct wandev_conf | ||
| 199 | { | ||
| 200 | unsigned magic; /* magic number (for verification) */ | ||
| 201 | unsigned config_id; /* configuration structure identifier */ | ||
| 202 | /****** hardware configuration ******/ | ||
| 203 | unsigned ioport; /* adapter I/O port base */ | ||
| 204 | unsigned long maddr; /* dual-port memory address */ | ||
| 205 | unsigned msize; /* dual-port memory size */ | ||
| 206 | int irq; /* interrupt request level */ | ||
| 207 | int dma; /* DMA request level */ | ||
| 208 | char S514_CPU_no[1]; /* S514 PCI adapter CPU number ('A' or 'B') */ | ||
| 209 | unsigned PCI_slot_no; /* S514 PCI adapter slot number */ | ||
| 210 | char auto_pci_cfg; /* S515 PCI automatic slot detection */ | ||
| 211 | char comm_port; /* Communication Port (PRI=0, SEC=1) */ | ||
| 212 | unsigned bps; /* data transfer rate */ | ||
| 213 | unsigned mtu; /* maximum transmit unit size */ | ||
| 214 | unsigned udp_port; /* UDP port for management */ | ||
| 215 | unsigned char ttl; /* Time To Live for UDP security */ | ||
| 216 | unsigned char ft1; /* FT1 Configurator Option */ | ||
| 217 | char interface; /* RS-232/V.35, etc. */ | ||
| 218 | char clocking; /* external/internal */ | ||
| 219 | char line_coding; /* NRZ/NRZI/FM0/FM1, etc. */ | ||
| 220 | char station; /* DTE/DCE, primary/secondary, etc. */ | ||
| 221 | char connection; /* permanent/switched/on-demand */ | ||
| 222 | char read_mode; /* read mode: Polling or interrupt */ | ||
| 223 | char receive_only; /* disable tx buffers */ | ||
| 224 | char tty; /* Create a fake tty device */ | ||
| 225 | unsigned tty_major; /* Major number for wanpipe tty device */ | ||
| 226 | unsigned tty_minor; /* Minor number for wanpipe tty device */ | ||
| 227 | unsigned tty_mode; /* TTY operation mode SYNC or ASYNC */ | ||
| 228 | char backup; /* Backup Mode */ | ||
| 229 | unsigned hw_opt[4]; /* other hardware options */ | ||
| 230 | unsigned reserved[4]; | ||
| 231 | /****** arbitrary data ***************/ | ||
| 232 | unsigned data_size; /* data buffer size */ | ||
| 233 | void* data; /* data buffer, e.g. firmware */ | ||
| 234 | union /****** protocol-specific ************/ | ||
| 235 | { | ||
| 236 | wan_x25_conf_t x25; /* X.25 configuration */ | ||
| 237 | wan_ppp_conf_t ppp; /* PPP configuration */ | ||
| 238 | wan_fr_conf_t fr; /* frame relay configuration */ | ||
| 239 | wan_chdlc_conf_t chdlc; /* Cisco HDLC configuration */ | ||
| 240 | } u; | ||
| 241 | } wandev_conf_t; | ||
| 242 | |||
| 243 | /* 'config_id' definitions */ | ||
| 244 | #define WANCONFIG_X25 101 /* X.25 link */ | ||
| 245 | #define WANCONFIG_FR 102 /* frame relay link */ | ||
| 246 | #define WANCONFIG_PPP 103 /* synchronous PPP link */ | ||
| 247 | #define WANCONFIG_CHDLC 104 /* Cisco HDLC Link */ | ||
| 248 | #define WANCONFIG_BSC 105 /* BiSync Streaming */ | ||
| 249 | #define WANCONFIG_HDLC 106 /* HDLC Support */ | ||
| 250 | #define WANCONFIG_MPPP 107 /* Multi Port PPP over RAW CHDLC */ | ||
| 251 | |||
| 252 | /* | 1 | /* |
| 253 | * Configuration options defines. | 2 | * wanrouter.h Legacy declarations kept around until X25 is removed |
| 254 | */ | 3 | */ |
| 255 | /* general options */ | ||
| 256 | #define WANOPT_OFF 0 | ||
| 257 | #define WANOPT_ON 1 | ||
| 258 | #define WANOPT_NO 0 | ||
| 259 | #define WANOPT_YES 1 | ||
| 260 | |||
| 261 | /* intercace options */ | ||
| 262 | #define WANOPT_RS232 0 | ||
| 263 | #define WANOPT_V35 1 | ||
| 264 | |||
| 265 | /* data encoding options */ | ||
| 266 | #define WANOPT_NRZ 0 | ||
| 267 | #define WANOPT_NRZI 1 | ||
| 268 | #define WANOPT_FM0 2 | ||
| 269 | #define WANOPT_FM1 3 | ||
| 270 | |||
| 271 | /* link type options */ | ||
| 272 | #define WANOPT_POINTTOPOINT 0 /* RTS always active */ | ||
| 273 | #define WANOPT_MULTIDROP 1 /* RTS is active when transmitting */ | ||
| 274 | |||
| 275 | /* clocking options */ | ||
| 276 | #define WANOPT_EXTERNAL 0 | ||
| 277 | #define WANOPT_INTERNAL 1 | ||
| 278 | |||
| 279 | /* station options */ | ||
| 280 | #define WANOPT_DTE 0 | ||
| 281 | #define WANOPT_DCE 1 | ||
| 282 | #define WANOPT_CPE 0 | ||
| 283 | #define WANOPT_NODE 1 | ||
| 284 | #define WANOPT_SECONDARY 0 | ||
| 285 | #define WANOPT_PRIMARY 1 | ||
| 286 | |||
| 287 | /* connection options */ | ||
| 288 | #define WANOPT_PERMANENT 0 /* DTR always active */ | ||
| 289 | #define WANOPT_SWITCHED 1 /* use DTR to setup link (dial-up) */ | ||
| 290 | #define WANOPT_ONDEMAND 2 /* activate DTR only before sending */ | ||
| 291 | |||
| 292 | /* frame relay in-channel signalling */ | ||
| 293 | #define WANOPT_FR_ANSI 1 /* ANSI T1.617 Annex D */ | ||
| 294 | #define WANOPT_FR_Q933 2 /* ITU Q.933A */ | ||
| 295 | #define WANOPT_FR_LMI 3 /* LMI */ | ||
| 296 | |||
| 297 | /* PPP IP Mode Options */ | ||
| 298 | #define WANOPT_PPP_STATIC 0 | ||
| 299 | #define WANOPT_PPP_HOST 1 | ||
| 300 | #define WANOPT_PPP_PEER 2 | ||
| 301 | |||
| 302 | /* ASY Mode Options */ | ||
| 303 | #define WANOPT_ONE 1 | ||
| 304 | #define WANOPT_TWO 2 | ||
| 305 | #define WANOPT_ONE_AND_HALF 3 | ||
| 306 | |||
| 307 | #define WANOPT_NONE 0 | ||
| 308 | #define WANOPT_ODD 1 | ||
| 309 | #define WANOPT_EVEN 2 | ||
| 310 | |||
| 311 | /* CHDLC Protocol Options */ | ||
| 312 | /* DF Commented out for now. | ||
| 313 | |||
| 314 | #define WANOPT_CHDLC_NO_DCD IGNORE_DCD_FOR_LINK_STAT | ||
| 315 | #define WANOPT_CHDLC_NO_CTS IGNORE_CTS_FOR_LINK_STAT | ||
| 316 | #define WANOPT_CHDLC_NO_KEEPALIVE IGNORE_KPALV_FOR_LINK_STAT | ||
| 317 | */ | ||
| 318 | |||
| 319 | /* Port options */ | ||
| 320 | #define WANOPT_PRI 0 | ||
| 321 | #define WANOPT_SEC 1 | ||
| 322 | /* read mode */ | ||
| 323 | #define WANOPT_INTR 0 | ||
| 324 | #define WANOPT_POLL 1 | ||
| 325 | 4 | ||
| 326 | 5 | #ifndef _UAPI_ROUTER_H | |
| 327 | #define WANOPT_TTY_SYNC 0 | 6 | #define _UAPI_ROUTER_H |
| 328 | #define WANOPT_TTY_ASYNC 1 | ||
| 329 | /*---------------------------------------------------------------------------- | ||
| 330 | * WAN Link Status Info (for ROUTER_STAT IOCTL). | ||
| 331 | */ | ||
| 332 | typedef struct wandev_stat | ||
| 333 | { | ||
| 334 | unsigned state; /* link state */ | ||
| 335 | unsigned ndev; /* number of configured interfaces */ | ||
| 336 | |||
| 337 | /* link/interface configuration */ | ||
| 338 | unsigned connection; /* permanent/switched/on-demand */ | ||
| 339 | unsigned media_type; /* Frame relay/PPP/X.25/SDLC, etc. */ | ||
| 340 | unsigned mtu; /* max. transmit unit for this device */ | ||
| 341 | |||
| 342 | /* physical level statistics */ | ||
| 343 | unsigned modem_status; /* modem status */ | ||
| 344 | unsigned rx_frames; /* received frames count */ | ||
| 345 | unsigned rx_overruns; /* receiver overrun error count */ | ||
| 346 | unsigned rx_crc_err; /* receive CRC error count */ | ||
| 347 | unsigned rx_aborts; /* received aborted frames count */ | ||
| 348 | unsigned rx_bad_length; /* unexpetedly long/short frames count */ | ||
| 349 | unsigned rx_dropped; /* frames discarded at device level */ | ||
| 350 | unsigned tx_frames; /* transmitted frames count */ | ||
| 351 | unsigned tx_underruns; /* aborted transmissions (underruns) count */ | ||
| 352 | unsigned tx_timeouts; /* transmission timeouts */ | ||
| 353 | unsigned tx_rejects; /* other transmit errors */ | ||
| 354 | |||
| 355 | /* media level statistics */ | ||
| 356 | unsigned rx_bad_format; /* frames with invalid format */ | ||
| 357 | unsigned rx_bad_addr; /* frames with invalid media address */ | ||
| 358 | unsigned tx_retries; /* frames re-transmitted */ | ||
| 359 | unsigned reserved[16]; /* reserved for future use */ | ||
| 360 | } wandev_stat_t; | ||
| 361 | 7 | ||
| 362 | /* 'state' defines */ | 8 | /* 'state' defines */ |
| 363 | enum wan_states | 9 | enum wan_states |
| @@ -365,88 +11,7 @@ enum wan_states | |||
| 365 | WAN_UNCONFIGURED, /* link/channel is not configured */ | 11 | WAN_UNCONFIGURED, /* link/channel is not configured */ |
| 366 | WAN_DISCONNECTED, /* link/channel is disconnected */ | 12 | WAN_DISCONNECTED, /* link/channel is disconnected */ |
| 367 | WAN_CONNECTING, /* connection is in progress */ | 13 | WAN_CONNECTING, /* connection is in progress */ |
| 368 | WAN_CONNECTED, /* link/channel is operational */ | 14 | WAN_CONNECTED /* link/channel is operational */ |
| 369 | WAN_LIMIT, /* for verification only */ | ||
| 370 | WAN_DUALPORT, /* for Dual Port cards */ | ||
| 371 | WAN_DISCONNECTING, | ||
| 372 | WAN_FT1_READY /* FT1 Configurator Ready */ | ||
| 373 | }; | 15 | }; |
| 374 | 16 | ||
| 375 | enum { | ||
| 376 | WAN_LOCAL_IP, | ||
| 377 | WAN_POINTOPOINT_IP, | ||
| 378 | WAN_NETMASK_IP, | ||
| 379 | WAN_BROADCAST_IP | ||
| 380 | }; | ||
| 381 | |||
| 382 | /* 'modem_status' masks */ | ||
| 383 | #define WAN_MODEM_CTS 0x0001 /* CTS line active */ | ||
| 384 | #define WAN_MODEM_DCD 0x0002 /* DCD line active */ | ||
| 385 | #define WAN_MODEM_DTR 0x0010 /* DTR line active */ | ||
| 386 | #define WAN_MODEM_RTS 0x0020 /* RTS line active */ | ||
| 387 | |||
| 388 | /*---------------------------------------------------------------------------- | ||
| 389 | * WAN interface (logical channel) configuration (for ROUTER_IFNEW IOCTL). | ||
| 390 | */ | ||
| 391 | typedef struct wanif_conf | ||
| 392 | { | ||
| 393 | unsigned magic; /* magic number */ | ||
| 394 | unsigned config_id; /* configuration identifier */ | ||
| 395 | char name[WAN_IFNAME_SZ+1]; /* interface name, ASCIIZ */ | ||
| 396 | char addr[WAN_ADDRESS_SZ+1]; /* media address, ASCIIZ */ | ||
| 397 | char usedby[USED_BY_FIELD]; /* used by API or WANPIPE */ | ||
| 398 | unsigned idle_timeout; /* sec, before disconnecting */ | ||
| 399 | unsigned hold_timeout; /* sec, before re-connecting */ | ||
| 400 | unsigned cir; /* Committed Information Rate fwd,bwd*/ | ||
| 401 | unsigned bc; /* Committed Burst Size fwd, bwd */ | ||
| 402 | unsigned be; /* Excess Burst Size fwd, bwd */ | ||
| 403 | unsigned char enable_IPX; /* Enable or Disable IPX */ | ||
| 404 | unsigned char inarp; /* Send Inverse ARP requests Y/N */ | ||
| 405 | unsigned inarp_interval; /* sec, between InARP requests */ | ||
| 406 | unsigned long network_number; /* Network Number for IPX */ | ||
| 407 | char mc; /* Multicast on or off */ | ||
| 408 | char local_addr[WAN_ADDRESS_SZ+1];/* local media address, ASCIIZ */ | ||
| 409 | unsigned char port; /* board port */ | ||
| 410 | unsigned char protocol; /* prococol used in this channel (TCPOX25 or X25) */ | ||
| 411 | char pap; /* PAP enabled or disabled */ | ||
| 412 | char chap; /* CHAP enabled or disabled */ | ||
| 413 | unsigned char userid[511]; /* List of User Id */ | ||
| 414 | unsigned char passwd[511]; /* List of passwords */ | ||
| 415 | unsigned char sysname[31]; /* Name of the system */ | ||
| 416 | unsigned char ignore_dcd; /* Protocol options: */ | ||
| 417 | unsigned char ignore_cts; /* Ignore these to determine */ | ||
| 418 | unsigned char ignore_keepalive; /* link status (Yes or No) */ | ||
| 419 | unsigned char hdlc_streaming; /* Hdlc streaming mode (Y/N) */ | ||
| 420 | unsigned keepalive_tx_tmr; /* transmit keepalive timer */ | ||
| 421 | unsigned keepalive_rx_tmr; /* receive keepalive timer */ | ||
| 422 | unsigned keepalive_err_margin; /* keepalive_error_tolerance */ | ||
| 423 | unsigned slarp_timer; /* SLARP request timer */ | ||
| 424 | unsigned char ttl; /* Time To Live for UDP security */ | ||
| 425 | char interface; /* RS-232/V.35, etc. */ | ||
| 426 | char clocking; /* external/internal */ | ||
| 427 | unsigned bps; /* data transfer rate */ | ||
| 428 | unsigned mtu; /* maximum transmit unit size */ | ||
| 429 | unsigned char if_down; /* brind down interface when disconnected */ | ||
| 430 | unsigned char gateway; /* Is this interface a gateway */ | ||
| 431 | unsigned char true_if_encoding; /* Set the dev->type to true board protocol */ | ||
| 432 | |||
| 433 | unsigned char asy_data_trans; /* async API options */ | ||
| 434 | unsigned char rts_hs_for_receive; /* async Protocol options */ | ||
| 435 | unsigned char xon_xoff_hs_for_receive; | ||
| 436 | unsigned char xon_xoff_hs_for_transmit; | ||
| 437 | unsigned char dcd_hs_for_transmit; | ||
| 438 | unsigned char cts_hs_for_transmit; | ||
| 439 | unsigned char async_mode; | ||
| 440 | unsigned tx_bits_per_char; | ||
| 441 | unsigned rx_bits_per_char; | ||
| 442 | unsigned stop_bits; | ||
| 443 | unsigned char parity; | ||
| 444 | unsigned break_timer; | ||
| 445 | unsigned inter_char_timer; | ||
| 446 | unsigned rx_complete_length; | ||
| 447 | unsigned xon_char; | ||
| 448 | unsigned xoff_char; | ||
| 449 | unsigned char receive_only; /* no transmit buffering (Y/N) */ | ||
| 450 | } wanif_conf_t; | ||
| 451 | |||
| 452 | #endif /* _UAPI_ROUTER_H */ | 17 | #endif /* _UAPI_ROUTER_H */ |
diff --git a/include/uapi/linux/xattr.h b/include/uapi/linux/xattr.h index 26607bd965fa..e4629b93bdd6 100644 --- a/include/uapi/linux/xattr.h +++ b/include/uapi/linux/xattr.h | |||
| @@ -15,19 +15,22 @@ | |||
| 15 | 15 | ||
| 16 | /* Namespaces */ | 16 | /* Namespaces */ |
| 17 | #define XATTR_OS2_PREFIX "os2." | 17 | #define XATTR_OS2_PREFIX "os2." |
| 18 | #define XATTR_OS2_PREFIX_LEN (sizeof (XATTR_OS2_PREFIX) - 1) | 18 | #define XATTR_OS2_PREFIX_LEN (sizeof(XATTR_OS2_PREFIX) - 1) |
| 19 | |||
| 20 | #define XATTR_MAC_OSX_PREFIX "osx." | ||
| 21 | #define XATTR_MAC_OSX_PREFIX_LEN (sizeof(XATTR_MAC_OSX_PREFIX) - 1) | ||
| 19 | 22 | ||
| 20 | #define XATTR_SECURITY_PREFIX "security." | 23 | #define XATTR_SECURITY_PREFIX "security." |
| 21 | #define XATTR_SECURITY_PREFIX_LEN (sizeof (XATTR_SECURITY_PREFIX) - 1) | 24 | #define XATTR_SECURITY_PREFIX_LEN (sizeof(XATTR_SECURITY_PREFIX) - 1) |
| 22 | 25 | ||
| 23 | #define XATTR_SYSTEM_PREFIX "system." | 26 | #define XATTR_SYSTEM_PREFIX "system." |
| 24 | #define XATTR_SYSTEM_PREFIX_LEN (sizeof (XATTR_SYSTEM_PREFIX) - 1) | 27 | #define XATTR_SYSTEM_PREFIX_LEN (sizeof(XATTR_SYSTEM_PREFIX) - 1) |
| 25 | 28 | ||
| 26 | #define XATTR_TRUSTED_PREFIX "trusted." | 29 | #define XATTR_TRUSTED_PREFIX "trusted." |
| 27 | #define XATTR_TRUSTED_PREFIX_LEN (sizeof (XATTR_TRUSTED_PREFIX) - 1) | 30 | #define XATTR_TRUSTED_PREFIX_LEN (sizeof(XATTR_TRUSTED_PREFIX) - 1) |
| 28 | 31 | ||
| 29 | #define XATTR_USER_PREFIX "user." | 32 | #define XATTR_USER_PREFIX "user." |
| 30 | #define XATTR_USER_PREFIX_LEN (sizeof (XATTR_USER_PREFIX) - 1) | 33 | #define XATTR_USER_PREFIX_LEN (sizeof(XATTR_USER_PREFIX) - 1) |
| 31 | 34 | ||
| 32 | /* Security namespace */ | 35 | /* Security namespace */ |
| 33 | #define XATTR_EVM_SUFFIX "evm" | 36 | #define XATTR_EVM_SUFFIX "evm" |
diff --git a/include/uapi/rdma/ib_user_verbs.h b/include/uapi/rdma/ib_user_verbs.h index 81aba3a73aa3..805711ea2005 100644 --- a/include/uapi/rdma/ib_user_verbs.h +++ b/include/uapi/rdma/ib_user_verbs.h | |||
| @@ -261,6 +261,22 @@ struct ib_uverbs_dereg_mr { | |||
| 261 | __u32 mr_handle; | 261 | __u32 mr_handle; |
| 262 | }; | 262 | }; |
| 263 | 263 | ||
| 264 | struct ib_uverbs_alloc_mw { | ||
| 265 | __u64 response; | ||
| 266 | __u32 pd_handle; | ||
| 267 | __u8 mw_type; | ||
| 268 | __u8 reserved[3]; | ||
| 269 | }; | ||
| 270 | |||
| 271 | struct ib_uverbs_alloc_mw_resp { | ||
| 272 | __u32 mw_handle; | ||
| 273 | __u32 rkey; | ||
| 274 | }; | ||
| 275 | |||
| 276 | struct ib_uverbs_dealloc_mw { | ||
| 277 | __u32 mw_handle; | ||
| 278 | }; | ||
| 279 | |||
| 264 | struct ib_uverbs_create_comp_channel { | 280 | struct ib_uverbs_create_comp_channel { |
| 265 | __u64 response; | 281 | __u64 response; |
| 266 | }; | 282 | }; |
diff --git a/include/uapi/scsi/Kbuild b/include/uapi/scsi/Kbuild index 29a87dd26cfb..75746d52f208 100644 --- a/include/uapi/scsi/Kbuild +++ b/include/uapi/scsi/Kbuild | |||
| @@ -1,2 +1,5 @@ | |||
| 1 | # UAPI Header export list | 1 | # UAPI Header export list |
| 2 | header-y += fc/ | 2 | header-y += fc/ |
| 3 | header-y += scsi_bsg_fc.h | ||
| 4 | header-y += scsi_netlink.h | ||
| 5 | header-y += scsi_netlink_fc.h | ||
diff --git a/include/uapi/scsi/fc/Kbuild b/include/uapi/scsi/fc/Kbuild index aafaa5aa54d4..5ead9fac265c 100644 --- a/include/uapi/scsi/fc/Kbuild +++ b/include/uapi/scsi/fc/Kbuild | |||
| @@ -1 +1,5 @@ | |||
| 1 | # UAPI Header export list | 1 | # UAPI Header export list |
| 2 | header-y += fc_els.h | ||
| 3 | header-y += fc_fs.h | ||
| 4 | header-y += fc_gs.h | ||
| 5 | header-y += fc_ns.h | ||
diff --git a/include/uapi/scsi/fc/fc_els.h b/include/uapi/scsi/fc/fc_els.h new file mode 100644 index 000000000000..481abbd48e39 --- /dev/null +++ b/include/uapi/scsi/fc/fc_els.h | |||
| @@ -0,0 +1,831 @@ | |||
| 1 | /* | ||
| 2 | * Copyright(c) 2007 Intel Corporation. All rights reserved. | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify it | ||
| 5 | * under the terms and conditions of the GNU General Public License, | ||
| 6 | * version 2, as published by the Free Software Foundation. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
| 9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 11 | * more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License along with | ||
| 14 | * this program; if not, write to the Free Software Foundation, Inc., | ||
| 15 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
| 16 | * | ||
| 17 | * Maintained at www.Open-FCoE.org | ||
| 18 | */ | ||
| 19 | |||
| 20 | #ifndef _FC_ELS_H_ | ||
| 21 | #define _FC_ELS_H_ | ||
| 22 | |||
| 23 | #include <linux/types.h> | ||
| 24 | |||
| 25 | /* | ||
| 26 | * Fibre Channel Switch - Enhanced Link Services definitions. | ||
| 27 | * From T11 FC-LS Rev 1.2 June 7, 2005. | ||
| 28 | */ | ||
| 29 | |||
| 30 | /* | ||
| 31 | * ELS Command codes - byte 0 of the frame payload | ||
| 32 | */ | ||
| 33 | enum fc_els_cmd { | ||
| 34 | ELS_LS_RJT = 0x01, /* ESL reject */ | ||
| 35 | ELS_LS_ACC = 0x02, /* ESL Accept */ | ||
| 36 | ELS_PLOGI = 0x03, /* N_Port login */ | ||
| 37 | ELS_FLOGI = 0x04, /* F_Port login */ | ||
| 38 | ELS_LOGO = 0x05, /* Logout */ | ||
| 39 | ELS_ABTX = 0x06, /* Abort exchange - obsolete */ | ||
| 40 | ELS_RCS = 0x07, /* read connection status */ | ||
| 41 | ELS_RES = 0x08, /* read exchange status block */ | ||
| 42 | ELS_RSS = 0x09, /* read sequence status block */ | ||
| 43 | ELS_RSI = 0x0a, /* read sequence initiative */ | ||
| 44 | ELS_ESTS = 0x0b, /* establish streaming */ | ||
| 45 | ELS_ESTC = 0x0c, /* estimate credit */ | ||
| 46 | ELS_ADVC = 0x0d, /* advise credit */ | ||
| 47 | ELS_RTV = 0x0e, /* read timeout value */ | ||
| 48 | ELS_RLS = 0x0f, /* read link error status block */ | ||
| 49 | ELS_ECHO = 0x10, /* echo */ | ||
| 50 | ELS_TEST = 0x11, /* test */ | ||
| 51 | ELS_RRQ = 0x12, /* reinstate recovery qualifier */ | ||
| 52 | ELS_REC = 0x13, /* read exchange concise */ | ||
| 53 | ELS_SRR = 0x14, /* sequence retransmission request */ | ||
| 54 | ELS_PRLI = 0x20, /* process login */ | ||
| 55 | ELS_PRLO = 0x21, /* process logout */ | ||
| 56 | ELS_SCN = 0x22, /* state change notification */ | ||
| 57 | ELS_TPLS = 0x23, /* test process login state */ | ||
| 58 | ELS_TPRLO = 0x24, /* third party process logout */ | ||
| 59 | ELS_LCLM = 0x25, /* login control list mgmt (obs) */ | ||
| 60 | ELS_GAID = 0x30, /* get alias_ID */ | ||
| 61 | ELS_FACT = 0x31, /* fabric activate alias_id */ | ||
| 62 | ELS_FDACDT = 0x32, /* fabric deactivate alias_id */ | ||
| 63 | ELS_NACT = 0x33, /* N-port activate alias_id */ | ||
| 64 | ELS_NDACT = 0x34, /* N-port deactivate alias_id */ | ||
| 65 | ELS_QOSR = 0x40, /* quality of service request */ | ||
| 66 | ELS_RVCS = 0x41, /* read virtual circuit status */ | ||
| 67 | ELS_PDISC = 0x50, /* discover N_port service params */ | ||
| 68 | ELS_FDISC = 0x51, /* discover F_port service params */ | ||
| 69 | ELS_ADISC = 0x52, /* discover address */ | ||
| 70 | ELS_RNC = 0x53, /* report node cap (obs) */ | ||
| 71 | ELS_FARP_REQ = 0x54, /* FC ARP request */ | ||
| 72 | ELS_FARP_REPL = 0x55, /* FC ARP reply */ | ||
| 73 | ELS_RPS = 0x56, /* read port status block */ | ||
| 74 | ELS_RPL = 0x57, /* read port list */ | ||
| 75 | ELS_RPBC = 0x58, /* read port buffer condition */ | ||
| 76 | ELS_FAN = 0x60, /* fabric address notification */ | ||
| 77 | ELS_RSCN = 0x61, /* registered state change notification */ | ||
| 78 | ELS_SCR = 0x62, /* state change registration */ | ||
| 79 | ELS_RNFT = 0x63, /* report node FC-4 types */ | ||
| 80 | ELS_CSR = 0x68, /* clock synch. request */ | ||
| 81 | ELS_CSU = 0x69, /* clock synch. update */ | ||
| 82 | ELS_LINIT = 0x70, /* loop initialize */ | ||
| 83 | ELS_LSTS = 0x72, /* loop status */ | ||
| 84 | ELS_RNID = 0x78, /* request node ID data */ | ||
| 85 | ELS_RLIR = 0x79, /* registered link incident report */ | ||
| 86 | ELS_LIRR = 0x7a, /* link incident record registration */ | ||
| 87 | ELS_SRL = 0x7b, /* scan remote loop */ | ||
| 88 | ELS_SBRP = 0x7c, /* set bit-error reporting params */ | ||
| 89 | ELS_RPSC = 0x7d, /* report speed capabilities */ | ||
| 90 | ELS_QSA = 0x7e, /* query security attributes */ | ||
| 91 | ELS_EVFP = 0x7f, /* exchange virt. fabrics params */ | ||
| 92 | ELS_LKA = 0x80, /* link keep-alive */ | ||
| 93 | ELS_AUTH_ELS = 0x90, /* authentication ELS */ | ||
| 94 | }; | ||
| 95 | |||
| 96 | /* | ||
| 97 | * Initializer useful for decoding table. | ||
| 98 | * Please keep this in sync with the above definitions. | ||
| 99 | */ | ||
| 100 | #define FC_ELS_CMDS_INIT { \ | ||
| 101 | [ELS_LS_RJT] = "LS_RJT", \ | ||
| 102 | [ELS_LS_ACC] = "LS_ACC", \ | ||
| 103 | [ELS_PLOGI] = "PLOGI", \ | ||
| 104 | [ELS_FLOGI] = "FLOGI", \ | ||
| 105 | [ELS_LOGO] = "LOGO", \ | ||
| 106 | [ELS_ABTX] = "ABTX", \ | ||
| 107 | [ELS_RCS] = "RCS", \ | ||
| 108 | [ELS_RES] = "RES", \ | ||
| 109 | [ELS_RSS] = "RSS", \ | ||
| 110 | [ELS_RSI] = "RSI", \ | ||
| 111 | [ELS_ESTS] = "ESTS", \ | ||
| 112 | [ELS_ESTC] = "ESTC", \ | ||
| 113 | [ELS_ADVC] = "ADVC", \ | ||
| 114 | [ELS_RTV] = "RTV", \ | ||
| 115 | [ELS_RLS] = "RLS", \ | ||
| 116 | [ELS_ECHO] = "ECHO", \ | ||
| 117 | [ELS_TEST] = "TEST", \ | ||
| 118 | [ELS_RRQ] = "RRQ", \ | ||
| 119 | [ELS_REC] = "REC", \ | ||
| 120 | [ELS_SRR] = "SRR", \ | ||
| 121 | [ELS_PRLI] = "PRLI", \ | ||
| 122 | [ELS_PRLO] = "PRLO", \ | ||
| 123 | [ELS_SCN] = "SCN", \ | ||
| 124 | [ELS_TPLS] = "TPLS", \ | ||
| 125 | [ELS_TPRLO] = "TPRLO", \ | ||
| 126 | [ELS_LCLM] = "LCLM", \ | ||
| 127 | [ELS_GAID] = "GAID", \ | ||
| 128 | [ELS_FACT] = "FACT", \ | ||
| 129 | [ELS_FDACDT] = "FDACDT", \ | ||
| 130 | [ELS_NACT] = "NACT", \ | ||
| 131 | [ELS_NDACT] = "NDACT", \ | ||
| 132 | [ELS_QOSR] = "QOSR", \ | ||
| 133 | [ELS_RVCS] = "RVCS", \ | ||
| 134 | [ELS_PDISC] = "PDISC", \ | ||
| 135 | [ELS_FDISC] = "FDISC", \ | ||
| 136 | [ELS_ADISC] = "ADISC", \ | ||
| 137 | [ELS_RNC] = "RNC", \ | ||
| 138 | [ELS_FARP_REQ] = "FARP_REQ", \ | ||
| 139 | [ELS_FARP_REPL] = "FARP_REPL", \ | ||
| 140 | [ELS_RPS] = "RPS", \ | ||
| 141 | [ELS_RPL] = "RPL", \ | ||
| 142 | [ELS_RPBC] = "RPBC", \ | ||
| 143 | [ELS_FAN] = "FAN", \ | ||
| 144 | [ELS_RSCN] = "RSCN", \ | ||
| 145 | [ELS_SCR] = "SCR", \ | ||
| 146 | [ELS_RNFT] = "RNFT", \ | ||
| 147 | [ELS_CSR] = "CSR", \ | ||
| 148 | [ELS_CSU] = "CSU", \ | ||
| 149 | [ELS_LINIT] = "LINIT", \ | ||
| 150 | [ELS_LSTS] = "LSTS", \ | ||
| 151 | [ELS_RNID] = "RNID", \ | ||
| 152 | [ELS_RLIR] = "RLIR", \ | ||
| 153 | [ELS_LIRR] = "LIRR", \ | ||
| 154 | [ELS_SRL] = "SRL", \ | ||
| 155 | [ELS_SBRP] = "SBRP", \ | ||
| 156 | [ELS_RPSC] = "RPSC", \ | ||
| 157 | [ELS_QSA] = "QSA", \ | ||
| 158 | [ELS_EVFP] = "EVFP", \ | ||
| 159 | [ELS_LKA] = "LKA", \ | ||
| 160 | [ELS_AUTH_ELS] = "AUTH_ELS", \ | ||
| 161 | } | ||
| 162 | |||
| 163 | /* | ||
| 164 | * LS_ACC payload. | ||
| 165 | */ | ||
| 166 | struct fc_els_ls_acc { | ||
| 167 | __u8 la_cmd; /* command code ELS_LS_ACC */ | ||
| 168 | __u8 la_resv[3]; /* reserved */ | ||
| 169 | }; | ||
| 170 | |||
| 171 | /* | ||
| 172 | * ELS reject payload. | ||
| 173 | */ | ||
| 174 | struct fc_els_ls_rjt { | ||
| 175 | __u8 er_cmd; /* command code ELS_LS_RJT */ | ||
| 176 | __u8 er_resv[4]; /* reserved must be zero */ | ||
| 177 | __u8 er_reason; /* reason (enum fc_els_rjt_reason below) */ | ||
| 178 | __u8 er_explan; /* explanation (enum fc_els_rjt_explan below) */ | ||
| 179 | __u8 er_vendor; /* vendor specific code */ | ||
| 180 | }; | ||
| 181 | |||
| 182 | /* | ||
| 183 | * ELS reject reason codes (er_reason). | ||
| 184 | */ | ||
| 185 | enum fc_els_rjt_reason { | ||
| 186 | ELS_RJT_NONE = 0, /* no reject - not to be sent */ | ||
| 187 | ELS_RJT_INVAL = 0x01, /* invalid ELS command code */ | ||
| 188 | ELS_RJT_LOGIC = 0x03, /* logical error */ | ||
| 189 | ELS_RJT_BUSY = 0x05, /* logical busy */ | ||
| 190 | ELS_RJT_PROT = 0x07, /* protocol error */ | ||
| 191 | ELS_RJT_UNAB = 0x09, /* unable to perform command request */ | ||
| 192 | ELS_RJT_UNSUP = 0x0b, /* command not supported */ | ||
| 193 | ELS_RJT_INPROG = 0x0e, /* command already in progress */ | ||
| 194 | ELS_RJT_FIP = 0x20, /* FIP error */ | ||
| 195 | ELS_RJT_VENDOR = 0xff, /* vendor specific error */ | ||
| 196 | }; | ||
| 197 | |||
| 198 | |||
| 199 | /* | ||
| 200 | * reason code explanation (er_explan). | ||
| 201 | */ | ||
| 202 | enum fc_els_rjt_explan { | ||
| 203 | ELS_EXPL_NONE = 0x00, /* No additional explanation */ | ||
| 204 | ELS_EXPL_SPP_OPT_ERR = 0x01, /* service parameter error - options */ | ||
| 205 | ELS_EXPL_SPP_ICTL_ERR = 0x03, /* service parm error - initiator ctl */ | ||
| 206 | ELS_EXPL_AH = 0x11, /* invalid association header */ | ||
| 207 | ELS_EXPL_AH_REQ = 0x13, /* association_header required */ | ||
| 208 | ELS_EXPL_SID = 0x15, /* invalid originator S_ID */ | ||
| 209 | ELS_EXPL_OXID_RXID = 0x17, /* invalid OX_ID-RX_ID combination */ | ||
| 210 | ELS_EXPL_INPROG = 0x19, /* Request already in progress */ | ||
| 211 | ELS_EXPL_PLOGI_REQD = 0x1e, /* N_Port login required */ | ||
| 212 | ELS_EXPL_INSUF_RES = 0x29, /* insufficient resources */ | ||
| 213 | ELS_EXPL_UNAB_DATA = 0x2a, /* unable to supply requested data */ | ||
| 214 | ELS_EXPL_UNSUPR = 0x2c, /* Request not supported */ | ||
| 215 | ELS_EXPL_INV_LEN = 0x2d, /* Invalid payload length */ | ||
| 216 | ELS_EXPL_NOT_NEIGHBOR = 0x62, /* VN2VN_Port not in neighbor set */ | ||
| 217 | /* TBD - above definitions incomplete */ | ||
| 218 | }; | ||
| 219 | |||
| 220 | /* | ||
| 221 | * Common service parameters (N ports). | ||
| 222 | */ | ||
| 223 | struct fc_els_csp { | ||
| 224 | __u8 sp_hi_ver; /* highest version supported (obs.) */ | ||
| 225 | __u8 sp_lo_ver; /* highest version supported (obs.) */ | ||
| 226 | __be16 sp_bb_cred; /* buffer-to-buffer credits */ | ||
| 227 | __be16 sp_features; /* common feature flags */ | ||
| 228 | __be16 sp_bb_data; /* b-b state number and data field sz */ | ||
| 229 | union { | ||
| 230 | struct { | ||
| 231 | __be16 _sp_tot_seq; /* total concurrent sequences */ | ||
| 232 | __be16 _sp_rel_off; /* rel. offset by info cat */ | ||
| 233 | } sp_plogi; | ||
| 234 | struct { | ||
| 235 | __be32 _sp_r_a_tov; /* resource alloc. timeout msec */ | ||
| 236 | } sp_flogi_acc; | ||
| 237 | } sp_u; | ||
| 238 | __be32 sp_e_d_tov; /* error detect timeout value */ | ||
| 239 | }; | ||
| 240 | #define sp_tot_seq sp_u.sp_plogi._sp_tot_seq | ||
| 241 | #define sp_rel_off sp_u.sp_plogi._sp_rel_off | ||
| 242 | #define sp_r_a_tov sp_u.sp_flogi_acc._sp_r_a_tov | ||
| 243 | |||
| 244 | #define FC_SP_BB_DATA_MASK 0xfff /* mask for data field size in sp_bb_data */ | ||
| 245 | |||
| 246 | /* | ||
| 247 | * Minimum and maximum values for max data field size in service parameters. | ||
| 248 | */ | ||
| 249 | #define FC_SP_MIN_MAX_PAYLOAD FC_MIN_MAX_PAYLOAD | ||
| 250 | #define FC_SP_MAX_MAX_PAYLOAD FC_MAX_PAYLOAD | ||
| 251 | |||
| 252 | /* | ||
| 253 | * sp_features | ||
| 254 | */ | ||
| 255 | #define FC_SP_FT_NPIV 0x8000 /* multiple N_Port_ID support (FLOGI) */ | ||
| 256 | #define FC_SP_FT_CIRO 0x8000 /* continuously increasing rel off (PLOGI) */ | ||
| 257 | #define FC_SP_FT_CLAD 0x8000 /* clean address (in FLOGI LS_ACC) */ | ||
| 258 | #define FC_SP_FT_RAND 0x4000 /* random relative offset */ | ||
| 259 | #define FC_SP_FT_VAL 0x2000 /* valid vendor version level */ | ||
| 260 | #define FC_SP_FT_NPIV_ACC 0x2000 /* NPIV assignment (FLOGI LS_ACC) */ | ||
| 261 | #define FC_SP_FT_FPORT 0x1000 /* F port (1) vs. N port (0) */ | ||
| 262 | #define FC_SP_FT_ABB 0x0800 /* alternate BB_credit management */ | ||
| 263 | #define FC_SP_FT_EDTR 0x0400 /* E_D_TOV Resolution is nanoseconds */ | ||
| 264 | #define FC_SP_FT_MCAST 0x0200 /* multicast */ | ||
| 265 | #define FC_SP_FT_BCAST 0x0100 /* broadcast */ | ||
| 266 | #define FC_SP_FT_HUNT 0x0080 /* hunt group */ | ||
| 267 | #define FC_SP_FT_SIMP 0x0040 /* dedicated simplex */ | ||
| 268 | #define FC_SP_FT_SEC 0x0020 /* reserved for security */ | ||
| 269 | #define FC_SP_FT_CSYN 0x0010 /* clock synch. supported */ | ||
| 270 | #define FC_SP_FT_RTTOV 0x0008 /* R_T_TOV value 100 uS, else 100 mS */ | ||
| 271 | #define FC_SP_FT_HALF 0x0004 /* dynamic half duplex */ | ||
| 272 | #define FC_SP_FT_SEQC 0x0002 /* SEQ_CNT */ | ||
| 273 | #define FC_SP_FT_PAYL 0x0001 /* FLOGI payload length 256, else 116 */ | ||
| 274 | |||
| 275 | /* | ||
| 276 | * Class-specific service parameters. | ||
| 277 | */ | ||
| 278 | struct fc_els_cssp { | ||
| 279 | __be16 cp_class; /* class flags */ | ||
| 280 | __be16 cp_init; /* initiator flags */ | ||
| 281 | __be16 cp_recip; /* recipient flags */ | ||
| 282 | __be16 cp_rdfs; /* receive data field size */ | ||
| 283 | __be16 cp_con_seq; /* concurrent sequences */ | ||
| 284 | __be16 cp_ee_cred; /* N-port end-to-end credit */ | ||
| 285 | __u8 cp_resv1; /* reserved */ | ||
| 286 | __u8 cp_open_seq; /* open sequences per exchange */ | ||
| 287 | __u8 _cp_resv2[2]; /* reserved */ | ||
| 288 | }; | ||
| 289 | |||
| 290 | /* | ||
| 291 | * cp_class flags. | ||
| 292 | */ | ||
| 293 | #define FC_CPC_VALID 0x8000 /* class valid */ | ||
| 294 | #define FC_CPC_IMIX 0x4000 /* intermix mode */ | ||
| 295 | #define FC_CPC_SEQ 0x0800 /* sequential delivery */ | ||
| 296 | #define FC_CPC_CAMP 0x0200 /* camp-on */ | ||
| 297 | #define FC_CPC_PRI 0x0080 /* priority */ | ||
| 298 | |||
| 299 | /* | ||
| 300 | * cp_init flags. | ||
| 301 | * (TBD: not all flags defined here). | ||
| 302 | */ | ||
| 303 | #define FC_CPI_CSYN 0x0010 /* clock synch. capable */ | ||
| 304 | |||
| 305 | /* | ||
| 306 | * cp_recip flags. | ||
| 307 | */ | ||
| 308 | #define FC_CPR_CSYN 0x0008 /* clock synch. capable */ | ||
| 309 | |||
| 310 | /* | ||
| 311 | * NFC_ELS_FLOGI: Fabric login request. | ||
| 312 | * NFC_ELS_PLOGI: Port login request (same format). | ||
| 313 | */ | ||
| 314 | struct fc_els_flogi { | ||
| 315 | __u8 fl_cmd; /* command */ | ||
| 316 | __u8 _fl_resvd[3]; /* must be zero */ | ||
| 317 | struct fc_els_csp fl_csp; /* common service parameters */ | ||
| 318 | __be64 fl_wwpn; /* port name */ | ||
| 319 | __be64 fl_wwnn; /* node name */ | ||
| 320 | struct fc_els_cssp fl_cssp[4]; /* class 1-4 service parameters */ | ||
| 321 | __u8 fl_vend[16]; /* vendor version level */ | ||
| 322 | } __attribute__((__packed__)); | ||
| 323 | |||
| 324 | /* | ||
| 325 | * Process login service parameter page. | ||
| 326 | */ | ||
| 327 | struct fc_els_spp { | ||
| 328 | __u8 spp_type; /* type code or common service params */ | ||
| 329 | __u8 spp_type_ext; /* type code extension */ | ||
| 330 | __u8 spp_flags; | ||
| 331 | __u8 _spp_resvd; | ||
| 332 | __be32 spp_orig_pa; /* originator process associator */ | ||
| 333 | __be32 spp_resp_pa; /* responder process associator */ | ||
| 334 | __be32 spp_params; /* service parameters */ | ||
| 335 | }; | ||
| 336 | |||
| 337 | /* | ||
| 338 | * spp_flags. | ||
| 339 | */ | ||
| 340 | #define FC_SPP_OPA_VAL 0x80 /* originator proc. assoc. valid */ | ||
| 341 | #define FC_SPP_RPA_VAL 0x40 /* responder proc. assoc. valid */ | ||
| 342 | #define FC_SPP_EST_IMG_PAIR 0x20 /* establish image pair */ | ||
| 343 | #define FC_SPP_RESP_MASK 0x0f /* mask for response code (below) */ | ||
| 344 | |||
| 345 | /* | ||
| 346 | * SPP response code in spp_flags - lower 4 bits. | ||
| 347 | */ | ||
| 348 | enum fc_els_spp_resp { | ||
| 349 | FC_SPP_RESP_ACK = 1, /* request executed */ | ||
| 350 | FC_SPP_RESP_RES = 2, /* unable due to lack of resources */ | ||
| 351 | FC_SPP_RESP_INIT = 3, /* initialization not complete */ | ||
| 352 | FC_SPP_RESP_NO_PA = 4, /* unknown process associator */ | ||
| 353 | FC_SPP_RESP_CONF = 5, /* configuration precludes image pair */ | ||
| 354 | FC_SPP_RESP_COND = 6, /* request completed conditionally */ | ||
| 355 | FC_SPP_RESP_MULT = 7, /* unable to handle multiple SPPs */ | ||
| 356 | FC_SPP_RESP_INVL = 8, /* SPP is invalid */ | ||
| 357 | }; | ||
| 358 | |||
| 359 | /* | ||
| 360 | * ELS_RRQ - Reinstate Recovery Qualifier | ||
| 361 | */ | ||
| 362 | struct fc_els_rrq { | ||
| 363 | __u8 rrq_cmd; /* command (0x12) */ | ||
| 364 | __u8 rrq_zero[3]; /* specified as zero - part of cmd */ | ||
| 365 | __u8 rrq_resvd; /* reserved */ | ||
| 366 | __u8 rrq_s_id[3]; /* originator FID */ | ||
| 367 | __be16 rrq_ox_id; /* originator exchange ID */ | ||
| 368 | __be16 rrq_rx_id; /* responders exchange ID */ | ||
| 369 | }; | ||
| 370 | |||
| 371 | /* | ||
| 372 | * ELS_REC - Read exchange concise. | ||
| 373 | */ | ||
| 374 | struct fc_els_rec { | ||
| 375 | __u8 rec_cmd; /* command (0x13) */ | ||
| 376 | __u8 rec_zero[3]; /* specified as zero - part of cmd */ | ||
| 377 | __u8 rec_resvd; /* reserved */ | ||
| 378 | __u8 rec_s_id[3]; /* originator FID */ | ||
| 379 | __be16 rec_ox_id; /* originator exchange ID */ | ||
| 380 | __be16 rec_rx_id; /* responders exchange ID */ | ||
| 381 | }; | ||
| 382 | |||
| 383 | /* | ||
| 384 | * ELS_REC LS_ACC payload. | ||
| 385 | */ | ||
| 386 | struct fc_els_rec_acc { | ||
| 387 | __u8 reca_cmd; /* accept (0x02) */ | ||
| 388 | __u8 reca_zero[3]; /* specified as zero - part of cmd */ | ||
| 389 | __be16 reca_ox_id; /* originator exchange ID */ | ||
| 390 | __be16 reca_rx_id; /* responders exchange ID */ | ||
| 391 | __u8 reca_resvd1; /* reserved */ | ||
| 392 | __u8 reca_ofid[3]; /* originator FID */ | ||
| 393 | __u8 reca_resvd2; /* reserved */ | ||
| 394 | __u8 reca_rfid[3]; /* responder FID */ | ||
| 395 | __be32 reca_fc4value; /* FC4 value */ | ||
| 396 | __be32 reca_e_stat; /* ESB (exchange status block) status */ | ||
| 397 | }; | ||
| 398 | |||
| 399 | /* | ||
| 400 | * ELS_PRLI - Process login request and response. | ||
| 401 | */ | ||
| 402 | struct fc_els_prli { | ||
| 403 | __u8 prli_cmd; /* command */ | ||
| 404 | __u8 prli_spp_len; /* length of each serv. parm. page */ | ||
| 405 | __be16 prli_len; /* length of entire payload */ | ||
| 406 | /* service parameter pages follow */ | ||
| 407 | }; | ||
| 408 | |||
| 409 | /* | ||
| 410 | * ELS_PRLO - Process logout request and response. | ||
| 411 | */ | ||
| 412 | struct fc_els_prlo { | ||
| 413 | __u8 prlo_cmd; /* command */ | ||
| 414 | __u8 prlo_obs; /* obsolete, but shall be set to 10h */ | ||
| 415 | __be16 prlo_len; /* payload length */ | ||
| 416 | }; | ||
| 417 | |||
| 418 | /* | ||
| 419 | * ELS_ADISC payload | ||
| 420 | */ | ||
| 421 | struct fc_els_adisc { | ||
| 422 | __u8 adisc_cmd; | ||
| 423 | __u8 adisc_resv[3]; | ||
| 424 | __u8 adisc_resv1; | ||
| 425 | __u8 adisc_hard_addr[3]; | ||
| 426 | __be64 adisc_wwpn; | ||
| 427 | __be64 adisc_wwnn; | ||
| 428 | __u8 adisc_resv2; | ||
| 429 | __u8 adisc_port_id[3]; | ||
| 430 | } __attribute__((__packed__)); | ||
| 431 | |||
| 432 | /* | ||
| 433 | * ELS_LOGO - process or fabric logout. | ||
| 434 | */ | ||
| 435 | struct fc_els_logo { | ||
| 436 | __u8 fl_cmd; /* command code */ | ||
| 437 | __u8 fl_zero[3]; /* specified as zero - part of cmd */ | ||
| 438 | __u8 fl_resvd; /* reserved */ | ||
| 439 | __u8 fl_n_port_id[3];/* N port ID */ | ||
| 440 | __be64 fl_n_port_wwn; /* port name */ | ||
| 441 | }; | ||
| 442 | |||
| 443 | /* | ||
| 444 | * ELS_RTV - read timeout value. | ||
| 445 | */ | ||
| 446 | struct fc_els_rtv { | ||
| 447 | __u8 rtv_cmd; /* command code 0x0e */ | ||
| 448 | __u8 rtv_zero[3]; /* specified as zero - part of cmd */ | ||
| 449 | }; | ||
| 450 | |||
| 451 | /* | ||
| 452 | * LS_ACC for ELS_RTV - read timeout value. | ||
| 453 | */ | ||
| 454 | struct fc_els_rtv_acc { | ||
| 455 | __u8 rtv_cmd; /* command code 0x02 */ | ||
| 456 | __u8 rtv_zero[3]; /* specified as zero - part of cmd */ | ||
| 457 | __be32 rtv_r_a_tov; /* resource allocation timeout value */ | ||
| 458 | __be32 rtv_e_d_tov; /* error detection timeout value */ | ||
| 459 | __be32 rtv_toq; /* timeout qualifier (see below) */ | ||
| 460 | }; | ||
| 461 | |||
| 462 | /* | ||
| 463 | * rtv_toq bits. | ||
| 464 | */ | ||
| 465 | #define FC_ELS_RTV_EDRES (1 << 26) /* E_D_TOV resolution is nS else mS */ | ||
| 466 | #define FC_ELS_RTV_RTTOV (1 << 19) /* R_T_TOV is 100 uS else 100 mS */ | ||
| 467 | |||
| 468 | /* | ||
| 469 | * ELS_SCR - state change registration payload. | ||
| 470 | */ | ||
| 471 | struct fc_els_scr { | ||
| 472 | __u8 scr_cmd; /* command code */ | ||
| 473 | __u8 scr_resv[6]; /* reserved */ | ||
| 474 | __u8 scr_reg_func; /* registration function (see below) */ | ||
| 475 | }; | ||
| 476 | |||
| 477 | enum fc_els_scr_func { | ||
| 478 | ELS_SCRF_FAB = 1, /* fabric-detected registration */ | ||
| 479 | ELS_SCRF_NPORT = 2, /* Nx_Port-detected registration */ | ||
| 480 | ELS_SCRF_FULL = 3, /* full registration */ | ||
| 481 | ELS_SCRF_CLEAR = 255, /* remove any current registrations */ | ||
| 482 | }; | ||
| 483 | |||
| 484 | /* | ||
| 485 | * ELS_RSCN - registered state change notification payload. | ||
| 486 | */ | ||
| 487 | struct fc_els_rscn { | ||
| 488 | __u8 rscn_cmd; /* RSCN opcode (0x61) */ | ||
| 489 | __u8 rscn_page_len; /* page length (4) */ | ||
| 490 | __be16 rscn_plen; /* payload length including this word */ | ||
| 491 | |||
| 492 | /* followed by 4-byte generic affected Port_ID pages */ | ||
| 493 | }; | ||
| 494 | |||
| 495 | struct fc_els_rscn_page { | ||
| 496 | __u8 rscn_page_flags; /* event and address format */ | ||
| 497 | __u8 rscn_fid[3]; /* fabric ID */ | ||
| 498 | }; | ||
| 499 | |||
| 500 | #define ELS_RSCN_EV_QUAL_BIT 2 /* shift count for event qualifier */ | ||
| 501 | #define ELS_RSCN_EV_QUAL_MASK 0xf /* mask for event qualifier */ | ||
| 502 | #define ELS_RSCN_ADDR_FMT_BIT 0 /* shift count for address format */ | ||
| 503 | #define ELS_RSCN_ADDR_FMT_MASK 0x3 /* mask for address format */ | ||
| 504 | |||
| 505 | enum fc_els_rscn_ev_qual { | ||
| 506 | ELS_EV_QUAL_NONE = 0, /* unspecified */ | ||
| 507 | ELS_EV_QUAL_NS_OBJ = 1, /* changed name server object */ | ||
| 508 | ELS_EV_QUAL_PORT_ATTR = 2, /* changed port attribute */ | ||
| 509 | ELS_EV_QUAL_SERV_OBJ = 3, /* changed service object */ | ||
| 510 | ELS_EV_QUAL_SW_CONFIG = 4, /* changed switch configuration */ | ||
| 511 | ELS_EV_QUAL_REM_OBJ = 5, /* removed object */ | ||
| 512 | }; | ||
| 513 | |||
| 514 | enum fc_els_rscn_addr_fmt { | ||
| 515 | ELS_ADDR_FMT_PORT = 0, /* rscn_fid is a port address */ | ||
| 516 | ELS_ADDR_FMT_AREA = 1, /* rscn_fid is a area address */ | ||
| 517 | ELS_ADDR_FMT_DOM = 2, /* rscn_fid is a domain address */ | ||
| 518 | ELS_ADDR_FMT_FAB = 3, /* anything on fabric may have changed */ | ||
| 519 | }; | ||
| 520 | |||
| 521 | /* | ||
| 522 | * ELS_RNID - request Node ID. | ||
| 523 | */ | ||
| 524 | struct fc_els_rnid { | ||
| 525 | __u8 rnid_cmd; /* RNID opcode (0x78) */ | ||
| 526 | __u8 rnid_resv[3]; /* reserved */ | ||
| 527 | __u8 rnid_fmt; /* data format */ | ||
| 528 | __u8 rnid_resv2[3]; /* reserved */ | ||
| 529 | }; | ||
| 530 | |||
| 531 | /* | ||
| 532 | * Node Identification Data formats (rnid_fmt) | ||
| 533 | */ | ||
| 534 | enum fc_els_rnid_fmt { | ||
| 535 | ELS_RNIDF_NONE = 0, /* no specific identification data */ | ||
| 536 | ELS_RNIDF_GEN = 0xdf, /* general topology discovery format */ | ||
| 537 | }; | ||
| 538 | |||
| 539 | /* | ||
| 540 | * ELS_RNID response. | ||
| 541 | */ | ||
| 542 | struct fc_els_rnid_resp { | ||
| 543 | __u8 rnid_cmd; /* response code (LS_ACC) */ | ||
| 544 | __u8 rnid_resv[3]; /* reserved */ | ||
| 545 | __u8 rnid_fmt; /* data format */ | ||
| 546 | __u8 rnid_cid_len; /* common ID data length */ | ||
| 547 | __u8 rnid_resv2; /* reserved */ | ||
| 548 | __u8 rnid_sid_len; /* specific ID data length */ | ||
| 549 | }; | ||
| 550 | |||
| 551 | struct fc_els_rnid_cid { | ||
| 552 | __be64 rnid_wwpn; /* N port name */ | ||
| 553 | __be64 rnid_wwnn; /* node name */ | ||
| 554 | }; | ||
| 555 | |||
| 556 | struct fc_els_rnid_gen { | ||
| 557 | __u8 rnid_vend_id[16]; /* vendor-unique ID */ | ||
| 558 | __be32 rnid_atype; /* associated type (see below) */ | ||
| 559 | __be32 rnid_phys_port; /* physical port number */ | ||
| 560 | __be32 rnid_att_nodes; /* number of attached nodes */ | ||
| 561 | __u8 rnid_node_mgmt; /* node management (see below) */ | ||
| 562 | __u8 rnid_ip_ver; /* IP version (see below) */ | ||
| 563 | __be16 rnid_prot_port; /* UDP / TCP port number */ | ||
| 564 | __be32 rnid_ip_addr[4]; /* IP address */ | ||
| 565 | __u8 rnid_resvd[2]; /* reserved */ | ||
| 566 | __be16 rnid_vend_spec; /* vendor-specific field */ | ||
| 567 | }; | ||
| 568 | |||
| 569 | enum fc_els_rnid_atype { | ||
| 570 | ELS_RNIDA_UNK = 0x01, /* unknown */ | ||
| 571 | ELS_RNIDA_OTHER = 0x02, /* none of the following */ | ||
| 572 | ELS_RNIDA_HUB = 0x03, | ||
| 573 | ELS_RNIDA_SWITCH = 0x04, | ||
| 574 | ELS_RNIDA_GATEWAY = 0x05, | ||
| 575 | ELS_RNIDA_CONV = 0x06, /* Obsolete, do not use this value */ | ||
| 576 | ELS_RNIDA_HBA = 0x07, /* Obsolete, do not use this value */ | ||
| 577 | ELS_RNIDA_PROXY = 0x08, /* Obsolete, do not use this value */ | ||
| 578 | ELS_RNIDA_STORAGE = 0x09, | ||
| 579 | ELS_RNIDA_HOST = 0x0a, | ||
| 580 | ELS_RNIDA_SUBSYS = 0x0b, /* storage subsystem (e.g., RAID) */ | ||
| 581 | ELS_RNIDA_ACCESS = 0x0e, /* access device (e.g. media changer) */ | ||
| 582 | ELS_RNIDA_NAS = 0x11, /* NAS server */ | ||
| 583 | ELS_RNIDA_BRIDGE = 0x12, /* bridge */ | ||
| 584 | ELS_RNIDA_VIRT = 0x13, /* virtualization device */ | ||
| 585 | ELS_RNIDA_MF = 0xff, /* multifunction device (bits below) */ | ||
| 586 | ELS_RNIDA_MF_HUB = 1UL << 31, /* hub */ | ||
| 587 | ELS_RNIDA_MF_SW = 1UL << 30, /* switch */ | ||
| 588 | ELS_RNIDA_MF_GW = 1UL << 29, /* gateway */ | ||
| 589 | ELS_RNIDA_MF_ST = 1UL << 28, /* storage */ | ||
| 590 | ELS_RNIDA_MF_HOST = 1UL << 27, /* host */ | ||
| 591 | ELS_RNIDA_MF_SUB = 1UL << 26, /* storage subsystem */ | ||
| 592 | ELS_RNIDA_MF_ACC = 1UL << 25, /* storage access dev */ | ||
| 593 | ELS_RNIDA_MF_WDM = 1UL << 24, /* wavelength division mux */ | ||
| 594 | ELS_RNIDA_MF_NAS = 1UL << 23, /* NAS server */ | ||
| 595 | ELS_RNIDA_MF_BR = 1UL << 22, /* bridge */ | ||
| 596 | ELS_RNIDA_MF_VIRT = 1UL << 21, /* virtualization device */ | ||
| 597 | }; | ||
| 598 | |||
| 599 | enum fc_els_rnid_mgmt { | ||
| 600 | ELS_RNIDM_SNMP = 0, | ||
| 601 | ELS_RNIDM_TELNET = 1, | ||
| 602 | ELS_RNIDM_HTTP = 2, | ||
| 603 | ELS_RNIDM_HTTPS = 3, | ||
| 604 | ELS_RNIDM_XML = 4, /* HTTP + XML */ | ||
| 605 | }; | ||
| 606 | |||
| 607 | enum fc_els_rnid_ipver { | ||
| 608 | ELS_RNIDIP_NONE = 0, /* no IP support or node mgmt. */ | ||
| 609 | ELS_RNIDIP_V4 = 1, /* IPv4 */ | ||
| 610 | ELS_RNIDIP_V6 = 2, /* IPv6 */ | ||
| 611 | }; | ||
| 612 | |||
| 613 | /* | ||
| 614 | * ELS RPL - Read Port List. | ||
| 615 | */ | ||
| 616 | struct fc_els_rpl { | ||
| 617 | __u8 rpl_cmd; /* command */ | ||
| 618 | __u8 rpl_resv[5]; /* reserved - must be zero */ | ||
| 619 | __be16 rpl_max_size; /* maximum response size or zero */ | ||
| 620 | __u8 rpl_resv1; /* reserved - must be zero */ | ||
| 621 | __u8 rpl_index[3]; /* starting index */ | ||
| 622 | }; | ||
| 623 | |||
| 624 | /* | ||
| 625 | * Port number block in RPL response. | ||
| 626 | */ | ||
| 627 | struct fc_els_pnb { | ||
| 628 | __be32 pnb_phys_pn; /* physical port number */ | ||
| 629 | __u8 pnb_resv; /* reserved */ | ||
| 630 | __u8 pnb_port_id[3]; /* port ID */ | ||
| 631 | __be64 pnb_wwpn; /* port name */ | ||
| 632 | }; | ||
| 633 | |||
| 634 | /* | ||
| 635 | * RPL LS_ACC response. | ||
| 636 | */ | ||
| 637 | struct fc_els_rpl_resp { | ||
| 638 | __u8 rpl_cmd; /* ELS_LS_ACC */ | ||
| 639 | __u8 rpl_resv1; /* reserved - must be zero */ | ||
| 640 | __be16 rpl_plen; /* payload length */ | ||
| 641 | __u8 rpl_resv2; /* reserved - must be zero */ | ||
| 642 | __u8 rpl_llen[3]; /* list length */ | ||
| 643 | __u8 rpl_resv3; /* reserved - must be zero */ | ||
| 644 | __u8 rpl_index[3]; /* starting index */ | ||
| 645 | struct fc_els_pnb rpl_pnb[1]; /* variable number of PNBs */ | ||
| 646 | }; | ||
| 647 | |||
| 648 | /* | ||
| 649 | * Link Error Status Block. | ||
| 650 | */ | ||
| 651 | struct fc_els_lesb { | ||
| 652 | __be32 lesb_link_fail; /* link failure count */ | ||
| 653 | __be32 lesb_sync_loss; /* loss of synchronization count */ | ||
| 654 | __be32 lesb_sig_loss; /* loss of signal count */ | ||
| 655 | __be32 lesb_prim_err; /* primitive sequence error count */ | ||
| 656 | __be32 lesb_inv_word; /* invalid transmission word count */ | ||
| 657 | __be32 lesb_inv_crc; /* invalid CRC count */ | ||
| 658 | }; | ||
| 659 | |||
| 660 | /* | ||
| 661 | * ELS RPS - Read Port Status Block request. | ||
| 662 | */ | ||
| 663 | struct fc_els_rps { | ||
| 664 | __u8 rps_cmd; /* command */ | ||
| 665 | __u8 rps_resv[2]; /* reserved - must be zero */ | ||
| 666 | __u8 rps_flag; /* flag - see below */ | ||
| 667 | __be64 rps_port_spec; /* port selection */ | ||
| 668 | }; | ||
| 669 | |||
| 670 | enum fc_els_rps_flag { | ||
| 671 | FC_ELS_RPS_DID = 0x00, /* port identified by D_ID of req. */ | ||
| 672 | FC_ELS_RPS_PPN = 0x01, /* port_spec is physical port number */ | ||
| 673 | FC_ELS_RPS_WWPN = 0x02, /* port_spec is port WWN */ | ||
| 674 | }; | ||
| 675 | |||
| 676 | /* | ||
| 677 | * ELS RPS LS_ACC response. | ||
| 678 | */ | ||
| 679 | struct fc_els_rps_resp { | ||
| 680 | __u8 rps_cmd; /* command - LS_ACC */ | ||
| 681 | __u8 rps_resv[2]; /* reserved - must be zero */ | ||
| 682 | __u8 rps_flag; /* flag - see below */ | ||
| 683 | __u8 rps_resv2[2]; /* reserved */ | ||
| 684 | __be16 rps_status; /* port status - see below */ | ||
| 685 | struct fc_els_lesb rps_lesb; /* link error status block */ | ||
| 686 | }; | ||
| 687 | |||
| 688 | enum fc_els_rps_resp_flag { | ||
| 689 | FC_ELS_RPS_LPEV = 0x01, /* L_port extension valid */ | ||
| 690 | }; | ||
| 691 | |||
| 692 | enum fc_els_rps_resp_status { | ||
| 693 | FC_ELS_RPS_PTP = 1 << 5, /* point-to-point connection */ | ||
| 694 | FC_ELS_RPS_LOOP = 1 << 4, /* loop mode */ | ||
| 695 | FC_ELS_RPS_FAB = 1 << 3, /* fabric present */ | ||
| 696 | FC_ELS_RPS_NO_SIG = 1 << 2, /* loss of signal */ | ||
| 697 | FC_ELS_RPS_NO_SYNC = 1 << 1, /* loss of synchronization */ | ||
| 698 | FC_ELS_RPS_RESET = 1 << 0, /* in link reset protocol */ | ||
| 699 | }; | ||
| 700 | |||
| 701 | /* | ||
| 702 | * ELS LIRR - Link Incident Record Registration request. | ||
| 703 | */ | ||
| 704 | struct fc_els_lirr { | ||
| 705 | __u8 lirr_cmd; /* command */ | ||
| 706 | __u8 lirr_resv[3]; /* reserved - must be zero */ | ||
| 707 | __u8 lirr_func; /* registration function */ | ||
| 708 | __u8 lirr_fmt; /* FC-4 type of RLIR requested */ | ||
| 709 | __u8 lirr_resv2[2]; /* reserved - must be zero */ | ||
| 710 | }; | ||
| 711 | |||
| 712 | enum fc_els_lirr_func { | ||
| 713 | ELS_LIRR_SET_COND = 0x01, /* set - conditionally receive */ | ||
| 714 | ELS_LIRR_SET_UNCOND = 0x02, /* set - unconditionally receive */ | ||
| 715 | ELS_LIRR_CLEAR = 0xff /* clear registration */ | ||
| 716 | }; | ||
| 717 | |||
| 718 | /* | ||
| 719 | * ELS SRL - Scan Remote Loop request. | ||
| 720 | */ | ||
| 721 | struct fc_els_srl { | ||
| 722 | __u8 srl_cmd; /* command */ | ||
| 723 | __u8 srl_resv[3]; /* reserved - must be zero */ | ||
| 724 | __u8 srl_flag; /* flag - see below */ | ||
| 725 | __u8 srl_flag_param[3]; /* flag parameter */ | ||
| 726 | }; | ||
| 727 | |||
| 728 | enum fc_els_srl_flag { | ||
| 729 | FC_ELS_SRL_ALL = 0x00, /* scan all FL ports */ | ||
| 730 | FC_ELS_SRL_ONE = 0x01, /* scan specified loop */ | ||
| 731 | FC_ELS_SRL_EN_PER = 0x02, /* enable periodic scanning (param) */ | ||
| 732 | FC_ELS_SRL_DIS_PER = 0x03, /* disable periodic scanning */ | ||
| 733 | }; | ||
| 734 | |||
| 735 | /* | ||
| 736 | * ELS RLS - Read Link Error Status Block request. | ||
| 737 | */ | ||
| 738 | struct fc_els_rls { | ||
| 739 | __u8 rls_cmd; /* command */ | ||
| 740 | __u8 rls_resv[4]; /* reserved - must be zero */ | ||
| 741 | __u8 rls_port_id[3]; /* port ID */ | ||
| 742 | }; | ||
| 743 | |||
| 744 | /* | ||
| 745 | * ELS RLS LS_ACC Response. | ||
| 746 | */ | ||
| 747 | struct fc_els_rls_resp { | ||
| 748 | __u8 rls_cmd; /* ELS_LS_ACC */ | ||
| 749 | __u8 rls_resv[3]; /* reserved - must be zero */ | ||
| 750 | struct fc_els_lesb rls_lesb; /* link error status block */ | ||
| 751 | }; | ||
| 752 | |||
| 753 | /* | ||
| 754 | * ELS RLIR - Registered Link Incident Report. | ||
| 755 | * This is followed by the CLIR and the CLID, described below. | ||
| 756 | */ | ||
| 757 | struct fc_els_rlir { | ||
| 758 | __u8 rlir_cmd; /* command */ | ||
| 759 | __u8 rlir_resv[3]; /* reserved - must be zero */ | ||
| 760 | __u8 rlir_fmt; /* format (FC4-type if type specific) */ | ||
| 761 | __u8 rlir_clr_len; /* common link incident record length */ | ||
| 762 | __u8 rlir_cld_len; /* common link incident desc. length */ | ||
| 763 | __u8 rlir_slr_len; /* spec. link incident record length */ | ||
| 764 | }; | ||
| 765 | |||
| 766 | /* | ||
| 767 | * CLIR - Common Link Incident Record Data. - Sent via RLIR. | ||
| 768 | */ | ||
| 769 | struct fc_els_clir { | ||
| 770 | __be64 clir_wwpn; /* incident port name */ | ||
| 771 | __be64 clir_wwnn; /* incident port node name */ | ||
| 772 | __u8 clir_port_type; /* incident port type */ | ||
| 773 | __u8 clir_port_id[3]; /* incident port ID */ | ||
| 774 | |||
| 775 | __be64 clir_conn_wwpn; /* connected port name */ | ||
| 776 | __be64 clir_conn_wwnn; /* connected node name */ | ||
| 777 | __be64 clir_fab_name; /* fabric name */ | ||
| 778 | __be32 clir_phys_port; /* physical port number */ | ||
| 779 | __be32 clir_trans_id; /* transaction ID */ | ||
| 780 | __u8 clir_resv[3]; /* reserved */ | ||
| 781 | __u8 clir_ts_fmt; /* time stamp format */ | ||
| 782 | __be64 clir_timestamp; /* time stamp */ | ||
| 783 | }; | ||
| 784 | |||
| 785 | /* | ||
| 786 | * CLIR clir_ts_fmt - time stamp format values. | ||
| 787 | */ | ||
| 788 | enum fc_els_clir_ts_fmt { | ||
| 789 | ELS_CLIR_TS_UNKNOWN = 0, /* time stamp field unknown */ | ||
| 790 | ELS_CLIR_TS_SEC_FRAC = 1, /* time in seconds and fractions */ | ||
| 791 | ELS_CLIR_TS_CSU = 2, /* time in clock synch update format */ | ||
| 792 | }; | ||
| 793 | |||
| 794 | /* | ||
| 795 | * Common Link Incident Descriptor - sent via RLIR. | ||
| 796 | */ | ||
| 797 | struct fc_els_clid { | ||
| 798 | __u8 clid_iq; /* incident qualifier flags */ | ||
| 799 | __u8 clid_ic; /* incident code */ | ||
| 800 | __be16 clid_epai; /* domain/area of ISL */ | ||
| 801 | }; | ||
| 802 | |||
| 803 | /* | ||
| 804 | * CLID incident qualifier flags. | ||
| 805 | */ | ||
| 806 | enum fc_els_clid_iq { | ||
| 807 | ELS_CLID_SWITCH = 0x20, /* incident port is a switch node */ | ||
| 808 | ELS_CLID_E_PORT = 0x10, /* incident is an ISL (E) port */ | ||
| 809 | ELS_CLID_SEV_MASK = 0x0c, /* severity 2-bit field mask */ | ||
| 810 | ELS_CLID_SEV_INFO = 0x00, /* report is informational */ | ||
| 811 | ELS_CLID_SEV_INOP = 0x08, /* link not operational */ | ||
| 812 | ELS_CLID_SEV_DEG = 0x04, /* link degraded but operational */ | ||
| 813 | ELS_CLID_LASER = 0x02, /* subassembly is a laser */ | ||
| 814 | ELS_CLID_FRU = 0x01, /* format can identify a FRU */ | ||
| 815 | }; | ||
| 816 | |||
| 817 | /* | ||
| 818 | * CLID incident code. | ||
| 819 | */ | ||
| 820 | enum fc_els_clid_ic { | ||
| 821 | ELS_CLID_IC_IMPL = 1, /* implicit incident */ | ||
| 822 | ELS_CLID_IC_BER = 2, /* bit-error-rate threshold exceeded */ | ||
| 823 | ELS_CLID_IC_LOS = 3, /* loss of synch or signal */ | ||
| 824 | ELS_CLID_IC_NOS = 4, /* non-operational primitive sequence */ | ||
| 825 | ELS_CLID_IC_PST = 5, /* primitive sequence timeout */ | ||
| 826 | ELS_CLID_IC_INVAL = 6, /* invalid primitive sequence */ | ||
| 827 | ELS_CLID_IC_LOOP_TO = 7, /* loop initialization time out */ | ||
| 828 | ELS_CLID_IC_LIP = 8, /* receiving LIP */ | ||
| 829 | }; | ||
| 830 | |||
| 831 | #endif /* _FC_ELS_H_ */ | ||
diff --git a/include/uapi/scsi/fc/fc_fs.h b/include/uapi/scsi/fc/fc_fs.h new file mode 100644 index 000000000000..50f28b143451 --- /dev/null +++ b/include/uapi/scsi/fc/fc_fs.h | |||
| @@ -0,0 +1,348 @@ | |||
| 1 | /* | ||
| 2 | * Copyright(c) 2007 Intel Corporation. All rights reserved. | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify it | ||
| 5 | * under the terms and conditions of the GNU General Public License, | ||
| 6 | * version 2, as published by the Free Software Foundation. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
| 9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 11 | * more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License along with | ||
| 14 | * this program; if not, write to the Free Software Foundation, Inc., | ||
| 15 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
| 16 | * | ||
| 17 | * Maintained at www.Open-FCoE.org | ||
| 18 | */ | ||
| 19 | |||
| 20 | #ifndef _FC_FS_H_ | ||
| 21 | #define _FC_FS_H_ | ||
| 22 | |||
| 23 | #include <linux/types.h> | ||
| 24 | |||
| 25 | /* | ||
| 26 | * Fibre Channel Framing and Signalling definitions. | ||
| 27 | * From T11 FC-FS-2 Rev 0.90 - 9 August 2005. | ||
| 28 | */ | ||
| 29 | |||
| 30 | /* | ||
| 31 | * Frame header | ||
| 32 | */ | ||
| 33 | struct fc_frame_header { | ||
| 34 | __u8 fh_r_ctl; /* routing control */ | ||
| 35 | __u8 fh_d_id[3]; /* Destination ID */ | ||
| 36 | |||
| 37 | __u8 fh_cs_ctl; /* class of service control / pri */ | ||
| 38 | __u8 fh_s_id[3]; /* Source ID */ | ||
| 39 | |||
| 40 | __u8 fh_type; /* see enum fc_fh_type below */ | ||
| 41 | __u8 fh_f_ctl[3]; /* frame control */ | ||
| 42 | |||
| 43 | __u8 fh_seq_id; /* sequence ID */ | ||
| 44 | __u8 fh_df_ctl; /* data field control */ | ||
| 45 | __be16 fh_seq_cnt; /* sequence count */ | ||
| 46 | |||
| 47 | __be16 fh_ox_id; /* originator exchange ID */ | ||
| 48 | __be16 fh_rx_id; /* responder exchange ID */ | ||
| 49 | __be32 fh_parm_offset; /* parameter or relative offset */ | ||
| 50 | }; | ||
| 51 | |||
| 52 | #define FC_FRAME_HEADER_LEN 24 /* expected length of structure */ | ||
| 53 | |||
| 54 | #define FC_MAX_PAYLOAD 2112U /* max payload length in bytes */ | ||
| 55 | #define FC_MIN_MAX_PAYLOAD 256U /* lower limit on max payload */ | ||
| 56 | |||
| 57 | #define FC_MAX_FRAME (FC_MAX_PAYLOAD + FC_FRAME_HEADER_LEN) | ||
| 58 | #define FC_MIN_MAX_FRAME (FC_MIN_MAX_PAYLOAD + FC_FRAME_HEADER_LEN) | ||
| 59 | |||
| 60 | /* | ||
| 61 | * fh_r_ctl - Routing control definitions. | ||
| 62 | */ | ||
| 63 | /* | ||
| 64 | * FC-4 device_data. | ||
| 65 | */ | ||
| 66 | enum fc_rctl { | ||
| 67 | FC_RCTL_DD_UNCAT = 0x00, /* uncategorized information */ | ||
| 68 | FC_RCTL_DD_SOL_DATA = 0x01, /* solicited data */ | ||
| 69 | FC_RCTL_DD_UNSOL_CTL = 0x02, /* unsolicited control */ | ||
| 70 | FC_RCTL_DD_SOL_CTL = 0x03, /* solicited control or reply */ | ||
| 71 | FC_RCTL_DD_UNSOL_DATA = 0x04, /* unsolicited data */ | ||
| 72 | FC_RCTL_DD_DATA_DESC = 0x05, /* data descriptor */ | ||
| 73 | FC_RCTL_DD_UNSOL_CMD = 0x06, /* unsolicited command */ | ||
| 74 | FC_RCTL_DD_CMD_STATUS = 0x07, /* command status */ | ||
| 75 | |||
| 76 | #define FC_RCTL_ILS_REQ FC_RCTL_DD_UNSOL_CTL /* ILS request */ | ||
| 77 | #define FC_RCTL_ILS_REP FC_RCTL_DD_SOL_CTL /* ILS reply */ | ||
| 78 | |||
| 79 | /* | ||
| 80 | * Extended Link_Data | ||
| 81 | */ | ||
| 82 | FC_RCTL_ELS_REQ = 0x22, /* extended link services request */ | ||
| 83 | FC_RCTL_ELS_REP = 0x23, /* extended link services reply */ | ||
| 84 | FC_RCTL_ELS4_REQ = 0x32, /* FC-4 ELS request */ | ||
| 85 | FC_RCTL_ELS4_REP = 0x33, /* FC-4 ELS reply */ | ||
| 86 | /* | ||
| 87 | * Optional Extended Headers | ||
| 88 | */ | ||
| 89 | FC_RCTL_VFTH = 0x50, /* virtual fabric tagging header */ | ||
| 90 | FC_RCTL_IFRH = 0x51, /* inter-fabric routing header */ | ||
| 91 | FC_RCTL_ENCH = 0x52, /* encapsulation header */ | ||
| 92 | /* | ||
| 93 | * Basic Link Services fh_r_ctl values. | ||
| 94 | */ | ||
| 95 | FC_RCTL_BA_NOP = 0x80, /* basic link service NOP */ | ||
| 96 | FC_RCTL_BA_ABTS = 0x81, /* basic link service abort */ | ||
| 97 | FC_RCTL_BA_RMC = 0x82, /* remove connection */ | ||
| 98 | FC_RCTL_BA_ACC = 0x84, /* basic accept */ | ||
| 99 | FC_RCTL_BA_RJT = 0x85, /* basic reject */ | ||
| 100 | FC_RCTL_BA_PRMT = 0x86, /* dedicated connection preempted */ | ||
| 101 | /* | ||
| 102 | * Link Control Information. | ||
| 103 | */ | ||
| 104 | FC_RCTL_ACK_1 = 0xc0, /* acknowledge_1 */ | ||
| 105 | FC_RCTL_ACK_0 = 0xc1, /* acknowledge_0 */ | ||
| 106 | FC_RCTL_P_RJT = 0xc2, /* port reject */ | ||
| 107 | FC_RCTL_F_RJT = 0xc3, /* fabric reject */ | ||
| 108 | FC_RCTL_P_BSY = 0xc4, /* port busy */ | ||
| 109 | FC_RCTL_F_BSY = 0xc5, /* fabric busy to data frame */ | ||
| 110 | FC_RCTL_F_BSYL = 0xc6, /* fabric busy to link control frame */ | ||
| 111 | FC_RCTL_LCR = 0xc7, /* link credit reset */ | ||
| 112 | FC_RCTL_END = 0xc9, /* end */ | ||
| 113 | }; | ||
| 114 | /* incomplete list of definitions */ | ||
| 115 | |||
| 116 | /* | ||
| 117 | * R_CTL names initializer. | ||
| 118 | * Please keep this matching the above definitions. | ||
| 119 | */ | ||
| 120 | #define FC_RCTL_NAMES_INIT { \ | ||
| 121 | [FC_RCTL_DD_UNCAT] = "uncat", \ | ||
| 122 | [FC_RCTL_DD_SOL_DATA] = "sol data", \ | ||
| 123 | [FC_RCTL_DD_UNSOL_CTL] = "unsol ctl", \ | ||
| 124 | [FC_RCTL_DD_SOL_CTL] = "sol ctl/reply", \ | ||
| 125 | [FC_RCTL_DD_UNSOL_DATA] = "unsol data", \ | ||
| 126 | [FC_RCTL_DD_DATA_DESC] = "data desc", \ | ||
| 127 | [FC_RCTL_DD_UNSOL_CMD] = "unsol cmd", \ | ||
| 128 | [FC_RCTL_DD_CMD_STATUS] = "cmd status", \ | ||
| 129 | [FC_RCTL_ELS_REQ] = "ELS req", \ | ||
| 130 | [FC_RCTL_ELS_REP] = "ELS rep", \ | ||
| 131 | [FC_RCTL_ELS4_REQ] = "FC-4 ELS req", \ | ||
| 132 | [FC_RCTL_ELS4_REP] = "FC-4 ELS rep", \ | ||
| 133 | [FC_RCTL_BA_NOP] = "BLS NOP", \ | ||
| 134 | [FC_RCTL_BA_ABTS] = "BLS abort", \ | ||
| 135 | [FC_RCTL_BA_RMC] = "BLS remove connection", \ | ||
| 136 | [FC_RCTL_BA_ACC] = "BLS accept", \ | ||
| 137 | [FC_RCTL_BA_RJT] = "BLS reject", \ | ||
| 138 | [FC_RCTL_BA_PRMT] = "BLS dedicated connection preempted", \ | ||
| 139 | [FC_RCTL_ACK_1] = "LC ACK_1", \ | ||
| 140 | [FC_RCTL_ACK_0] = "LC ACK_0", \ | ||
| 141 | [FC_RCTL_P_RJT] = "LC port reject", \ | ||
| 142 | [FC_RCTL_F_RJT] = "LC fabric reject", \ | ||
| 143 | [FC_RCTL_P_BSY] = "LC port busy", \ | ||
| 144 | [FC_RCTL_F_BSY] = "LC fabric busy to data frame", \ | ||
| 145 | [FC_RCTL_F_BSYL] = "LC fabric busy to link control frame",\ | ||
| 146 | [FC_RCTL_LCR] = "LC link credit reset", \ | ||
| 147 | [FC_RCTL_END] = "LC end", \ | ||
| 148 | } | ||
| 149 | |||
| 150 | /* | ||
| 151 | * Well-known fabric addresses. | ||
| 152 | */ | ||
| 153 | enum fc_well_known_fid { | ||
| 154 | FC_FID_NONE = 0x000000, /* No destination */ | ||
| 155 | FC_FID_BCAST = 0xffffff, /* broadcast */ | ||
| 156 | FC_FID_FLOGI = 0xfffffe, /* fabric login */ | ||
| 157 | FC_FID_FCTRL = 0xfffffd, /* fabric controller */ | ||
| 158 | FC_FID_DIR_SERV = 0xfffffc, /* directory server */ | ||
| 159 | FC_FID_TIME_SERV = 0xfffffb, /* time server */ | ||
| 160 | FC_FID_MGMT_SERV = 0xfffffa, /* management server */ | ||
| 161 | FC_FID_QOS = 0xfffff9, /* QoS Facilitator */ | ||
| 162 | FC_FID_ALIASES = 0xfffff8, /* alias server (FC-PH2) */ | ||
| 163 | FC_FID_SEC_KEY = 0xfffff7, /* Security key dist. server */ | ||
| 164 | FC_FID_CLOCK = 0xfffff6, /* clock synch server */ | ||
| 165 | FC_FID_MCAST_SERV = 0xfffff5, /* multicast server */ | ||
| 166 | }; | ||
| 167 | |||
| 168 | #define FC_FID_WELL_KNOWN_MAX 0xffffff /* highest well-known fabric ID */ | ||
| 169 | #define FC_FID_WELL_KNOWN_BASE 0xfffff5 /* start of well-known fabric ID */ | ||
| 170 | |||
| 171 | /* | ||
| 172 | * Other well-known addresses, outside the above contiguous range. | ||
| 173 | */ | ||
| 174 | #define FC_FID_DOM_MGR 0xfffc00 /* domain manager base */ | ||
| 175 | |||
| 176 | /* | ||
| 177 | * Fabric ID bytes. | ||
| 178 | */ | ||
| 179 | #define FC_FID_DOMAIN 0 | ||
| 180 | #define FC_FID_PORT 1 | ||
| 181 | #define FC_FID_LINK 2 | ||
| 182 | |||
| 183 | /* | ||
| 184 | * fh_type codes | ||
| 185 | */ | ||
| 186 | enum fc_fh_type { | ||
| 187 | FC_TYPE_BLS = 0x00, /* basic link service */ | ||
| 188 | FC_TYPE_ELS = 0x01, /* extended link service */ | ||
| 189 | FC_TYPE_IP = 0x05, /* IP over FC, RFC 4338 */ | ||
| 190 | FC_TYPE_FCP = 0x08, /* SCSI FCP */ | ||
| 191 | FC_TYPE_CT = 0x20, /* Fibre Channel Services (FC-CT) */ | ||
| 192 | FC_TYPE_ILS = 0x22, /* internal link service */ | ||
| 193 | }; | ||
| 194 | |||
| 195 | /* | ||
| 196 | * FC_TYPE names initializer. | ||
| 197 | * Please keep this matching the above definitions. | ||
| 198 | */ | ||
| 199 | #define FC_TYPE_NAMES_INIT { \ | ||
| 200 | [FC_TYPE_BLS] = "BLS", \ | ||
| 201 | [FC_TYPE_ELS] = "ELS", \ | ||
| 202 | [FC_TYPE_IP] = "IP", \ | ||
| 203 | [FC_TYPE_FCP] = "FCP", \ | ||
| 204 | [FC_TYPE_CT] = "CT", \ | ||
| 205 | [FC_TYPE_ILS] = "ILS", \ | ||
| 206 | } | ||
| 207 | |||
| 208 | /* | ||
| 209 | * Exchange IDs. | ||
| 210 | */ | ||
| 211 | #define FC_XID_UNKNOWN 0xffff /* unknown exchange ID */ | ||
| 212 | #define FC_XID_MIN 0x0 /* supported min exchange ID */ | ||
| 213 | #define FC_XID_MAX 0xfffe /* supported max exchange ID */ | ||
| 214 | |||
| 215 | /* | ||
| 216 | * fh_f_ctl - Frame control flags. | ||
| 217 | */ | ||
| 218 | #define FC_FC_EX_CTX (1 << 23) /* sent by responder to exchange */ | ||
| 219 | #define FC_FC_SEQ_CTX (1 << 22) /* sent by responder to sequence */ | ||
| 220 | #define FC_FC_FIRST_SEQ (1 << 21) /* first sequence of this exchange */ | ||
| 221 | #define FC_FC_LAST_SEQ (1 << 20) /* last sequence of this exchange */ | ||
| 222 | #define FC_FC_END_SEQ (1 << 19) /* last frame of sequence */ | ||
| 223 | #define FC_FC_END_CONN (1 << 18) /* end of class 1 connection pending */ | ||
| 224 | #define FC_FC_RES_B17 (1 << 17) /* reserved */ | ||
| 225 | #define FC_FC_SEQ_INIT (1 << 16) /* transfer of sequence initiative */ | ||
| 226 | #define FC_FC_X_ID_REASS (1 << 15) /* exchange ID has been changed */ | ||
| 227 | #define FC_FC_X_ID_INVAL (1 << 14) /* exchange ID invalidated */ | ||
| 228 | |||
| 229 | #define FC_FC_ACK_1 (1 << 12) /* 13:12 = 1: ACK_1 expected */ | ||
| 230 | #define FC_FC_ACK_N (2 << 12) /* 13:12 = 2: ACK_N expected */ | ||
| 231 | #define FC_FC_ACK_0 (3 << 12) /* 13:12 = 3: ACK_0 expected */ | ||
| 232 | |||
| 233 | #define FC_FC_RES_B11 (1 << 11) /* reserved */ | ||
| 234 | #define FC_FC_RES_B10 (1 << 10) /* reserved */ | ||
| 235 | #define FC_FC_RETX_SEQ (1 << 9) /* retransmitted sequence */ | ||
| 236 | #define FC_FC_UNI_TX (1 << 8) /* unidirectional transmit (class 1) */ | ||
| 237 | #define FC_FC_CONT_SEQ(i) ((i) << 6) | ||
| 238 | #define FC_FC_ABT_SEQ(i) ((i) << 4) | ||
| 239 | #define FC_FC_REL_OFF (1 << 3) /* parameter is relative offset */ | ||
| 240 | #define FC_FC_RES2 (1 << 2) /* reserved */ | ||
| 241 | #define FC_FC_FILL(i) ((i) & 3) /* 1:0: bytes of trailing fill */ | ||
| 242 | |||
| 243 | /* | ||
| 244 | * BA_ACC payload. | ||
| 245 | */ | ||
| 246 | struct fc_ba_acc { | ||
| 247 | __u8 ba_seq_id_val; /* SEQ_ID validity */ | ||
| 248 | #define FC_BA_SEQ_ID_VAL 0x80 | ||
| 249 | __u8 ba_seq_id; /* SEQ_ID of seq last deliverable */ | ||
| 250 | __u8 ba_resvd[2]; /* reserved */ | ||
| 251 | __be16 ba_ox_id; /* OX_ID for aborted seq or exch */ | ||
| 252 | __be16 ba_rx_id; /* RX_ID for aborted seq or exch */ | ||
| 253 | __be16 ba_low_seq_cnt; /* low SEQ_CNT of aborted seq */ | ||
| 254 | __be16 ba_high_seq_cnt; /* high SEQ_CNT of aborted seq */ | ||
| 255 | }; | ||
| 256 | |||
| 257 | /* | ||
| 258 | * BA_RJT: Basic Reject payload. | ||
| 259 | */ | ||
| 260 | struct fc_ba_rjt { | ||
| 261 | __u8 br_resvd; /* reserved */ | ||
| 262 | __u8 br_reason; /* reason code */ | ||
| 263 | __u8 br_explan; /* reason explanation */ | ||
| 264 | __u8 br_vendor; /* vendor unique code */ | ||
| 265 | }; | ||
| 266 | |||
| 267 | /* | ||
| 268 | * BA_RJT reason codes. | ||
| 269 | * From FS-2. | ||
| 270 | */ | ||
| 271 | enum fc_ba_rjt_reason { | ||
| 272 | FC_BA_RJT_NONE = 0, /* in software this means no reject */ | ||
| 273 | FC_BA_RJT_INVL_CMD = 0x01, /* invalid command code */ | ||
| 274 | FC_BA_RJT_LOG_ERR = 0x03, /* logical error */ | ||
| 275 | FC_BA_RJT_LOG_BUSY = 0x05, /* logical busy */ | ||
| 276 | FC_BA_RJT_PROTO_ERR = 0x07, /* protocol error */ | ||
| 277 | FC_BA_RJT_UNABLE = 0x09, /* unable to perform request */ | ||
| 278 | FC_BA_RJT_VENDOR = 0xff, /* vendor-specific (see br_vendor) */ | ||
| 279 | }; | ||
| 280 | |||
| 281 | /* | ||
| 282 | * BA_RJT reason code explanations. | ||
| 283 | */ | ||
| 284 | enum fc_ba_rjt_explan { | ||
| 285 | FC_BA_RJT_EXP_NONE = 0x00, /* no additional expanation */ | ||
| 286 | FC_BA_RJT_INV_XID = 0x03, /* invalid OX_ID-RX_ID combination */ | ||
| 287 | FC_BA_RJT_ABT = 0x05, /* sequence aborted, no seq info */ | ||
| 288 | }; | ||
| 289 | |||
| 290 | /* | ||
| 291 | * P_RJT or F_RJT: Port Reject or Fabric Reject parameter field. | ||
| 292 | */ | ||
| 293 | struct fc_pf_rjt { | ||
| 294 | __u8 rj_action; /* reserved */ | ||
| 295 | __u8 rj_reason; /* reason code */ | ||
| 296 | __u8 rj_resvd; /* reserved */ | ||
| 297 | __u8 rj_vendor; /* vendor unique code */ | ||
| 298 | }; | ||
| 299 | |||
| 300 | /* | ||
| 301 | * P_RJT and F_RJT reject reason codes. | ||
| 302 | */ | ||
| 303 | enum fc_pf_rjt_reason { | ||
| 304 | FC_RJT_NONE = 0, /* non-reject (reserved by standard) */ | ||
| 305 | FC_RJT_INVL_DID = 0x01, /* invalid destination ID */ | ||
| 306 | FC_RJT_INVL_SID = 0x02, /* invalid source ID */ | ||
| 307 | FC_RJT_P_UNAV_T = 0x03, /* port unavailable, temporary */ | ||
| 308 | FC_RJT_P_UNAV = 0x04, /* port unavailable, permanent */ | ||
| 309 | FC_RJT_CLS_UNSUP = 0x05, /* class not supported */ | ||
| 310 | FC_RJT_DEL_USAGE = 0x06, /* delimiter usage error */ | ||
| 311 | FC_RJT_TYPE_UNSUP = 0x07, /* type not supported */ | ||
| 312 | FC_RJT_LINK_CTL = 0x08, /* invalid link control */ | ||
| 313 | FC_RJT_R_CTL = 0x09, /* invalid R_CTL field */ | ||
| 314 | FC_RJT_F_CTL = 0x0a, /* invalid F_CTL field */ | ||
| 315 | FC_RJT_OX_ID = 0x0b, /* invalid originator exchange ID */ | ||
| 316 | FC_RJT_RX_ID = 0x0c, /* invalid responder exchange ID */ | ||
| 317 | FC_RJT_SEQ_ID = 0x0d, /* invalid sequence ID */ | ||
| 318 | FC_RJT_DF_CTL = 0x0e, /* invalid DF_CTL field */ | ||
| 319 | FC_RJT_SEQ_CNT = 0x0f, /* invalid SEQ_CNT field */ | ||
| 320 | FC_RJT_PARAM = 0x10, /* invalid parameter field */ | ||
| 321 | FC_RJT_EXCH_ERR = 0x11, /* exchange error */ | ||
| 322 | FC_RJT_PROTO = 0x12, /* protocol error */ | ||
| 323 | FC_RJT_LEN = 0x13, /* incorrect length */ | ||
| 324 | FC_RJT_UNEXP_ACK = 0x14, /* unexpected ACK */ | ||
| 325 | FC_RJT_FAB_CLASS = 0x15, /* class unsupported by fabric entity */ | ||
| 326 | FC_RJT_LOGI_REQ = 0x16, /* login required */ | ||
| 327 | FC_RJT_SEQ_XS = 0x17, /* excessive sequences attempted */ | ||
| 328 | FC_RJT_EXCH_EST = 0x18, /* unable to establish exchange */ | ||
| 329 | FC_RJT_FAB_UNAV = 0x1a, /* fabric unavailable */ | ||
| 330 | FC_RJT_VC_ID = 0x1b, /* invalid VC_ID (class 4) */ | ||
| 331 | FC_RJT_CS_CTL = 0x1c, /* invalid CS_CTL field */ | ||
| 332 | FC_RJT_INSUF_RES = 0x1d, /* insuff. resources for VC (Class 4) */ | ||
| 333 | FC_RJT_INVL_CLS = 0x1f, /* invalid class of service */ | ||
| 334 | FC_RJT_PREEMT_RJT = 0x20, /* preemption request rejected */ | ||
| 335 | FC_RJT_PREEMT_DIS = 0x21, /* preemption not enabled */ | ||
| 336 | FC_RJT_MCAST_ERR = 0x22, /* multicast error */ | ||
| 337 | FC_RJT_MCAST_ET = 0x23, /* multicast error terminate */ | ||
| 338 | FC_RJT_PRLI_REQ = 0x24, /* process login required */ | ||
| 339 | FC_RJT_INVL_ATT = 0x25, /* invalid attachment */ | ||
| 340 | FC_RJT_VENDOR = 0xff, /* vendor specific reject */ | ||
| 341 | }; | ||
| 342 | |||
| 343 | /* default timeout values */ | ||
| 344 | |||
| 345 | #define FC_DEF_E_D_TOV 2000UL | ||
| 346 | #define FC_DEF_R_A_TOV 10000UL | ||
| 347 | |||
| 348 | #endif /* _FC_FS_H_ */ | ||
diff --git a/include/uapi/scsi/fc/fc_gs.h b/include/uapi/scsi/fc/fc_gs.h new file mode 100644 index 000000000000..a37346d47eb1 --- /dev/null +++ b/include/uapi/scsi/fc/fc_gs.h | |||
| @@ -0,0 +1,96 @@ | |||
| 1 | /* | ||
| 2 | * Copyright(c) 2007 Intel Corporation. All rights reserved. | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify it | ||
| 5 | * under the terms and conditions of the GNU General Public License, | ||
| 6 | * version 2, as published by the Free Software Foundation. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
| 9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 11 | * more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License along with | ||
| 14 | * this program; if not, write to the Free Software Foundation, Inc., | ||
| 15 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
| 16 | * | ||
| 17 | * Maintained at www.Open-FCoE.org | ||
| 18 | */ | ||
| 19 | |||
| 20 | #ifndef _FC_GS_H_ | ||
| 21 | #define _FC_GS_H_ | ||
| 22 | |||
| 23 | #include <linux/types.h> | ||
| 24 | |||
| 25 | /* | ||
| 26 | * Fibre Channel Services - Common Transport. | ||
| 27 | * From T11.org FC-GS-2 Rev 5.3 November 1998. | ||
| 28 | */ | ||
| 29 | |||
| 30 | struct fc_ct_hdr { | ||
| 31 | __u8 ct_rev; /* revision */ | ||
| 32 | __u8 ct_in_id[3]; /* N_Port ID of original requestor */ | ||
| 33 | __u8 ct_fs_type; /* type of fibre channel service */ | ||
| 34 | __u8 ct_fs_subtype; /* subtype */ | ||
| 35 | __u8 ct_options; | ||
| 36 | __u8 _ct_resvd1; | ||
| 37 | __be16 ct_cmd; /* command / response code */ | ||
| 38 | __be16 ct_mr_size; /* maximum / residual size */ | ||
| 39 | __u8 _ct_resvd2; | ||
| 40 | __u8 ct_reason; /* reject reason */ | ||
| 41 | __u8 ct_explan; /* reason code explanation */ | ||
| 42 | __u8 ct_vendor; /* vendor unique data */ | ||
| 43 | }; | ||
| 44 | |||
| 45 | #define FC_CT_HDR_LEN 16 /* expected sizeof (struct fc_ct_hdr) */ | ||
| 46 | |||
| 47 | enum fc_ct_rev { | ||
| 48 | FC_CT_REV = 1 /* common transport revision */ | ||
| 49 | }; | ||
| 50 | |||
| 51 | /* | ||
| 52 | * ct_fs_type values. | ||
| 53 | */ | ||
| 54 | enum fc_ct_fs_type { | ||
| 55 | FC_FST_ALIAS = 0xf8, /* alias service */ | ||
| 56 | FC_FST_MGMT = 0xfa, /* management service */ | ||
| 57 | FC_FST_TIME = 0xfb, /* time service */ | ||
| 58 | FC_FST_DIR = 0xfc, /* directory service */ | ||
| 59 | }; | ||
| 60 | |||
| 61 | /* | ||
| 62 | * ct_cmd: Command / response codes | ||
| 63 | */ | ||
| 64 | enum fc_ct_cmd { | ||
| 65 | FC_FS_RJT = 0x8001, /* reject */ | ||
| 66 | FC_FS_ACC = 0x8002, /* accept */ | ||
| 67 | }; | ||
| 68 | |||
| 69 | /* | ||
| 70 | * FS_RJT reason codes. | ||
| 71 | */ | ||
| 72 | enum fc_ct_reason { | ||
| 73 | FC_FS_RJT_CMD = 0x01, /* invalid command code */ | ||
| 74 | FC_FS_RJT_VER = 0x02, /* invalid version level */ | ||
| 75 | FC_FS_RJT_LOG = 0x03, /* logical error */ | ||
| 76 | FC_FS_RJT_IUSIZ = 0x04, /* invalid IU size */ | ||
| 77 | FC_FS_RJT_BSY = 0x05, /* logical busy */ | ||
| 78 | FC_FS_RJT_PROTO = 0x07, /* protocol error */ | ||
| 79 | FC_FS_RJT_UNABL = 0x09, /* unable to perform command request */ | ||
| 80 | FC_FS_RJT_UNSUP = 0x0b, /* command not supported */ | ||
| 81 | }; | ||
| 82 | |||
| 83 | /* | ||
| 84 | * FS_RJT reason code explanations. | ||
| 85 | */ | ||
| 86 | enum fc_ct_explan { | ||
| 87 | FC_FS_EXP_NONE = 0x00, /* no additional explanation */ | ||
| 88 | FC_FS_EXP_PID = 0x01, /* port ID not registered */ | ||
| 89 | FC_FS_EXP_PNAM = 0x02, /* port name not registered */ | ||
| 90 | FC_FS_EXP_NNAM = 0x03, /* node name not registered */ | ||
| 91 | FC_FS_EXP_COS = 0x04, /* class of service not registered */ | ||
| 92 | FC_FS_EXP_FTNR = 0x07, /* FC-4 types not registered */ | ||
| 93 | /* definitions not complete */ | ||
| 94 | }; | ||
| 95 | |||
| 96 | #endif /* _FC_GS_H_ */ | ||
diff --git a/include/uapi/scsi/fc/fc_ns.h b/include/uapi/scsi/fc/fc_ns.h new file mode 100644 index 000000000000..f7751d53f1d3 --- /dev/null +++ b/include/uapi/scsi/fc/fc_ns.h | |||
| @@ -0,0 +1,208 @@ | |||
| 1 | /* | ||
| 2 | * Copyright(c) 2007 Intel Corporation. All rights reserved. | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify it | ||
| 5 | * under the terms and conditions of the GNU General Public License, | ||
| 6 | * version 2, as published by the Free Software Foundation. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
| 9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 11 | * more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License along with | ||
| 14 | * this program; if not, write to the Free Software Foundation, Inc., | ||
| 15 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
| 16 | * | ||
| 17 | * Maintained at www.Open-FCoE.org | ||
| 18 | */ | ||
| 19 | |||
| 20 | #ifndef _FC_NS_H_ | ||
| 21 | #define _FC_NS_H_ | ||
| 22 | |||
| 23 | #include <linux/types.h> | ||
| 24 | |||
| 25 | /* | ||
| 26 | * Fibre Channel Services - Name Service (dNS) | ||
| 27 | * From T11.org FC-GS-2 Rev 5.3 November 1998. | ||
| 28 | */ | ||
| 29 | |||
| 30 | /* | ||
| 31 | * Common-transport sub-type for Name Server. | ||
| 32 | */ | ||
| 33 | #define FC_NS_SUBTYPE 2 /* fs_ct_hdr.ct_fs_subtype */ | ||
| 34 | |||
| 35 | /* | ||
| 36 | * Name server Requests. | ||
| 37 | * Note: this is an incomplete list, some unused requests are omitted. | ||
| 38 | */ | ||
| 39 | enum fc_ns_req { | ||
| 40 | FC_NS_GA_NXT = 0x0100, /* get all next */ | ||
| 41 | FC_NS_GI_A = 0x0101, /* get identifiers - scope */ | ||
| 42 | FC_NS_GPN_ID = 0x0112, /* get port name by ID */ | ||
| 43 | FC_NS_GNN_ID = 0x0113, /* get node name by ID */ | ||
| 44 | FC_NS_GSPN_ID = 0x0118, /* get symbolic port name */ | ||
| 45 | FC_NS_GID_PN = 0x0121, /* get ID for port name */ | ||
| 46 | FC_NS_GID_NN = 0x0131, /* get IDs for node name */ | ||
| 47 | FC_NS_GID_FT = 0x0171, /* get IDs by FC4 type */ | ||
| 48 | FC_NS_GPN_FT = 0x0172, /* get port names by FC4 type */ | ||
| 49 | FC_NS_GID_PT = 0x01a1, /* get IDs by port type */ | ||
| 50 | FC_NS_RPN_ID = 0x0212, /* reg port name for ID */ | ||
| 51 | FC_NS_RNN_ID = 0x0213, /* reg node name for ID */ | ||
| 52 | FC_NS_RFT_ID = 0x0217, /* reg FC4 type for ID */ | ||
| 53 | FC_NS_RSPN_ID = 0x0218, /* reg symbolic port name */ | ||
| 54 | FC_NS_RFF_ID = 0x021f, /* reg FC4 Features for ID */ | ||
| 55 | FC_NS_RSNN_NN = 0x0239, /* reg symbolic node name */ | ||
| 56 | }; | ||
| 57 | |||
| 58 | /* | ||
| 59 | * Port type values. | ||
| 60 | */ | ||
| 61 | enum fc_ns_pt { | ||
| 62 | FC_NS_UNID_PORT = 0x00, /* unidentified */ | ||
| 63 | FC_NS_N_PORT = 0x01, /* N port */ | ||
| 64 | FC_NS_NL_PORT = 0x02, /* NL port */ | ||
| 65 | FC_NS_FNL_PORT = 0x03, /* F/NL port */ | ||
| 66 | FC_NS_NX_PORT = 0x7f, /* Nx port */ | ||
| 67 | FC_NS_F_PORT = 0x81, /* F port */ | ||
| 68 | FC_NS_FL_PORT = 0x82, /* FL port */ | ||
| 69 | FC_NS_E_PORT = 0x84, /* E port */ | ||
| 70 | FC_NS_B_PORT = 0x85, /* B port */ | ||
| 71 | }; | ||
| 72 | |||
| 73 | /* | ||
| 74 | * Port type object. | ||
| 75 | */ | ||
| 76 | struct fc_ns_pt_obj { | ||
| 77 | __u8 pt_type; | ||
| 78 | }; | ||
| 79 | |||
| 80 | /* | ||
| 81 | * Port ID object | ||
| 82 | */ | ||
| 83 | struct fc_ns_fid { | ||
| 84 | __u8 fp_flags; /* flags for responses only */ | ||
| 85 | __u8 fp_fid[3]; | ||
| 86 | }; | ||
| 87 | |||
| 88 | /* | ||
| 89 | * fp_flags in port ID object, for responses only. | ||
| 90 | */ | ||
| 91 | #define FC_NS_FID_LAST 0x80 /* last object */ | ||
| 92 | |||
| 93 | /* | ||
| 94 | * FC4-types object. | ||
| 95 | */ | ||
| 96 | #define FC_NS_TYPES 256 /* number of possible FC-4 types */ | ||
| 97 | #define FC_NS_BPW 32 /* bits per word in bitmap */ | ||
| 98 | |||
| 99 | struct fc_ns_fts { | ||
| 100 | __be32 ff_type_map[FC_NS_TYPES / FC_NS_BPW]; /* bitmap of FC-4 types */ | ||
| 101 | }; | ||
| 102 | |||
| 103 | /* | ||
| 104 | * FC4-features object. | ||
| 105 | */ | ||
| 106 | struct fc_ns_ff { | ||
| 107 | __be32 fd_feat[FC_NS_TYPES * 4 / FC_NS_BPW]; /* 4-bits per FC-type */ | ||
| 108 | }; | ||
| 109 | |||
| 110 | /* | ||
| 111 | * GID_PT request. | ||
| 112 | */ | ||
| 113 | struct fc_ns_gid_pt { | ||
| 114 | __u8 fn_pt_type; | ||
| 115 | __u8 fn_domain_id_scope; | ||
| 116 | __u8 fn_area_id_scope; | ||
| 117 | __u8 fn_resvd; | ||
| 118 | }; | ||
| 119 | |||
| 120 | /* | ||
| 121 | * GID_FT or GPN_FT request. | ||
| 122 | */ | ||
| 123 | struct fc_ns_gid_ft { | ||
| 124 | __u8 fn_resvd; | ||
| 125 | __u8 fn_domain_id_scope; | ||
| 126 | __u8 fn_area_id_scope; | ||
| 127 | __u8 fn_fc4_type; | ||
| 128 | }; | ||
| 129 | |||
| 130 | /* | ||
| 131 | * GPN_FT response. | ||
| 132 | */ | ||
| 133 | struct fc_gpn_ft_resp { | ||
| 134 | __u8 fp_flags; /* see fp_flags definitions above */ | ||
| 135 | __u8 fp_fid[3]; /* port ID */ | ||
| 136 | __be32 fp_resvd; | ||
| 137 | __be64 fp_wwpn; /* port name */ | ||
| 138 | }; | ||
| 139 | |||
| 140 | /* | ||
| 141 | * GID_PN request | ||
| 142 | */ | ||
| 143 | struct fc_ns_gid_pn { | ||
| 144 | __be64 fn_wwpn; /* port name */ | ||
| 145 | }; | ||
| 146 | |||
| 147 | /* | ||
| 148 | * GID_PN response or GSPN_ID request | ||
| 149 | */ | ||
| 150 | struct fc_gid_pn_resp { | ||
| 151 | __u8 fp_resvd; | ||
| 152 | __u8 fp_fid[3]; /* port ID */ | ||
| 153 | }; | ||
| 154 | |||
| 155 | /* | ||
| 156 | * GSPN_ID response | ||
| 157 | */ | ||
| 158 | struct fc_gspn_resp { | ||
| 159 | __u8 fp_name_len; | ||
| 160 | char fp_name[]; | ||
| 161 | }; | ||
| 162 | |||
| 163 | /* | ||
| 164 | * RFT_ID request - register FC-4 types for ID. | ||
| 165 | */ | ||
| 166 | struct fc_ns_rft_id { | ||
| 167 | struct fc_ns_fid fr_fid; /* port ID object */ | ||
| 168 | struct fc_ns_fts fr_fts; /* FC-4 types object */ | ||
| 169 | }; | ||
| 170 | |||
| 171 | /* | ||
| 172 | * RPN_ID request - register port name for ID. | ||
| 173 | * RNN_ID request - register node name for ID. | ||
| 174 | */ | ||
| 175 | struct fc_ns_rn_id { | ||
| 176 | struct fc_ns_fid fr_fid; /* port ID object */ | ||
| 177 | __be64 fr_wwn; /* node name or port name */ | ||
| 178 | } __attribute__((__packed__)); | ||
| 179 | |||
| 180 | /* | ||
| 181 | * RSNN_NN request - register symbolic node name | ||
| 182 | */ | ||
| 183 | struct fc_ns_rsnn { | ||
| 184 | __be64 fr_wwn; /* node name */ | ||
| 185 | __u8 fr_name_len; | ||
| 186 | char fr_name[]; | ||
| 187 | } __attribute__((__packed__)); | ||
| 188 | |||
| 189 | /* | ||
| 190 | * RSPN_ID request - register symbolic port name | ||
| 191 | */ | ||
| 192 | struct fc_ns_rspn { | ||
| 193 | struct fc_ns_fid fr_fid; /* port ID object */ | ||
| 194 | __u8 fr_name_len; | ||
| 195 | char fr_name[]; | ||
| 196 | } __attribute__((__packed__)); | ||
| 197 | |||
| 198 | /* | ||
| 199 | * RFF_ID request - register FC-4 Features for ID. | ||
| 200 | */ | ||
| 201 | struct fc_ns_rff_id { | ||
| 202 | struct fc_ns_fid fr_fid; /* port ID object */ | ||
| 203 | __u8 fr_resvd[2]; | ||
| 204 | __u8 fr_feat; /* FC-4 Feature bits */ | ||
| 205 | __u8 fr_type; /* FC-4 type */ | ||
| 206 | } __attribute__((__packed__)); | ||
| 207 | |||
| 208 | #endif /* _FC_NS_H_ */ | ||
diff --git a/include/uapi/scsi/scsi_bsg_fc.h b/include/uapi/scsi/scsi_bsg_fc.h new file mode 100644 index 000000000000..3031b900b087 --- /dev/null +++ b/include/uapi/scsi/scsi_bsg_fc.h | |||
| @@ -0,0 +1,320 @@ | |||
| 1 | /* | ||
| 2 | * FC Transport BSG Interface | ||
| 3 | * | ||
| 4 | * Copyright (C) 2008 James Smart, Emulex Corporation | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 19 | * | ||
| 20 | */ | ||
| 21 | |||
| 22 | #ifndef SCSI_BSG_FC_H | ||
| 23 | #define SCSI_BSG_FC_H | ||
| 24 | |||
| 25 | /* | ||
| 26 | * This file intended to be included by both kernel and user space | ||
| 27 | */ | ||
| 28 | |||
| 29 | /* | ||
| 30 | * FC Transport SGIO v4 BSG Message Support | ||
| 31 | */ | ||
| 32 | |||
| 33 | /* Default BSG request timeout (in seconds) */ | ||
| 34 | #define FC_DEFAULT_BSG_TIMEOUT (10 * HZ) | ||
| 35 | |||
| 36 | |||
| 37 | /* | ||
| 38 | * Request Message Codes supported by the FC Transport | ||
| 39 | */ | ||
| 40 | |||
| 41 | /* define the class masks for the message codes */ | ||
| 42 | #define FC_BSG_CLS_MASK 0xF0000000 /* find object class */ | ||
| 43 | #define FC_BSG_HST_MASK 0x80000000 /* fc host class */ | ||
| 44 | #define FC_BSG_RPT_MASK 0x40000000 /* fc rport class */ | ||
| 45 | |||
| 46 | /* fc_host Message Codes */ | ||
| 47 | #define FC_BSG_HST_ADD_RPORT (FC_BSG_HST_MASK | 0x00000001) | ||
| 48 | #define FC_BSG_HST_DEL_RPORT (FC_BSG_HST_MASK | 0x00000002) | ||
| 49 | #define FC_BSG_HST_ELS_NOLOGIN (FC_BSG_HST_MASK | 0x00000003) | ||
| 50 | #define FC_BSG_HST_CT (FC_BSG_HST_MASK | 0x00000004) | ||
| 51 | #define FC_BSG_HST_VENDOR (FC_BSG_HST_MASK | 0x000000FF) | ||
| 52 | |||
| 53 | /* fc_rport Message Codes */ | ||
| 54 | #define FC_BSG_RPT_ELS (FC_BSG_RPT_MASK | 0x00000001) | ||
| 55 | #define FC_BSG_RPT_CT (FC_BSG_RPT_MASK | 0x00000002) | ||
| 56 | |||
| 57 | |||
| 58 | |||
| 59 | /* | ||
| 60 | * FC Address Identifiers in Message Structures : | ||
| 61 | * | ||
| 62 | * Whenever a command payload contains a FC Address Identifier | ||
| 63 | * (aka port_id), the value is effectively in big-endian | ||
| 64 | * order, thus the array elements are decoded as follows: | ||
| 65 | * element [0] is bits 23:16 of the FC Address Identifier | ||
| 66 | * element [1] is bits 15:8 of the FC Address Identifier | ||
| 67 | * element [2] is bits 7:0 of the FC Address Identifier | ||
| 68 | */ | ||
| 69 | |||
| 70 | |||
| 71 | /* | ||
| 72 | * FC Host Messages | ||
| 73 | */ | ||
| 74 | |||
| 75 | /* FC_BSG_HST_ADDR_PORT : */ | ||
| 76 | |||
| 77 | /* Request: | ||
| 78 | * This message requests the FC host to login to the remote port | ||
| 79 | * at the specified N_Port_Id. The remote port is to be enumerated | ||
| 80 | * with the transport upon completion of the login. | ||
| 81 | */ | ||
| 82 | struct fc_bsg_host_add_rport { | ||
| 83 | uint8_t reserved; | ||
| 84 | |||
| 85 | /* FC Address Identier of the remote port to login to */ | ||
| 86 | uint8_t port_id[3]; | ||
| 87 | }; | ||
| 88 | |||
| 89 | /* Response: | ||
| 90 | * There is no additional response data - fc_bsg_reply->result is sufficient | ||
| 91 | */ | ||
| 92 | |||
| 93 | |||
| 94 | /* FC_BSG_HST_DEL_RPORT : */ | ||
| 95 | |||
| 96 | /* Request: | ||
| 97 | * This message requests the FC host to remove an enumerated | ||
| 98 | * remote port and to terminate the login to it. | ||
| 99 | * | ||
| 100 | * Note: The driver is free to reject this request if it desires to | ||
| 101 | * remain logged in with the remote port. | ||
| 102 | */ | ||
| 103 | struct fc_bsg_host_del_rport { | ||
| 104 | uint8_t reserved; | ||
| 105 | |||
| 106 | /* FC Address Identier of the remote port to logout of */ | ||
| 107 | uint8_t port_id[3]; | ||
| 108 | }; | ||
| 109 | |||
| 110 | /* Response: | ||
| 111 | * There is no additional response data - fc_bsg_reply->result is sufficient | ||
| 112 | */ | ||
| 113 | |||
| 114 | |||
| 115 | /* FC_BSG_HST_ELS_NOLOGIN : */ | ||
| 116 | |||
| 117 | /* Request: | ||
| 118 | * This message requests the FC_Host to send an ELS to a specific | ||
| 119 | * N_Port_ID. The host does not need to log into the remote port, | ||
| 120 | * nor does it need to enumerate the rport for further traffic | ||
| 121 | * (although, the FC host is free to do so if it desires). | ||
| 122 | */ | ||
| 123 | struct fc_bsg_host_els { | ||
| 124 | /* | ||
| 125 | * ELS Command Code being sent (must be the same as byte 0 | ||
| 126 | * of the payload) | ||
| 127 | */ | ||
| 128 | uint8_t command_code; | ||
| 129 | |||
| 130 | /* FC Address Identier of the remote port to send the ELS to */ | ||
| 131 | uint8_t port_id[3]; | ||
| 132 | }; | ||
| 133 | |||
| 134 | /* Response: | ||
| 135 | */ | ||
| 136 | /* fc_bsg_ctels_reply->status values */ | ||
| 137 | #define FC_CTELS_STATUS_OK 0x00000000 | ||
| 138 | #define FC_CTELS_STATUS_REJECT 0x00000001 | ||
| 139 | #define FC_CTELS_STATUS_P_RJT 0x00000002 | ||
| 140 | #define FC_CTELS_STATUS_F_RJT 0x00000003 | ||
| 141 | #define FC_CTELS_STATUS_P_BSY 0x00000004 | ||
| 142 | #define FC_CTELS_STATUS_F_BSY 0x00000006 | ||
| 143 | struct fc_bsg_ctels_reply { | ||
| 144 | /* | ||
| 145 | * Note: An ELS LS_RJT may be reported in 2 ways: | ||
| 146 | * a) A status of FC_CTELS_STATUS_OK is returned. The caller | ||
| 147 | * is to look into the ELS receive payload to determine | ||
| 148 | * LS_ACC or LS_RJT (by contents of word 0). The reject | ||
| 149 | * data will be in word 1. | ||
| 150 | * b) A status of FC_CTELS_STATUS_REJECT is returned, The | ||
| 151 | * rjt_data field will contain valid data. | ||
| 152 | * | ||
| 153 | * Note: ELS LS_ACC is determined by an FC_CTELS_STATUS_OK, and | ||
| 154 | * the receive payload word 0 indicates LS_ACC | ||
| 155 | * (e.g. value is 0x02xxxxxx). | ||
| 156 | * | ||
| 157 | * Note: Similarly, a CT Reject may be reported in 2 ways: | ||
| 158 | * a) A status of FC_CTELS_STATUS_OK is returned. The caller | ||
| 159 | * is to look into the CT receive payload to determine | ||
| 160 | * Accept or Reject (by contents of word 2). The reject | ||
| 161 | * data will be in word 3. | ||
| 162 | * b) A status of FC_CTELS_STATUS_REJECT is returned, The | ||
| 163 | * rjt_data field will contain valid data. | ||
| 164 | * | ||
| 165 | * Note: x_RJT/BSY status will indicae that the rjt_data field | ||
| 166 | * is valid and contains the reason/explanation values. | ||
| 167 | */ | ||
| 168 | uint32_t status; /* See FC_CTELS_STATUS_xxx */ | ||
| 169 | |||
| 170 | /* valid if status is not FC_CTELS_STATUS_OK */ | ||
| 171 | struct { | ||
| 172 | uint8_t action; /* fragment_id for CT REJECT */ | ||
| 173 | uint8_t reason_code; | ||
| 174 | uint8_t reason_explanation; | ||
| 175 | uint8_t vendor_unique; | ||
| 176 | } rjt_data; | ||
| 177 | }; | ||
| 178 | |||
| 179 | |||
| 180 | /* FC_BSG_HST_CT : */ | ||
| 181 | |||
| 182 | /* Request: | ||
| 183 | * This message requests that a CT Request be performed with the | ||
| 184 | * indicated N_Port_ID. The driver is responsible for logging in with | ||
| 185 | * the fabric and/or N_Port_ID, etc as per FC rules. This request does | ||
| 186 | * not mandate that the driver must enumerate the destination in the | ||
| 187 | * transport. The driver is allowed to decide whether to enumerate it, | ||
| 188 | * and whether to tear it down after the request. | ||
| 189 | */ | ||
| 190 | struct fc_bsg_host_ct { | ||
| 191 | uint8_t reserved; | ||
| 192 | |||
| 193 | /* FC Address Identier of the remote port to send the ELS to */ | ||
| 194 | uint8_t port_id[3]; | ||
| 195 | |||
| 196 | /* | ||
| 197 | * We need words 0-2 of the generic preamble for the LLD's | ||
| 198 | */ | ||
| 199 | uint32_t preamble_word0; /* revision & IN_ID */ | ||
| 200 | uint32_t preamble_word1; /* GS_Type, GS_SubType, Options, Rsvd */ | ||
| 201 | uint32_t preamble_word2; /* Cmd Code, Max Size */ | ||
| 202 | |||
| 203 | }; | ||
| 204 | /* Response: | ||
| 205 | * | ||
| 206 | * The reply structure is an fc_bsg_ctels_reply structure | ||
| 207 | */ | ||
| 208 | |||
| 209 | |||
| 210 | /* FC_BSG_HST_VENDOR : */ | ||
| 211 | |||
| 212 | /* Request: | ||
| 213 | * Note: When specifying vendor_id, be sure to read the Vendor Type and ID | ||
| 214 | * formatting requirements specified in scsi_netlink.h | ||
| 215 | */ | ||
| 216 | struct fc_bsg_host_vendor { | ||
| 217 | /* | ||
| 218 | * Identifies the vendor that the message is formatted for. This | ||
| 219 | * should be the recipient of the message. | ||
| 220 | */ | ||
| 221 | uint64_t vendor_id; | ||
| 222 | |||
| 223 | /* start of vendor command area */ | ||
| 224 | uint32_t vendor_cmd[0]; | ||
| 225 | }; | ||
| 226 | |||
| 227 | /* Response: | ||
| 228 | */ | ||
| 229 | struct fc_bsg_host_vendor_reply { | ||
| 230 | /* start of vendor response area */ | ||
| 231 | uint32_t vendor_rsp[0]; | ||
| 232 | }; | ||
| 233 | |||
| 234 | |||
| 235 | |||
| 236 | /* | ||
| 237 | * FC Remote Port Messages | ||
| 238 | */ | ||
| 239 | |||
| 240 | /* FC_BSG_RPT_ELS : */ | ||
| 241 | |||
| 242 | /* Request: | ||
| 243 | * This message requests that an ELS be performed with the rport. | ||
| 244 | */ | ||
| 245 | struct fc_bsg_rport_els { | ||
| 246 | /* | ||
| 247 | * ELS Command Code being sent (must be the same as | ||
| 248 | * byte 0 of the payload) | ||
| 249 | */ | ||
| 250 | uint8_t els_code; | ||
| 251 | }; | ||
| 252 | |||
| 253 | /* Response: | ||
| 254 | * | ||
| 255 | * The reply structure is an fc_bsg_ctels_reply structure | ||
| 256 | */ | ||
| 257 | |||
| 258 | |||
| 259 | /* FC_BSG_RPT_CT : */ | ||
| 260 | |||
| 261 | /* Request: | ||
| 262 | * This message requests that a CT Request be performed with the rport. | ||
| 263 | */ | ||
| 264 | struct fc_bsg_rport_ct { | ||
| 265 | /* | ||
| 266 | * We need words 0-2 of the generic preamble for the LLD's | ||
| 267 | */ | ||
| 268 | uint32_t preamble_word0; /* revision & IN_ID */ | ||
| 269 | uint32_t preamble_word1; /* GS_Type, GS_SubType, Options, Rsvd */ | ||
| 270 | uint32_t preamble_word2; /* Cmd Code, Max Size */ | ||
| 271 | }; | ||
| 272 | /* Response: | ||
| 273 | * | ||
| 274 | * The reply structure is an fc_bsg_ctels_reply structure | ||
| 275 | */ | ||
| 276 | |||
| 277 | |||
| 278 | |||
| 279 | |||
| 280 | /* request (CDB) structure of the sg_io_v4 */ | ||
| 281 | struct fc_bsg_request { | ||
| 282 | uint32_t msgcode; | ||
| 283 | union { | ||
| 284 | struct fc_bsg_host_add_rport h_addrport; | ||
| 285 | struct fc_bsg_host_del_rport h_delrport; | ||
| 286 | struct fc_bsg_host_els h_els; | ||
| 287 | struct fc_bsg_host_ct h_ct; | ||
| 288 | struct fc_bsg_host_vendor h_vendor; | ||
| 289 | |||
| 290 | struct fc_bsg_rport_els r_els; | ||
| 291 | struct fc_bsg_rport_ct r_ct; | ||
| 292 | } rqst_data; | ||
| 293 | } __attribute__((packed)); | ||
| 294 | |||
| 295 | |||
| 296 | /* response (request sense data) structure of the sg_io_v4 */ | ||
| 297 | struct fc_bsg_reply { | ||
| 298 | /* | ||
| 299 | * The completion result. Result exists in two forms: | ||
| 300 | * if negative, it is an -Exxx system errno value. There will | ||
| 301 | * be no further reply information supplied. | ||
| 302 | * else, it's the 4-byte scsi error result, with driver, host, | ||
| 303 | * msg and status fields. The per-msgcode reply structure | ||
| 304 | * will contain valid data. | ||
| 305 | */ | ||
| 306 | uint32_t result; | ||
| 307 | |||
| 308 | /* If there was reply_payload, how much was recevied ? */ | ||
| 309 | uint32_t reply_payload_rcv_len; | ||
| 310 | |||
| 311 | union { | ||
| 312 | struct fc_bsg_host_vendor_reply vendor_reply; | ||
| 313 | |||
| 314 | struct fc_bsg_ctels_reply ctels_reply; | ||
| 315 | } reply_data; | ||
| 316 | }; | ||
| 317 | |||
| 318 | |||
| 319 | #endif /* SCSI_BSG_FC_H */ | ||
| 320 | |||
diff --git a/include/uapi/scsi/scsi_netlink.h b/include/uapi/scsi/scsi_netlink.h new file mode 100644 index 000000000000..62b4edab15d3 --- /dev/null +++ b/include/uapi/scsi/scsi_netlink.h | |||
| @@ -0,0 +1,123 @@ | |||
| 1 | /* | ||
| 2 | * SCSI Transport Netlink Interface | ||
| 3 | * Used for the posting of outbound SCSI transport events | ||
| 4 | * | ||
| 5 | * Copyright (C) 2006 James Smart, Emulex Corporation | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License as published by | ||
| 9 | * the Free Software Foundation; either version 2 of the License, or | ||
| 10 | * (at your option) any later version. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, | ||
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | * GNU General Public License for more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License | ||
| 18 | * along with this program; if not, write to the Free Software | ||
| 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 20 | * | ||
| 21 | */ | ||
| 22 | #ifndef SCSI_NETLINK_H | ||
| 23 | #define SCSI_NETLINK_H | ||
| 24 | |||
| 25 | #include <linux/netlink.h> | ||
| 26 | #include <linux/types.h> | ||
| 27 | |||
| 28 | /* | ||
| 29 | * This file intended to be included by both kernel and user space | ||
| 30 | */ | ||
| 31 | |||
| 32 | /* Single Netlink Message type to send all SCSI Transport messages */ | ||
| 33 | #define SCSI_TRANSPORT_MSG NLMSG_MIN_TYPE + 1 | ||
| 34 | |||
| 35 | /* SCSI Transport Broadcast Groups */ | ||
| 36 | /* leaving groups 0 and 1 unassigned */ | ||
| 37 | #define SCSI_NL_GRP_FC_EVENTS (1<<2) /* Group 2 */ | ||
| 38 | #define SCSI_NL_GRP_CNT 3 | ||
| 39 | |||
| 40 | |||
| 41 | /* SCSI_TRANSPORT_MSG event message header */ | ||
| 42 | struct scsi_nl_hdr { | ||
| 43 | uint8_t version; | ||
| 44 | uint8_t transport; | ||
| 45 | uint16_t magic; | ||
| 46 | uint16_t msgtype; | ||
| 47 | uint16_t msglen; | ||
| 48 | } __attribute__((aligned(sizeof(uint64_t)))); | ||
| 49 | |||
| 50 | /* scsi_nl_hdr->version value */ | ||
| 51 | #define SCSI_NL_VERSION 1 | ||
| 52 | |||
| 53 | /* scsi_nl_hdr->magic value */ | ||
| 54 | #define SCSI_NL_MAGIC 0xA1B2 | ||
| 55 | |||
| 56 | /* scsi_nl_hdr->transport value */ | ||
| 57 | #define SCSI_NL_TRANSPORT 0 | ||
| 58 | #define SCSI_NL_TRANSPORT_FC 1 | ||
| 59 | #define SCSI_NL_MAX_TRANSPORTS 2 | ||
| 60 | |||
| 61 | /* Transport-based scsi_nl_hdr->msgtype values are defined in each transport */ | ||
| 62 | |||
| 63 | /* | ||
| 64 | * GENERIC SCSI scsi_nl_hdr->msgtype Values | ||
| 65 | */ | ||
| 66 | /* kernel -> user */ | ||
| 67 | #define SCSI_NL_SHOST_VENDOR 0x0001 | ||
| 68 | /* user -> kernel */ | ||
| 69 | /* SCSI_NL_SHOST_VENDOR msgtype is kernel->user and user->kernel */ | ||
| 70 | |||
| 71 | |||
| 72 | /* | ||
| 73 | * Message Structures : | ||
| 74 | */ | ||
| 75 | |||
| 76 | /* macro to round up message lengths to 8byte boundary */ | ||
| 77 | #define SCSI_NL_MSGALIGN(len) (((len) + 7) & ~7) | ||
| 78 | |||
| 79 | |||
| 80 | /* | ||
| 81 | * SCSI HOST Vendor Unique messages : | ||
| 82 | * SCSI_NL_SHOST_VENDOR | ||
| 83 | * | ||
| 84 | * Note: The Vendor Unique message payload will begin directly after | ||
| 85 | * this structure, with the length of the payload per vmsg_datalen. | ||
| 86 | * | ||
| 87 | * Note: When specifying vendor_id, be sure to read the Vendor Type and ID | ||
| 88 | * formatting requirements specified below | ||
| 89 | */ | ||
| 90 | struct scsi_nl_host_vendor_msg { | ||
| 91 | struct scsi_nl_hdr snlh; /* must be 1st element ! */ | ||
| 92 | uint64_t vendor_id; | ||
| 93 | uint16_t host_no; | ||
| 94 | uint16_t vmsg_datalen; | ||
| 95 | } __attribute__((aligned(sizeof(uint64_t)))); | ||
| 96 | |||
| 97 | |||
| 98 | /* | ||
| 99 | * Vendor ID: | ||
| 100 | * If transports post vendor-unique events, they must pass a well-known | ||
| 101 | * 32-bit vendor identifier. This identifier consists of 8 bits indicating | ||
| 102 | * the "type" of identifier contained, and 24 bits of id data. | ||
| 103 | * | ||
| 104 | * Identifiers for each type: | ||
| 105 | * PCI : ID data is the 16 bit PCI Registered Vendor ID | ||
| 106 | */ | ||
| 107 | #define SCSI_NL_VID_TYPE_SHIFT 56 | ||
| 108 | #define SCSI_NL_VID_TYPE_MASK ((__u64)0xFF << SCSI_NL_VID_TYPE_SHIFT) | ||
| 109 | #define SCSI_NL_VID_TYPE_PCI ((__u64)0x01 << SCSI_NL_VID_TYPE_SHIFT) | ||
| 110 | #define SCSI_NL_VID_ID_MASK (~ SCSI_NL_VID_TYPE_MASK) | ||
| 111 | |||
| 112 | |||
| 113 | #define INIT_SCSI_NL_HDR(hdr, t, mtype, mlen) \ | ||
| 114 | { \ | ||
| 115 | (hdr)->version = SCSI_NL_VERSION; \ | ||
| 116 | (hdr)->transport = t; \ | ||
| 117 | (hdr)->magic = SCSI_NL_MAGIC; \ | ||
| 118 | (hdr)->msgtype = mtype; \ | ||
| 119 | (hdr)->msglen = mlen; \ | ||
| 120 | } | ||
| 121 | |||
| 122 | #endif /* SCSI_NETLINK_H */ | ||
| 123 | |||
diff --git a/include/uapi/scsi/scsi_netlink_fc.h b/include/uapi/scsi/scsi_netlink_fc.h new file mode 100644 index 000000000000..cbf76e479761 --- /dev/null +++ b/include/uapi/scsi/scsi_netlink_fc.h | |||
| @@ -0,0 +1,71 @@ | |||
| 1 | /* | ||
| 2 | * FC Transport Netlink Interface | ||
| 3 | * | ||
| 4 | * Copyright (C) 2006 James Smart, Emulex Corporation | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 19 | * | ||
| 20 | */ | ||
| 21 | #ifndef SCSI_NETLINK_FC_H | ||
| 22 | #define SCSI_NETLINK_FC_H | ||
| 23 | |||
| 24 | #include <scsi/scsi_netlink.h> | ||
| 25 | |||
| 26 | /* | ||
| 27 | * This file intended to be included by both kernel and user space | ||
| 28 | */ | ||
| 29 | |||
| 30 | /* | ||
| 31 | * FC Transport Message Types | ||
| 32 | */ | ||
| 33 | /* kernel -> user */ | ||
| 34 | #define FC_NL_ASYNC_EVENT 0x0100 | ||
| 35 | /* user -> kernel */ | ||
| 36 | /* none */ | ||
| 37 | |||
| 38 | |||
| 39 | /* | ||
| 40 | * Message Structures : | ||
| 41 | */ | ||
| 42 | |||
| 43 | /* macro to round up message lengths to 8byte boundary */ | ||
| 44 | #define FC_NL_MSGALIGN(len) (((len) + 7) & ~7) | ||
| 45 | |||
| 46 | |||
| 47 | /* | ||
| 48 | * FC Transport Broadcast Event Message : | ||
| 49 | * FC_NL_ASYNC_EVENT | ||
| 50 | * | ||
| 51 | * Note: if Vendor Unique message, &event_data will be start of | ||
| 52 | * vendor unique payload, and the length of the payload is | ||
| 53 | * per event_datalen | ||
| 54 | * | ||
| 55 | * Note: When specifying vendor_id, be sure to read the Vendor Type and ID | ||
| 56 | * formatting requirements specified in scsi_netlink.h | ||
| 57 | */ | ||
| 58 | struct fc_nl_event { | ||
| 59 | struct scsi_nl_hdr snlh; /* must be 1st element ! */ | ||
| 60 | uint64_t seconds; | ||
| 61 | uint64_t vendor_id; | ||
| 62 | uint16_t host_no; | ||
| 63 | uint16_t event_datalen; | ||
| 64 | uint32_t event_num; | ||
| 65 | uint32_t event_code; | ||
| 66 | uint32_t event_data; | ||
| 67 | } __attribute__((aligned(sizeof(uint64_t)))); | ||
| 68 | |||
| 69 | |||
| 70 | #endif /* SCSI_NETLINK_FC_H */ | ||
| 71 | |||
diff --git a/include/uapi/sound/compress_offload.h b/include/uapi/sound/compress_offload.h index 05341a43fedf..d630163b9a2e 100644 --- a/include/uapi/sound/compress_offload.h +++ b/include/uapi/sound/compress_offload.h | |||
| @@ -30,7 +30,7 @@ | |||
| 30 | #include <sound/compress_params.h> | 30 | #include <sound/compress_params.h> |
| 31 | 31 | ||
| 32 | 32 | ||
| 33 | #define SNDRV_COMPRESS_VERSION SNDRV_PROTOCOL_VERSION(0, 1, 0) | 33 | #define SNDRV_COMPRESS_VERSION SNDRV_PROTOCOL_VERSION(0, 1, 1) |
| 34 | /** | 34 | /** |
| 35 | * struct snd_compressed_buffer: compressed buffer | 35 | * struct snd_compressed_buffer: compressed buffer |
| 36 | * @fragment_size: size of buffer fragment in bytes | 36 | * @fragment_size: size of buffer fragment in bytes |
| @@ -122,6 +122,27 @@ struct snd_compr_codec_caps { | |||
| 122 | }; | 122 | }; |
| 123 | 123 | ||
| 124 | /** | 124 | /** |
| 125 | * @SNDRV_COMPRESS_ENCODER_PADDING: no of samples appended by the encoder at the | ||
| 126 | * end of the track | ||
| 127 | * @SNDRV_COMPRESS_ENCODER_DELAY: no of samples inserted by the encoder at the | ||
| 128 | * beginning of the track | ||
| 129 | */ | ||
| 130 | enum { | ||
| 131 | SNDRV_COMPRESS_ENCODER_PADDING = 1, | ||
| 132 | SNDRV_COMPRESS_ENCODER_DELAY = 2, | ||
| 133 | }; | ||
| 134 | |||
| 135 | /** | ||
| 136 | * struct snd_compr_metadata: compressed stream metadata | ||
| 137 | * @key: key id | ||
| 138 | * @value: key value | ||
| 139 | */ | ||
| 140 | struct snd_compr_metadata { | ||
| 141 | __u32 key; | ||
| 142 | __u32 value[8]; | ||
| 143 | }; | ||
| 144 | |||
| 145 | /** | ||
| 125 | * compress path ioctl definitions | 146 | * compress path ioctl definitions |
| 126 | * SNDRV_COMPRESS_GET_CAPS: Query capability of DSP | 147 | * SNDRV_COMPRESS_GET_CAPS: Query capability of DSP |
| 127 | * SNDRV_COMPRESS_GET_CODEC_CAPS: Query capability of a codec | 148 | * SNDRV_COMPRESS_GET_CODEC_CAPS: Query capability of a codec |
| @@ -145,6 +166,10 @@ struct snd_compr_codec_caps { | |||
| 145 | struct snd_compr_codec_caps) | 166 | struct snd_compr_codec_caps) |
| 146 | #define SNDRV_COMPRESS_SET_PARAMS _IOW('C', 0x12, struct snd_compr_params) | 167 | #define SNDRV_COMPRESS_SET_PARAMS _IOW('C', 0x12, struct snd_compr_params) |
| 147 | #define SNDRV_COMPRESS_GET_PARAMS _IOR('C', 0x13, struct snd_codec) | 168 | #define SNDRV_COMPRESS_GET_PARAMS _IOR('C', 0x13, struct snd_codec) |
| 169 | #define SNDRV_COMPRESS_SET_METADATA _IOW('C', 0x14,\ | ||
| 170 | struct snd_compr_metadata) | ||
| 171 | #define SNDRV_COMPRESS_GET_METADATA _IOWR('C', 0x15,\ | ||
| 172 | struct snd_compr_metadata) | ||
| 148 | #define SNDRV_COMPRESS_TSTAMP _IOR('C', 0x20, struct snd_compr_tstamp) | 173 | #define SNDRV_COMPRESS_TSTAMP _IOR('C', 0x20, struct snd_compr_tstamp) |
| 149 | #define SNDRV_COMPRESS_AVAIL _IOR('C', 0x21, struct snd_compr_avail) | 174 | #define SNDRV_COMPRESS_AVAIL _IOR('C', 0x21, struct snd_compr_avail) |
| 150 | #define SNDRV_COMPRESS_PAUSE _IO('C', 0x30) | 175 | #define SNDRV_COMPRESS_PAUSE _IO('C', 0x30) |
| @@ -152,10 +177,14 @@ struct snd_compr_codec_caps { | |||
| 152 | #define SNDRV_COMPRESS_START _IO('C', 0x32) | 177 | #define SNDRV_COMPRESS_START _IO('C', 0x32) |
| 153 | #define SNDRV_COMPRESS_STOP _IO('C', 0x33) | 178 | #define SNDRV_COMPRESS_STOP _IO('C', 0x33) |
| 154 | #define SNDRV_COMPRESS_DRAIN _IO('C', 0x34) | 179 | #define SNDRV_COMPRESS_DRAIN _IO('C', 0x34) |
| 180 | #define SNDRV_COMPRESS_NEXT_TRACK _IO('C', 0x35) | ||
| 181 | #define SNDRV_COMPRESS_PARTIAL_DRAIN _IO('C', 0x36) | ||
| 155 | /* | 182 | /* |
| 156 | * TODO | 183 | * TODO |
| 157 | * 1. add mmap support | 184 | * 1. add mmap support |
| 158 | * | 185 | * |
| 159 | */ | 186 | */ |
| 160 | #define SND_COMPR_TRIGGER_DRAIN 7 /*FIXME move this to pcm.h */ | 187 | #define SND_COMPR_TRIGGER_DRAIN 7 /*FIXME move this to pcm.h */ |
| 188 | #define SND_COMPR_TRIGGER_NEXT_TRACK 8 | ||
| 189 | #define SND_COMPR_TRIGGER_PARTIAL_DRAIN 9 | ||
| 161 | #endif | 190 | #endif |
diff --git a/include/uapi/video/Kbuild b/include/uapi/video/Kbuild index aafaa5aa54d4..ac7203bb32cc 100644 --- a/include/uapi/video/Kbuild +++ b/include/uapi/video/Kbuild | |||
| @@ -1 +1,4 @@ | |||
| 1 | # UAPI Header export list | 1 | # UAPI Header export list |
| 2 | header-y += edid.h | ||
| 3 | header-y += sisfb.h | ||
| 4 | header-y += uvesafb.h | ||
diff --git a/include/uapi/video/edid.h b/include/uapi/video/edid.h new file mode 100644 index 000000000000..8c0f032014c9 --- /dev/null +++ b/include/uapi/video/edid.h | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | #ifndef _UAPI__linux_video_edid_h__ | ||
| 2 | #define _UAPI__linux_video_edid_h__ | ||
| 3 | |||
| 4 | struct edid_info { | ||
| 5 | unsigned char dummy[128]; | ||
| 6 | }; | ||
| 7 | |||
| 8 | |||
| 9 | #endif /* _UAPI__linux_video_edid_h__ */ | ||
diff --git a/include/uapi/video/sisfb.h b/include/uapi/video/sisfb.h new file mode 100644 index 000000000000..9250b22b10f8 --- /dev/null +++ b/include/uapi/video/sisfb.h | |||
| @@ -0,0 +1,209 @@ | |||
| 1 | /* | ||
| 2 | * sisfb.h - definitions for the SiS framebuffer driver | ||
| 3 | * | ||
| 4 | * Copyright (C) 2001-2005 by Thomas Winischhofer, Vienna, Austria. | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the named License, | ||
| 9 | * or any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA | ||
| 19 | */ | ||
| 20 | |||
| 21 | #ifndef _UAPI_LINUX_SISFB_H_ | ||
| 22 | #define _UAPI_LINUX_SISFB_H_ | ||
| 23 | |||
| 24 | #include <linux/types.h> | ||
| 25 | #include <asm/ioctl.h> | ||
| 26 | |||
| 27 | /**********************************************/ | ||
| 28 | /* PUBLIC */ | ||
| 29 | /**********************************************/ | ||
| 30 | |||
| 31 | /* vbflags, public (others in sis.h) */ | ||
| 32 | #define CRT2_DEFAULT 0x00000001 | ||
| 33 | #define CRT2_LCD 0x00000002 | ||
| 34 | #define CRT2_TV 0x00000004 | ||
| 35 | #define CRT2_VGA 0x00000008 | ||
| 36 | #define TV_NTSC 0x00000010 | ||
| 37 | #define TV_PAL 0x00000020 | ||
| 38 | #define TV_HIVISION 0x00000040 | ||
| 39 | #define TV_YPBPR 0x00000080 | ||
| 40 | #define TV_AVIDEO 0x00000100 | ||
| 41 | #define TV_SVIDEO 0x00000200 | ||
| 42 | #define TV_SCART 0x00000400 | ||
| 43 | #define TV_PALM 0x00001000 | ||
| 44 | #define TV_PALN 0x00002000 | ||
| 45 | #define TV_NTSCJ 0x00001000 | ||
| 46 | #define TV_CHSCART 0x00008000 | ||
| 47 | #define TV_CHYPBPR525I 0x00010000 | ||
| 48 | #define CRT1_VGA 0x00000000 | ||
| 49 | #define CRT1_LCDA 0x00020000 | ||
| 50 | #define VGA2_CONNECTED 0x00040000 | ||
| 51 | #define VB_DISPTYPE_CRT1 0x00080000 /* CRT1 connected and used */ | ||
| 52 | #define VB_SINGLE_MODE 0x20000000 /* CRT1 or CRT2; determined by DISPTYPE_CRTx */ | ||
| 53 | #define VB_MIRROR_MODE 0x40000000 /* CRT1 + CRT2 identical (mirror mode) */ | ||
| 54 | #define VB_DUALVIEW_MODE 0x80000000 /* CRT1 + CRT2 independent (dual head mode) */ | ||
| 55 | |||
| 56 | /* Aliases: */ | ||
| 57 | #define CRT2_ENABLE (CRT2_LCD | CRT2_TV | CRT2_VGA) | ||
| 58 | #define TV_STANDARD (TV_NTSC | TV_PAL | TV_PALM | TV_PALN | TV_NTSCJ) | ||
| 59 | #define TV_INTERFACE (TV_AVIDEO|TV_SVIDEO|TV_SCART|TV_HIVISION|TV_YPBPR|TV_CHSCART|TV_CHYPBPR525I) | ||
| 60 | |||
| 61 | /* Only if TV_YPBPR is set: */ | ||
| 62 | #define TV_YPBPR525I TV_NTSC | ||
| 63 | #define TV_YPBPR525P TV_PAL | ||
| 64 | #define TV_YPBPR750P TV_PALM | ||
| 65 | #define TV_YPBPR1080I TV_PALN | ||
| 66 | #define TV_YPBPRALL (TV_YPBPR525I | TV_YPBPR525P | TV_YPBPR750P | TV_YPBPR1080I) | ||
| 67 | |||
| 68 | #define VB_DISPTYPE_DISP2 CRT2_ENABLE | ||
| 69 | #define VB_DISPTYPE_CRT2 CRT2_ENABLE | ||
| 70 | #define VB_DISPTYPE_DISP1 VB_DISPTYPE_CRT1 | ||
| 71 | #define VB_DISPMODE_SINGLE VB_SINGLE_MODE | ||
| 72 | #define VB_DISPMODE_MIRROR VB_MIRROR_MODE | ||
| 73 | #define VB_DISPMODE_DUAL VB_DUALVIEW_MODE | ||
| 74 | #define VB_DISPLAY_MODE (SINGLE_MODE | MIRROR_MODE | DUALVIEW_MODE) | ||
| 75 | |||
| 76 | /* Structure argument for SISFB_GET_INFO ioctl */ | ||
| 77 | struct sisfb_info { | ||
| 78 | __u32 sisfb_id; /* for identifying sisfb */ | ||
| 79 | #ifndef SISFB_ID | ||
| 80 | #define SISFB_ID 0x53495346 /* Identify myself with 'SISF' */ | ||
| 81 | #endif | ||
| 82 | __u32 chip_id; /* PCI-ID of detected chip */ | ||
| 83 | __u32 memory; /* total video memory in KB */ | ||
| 84 | __u32 heapstart; /* heap start offset in KB */ | ||
| 85 | __u8 fbvidmode; /* current sisfb mode */ | ||
| 86 | |||
| 87 | __u8 sisfb_version; | ||
| 88 | __u8 sisfb_revision; | ||
| 89 | __u8 sisfb_patchlevel; | ||
| 90 | |||
| 91 | __u8 sisfb_caps; /* sisfb capabilities */ | ||
| 92 | |||
| 93 | __u32 sisfb_tqlen; /* turbo queue length (in KB) */ | ||
| 94 | |||
| 95 | __u32 sisfb_pcibus; /* The card's PCI ID */ | ||
| 96 | __u32 sisfb_pcislot; | ||
| 97 | __u32 sisfb_pcifunc; | ||
| 98 | |||
| 99 | __u8 sisfb_lcdpdc; /* PanelDelayCompensation */ | ||
| 100 | |||
| 101 | __u8 sisfb_lcda; /* Detected status of LCDA for low res/text modes */ | ||
| 102 | |||
| 103 | __u32 sisfb_vbflags; | ||
| 104 | __u32 sisfb_currentvbflags; | ||
| 105 | |||
| 106 | __u32 sisfb_scalelcd; | ||
| 107 | __u32 sisfb_specialtiming; | ||
| 108 | |||
| 109 | __u8 sisfb_haveemi; | ||
| 110 | __u8 sisfb_emi30,sisfb_emi31,sisfb_emi32,sisfb_emi33; | ||
| 111 | __u8 sisfb_haveemilcd; | ||
| 112 | |||
| 113 | __u8 sisfb_lcdpdca; /* PanelDelayCompensation for LCD-via-CRT1 */ | ||
| 114 | |||
| 115 | __u16 sisfb_tvxpos, sisfb_tvypos; /* Warning: Values + 32 ! */ | ||
| 116 | |||
| 117 | __u32 sisfb_heapsize; /* heap size (in KB) */ | ||
| 118 | __u32 sisfb_videooffset; /* Offset of viewport in video memory (in bytes) */ | ||
| 119 | |||
| 120 | __u32 sisfb_curfstn; /* currently running FSTN/DSTN mode */ | ||
| 121 | __u32 sisfb_curdstn; | ||
| 122 | |||
| 123 | __u16 sisfb_pci_vendor; /* PCI vendor (SiS or XGI) */ | ||
| 124 | |||
| 125 | __u32 sisfb_vbflags2; /* ivideo->vbflags2 */ | ||
| 126 | |||
| 127 | __u8 sisfb_can_post; /* sisfb can POST this card */ | ||
| 128 | __u8 sisfb_card_posted; /* card is POSTED */ | ||
| 129 | __u8 sisfb_was_boot_device; /* This card was the boot video device (ie is primary) */ | ||
| 130 | |||
| 131 | __u8 reserved[183]; /* for future use */ | ||
| 132 | }; | ||
| 133 | |||
| 134 | #define SISFB_CMD_GETVBFLAGS 0x55AA0001 /* no arg; result[1] = vbflags */ | ||
| 135 | #define SISFB_CMD_SWITCHCRT1 0x55AA0010 /* arg[0]: 99 = query, 0 = off, 1 = on */ | ||
| 136 | /* more to come */ | ||
| 137 | |||
| 138 | #define SISFB_CMD_ERR_OK 0x80000000 /* command succeeded */ | ||
| 139 | #define SISFB_CMD_ERR_LOCKED 0x80000001 /* sisfb is locked */ | ||
| 140 | #define SISFB_CMD_ERR_EARLY 0x80000002 /* request before sisfb took over gfx system */ | ||
| 141 | #define SISFB_CMD_ERR_NOVB 0x80000003 /* No video bridge */ | ||
| 142 | #define SISFB_CMD_ERR_NOCRT2 0x80000004 /* can't change CRT1 status, CRT2 disabled */ | ||
| 143 | /* more to come */ | ||
| 144 | #define SISFB_CMD_ERR_UNKNOWN 0x8000ffff /* Unknown command */ | ||
| 145 | #define SISFB_CMD_ERR_OTHER 0x80010000 /* Other error */ | ||
| 146 | |||
| 147 | /* Argument for SISFB_CMD ioctl */ | ||
| 148 | struct sisfb_cmd { | ||
| 149 | __u32 sisfb_cmd; | ||
| 150 | __u32 sisfb_arg[16]; | ||
| 151 | __u32 sisfb_result[4]; | ||
| 152 | }; | ||
| 153 | |||
| 154 | /* Additional IOCTLs for communication sisfb <> X driver */ | ||
| 155 | /* If changing this, vgatypes.h must also be changed (for X driver) */ | ||
| 156 | |||
| 157 | /* ioctl for identifying and giving some info (esp. memory heap start) */ | ||
| 158 | #define SISFB_GET_INFO_SIZE _IOR(0xF3,0x00,__u32) | ||
| 159 | #define SISFB_GET_INFO _IOR(0xF3,0x01,struct sisfb_info) | ||
| 160 | |||
| 161 | /* ioctrl to get current vertical retrace status */ | ||
| 162 | #define SISFB_GET_VBRSTATUS _IOR(0xF3,0x02,__u32) | ||
| 163 | |||
| 164 | /* ioctl to enable/disable panning auto-maximize (like nomax parameter) */ | ||
| 165 | #define SISFB_GET_AUTOMAXIMIZE _IOR(0xF3,0x03,__u32) | ||
| 166 | #define SISFB_SET_AUTOMAXIMIZE _IOW(0xF3,0x03,__u32) | ||
| 167 | |||
| 168 | /* ioctls to relocate TV output (x=D[31:16], y=D[15:0], + 32)*/ | ||
| 169 | #define SISFB_GET_TVPOSOFFSET _IOR(0xF3,0x04,__u32) | ||
| 170 | #define SISFB_SET_TVPOSOFFSET _IOW(0xF3,0x04,__u32) | ||
| 171 | |||
| 172 | /* ioctl for internal sisfb commands (sisfbctrl) */ | ||
| 173 | #define SISFB_COMMAND _IOWR(0xF3,0x05,struct sisfb_cmd) | ||
| 174 | |||
| 175 | /* ioctl for locking sisfb (no register access during lock) */ | ||
| 176 | /* As of now, only used to avoid register access during | ||
| 177 | * the ioctls listed above. | ||
| 178 | */ | ||
| 179 | #define SISFB_SET_LOCK _IOW(0xF3,0x06,__u32) | ||
| 180 | |||
| 181 | /* ioctls 0xF3 up to 0x3F reserved for sisfb */ | ||
| 182 | |||
| 183 | /****************************************************************/ | ||
| 184 | /* The following are deprecated and should not be used anymore: */ | ||
| 185 | /****************************************************************/ | ||
| 186 | /* ioctl for identifying and giving some info (esp. memory heap start) */ | ||
| 187 | #define SISFB_GET_INFO_OLD _IOR('n',0xF8,__u32) | ||
| 188 | /* ioctrl to get current vertical retrace status */ | ||
| 189 | #define SISFB_GET_VBRSTATUS_OLD _IOR('n',0xF9,__u32) | ||
| 190 | /* ioctl to enable/disable panning auto-maximize (like nomax parameter) */ | ||
| 191 | #define SISFB_GET_AUTOMAXIMIZE_OLD _IOR('n',0xFA,__u32) | ||
| 192 | #define SISFB_SET_AUTOMAXIMIZE_OLD _IOW('n',0xFA,__u32) | ||
| 193 | /****************************************************************/ | ||
| 194 | /* End of deprecated ioctl numbers */ | ||
| 195 | /****************************************************************/ | ||
| 196 | |||
| 197 | /* For fb memory manager (FBIO_ALLOC, FBIO_FREE) */ | ||
| 198 | struct sis_memreq { | ||
| 199 | __u32 offset; | ||
| 200 | __u32 size; | ||
| 201 | }; | ||
| 202 | |||
| 203 | /**********************************************/ | ||
| 204 | /* PRIVATE */ | ||
| 205 | /* (for IN-KERNEL usage only) */ | ||
| 206 | /**********************************************/ | ||
| 207 | |||
| 208 | |||
| 209 | #endif /* _UAPI_LINUX_SISFB_H_ */ | ||
diff --git a/include/uapi/video/uvesafb.h b/include/uapi/video/uvesafb.h new file mode 100644 index 000000000000..cee063d723ad --- /dev/null +++ b/include/uapi/video/uvesafb.h | |||
| @@ -0,0 +1,60 @@ | |||
| 1 | #ifndef _UAPI_UVESAFB_H | ||
| 2 | #define _UAPI_UVESAFB_H | ||
| 3 | |||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 6 | struct v86_regs { | ||
| 7 | __u32 ebx; | ||
| 8 | __u32 ecx; | ||
| 9 | __u32 edx; | ||
| 10 | __u32 esi; | ||
| 11 | __u32 edi; | ||
| 12 | __u32 ebp; | ||
| 13 | __u32 eax; | ||
| 14 | __u32 eip; | ||
| 15 | __u32 eflags; | ||
| 16 | __u32 esp; | ||
| 17 | __u16 cs; | ||
| 18 | __u16 ss; | ||
| 19 | __u16 es; | ||
| 20 | __u16 ds; | ||
| 21 | __u16 fs; | ||
| 22 | __u16 gs; | ||
| 23 | }; | ||
| 24 | |||
| 25 | /* Task flags */ | ||
| 26 | #define TF_VBEIB 0x01 | ||
| 27 | #define TF_BUF_ESDI 0x02 | ||
| 28 | #define TF_BUF_ESBX 0x04 | ||
| 29 | #define TF_BUF_RET 0x08 | ||
| 30 | #define TF_EXIT 0x10 | ||
| 31 | |||
| 32 | struct uvesafb_task { | ||
| 33 | __u8 flags; | ||
| 34 | int buf_len; | ||
| 35 | struct v86_regs regs; | ||
| 36 | }; | ||
| 37 | |||
| 38 | /* Constants for the capabilities field | ||
| 39 | * in vbe_ib */ | ||
| 40 | #define VBE_CAP_CAN_SWITCH_DAC 0x01 | ||
| 41 | #define VBE_CAP_VGACOMPAT 0x02 | ||
| 42 | |||
| 43 | /* The VBE Info Block */ | ||
| 44 | struct vbe_ib { | ||
| 45 | char vbe_signature[4]; | ||
| 46 | __u16 vbe_version; | ||
| 47 | __u32 oem_string_ptr; | ||
| 48 | __u32 capabilities; | ||
| 49 | __u32 mode_list_ptr; | ||
| 50 | __u16 total_memory; | ||
| 51 | __u16 oem_software_rev; | ||
| 52 | __u32 oem_vendor_name_ptr; | ||
| 53 | __u32 oem_product_name_ptr; | ||
| 54 | __u32 oem_product_rev_ptr; | ||
| 55 | __u8 reserved[222]; | ||
| 56 | char oem_data[256]; | ||
| 57 | char misc_data[512]; | ||
| 58 | } __attribute__ ((packed)); | ||
| 59 | |||
| 60 | #endif /* _UAPI_UVESAFB_H */ | ||
