diff options
| author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2009-05-23 15:57:31 -0400 |
|---|---|---|
| committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-05-23 15:57:31 -0400 |
| commit | a2ab67fae1ab9226679495a8d260f4e6555efc5f (patch) | |
| tree | f7de683c9c8ff0869a7e11f1d40802145d05f5b4 /include | |
| parent | 6d0485a99366d4e0e7e725f14995c74cb7ca4499 (diff) | |
| parent | 135cad366b4e7d6a79f6369f6cb5b721985aa62f (diff) | |
Merge branch 'for-rmk-devel' of git://git.pengutronix.de/git/imx/linux-2.6 into devel
Conflicts:
arch/arm/Kconfig
arch/arm/Makefile
Diffstat (limited to 'include')
| -rw-r--r-- | include/acpi/video.h | 2 | ||||
| -rw-r--r-- | include/asm-generic/atomic.h | 4 | ||||
| -rw-r--r-- | include/asm-generic/vmlinux.lds.h | 7 | ||||
| -rw-r--r-- | include/drm/drm_pciids.h | 1 | ||||
| -rw-r--r-- | include/linux/binfmts.h | 14 | ||||
| -rw-r--r-- | include/linux/blkdev.h | 1 | ||||
| -rw-r--r-- | include/linux/init.h | 12 | ||||
| -rw-r--r-- | include/linux/input.h | 24 | ||||
| -rw-r--r-- | include/linux/memcontrol.h | 4 | ||||
| -rw-r--r-- | include/linux/mman.h | 9 | ||||
| -rw-r--r-- | include/linux/netdevice.h | 4 | ||||
| -rw-r--r-- | include/linux/netfilter/nfnetlink_conntrack.h | 1 | ||||
| -rw-r--r-- | include/linux/netfilter/x_tables.h | 73 | ||||
| -rw-r--r-- | include/linux/of_platform.h | 10 | ||||
| -rw-r--r-- | include/linux/pci_regs.h | 1 | ||||
| -rw-r--r-- | include/linux/regulator/driver.h | 1 | ||||
| -rw-r--r-- | include/linux/section-names.h | 6 | ||||
| -rw-r--r-- | include/linux/sunrpc/xprt.h | 1 | ||||
| -rw-r--r-- | include/linux/wait.h | 6 | ||||
| -rw-r--r-- | include/net/bluetooth/hci.h | 1 | ||||
| -rw-r--r-- | include/net/bluetooth/hci_core.h | 8 | ||||
| -rw-r--r-- | include/scsi/fc/fc_fs.h | 1 | ||||
| -rw-r--r-- | include/scsi/libfc.h | 1 | ||||
| -rw-r--r-- | include/scsi/libiscsi.h | 2 | ||||
| -rw-r--r-- | include/scsi/osd_protocol.h | 96 |
25 files changed, 229 insertions, 61 deletions
diff --git a/include/acpi/video.h b/include/acpi/video.h index f0275bb79ce4..af6fe95fd3d0 100644 --- a/include/acpi/video.h +++ b/include/acpi/video.h | |||
| @@ -3,8 +3,10 @@ | |||
| 3 | 3 | ||
| 4 | #if (defined CONFIG_ACPI_VIDEO || defined CONFIG_ACPI_VIDEO_MODULE) | 4 | #if (defined CONFIG_ACPI_VIDEO || defined CONFIG_ACPI_VIDEO_MODULE) |
| 5 | extern int acpi_video_register(void); | 5 | extern int acpi_video_register(void); |
| 6 | extern int acpi_video_exit(void); | ||
| 6 | #else | 7 | #else |
| 7 | static inline int acpi_video_register(void) { return 0; } | 8 | static inline int acpi_video_register(void) { return 0; } |
| 9 | static inline void acpi_video_exit(void) { return; } | ||
| 8 | #endif | 10 | #endif |
| 9 | 11 | ||
| 10 | #endif | 12 | #endif |
diff --git a/include/asm-generic/atomic.h b/include/asm-generic/atomic.h index 7abdaa91ccd3..3673a13b6703 100644 --- a/include/asm-generic/atomic.h +++ b/include/asm-generic/atomic.h | |||
| @@ -132,9 +132,9 @@ static inline long atomic_long_add_unless(atomic_long_t *l, long a, long u) | |||
| 132 | #define atomic_long_inc_not_zero(l) atomic64_inc_not_zero((atomic64_t *)(l)) | 132 | #define atomic_long_inc_not_zero(l) atomic64_inc_not_zero((atomic64_t *)(l)) |
| 133 | 133 | ||
| 134 | #define atomic_long_cmpxchg(l, old, new) \ | 134 | #define atomic_long_cmpxchg(l, old, new) \ |
| 135 | (atomic_cmpxchg((atomic64_t *)(l), (old), (new))) | 135 | (atomic64_cmpxchg((atomic64_t *)(l), (old), (new))) |
| 136 | #define atomic_long_xchg(v, new) \ | 136 | #define atomic_long_xchg(v, new) \ |
| 137 | (atomic_xchg((atomic64_t *)(l), (new))) | 137 | (atomic64_xchg((atomic64_t *)(l), (new))) |
| 138 | 138 | ||
| 139 | #else /* BITS_PER_LONG == 64 */ | 139 | #else /* BITS_PER_LONG == 64 */ |
| 140 | 140 | ||
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 7fa660fd449c..89853bcd27a6 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
| @@ -1,3 +1,5 @@ | |||
| 1 | #include <linux/section-names.h> | ||
| 2 | |||
| 1 | #ifndef LOAD_OFFSET | 3 | #ifndef LOAD_OFFSET |
| 2 | #define LOAD_OFFSET 0 | 4 | #define LOAD_OFFSET 0 |
| 3 | #endif | 5 | #endif |
| @@ -88,7 +90,6 @@ | |||
| 88 | /* .data section */ | 90 | /* .data section */ |
| 89 | #define DATA_DATA \ | 91 | #define DATA_DATA \ |
| 90 | *(.data) \ | 92 | *(.data) \ |
| 91 | *(.data.init.refok) \ | ||
| 92 | *(.ref.data) \ | 93 | *(.ref.data) \ |
| 93 | DEV_KEEP(init.data) \ | 94 | DEV_KEEP(init.data) \ |
| 94 | DEV_KEEP(exit.data) \ | 95 | DEV_KEEP(exit.data) \ |
| @@ -287,8 +288,6 @@ | |||
| 287 | *(.text.hot) \ | 288 | *(.text.hot) \ |
| 288 | *(.text) \ | 289 | *(.text) \ |
| 289 | *(.ref.text) \ | 290 | *(.ref.text) \ |
| 290 | *(.text.init.refok) \ | ||
| 291 | *(.exit.text.refok) \ | ||
| 292 | DEV_KEEP(init.text) \ | 291 | DEV_KEEP(init.text) \ |
| 293 | DEV_KEEP(exit.text) \ | 292 | DEV_KEEP(exit.text) \ |
| 294 | CPU_KEEP(init.text) \ | 293 | CPU_KEEP(init.text) \ |
| @@ -331,7 +330,7 @@ | |||
| 331 | #endif | 330 | #endif |
| 332 | 331 | ||
| 333 | /* Section used for early init (in .S files) */ | 332 | /* Section used for early init (in .S files) */ |
| 334 | #define HEAD_TEXT *(.head.text) | 333 | #define HEAD_TEXT *(HEAD_TEXT_SECTION) |
| 335 | 334 | ||
| 336 | /* init and exit section handling */ | 335 | /* init and exit section handling */ |
| 337 | #define INIT_DATA \ | 336 | #define INIT_DATA \ |
diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h index 9477af01a639..fc55db780199 100644 --- a/include/drm/drm_pciids.h +++ b/include/drm/drm_pciids.h | |||
| @@ -532,6 +532,7 @@ | |||
| 532 | {0x8086, 0x2e02, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ | 532 | {0x8086, 0x2e02, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ |
| 533 | {0x8086, 0x2e12, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ | 533 | {0x8086, 0x2e12, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ |
| 534 | {0x8086, 0x2e22, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ | 534 | {0x8086, 0x2e22, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ |
| 535 | {0x8086, 0x2e32, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ | ||
| 535 | {0x8086, 0xa001, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ | 536 | {0x8086, 0xa001, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ |
| 536 | {0x8086, 0xa011, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ | 537 | {0x8086, 0xa011, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ |
| 537 | {0x8086, 0x35e8, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ | 538 | {0x8086, 0x35e8, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ |
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index 6638b8148de7..61ee18c1bdb4 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h | |||
| @@ -82,7 +82,19 @@ struct linux_binfmt { | |||
| 82 | int hasvdso; | 82 | int hasvdso; |
| 83 | }; | 83 | }; |
| 84 | 84 | ||
| 85 | extern int register_binfmt(struct linux_binfmt *); | 85 | extern int __register_binfmt(struct linux_binfmt *fmt, int insert); |
| 86 | |||
| 87 | /* Registration of default binfmt handlers */ | ||
| 88 | static inline int register_binfmt(struct linux_binfmt *fmt) | ||
| 89 | { | ||
| 90 | return __register_binfmt(fmt, 0); | ||
| 91 | } | ||
| 92 | /* Same as above, but adds a new binfmt at the top of the list */ | ||
| 93 | static inline int insert_binfmt(struct linux_binfmt *fmt) | ||
| 94 | { | ||
| 95 | return __register_binfmt(fmt, 1); | ||
| 96 | } | ||
| 97 | |||
| 86 | extern void unregister_binfmt(struct linux_binfmt *); | 98 | extern void unregister_binfmt(struct linux_binfmt *); |
| 87 | 99 | ||
| 88 | extern int prepare_binprm(struct linux_binprm *); | 100 | extern int prepare_binprm(struct linux_binprm *); |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 2755d5c6da22..b4f71f1a4af7 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -601,6 +601,7 @@ enum { | |||
| 601 | blk_failfast_driver(rq)) | 601 | blk_failfast_driver(rq)) |
| 602 | #define blk_rq_started(rq) ((rq)->cmd_flags & REQ_STARTED) | 602 | #define blk_rq_started(rq) ((rq)->cmd_flags & REQ_STARTED) |
| 603 | #define blk_rq_io_stat(rq) ((rq)->cmd_flags & REQ_IO_STAT) | 603 | #define blk_rq_io_stat(rq) ((rq)->cmd_flags & REQ_IO_STAT) |
| 604 | #define blk_rq_quiet(rq) ((rq)->cmd_flags & REQ_QUIET) | ||
| 604 | 605 | ||
| 605 | #define blk_account_rq(rq) (blk_rq_started(rq) && (blk_fs_request(rq) || blk_discard_rq(rq))) | 606 | #define blk_account_rq(rq) (blk_rq_started(rq) && (blk_fs_request(rq) || blk_discard_rq(rq))) |
| 606 | 607 | ||
diff --git a/include/linux/init.h b/include/linux/init.h index f121a7a10c3d..0e06c176f185 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
| @@ -2,6 +2,8 @@ | |||
| 2 | #define _LINUX_INIT_H | 2 | #define _LINUX_INIT_H |
| 3 | 3 | ||
| 4 | #include <linux/compiler.h> | 4 | #include <linux/compiler.h> |
| 5 | #include <linux/section-names.h> | ||
| 6 | #include <linux/stringify.h> | ||
| 5 | 7 | ||
| 6 | /* These macros are used to mark some functions or | 8 | /* These macros are used to mark some functions or |
| 7 | * initialized data (doesn't apply to uninitialized data) | 9 | * initialized data (doesn't apply to uninitialized data) |
| @@ -60,14 +62,6 @@ | |||
| 60 | #define __refdata __section(.ref.data) | 62 | #define __refdata __section(.ref.data) |
| 61 | #define __refconst __section(.ref.rodata) | 63 | #define __refconst __section(.ref.rodata) |
| 62 | 64 | ||
| 63 | /* backward compatibility note | ||
| 64 | * A few places hardcode the old section names: | ||
| 65 | * .text.init.refok | ||
| 66 | * .data.init.refok | ||
| 67 | * .exit.text.refok | ||
| 68 | * They should be converted to use the defines from this file | ||
| 69 | */ | ||
| 70 | |||
| 71 | /* compatibility defines */ | 65 | /* compatibility defines */ |
| 72 | #define __init_refok __ref | 66 | #define __init_refok __ref |
| 73 | #define __initdata_refok __refdata | 67 | #define __initdata_refok __refdata |
| @@ -107,7 +101,7 @@ | |||
| 107 | #define __memexitconst __section(.memexit.rodata) | 101 | #define __memexitconst __section(.memexit.rodata) |
| 108 | 102 | ||
| 109 | /* For assembly routines */ | 103 | /* For assembly routines */ |
| 110 | #define __HEAD .section ".head.text","ax" | 104 | #define __HEAD .section __stringify(HEAD_TEXT_SECTION),"ax" |
| 111 | #define __INIT .section ".init.text","ax" | 105 | #define __INIT .section ".init.text","ax" |
| 112 | #define __FINIT .previous | 106 | #define __FINIT .previous |
| 113 | 107 | ||
diff --git a/include/linux/input.h b/include/linux/input.h index 6b28048fc568..0e6ff5de3588 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
| @@ -106,6 +106,7 @@ struct input_absinfo { | |||
| 106 | 106 | ||
| 107 | #define SYN_REPORT 0 | 107 | #define SYN_REPORT 0 |
| 108 | #define SYN_CONFIG 1 | 108 | #define SYN_CONFIG 1 |
| 109 | #define SYN_MT_REPORT 2 | ||
| 109 | 110 | ||
| 110 | /* | 111 | /* |
| 111 | * Keys and buttons | 112 | * Keys and buttons |
| @@ -445,6 +446,7 @@ struct input_absinfo { | |||
| 445 | #define BTN_STYLUS2 0x14c | 446 | #define BTN_STYLUS2 0x14c |
| 446 | #define BTN_TOOL_DOUBLETAP 0x14d | 447 | #define BTN_TOOL_DOUBLETAP 0x14d |
| 447 | #define BTN_TOOL_TRIPLETAP 0x14e | 448 | #define BTN_TOOL_TRIPLETAP 0x14e |
| 449 | #define BTN_TOOL_QUADTAP 0x14f /* Four fingers on trackpad */ | ||
| 448 | 450 | ||
| 449 | #define BTN_WHEEL 0x150 | 451 | #define BTN_WHEEL 0x150 |
| 450 | #define BTN_GEAR_DOWN 0x150 | 452 | #define BTN_GEAR_DOWN 0x150 |
| @@ -644,6 +646,17 @@ struct input_absinfo { | |||
| 644 | #define ABS_TOOL_WIDTH 0x1c | 646 | #define ABS_TOOL_WIDTH 0x1c |
| 645 | #define ABS_VOLUME 0x20 | 647 | #define ABS_VOLUME 0x20 |
| 646 | #define ABS_MISC 0x28 | 648 | #define ABS_MISC 0x28 |
| 649 | |||
| 650 | #define ABS_MT_TOUCH_MAJOR 0x30 /* Major axis of touching ellipse */ | ||
| 651 | #define ABS_MT_TOUCH_MINOR 0x31 /* Minor axis (omit if circular) */ | ||
| 652 | #define ABS_MT_WIDTH_MAJOR 0x32 /* Major axis of approaching ellipse */ | ||
| 653 | #define ABS_MT_WIDTH_MINOR 0x33 /* Minor axis (omit if circular) */ | ||
| 654 | #define ABS_MT_ORIENTATION 0x34 /* Ellipse orientation */ | ||
| 655 | #define ABS_MT_POSITION_X 0x35 /* Center X ellipse position */ | ||
| 656 | #define ABS_MT_POSITION_Y 0x36 /* Center Y ellipse position */ | ||
| 657 | #define ABS_MT_TOOL_TYPE 0x37 /* Type of touching device */ | ||
| 658 | #define ABS_MT_BLOB_ID 0x38 /* Group a set of packets as a blob */ | ||
| 659 | |||
| 647 | #define ABS_MAX 0x3f | 660 | #define ABS_MAX 0x3f |
| 648 | #define ABS_CNT (ABS_MAX+1) | 661 | #define ABS_CNT (ABS_MAX+1) |
| 649 | 662 | ||
| @@ -743,6 +756,12 @@ struct input_absinfo { | |||
| 743 | #define BUS_ATARI 0x1B | 756 | #define BUS_ATARI 0x1B |
| 744 | 757 | ||
| 745 | /* | 758 | /* |
| 759 | * MT_TOOL types | ||
| 760 | */ | ||
| 761 | #define MT_TOOL_FINGER 0 | ||
| 762 | #define MT_TOOL_PEN 1 | ||
| 763 | |||
| 764 | /* | ||
| 746 | * Values describing the status of a force-feedback effect | 765 | * Values describing the status of a force-feedback effect |
| 747 | */ | 766 | */ |
| 748 | #define FF_STATUS_STOPPED 0x00 | 767 | #define FF_STATUS_STOPPED 0x00 |
| @@ -1311,6 +1330,11 @@ static inline void input_sync(struct input_dev *dev) | |||
| 1311 | input_event(dev, EV_SYN, SYN_REPORT, 0); | 1330 | input_event(dev, EV_SYN, SYN_REPORT, 0); |
| 1312 | } | 1331 | } |
| 1313 | 1332 | ||
| 1333 | static inline void input_mt_sync(struct input_dev *dev) | ||
| 1334 | { | ||
| 1335 | input_event(dev, EV_SYN, SYN_MT_REPORT, 0); | ||
| 1336 | } | ||
| 1337 | |||
| 1314 | void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int code); | 1338 | void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int code); |
| 1315 | 1339 | ||
| 1316 | static inline void input_set_abs_params(struct input_dev *dev, int axis, int min, int max, int fuzz, int flat) | 1340 | static inline void input_set_abs_params(struct input_dev *dev, int axis, int min, int max, int fuzz, int flat) |
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index a9e3b76aa884..25b9ca93d232 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
| @@ -56,7 +56,7 @@ extern void mem_cgroup_move_lists(struct page *page, | |||
| 56 | enum lru_list from, enum lru_list to); | 56 | enum lru_list from, enum lru_list to); |
| 57 | extern void mem_cgroup_uncharge_page(struct page *page); | 57 | extern void mem_cgroup_uncharge_page(struct page *page); |
| 58 | extern void mem_cgroup_uncharge_cache_page(struct page *page); | 58 | extern void mem_cgroup_uncharge_cache_page(struct page *page); |
| 59 | extern int mem_cgroup_shrink_usage(struct page *page, | 59 | extern int mem_cgroup_shmem_charge_fallback(struct page *page, |
| 60 | struct mm_struct *mm, gfp_t gfp_mask); | 60 | struct mm_struct *mm, gfp_t gfp_mask); |
| 61 | 61 | ||
| 62 | extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan, | 62 | extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan, |
| @@ -155,7 +155,7 @@ static inline void mem_cgroup_uncharge_cache_page(struct page *page) | |||
| 155 | { | 155 | { |
| 156 | } | 156 | } |
| 157 | 157 | ||
| 158 | static inline int mem_cgroup_shrink_usage(struct page *page, | 158 | static inline int mem_cgroup_shmem_charge_fallback(struct page *page, |
| 159 | struct mm_struct *mm, gfp_t gfp_mask) | 159 | struct mm_struct *mm, gfp_t gfp_mask) |
| 160 | { | 160 | { |
| 161 | return 0; | 161 | return 0; |
diff --git a/include/linux/mman.h b/include/linux/mman.h index 30d1073bac3b..9872d6ca58ae 100644 --- a/include/linux/mman.h +++ b/include/linux/mman.h | |||
| @@ -12,21 +12,18 @@ | |||
| 12 | 12 | ||
| 13 | #ifdef __KERNEL__ | 13 | #ifdef __KERNEL__ |
| 14 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
| 15 | #include <linux/percpu_counter.h> | ||
| 15 | 16 | ||
| 16 | #include <asm/atomic.h> | 17 | #include <asm/atomic.h> |
| 17 | 18 | ||
| 18 | extern int sysctl_overcommit_memory; | 19 | extern int sysctl_overcommit_memory; |
| 19 | extern int sysctl_overcommit_ratio; | 20 | extern int sysctl_overcommit_ratio; |
| 20 | extern atomic_long_t vm_committed_space; | 21 | extern struct percpu_counter vm_committed_as; |
| 21 | 22 | ||
| 22 | #ifdef CONFIG_SMP | ||
| 23 | extern void vm_acct_memory(long pages); | ||
| 24 | #else | ||
| 25 | static inline void vm_acct_memory(long pages) | 23 | static inline void vm_acct_memory(long pages) |
| 26 | { | 24 | { |
| 27 | atomic_long_add(pages, &vm_committed_space); | 25 | percpu_counter_add(&vm_committed_as, pages); |
| 28 | } | 26 | } |
| 29 | #endif | ||
| 30 | 27 | ||
| 31 | static inline void vm_unacct_memory(long pages) | 28 | static inline void vm_unacct_memory(long pages) |
| 32 | { | 29 | { |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 2e7783f4a755..5a96a1a406e9 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -104,7 +104,7 @@ struct wireless_dev; | |||
| 104 | # else | 104 | # else |
| 105 | # define LL_MAX_HEADER 96 | 105 | # define LL_MAX_HEADER 96 |
| 106 | # endif | 106 | # endif |
| 107 | #elif defined(CONFIG_TR) | 107 | #elif defined(CONFIG_TR) || defined(CONFIG_TR_MODULE) |
| 108 | # define LL_MAX_HEADER 48 | 108 | # define LL_MAX_HEADER 48 |
| 109 | #else | 109 | #else |
| 110 | # define LL_MAX_HEADER 32 | 110 | # define LL_MAX_HEADER 32 |
| @@ -500,7 +500,7 @@ struct netdev_queue { | |||
| 500 | * | 500 | * |
| 501 | * int (*ndo_set_mac_address)(struct net_device *dev, void *addr); | 501 | * int (*ndo_set_mac_address)(struct net_device *dev, void *addr); |
| 502 | * This function is called when the Media Access Control address | 502 | * This function is called when the Media Access Control address |
| 503 | * needs to be changed. If not this interface is not defined, the | 503 | * needs to be changed. If this interface is not defined, the |
| 504 | * mac address can not be changed. | 504 | * mac address can not be changed. |
| 505 | * | 505 | * |
| 506 | * int (*ndo_validate_addr)(struct net_device *dev); | 506 | * int (*ndo_validate_addr)(struct net_device *dev); |
diff --git a/include/linux/netfilter/nfnetlink_conntrack.h b/include/linux/netfilter/nfnetlink_conntrack.h index 29fe9ea1d346..1a865e48b8eb 100644 --- a/include/linux/netfilter/nfnetlink_conntrack.h +++ b/include/linux/netfilter/nfnetlink_conntrack.h | |||
| @@ -100,6 +100,7 @@ enum ctattr_protoinfo_tcp { | |||
| 100 | enum ctattr_protoinfo_dccp { | 100 | enum ctattr_protoinfo_dccp { |
| 101 | CTA_PROTOINFO_DCCP_UNSPEC, | 101 | CTA_PROTOINFO_DCCP_UNSPEC, |
| 102 | CTA_PROTOINFO_DCCP_STATE, | 102 | CTA_PROTOINFO_DCCP_STATE, |
| 103 | CTA_PROTOINFO_DCCP_ROLE, | ||
| 103 | __CTA_PROTOINFO_DCCP_MAX, | 104 | __CTA_PROTOINFO_DCCP_MAX, |
| 104 | }; | 105 | }; |
| 105 | #define CTA_PROTOINFO_DCCP_MAX (__CTA_PROTOINFO_DCCP_MAX - 1) | 106 | #define CTA_PROTOINFO_DCCP_MAX (__CTA_PROTOINFO_DCCP_MAX - 1) |
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index 7b1a652066c0..1b2e43502ef7 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
| @@ -354,9 +354,6 @@ struct xt_table | |||
| 354 | /* What hooks you will enter on */ | 354 | /* What hooks you will enter on */ |
| 355 | unsigned int valid_hooks; | 355 | unsigned int valid_hooks; |
| 356 | 356 | ||
| 357 | /* Lock for the curtain */ | ||
| 358 | struct mutex lock; | ||
| 359 | |||
| 360 | /* Man behind the curtain... */ | 357 | /* Man behind the curtain... */ |
| 361 | struct xt_table_info *private; | 358 | struct xt_table_info *private; |
| 362 | 359 | ||
| @@ -434,8 +431,74 @@ extern void xt_proto_fini(struct net *net, u_int8_t af); | |||
| 434 | 431 | ||
| 435 | extern struct xt_table_info *xt_alloc_table_info(unsigned int size); | 432 | extern struct xt_table_info *xt_alloc_table_info(unsigned int size); |
| 436 | extern void xt_free_table_info(struct xt_table_info *info); | 433 | extern void xt_free_table_info(struct xt_table_info *info); |
| 437 | extern void xt_table_entry_swap_rcu(struct xt_table_info *old, | 434 | |
| 438 | struct xt_table_info *new); | 435 | /* |
| 436 | * Per-CPU spinlock associated with per-cpu table entries, and | ||
| 437 | * with a counter for the "reading" side that allows a recursive | ||
| 438 | * reader to avoid taking the lock and deadlocking. | ||
| 439 | * | ||
| 440 | * "reading" is used by ip/arp/ip6 tables rule processing which runs per-cpu. | ||
| 441 | * It needs to ensure that the rules are not being changed while the packet | ||
| 442 | * is being processed. In some cases, the read lock will be acquired | ||
| 443 | * twice on the same CPU; this is okay because of the count. | ||
| 444 | * | ||
| 445 | * "writing" is used when reading counters. | ||
| 446 | * During replace any readers that are using the old tables have to complete | ||
| 447 | * before freeing the old table. This is handled by the write locking | ||
| 448 | * necessary for reading the counters. | ||
| 449 | */ | ||
| 450 | struct xt_info_lock { | ||
| 451 | spinlock_t lock; | ||
| 452 | unsigned char readers; | ||
| 453 | }; | ||
| 454 | DECLARE_PER_CPU(struct xt_info_lock, xt_info_locks); | ||
| 455 | |||
| 456 | /* | ||
| 457 | * Note: we need to ensure that preemption is disabled before acquiring | ||
| 458 | * the per-cpu-variable, so we do it as a two step process rather than | ||
| 459 | * using "spin_lock_bh()". | ||
| 460 | * | ||
| 461 | * We _also_ need to disable bottom half processing before updating our | ||
| 462 | * nesting count, to make sure that the only kind of re-entrancy is this | ||
| 463 | * code being called by itself: since the count+lock is not an atomic | ||
| 464 | * operation, we can allow no races. | ||
| 465 | * | ||
| 466 | * _Only_ that special combination of being per-cpu and never getting | ||
| 467 | * re-entered asynchronously means that the count is safe. | ||
| 468 | */ | ||
| 469 | static inline void xt_info_rdlock_bh(void) | ||
| 470 | { | ||
| 471 | struct xt_info_lock *lock; | ||
| 472 | |||
| 473 | local_bh_disable(); | ||
| 474 | lock = &__get_cpu_var(xt_info_locks); | ||
| 475 | if (!lock->readers++) | ||
| 476 | spin_lock(&lock->lock); | ||
| 477 | } | ||
| 478 | |||
| 479 | static inline void xt_info_rdunlock_bh(void) | ||
| 480 | { | ||
| 481 | struct xt_info_lock *lock = &__get_cpu_var(xt_info_locks); | ||
| 482 | |||
| 483 | if (!--lock->readers) | ||
| 484 | spin_unlock(&lock->lock); | ||
| 485 | local_bh_enable(); | ||
| 486 | } | ||
| 487 | |||
| 488 | /* | ||
| 489 | * The "writer" side needs to get exclusive access to the lock, | ||
| 490 | * regardless of readers. This must be called with bottom half | ||
| 491 | * processing (and thus also preemption) disabled. | ||
| 492 | */ | ||
| 493 | static inline void xt_info_wrlock(unsigned int cpu) | ||
| 494 | { | ||
| 495 | spin_lock(&per_cpu(xt_info_locks, cpu).lock); | ||
| 496 | } | ||
| 497 | |||
| 498 | static inline void xt_info_wrunlock(unsigned int cpu) | ||
| 499 | { | ||
| 500 | spin_unlock(&per_cpu(xt_info_locks, cpu).lock); | ||
| 501 | } | ||
| 439 | 502 | ||
| 440 | /* | 503 | /* |
| 441 | * This helper is performance critical and must be inlined | 504 | * This helper is performance critical and must be inlined |
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h index 3d327b67d7e2..908406651330 100644 --- a/include/linux/of_platform.h +++ b/include/linux/of_platform.h | |||
| @@ -51,6 +51,16 @@ extern int of_register_driver(struct of_platform_driver *drv, | |||
| 51 | struct bus_type *bus); | 51 | struct bus_type *bus); |
| 52 | extern void of_unregister_driver(struct of_platform_driver *drv); | 52 | extern void of_unregister_driver(struct of_platform_driver *drv); |
| 53 | 53 | ||
| 54 | /* Platform drivers register/unregister */ | ||
| 55 | static inline int of_register_platform_driver(struct of_platform_driver *drv) | ||
| 56 | { | ||
| 57 | return of_register_driver(drv, &of_platform_bus_type); | ||
| 58 | } | ||
| 59 | static inline void of_unregister_platform_driver(struct of_platform_driver *drv) | ||
| 60 | { | ||
| 61 | of_unregister_driver(drv); | ||
| 62 | } | ||
| 63 | |||
| 54 | #include <asm/of_platform.h> | 64 | #include <asm/of_platform.h> |
| 55 | 65 | ||
| 56 | extern struct of_device *of_find_device_by_node(struct device_node *np); | 66 | extern struct of_device *of_find_device_by_node(struct device_node *np); |
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h index e4d08c1b2e0b..616bf8b3c8b5 100644 --- a/include/linux/pci_regs.h +++ b/include/linux/pci_regs.h | |||
| @@ -376,6 +376,7 @@ | |||
| 376 | #define PCI_EXP_TYPE_DOWNSTREAM 0x6 /* Downstream Port */ | 376 | #define PCI_EXP_TYPE_DOWNSTREAM 0x6 /* Downstream Port */ |
| 377 | #define PCI_EXP_TYPE_PCI_BRIDGE 0x7 /* PCI/PCI-X Bridge */ | 377 | #define PCI_EXP_TYPE_PCI_BRIDGE 0x7 /* PCI/PCI-X Bridge */ |
| 378 | #define PCI_EXP_TYPE_RC_END 0x9 /* Root Complex Integrated Endpoint */ | 378 | #define PCI_EXP_TYPE_RC_END 0x9 /* Root Complex Integrated Endpoint */ |
| 379 | #define PCI_EXP_TYPE_RC_EC 0x10 /* Root Complex Event Collector */ | ||
| 379 | #define PCI_EXP_FLAGS_SLOT 0x0100 /* Slot implemented */ | 380 | #define PCI_EXP_FLAGS_SLOT 0x0100 /* Slot implemented */ |
| 380 | #define PCI_EXP_FLAGS_IRQ 0x3e00 /* Interrupt message number */ | 381 | #define PCI_EXP_FLAGS_IRQ 0x3e00 /* Interrupt message number */ |
| 381 | #define PCI_EXP_DEVCAP 4 /* Device capabilities */ | 382 | #define PCI_EXP_DEVCAP 4 /* Device capabilities */ |
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index 4848d8dacd90..225f733e7533 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h | |||
| @@ -50,6 +50,7 @@ enum regulator_status { | |||
| 50 | * @set_current_limit: Configure a limit for a current-limited regulator. | 50 | * @set_current_limit: Configure a limit for a current-limited regulator. |
| 51 | * @get_current_limit: Get the configured limit for a current-limited regulator. | 51 | * @get_current_limit: Get the configured limit for a current-limited regulator. |
| 52 | * | 52 | * |
| 53 | * @set_mode: Set the configured operating mode for the regulator. | ||
| 53 | * @get_mode: Get the configured operating mode for the regulator. | 54 | * @get_mode: Get the configured operating mode for the regulator. |
| 54 | * @get_status: Return actual (not as-configured) status of regulator, as a | 55 | * @get_status: Return actual (not as-configured) status of regulator, as a |
| 55 | * REGULATOR_STATUS value (or negative errno) | 56 | * REGULATOR_STATUS value (or negative errno) |
diff --git a/include/linux/section-names.h b/include/linux/section-names.h new file mode 100644 index 000000000000..c956f4eb2adf --- /dev/null +++ b/include/linux/section-names.h | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | #ifndef __LINUX_SECTION_NAMES_H | ||
| 2 | #define __LINUX_SECTION_NAMES_H | ||
| 3 | |||
| 4 | #define HEAD_TEXT_SECTION .head.text | ||
| 5 | |||
| 6 | #endif /* !__LINUX_SECTION_NAMES_H */ | ||
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 1758d9f5b5c3..08afe43118f4 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
| @@ -261,6 +261,7 @@ void xprt_conditional_disconnect(struct rpc_xprt *xprt, unsigned int cookie); | |||
| 261 | #define XPRT_BINDING (5) | 261 | #define XPRT_BINDING (5) |
| 262 | #define XPRT_CLOSING (6) | 262 | #define XPRT_CLOSING (6) |
| 263 | #define XPRT_CONNECTION_ABORT (7) | 263 | #define XPRT_CONNECTION_ABORT (7) |
| 264 | #define XPRT_CONNECTION_CLOSE (8) | ||
| 264 | 265 | ||
| 265 | static inline void xprt_set_connected(struct rpc_xprt *xprt) | 266 | static inline void xprt_set_connected(struct rpc_xprt *xprt) |
| 266 | { | 267 | { |
diff --git a/include/linux/wait.h b/include/linux/wait.h index 5d631c17eaee..bc024632f365 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h | |||
| @@ -440,13 +440,15 @@ void abort_exclusive_wait(wait_queue_head_t *q, wait_queue_t *wait, | |||
| 440 | int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key); | 440 | int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key); |
| 441 | int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key); | 441 | int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key); |
| 442 | 442 | ||
| 443 | #define DEFINE_WAIT(name) \ | 443 | #define DEFINE_WAIT_FUNC(name, function) \ |
| 444 | wait_queue_t name = { \ | 444 | wait_queue_t name = { \ |
| 445 | .private = current, \ | 445 | .private = current, \ |
| 446 | .func = autoremove_wake_function, \ | 446 | .func = function, \ |
| 447 | .task_list = LIST_HEAD_INIT((name).task_list), \ | 447 | .task_list = LIST_HEAD_INIT((name).task_list), \ |
| 448 | } | 448 | } |
| 449 | 449 | ||
| 450 | #define DEFINE_WAIT(name) DEFINE_WAIT_FUNC(name, autoremove_wake_function) | ||
| 451 | |||
| 450 | #define DEFINE_WAIT_BIT(name, word, bit) \ | 452 | #define DEFINE_WAIT_BIT(name, word, bit) \ |
| 451 | struct wait_bit_queue name = { \ | 453 | struct wait_bit_queue name = { \ |
| 452 | .key = __WAIT_BIT_KEY_INITIALIZER(word, bit), \ | 454 | .key = __WAIT_BIT_KEY_INITIALIZER(word, bit), \ |
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index f69f015bbcc0..ed3aea1605e8 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h | |||
| @@ -101,6 +101,7 @@ enum { | |||
| 101 | /* HCI timeouts */ | 101 | /* HCI timeouts */ |
| 102 | #define HCI_CONNECT_TIMEOUT (40000) /* 40 seconds */ | 102 | #define HCI_CONNECT_TIMEOUT (40000) /* 40 seconds */ |
| 103 | #define HCI_DISCONN_TIMEOUT (2000) /* 2 seconds */ | 103 | #define HCI_DISCONN_TIMEOUT (2000) /* 2 seconds */ |
| 104 | #define HCI_PAIRING_TIMEOUT (60000) /* 60 seconds */ | ||
| 104 | #define HCI_IDLE_TIMEOUT (6000) /* 6 seconds */ | 105 | #define HCI_IDLE_TIMEOUT (6000) /* 6 seconds */ |
| 105 | #define HCI_INIT_TIMEOUT (10000) /* 10 seconds */ | 106 | #define HCI_INIT_TIMEOUT (10000) /* 10 seconds */ |
| 106 | 107 | ||
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 01f9316b4c23..be5bd713d2c9 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
| @@ -171,6 +171,7 @@ struct hci_conn { | |||
| 171 | __u8 auth_type; | 171 | __u8 auth_type; |
| 172 | __u8 sec_level; | 172 | __u8 sec_level; |
| 173 | __u8 power_save; | 173 | __u8 power_save; |
| 174 | __u16 disc_timeout; | ||
| 174 | unsigned long pend; | 175 | unsigned long pend; |
| 175 | 176 | ||
| 176 | unsigned int sent; | 177 | unsigned int sent; |
| @@ -180,7 +181,8 @@ struct hci_conn { | |||
| 180 | struct timer_list disc_timer; | 181 | struct timer_list disc_timer; |
| 181 | struct timer_list idle_timer; | 182 | struct timer_list idle_timer; |
| 182 | 183 | ||
| 183 | struct work_struct work; | 184 | struct work_struct work_add; |
| 185 | struct work_struct work_del; | ||
| 184 | 186 | ||
| 185 | struct device dev; | 187 | struct device dev; |
| 186 | 188 | ||
| @@ -348,9 +350,9 @@ static inline void hci_conn_put(struct hci_conn *conn) | |||
| 348 | if (conn->type == ACL_LINK) { | 350 | if (conn->type == ACL_LINK) { |
| 349 | del_timer(&conn->idle_timer); | 351 | del_timer(&conn->idle_timer); |
| 350 | if (conn->state == BT_CONNECTED) { | 352 | if (conn->state == BT_CONNECTED) { |
| 351 | timeo = msecs_to_jiffies(HCI_DISCONN_TIMEOUT); | 353 | timeo = msecs_to_jiffies(conn->disc_timeout); |
| 352 | if (!conn->out) | 354 | if (!conn->out) |
| 353 | timeo *= 5; | 355 | timeo *= 2; |
| 354 | } else | 356 | } else |
| 355 | timeo = msecs_to_jiffies(10); | 357 | timeo = msecs_to_jiffies(10); |
| 356 | } else | 358 | } else |
diff --git a/include/scsi/fc/fc_fs.h b/include/scsi/fc/fc_fs.h index 1b7af3a64c7c..ac4cd38c860e 100644 --- a/include/scsi/fc/fc_fs.h +++ b/include/scsi/fc/fc_fs.h | |||
| @@ -149,6 +149,7 @@ enum fc_rctl { | |||
| 149 | * Well-known fabric addresses. | 149 | * Well-known fabric addresses. |
| 150 | */ | 150 | */ |
| 151 | enum fc_well_known_fid { | 151 | enum fc_well_known_fid { |
| 152 | FC_FID_NONE = 0x000000, /* No destination */ | ||
| 152 | FC_FID_BCAST = 0xffffff, /* broadcast */ | 153 | FC_FID_BCAST = 0xffffff, /* broadcast */ |
| 153 | FC_FID_FLOGI = 0xfffffe, /* fabric login */ | 154 | FC_FID_FLOGI = 0xfffffe, /* fabric login */ |
| 154 | FC_FID_FCTRL = 0xfffffd, /* fabric controller */ | 155 | FC_FID_FCTRL = 0xfffffd, /* fabric controller */ |
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h index 0303a6a098cc..45f9cc642c46 100644 --- a/include/scsi/libfc.h +++ b/include/scsi/libfc.h | |||
| @@ -637,6 +637,7 @@ struct fc_disc { | |||
| 637 | enum fc_disc_event); | 637 | enum fc_disc_event); |
| 638 | 638 | ||
| 639 | struct list_head rports; | 639 | struct list_head rports; |
| 640 | struct list_head rogue_rports; | ||
| 640 | struct fc_lport *lport; | 641 | struct fc_lport *lport; |
| 641 | struct mutex disc_mutex; | 642 | struct mutex disc_mutex; |
| 642 | struct fc_gpn_ft_resp partial_buf; /* partial name buffer */ | 643 | struct fc_gpn_ft_resp partial_buf; /* partial name buffer */ |
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h index 7ffaed2f94dd..0289f5745fb9 100644 --- a/include/scsi/libiscsi.h +++ b/include/scsi/libiscsi.h | |||
| @@ -36,6 +36,7 @@ struct scsi_transport_template; | |||
| 36 | struct scsi_host_template; | 36 | struct scsi_host_template; |
| 37 | struct scsi_device; | 37 | struct scsi_device; |
| 38 | struct Scsi_Host; | 38 | struct Scsi_Host; |
| 39 | struct scsi_target; | ||
| 39 | struct scsi_cmnd; | 40 | struct scsi_cmnd; |
| 40 | struct socket; | 41 | struct socket; |
| 41 | struct iscsi_transport; | 42 | struct iscsi_transport; |
| @@ -350,6 +351,7 @@ extern struct Scsi_Host *iscsi_host_alloc(struct scsi_host_template *sht, | |||
| 350 | bool xmit_can_sleep); | 351 | bool xmit_can_sleep); |
| 351 | extern void iscsi_host_remove(struct Scsi_Host *shost); | 352 | extern void iscsi_host_remove(struct Scsi_Host *shost); |
| 352 | extern void iscsi_host_free(struct Scsi_Host *shost); | 353 | extern void iscsi_host_free(struct Scsi_Host *shost); |
| 354 | extern int iscsi_target_alloc(struct scsi_target *starget); | ||
| 353 | 355 | ||
| 354 | /* | 356 | /* |
| 355 | * session management | 357 | * session management |
diff --git a/include/scsi/osd_protocol.h b/include/scsi/osd_protocol.h index cd3cbf764650..62b2ab8c69d4 100644 --- a/include/scsi/osd_protocol.h +++ b/include/scsi/osd_protocol.h | |||
| @@ -24,17 +24,18 @@ enum { | |||
| 24 | OSDv1_ADDITIONAL_CDB_LENGTH = 192, | 24 | OSDv1_ADDITIONAL_CDB_LENGTH = 192, |
| 25 | OSDv1_TOTAL_CDB_LEN = OSDv1_ADDITIONAL_CDB_LENGTH + 8, | 25 | OSDv1_TOTAL_CDB_LEN = OSDv1_ADDITIONAL_CDB_LENGTH + 8, |
| 26 | OSDv1_CAP_LEN = 80, | 26 | OSDv1_CAP_LEN = 80, |
| 27 | |||
| 27 | /* Latest supported version */ | 28 | /* Latest supported version */ |
| 28 | /* OSD_ADDITIONAL_CDB_LENGTH = 216,*/ | 29 | OSDv2_ADDITIONAL_CDB_LENGTH = 228, |
| 29 | OSD_ADDITIONAL_CDB_LENGTH = | 30 | OSD_ADDITIONAL_CDB_LENGTH = |
| 30 | OSDv1_ADDITIONAL_CDB_LENGTH, /* FIXME: Pete rev-001 sup */ | 31 | OSDv2_ADDITIONAL_CDB_LENGTH, |
| 31 | OSD_TOTAL_CDB_LEN = OSD_ADDITIONAL_CDB_LENGTH + 8, | 32 | OSD_TOTAL_CDB_LEN = OSD_ADDITIONAL_CDB_LENGTH + 8, |
| 32 | /* OSD_CAP_LEN = 104,*/ | 33 | OSD_CAP_LEN = 104, |
| 33 | OSD_CAP_LEN = OSDv1_CAP_LEN,/* FIXME: Pete rev-001 sup */ | ||
| 34 | 34 | ||
| 35 | OSD_SYSTEMID_LEN = 20, | 35 | OSD_SYSTEMID_LEN = 20, |
| 36 | OSD_CRYPTO_KEYID_SIZE = 20, | 36 | OSDv1_CRYPTO_KEYID_SIZE = 20, |
| 37 | /*FIXME: OSDv2_CRYPTO_KEYID_SIZE = 32,*/ | 37 | OSDv2_CRYPTO_KEYID_SIZE = 32, |
| 38 | OSD_CRYPTO_KEYID_SIZE = OSDv2_CRYPTO_KEYID_SIZE, | ||
| 38 | OSD_CRYPTO_SEED_SIZE = 4, | 39 | OSD_CRYPTO_SEED_SIZE = 4, |
| 39 | OSD_CRYPTO_NONCE_SIZE = 12, | 40 | OSD_CRYPTO_NONCE_SIZE = 12, |
| 40 | OSD_MAX_SENSE_LEN = 252, /* from SPC-3 */ | 41 | OSD_MAX_SENSE_LEN = 252, /* from SPC-3 */ |
| @@ -164,7 +165,11 @@ struct osd_cdb_head { | |||
| 164 | /* called allocation_length in some commands */ | 165 | /* called allocation_length in some commands */ |
| 165 | /*32*/ __be64 length; | 166 | /*32*/ __be64 length; |
| 166 | /*40*/ __be64 start_address; | 167 | /*40*/ __be64 start_address; |
| 167 | /*48*/ __be32 list_identifier;/* Rarely used */ | 168 | union { |
| 169 | /*48*/ __be32 list_identifier;/* Rarely used */ | ||
| 170 | /* OSD2r05 5.2.5 CDB continuation length */ | ||
| 171 | /*48*/ __be32 cdb_continuation_length; | ||
| 172 | }; | ||
| 168 | } __packed v2; | 173 | } __packed v2; |
| 169 | }; | 174 | }; |
| 170 | /*52*/ union { /* selected attributes mode Page/List/Single */ | 175 | /*52*/ union { /* selected attributes mode Page/List/Single */ |
| @@ -204,29 +209,40 @@ struct osd_cdb_head { | |||
| 204 | /*80*/ | 209 | /*80*/ |
| 205 | 210 | ||
| 206 | /*160 v1*/ | 211 | /*160 v1*/ |
| 207 | /*184 v2*/ | 212 | struct osdv1_security_parameters { |
| 208 | struct osd_security_parameters { | 213 | /*160*/u8 integrity_check_value[OSDv1_CRYPTO_KEYID_SIZE]; |
| 209 | /*160*/u8 integrity_check_value[OSD_CRYPTO_KEYID_SIZE]; | ||
| 210 | /*180*/u8 request_nonce[OSD_CRYPTO_NONCE_SIZE]; | 214 | /*180*/u8 request_nonce[OSD_CRYPTO_NONCE_SIZE]; |
| 211 | /*192*/osd_cdb_offset data_in_integrity_check_offset; | 215 | /*192*/osd_cdb_offset data_in_integrity_check_offset; |
| 212 | /*196*/osd_cdb_offset data_out_integrity_check_offset; | 216 | /*196*/osd_cdb_offset data_out_integrity_check_offset; |
| 213 | } __packed; | 217 | } __packed; |
| 214 | /*200 v1*/ | 218 | /*200 v1*/ |
| 215 | /*224 v2*/ | ||
| 216 | 219 | ||
| 217 | /* FIXME: osdv2_security_parameters */ | 220 | /*184 v2*/ |
| 221 | struct osdv2_security_parameters { | ||
| 222 | /*184*/u8 integrity_check_value[OSDv2_CRYPTO_KEYID_SIZE]; | ||
| 223 | /*216*/u8 request_nonce[OSD_CRYPTO_NONCE_SIZE]; | ||
| 224 | /*228*/osd_cdb_offset data_in_integrity_check_offset; | ||
| 225 | /*232*/osd_cdb_offset data_out_integrity_check_offset; | ||
| 226 | } __packed; | ||
| 227 | /*236 v2*/ | ||
| 228 | |||
| 229 | struct osd_security_parameters { | ||
| 230 | union { | ||
| 231 | struct osdv1_security_parameters v1; | ||
| 232 | struct osdv2_security_parameters v2; | ||
| 233 | }; | ||
| 234 | }; | ||
| 218 | 235 | ||
| 219 | struct osdv1_cdb { | 236 | struct osdv1_cdb { |
| 220 | struct osd_cdb_head h; | 237 | struct osd_cdb_head h; |
| 221 | u8 caps[OSDv1_CAP_LEN]; | 238 | u8 caps[OSDv1_CAP_LEN]; |
| 222 | struct osd_security_parameters sec_params; | 239 | struct osdv1_security_parameters sec_params; |
| 223 | } __packed; | 240 | } __packed; |
| 224 | 241 | ||
| 225 | struct osdv2_cdb { | 242 | struct osdv2_cdb { |
| 226 | struct osd_cdb_head h; | 243 | struct osd_cdb_head h; |
| 227 | u8 caps[OSD_CAP_LEN]; | 244 | u8 caps[OSD_CAP_LEN]; |
| 228 | struct osd_security_parameters sec_params; | 245 | struct osdv2_security_parameters sec_params; |
| 229 | /* FIXME: osdv2_security_parameters */ | ||
| 230 | } __packed; | 246 | } __packed; |
| 231 | 247 | ||
| 232 | struct osd_cdb { | 248 | struct osd_cdb { |
| @@ -301,14 +317,25 @@ struct osd_attributes_list_attrid { | |||
| 301 | } __packed; | 317 | } __packed; |
| 302 | 318 | ||
| 303 | /* | 319 | /* |
| 320 | * NOTE: v1: is not aligned. | ||
| 321 | */ | ||
| 322 | struct osdv1_attributes_list_element { | ||
| 323 | __be32 attr_page; | ||
| 324 | __be32 attr_id; | ||
| 325 | __be16 attr_bytes; /* valid bytes at attr_val without padding */ | ||
| 326 | u8 attr_val[0]; | ||
| 327 | } __packed; | ||
| 328 | |||
| 329 | /* | ||
| 304 | * osd2r03: 7.1.3.3 List entry format for retrieved attributes and | 330 | * osd2r03: 7.1.3.3 List entry format for retrieved attributes and |
| 305 | * for setting attributes | 331 | * for setting attributes |
| 306 | * NOTE: v2 is 8-bytes aligned, v1 is not aligned. | 332 | * NOTE: v2 is 8-bytes aligned |
| 307 | */ | 333 | */ |
| 308 | struct osd_attributes_list_element { | 334 | struct osdv2_attributes_list_element { |
| 309 | __be32 attr_page; | 335 | __be32 attr_page; |
| 310 | __be32 attr_id; | 336 | __be32 attr_id; |
| 311 | __be16 attr_bytes; | 337 | u8 reserved[6]; |
| 338 | __be16 attr_bytes; /* valid bytes at attr_val without padding */ | ||
| 312 | u8 attr_val[0]; | 339 | u8 attr_val[0]; |
| 313 | } __packed; | 340 | } __packed; |
| 314 | 341 | ||
| @@ -324,13 +351,13 @@ enum { | |||
| 324 | 351 | ||
| 325 | static inline unsigned osdv1_attr_list_elem_size(unsigned len) | 352 | static inline unsigned osdv1_attr_list_elem_size(unsigned len) |
| 326 | { | 353 | { |
| 327 | return ALIGN(len + sizeof(struct osd_attributes_list_element), | 354 | return ALIGN(len + sizeof(struct osdv1_attributes_list_element), |
| 328 | OSDv1_ATTRIBUTES_ELEM_ALIGN); | 355 | OSDv1_ATTRIBUTES_ELEM_ALIGN); |
| 329 | } | 356 | } |
| 330 | 357 | ||
| 331 | static inline unsigned osdv2_attr_list_elem_size(unsigned len) | 358 | static inline unsigned osdv2_attr_list_elem_size(unsigned len) |
| 332 | { | 359 | { |
| 333 | return ALIGN(len + sizeof(struct osd_attributes_list_element), | 360 | return ALIGN(len + sizeof(struct osdv2_attributes_list_element), |
| 334 | OSD_ATTRIBUTES_ELEM_ALIGN); | 361 | OSD_ATTRIBUTES_ELEM_ALIGN); |
| 335 | } | 362 | } |
| 336 | 363 | ||
| @@ -419,15 +446,35 @@ struct osd_data_out_integrity_info { | |||
| 419 | __be64 data_bytes; | 446 | __be64 data_bytes; |
| 420 | __be64 set_attributes_bytes; | 447 | __be64 set_attributes_bytes; |
| 421 | __be64 get_attributes_bytes; | 448 | __be64 get_attributes_bytes; |
| 422 | __be64 integrity_check_value; | 449 | __u8 integrity_check_value[OSD_CRYPTO_KEYID_SIZE]; |
| 423 | } __packed; | 450 | } __packed; |
| 424 | 451 | ||
| 452 | /* Same osd_data_out_integrity_info is used for OSD2/OSD1. The only difference | ||
| 453 | * Is the sizeof the structure since in OSD1 the last array is smaller. Use | ||
| 454 | * below for version independent handling of this structure | ||
| 455 | */ | ||
| 456 | static inline int osd_data_out_integrity_info_sizeof(bool is_ver1) | ||
| 457 | { | ||
| 458 | return sizeof(struct osd_data_out_integrity_info) - | ||
| 459 | (is_ver1 * (OSDv2_CRYPTO_KEYID_SIZE - OSDv1_CRYPTO_KEYID_SIZE)); | ||
| 460 | } | ||
| 461 | |||
| 425 | struct osd_data_in_integrity_info { | 462 | struct osd_data_in_integrity_info { |
| 426 | __be64 data_bytes; | 463 | __be64 data_bytes; |
| 427 | __be64 retrieved_attributes_bytes; | 464 | __be64 retrieved_attributes_bytes; |
| 428 | __be64 integrity_check_value; | 465 | __u8 integrity_check_value[OSD_CRYPTO_KEYID_SIZE]; |
| 429 | } __packed; | 466 | } __packed; |
| 430 | 467 | ||
| 468 | /* Same osd_data_in_integrity_info is used for OSD2/OSD1. The only difference | ||
| 469 | * Is the sizeof the structure since in OSD1 the last array is smaller. Use | ||
| 470 | * below for version independent handling of this structure | ||
| 471 | */ | ||
| 472 | static inline int osd_data_in_integrity_info_sizeof(bool is_ver1) | ||
| 473 | { | ||
| 474 | return sizeof(struct osd_data_in_integrity_info) - | ||
| 475 | (is_ver1 * (OSDv2_CRYPTO_KEYID_SIZE - OSDv1_CRYPTO_KEYID_SIZE)); | ||
| 476 | } | ||
| 477 | |||
| 431 | struct osd_timestamp { | 478 | struct osd_timestamp { |
| 432 | u8 time[6]; /* number of milliseconds since 1/1/1970 UT (big endian) */ | 479 | u8 time[6]; /* number of milliseconds since 1/1/1970 UT (big endian) */ |
| 433 | } __packed; | 480 | } __packed; |
| @@ -477,7 +524,7 @@ enum osd_capability_bit_masks { | |||
| 477 | 524 | ||
| 478 | OSD_SEC_CAP_NONE1 = BIT(8), | 525 | OSD_SEC_CAP_NONE1 = BIT(8), |
| 479 | OSD_SEC_CAP_NONE2 = BIT(9), | 526 | OSD_SEC_CAP_NONE2 = BIT(9), |
| 480 | OSD_SEC_CAP_NONE3 = BIT(10), | 527 | OSD_SEC_GBL_REM = BIT(10), /*v2 only*/ |
| 481 | OSD_SEC_CAP_QUERY = BIT(11), /*v2 only*/ | 528 | OSD_SEC_CAP_QUERY = BIT(11), /*v2 only*/ |
| 482 | OSD_SEC_CAP_M_OBJECT = BIT(12), /*v2 only*/ | 529 | OSD_SEC_CAP_M_OBJECT = BIT(12), /*v2 only*/ |
| 483 | OSD_SEC_CAP_POL_SEC = BIT(13), | 530 | OSD_SEC_CAP_POL_SEC = BIT(13), |
| @@ -552,8 +599,7 @@ struct osdv1_capability { | |||
| 552 | 599 | ||
| 553 | struct osd_capability { | 600 | struct osd_capability { |
| 554 | struct osd_capability_head h; | 601 | struct osd_capability_head h; |
| 555 | /* struct osd_cap_object_descriptor od;*/ | 602 | struct osd_cap_object_descriptor od; |
| 556 | struct osdv1_cap_object_descriptor od; /* FIXME: Pete rev-001 sup */ | ||
| 557 | } __packed; | 603 | } __packed; |
| 558 | 604 | ||
| 559 | /** | 605 | /** |
