aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2009-05-22 14:25:34 -0400
committerJens Axboe <jens.axboe@oracle.com>2009-05-22 14:25:34 -0400
commite4b636366c00738b9609cda307014d71b1225b7f (patch)
tree760b67b3624eda62e943e48ce93635c30a5b47bf /include
parentb9ed7252d219c1c663944bf03846eabb515dbe75 (diff)
parent279e677faa775ad16e75c32e1bf4a37f8158bc61 (diff)
Merge branch 'master' into for-2.6.31
Conflicts: drivers/block/hd.c drivers/block/mg_disk.c Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'include')
-rw-r--r--include/acpi/video.h2
-rw-r--r--include/asm-generic/atomic.h4
-rw-r--r--include/asm-generic/bug.h7
-rw-r--r--include/asm-generic/local.h2
-rw-r--r--include/asm-generic/vmlinux.lds.h3
-rw-r--r--include/drm/drm_pciids.h1
-rw-r--r--include/drm/i915_drm.h10
-rw-r--r--include/linux/Kbuild2
-rw-r--r--include/linux/ata.h28
-rw-r--r--include/linux/binfmts.h14
-rw-r--r--include/linux/blkdev.h1
-rw-r--r--include/linux/device.h9
-rw-r--r--include/linux/dmaengine.h6
-rw-r--r--include/linux/fs.h4
-rw-r--r--include/linux/init.h8
-rw-r--r--include/linux/input.h24
-rw-r--r--include/linux/memcontrol.h4
-rw-r--r--include/linux/mman.h9
-rw-r--r--include/linux/namei.h1
-rw-r--r--include/linux/netdevice.h4
-rw-r--r--include/linux/netfilter/nfnetlink_conntrack.h1
-rw-r--r--include/linux/netfilter/x_tables.h73
-rw-r--r--include/linux/netfilter/xt_LED.h2
-rw-r--r--include/linux/netfilter/xt_cluster.h2
-rw-r--r--include/linux/nls.h19
-rw-r--r--include/linux/of_platform.h10
-rw-r--r--include/linux/pci_regs.h1
-rw-r--r--include/linux/platform_device.h1
-rw-r--r--include/linux/regulator/driver.h1
-rw-r--r--include/linux/reiserfs_fs_sb.h3
-rw-r--r--include/linux/reiserfs_xattr.h7
-rw-r--r--include/linux/romfs_fs.h5
-rw-r--r--include/linux/sunrpc/xprt.h1
-rw-r--r--include/linux/syscalls.h1
-rw-r--r--include/linux/usb/cdc.h3
-rw-r--r--include/linux/virtio_net.h1
-rw-r--r--include/linux/wait.h6
-rw-r--r--include/linux/writeback.h2
-rw-r--r--include/net/9p/client.h1
-rw-r--r--include/net/bluetooth/hci.h1
-rw-r--r--include/net/bluetooth/hci_core.h9
-rw-r--r--include/net/tcp.h14
-rw-r--r--include/scsi/fc/fc_fs.h1
-rw-r--r--include/scsi/libfc.h1
-rw-r--r--include/scsi/libiscsi.h2
-rw-r--r--include/scsi/osd_protocol.h96
-rw-r--r--include/sound/version.h2
47 files changed, 319 insertions, 90 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)
5extern int acpi_video_register(void); 5extern int acpi_video_register(void);
6extern int acpi_video_exit(void);
6#else 7#else
7static inline int acpi_video_register(void) { return 0; } 8static inline int acpi_video_register(void) { return 0; }
9static 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/bug.h b/include/asm-generic/bug.h
index e727fe0d1451..4b6755984d24 100644
--- a/include/asm-generic/bug.h
+++ b/include/asm-generic/bug.h
@@ -58,12 +58,13 @@ struct bug_entry {
58 */ 58 */
59#ifndef __WARN 59#ifndef __WARN
60#ifndef __ASSEMBLY__ 60#ifndef __ASSEMBLY__
61extern void warn_slowpath(const char *file, const int line, 61extern void warn_slowpath_fmt(const char *file, const int line,
62 const char *fmt, ...) __attribute__((format(printf, 3, 4))); 62 const char *fmt, ...) __attribute__((format(printf, 3, 4)));
63extern void warn_slowpath_null(const char *file, const int line);
63#define WANT_WARN_ON_SLOWPATH 64#define WANT_WARN_ON_SLOWPATH
64#endif 65#endif
65#define __WARN() warn_slowpath(__FILE__, __LINE__, NULL) 66#define __WARN() warn_slowpath_null(__FILE__, __LINE__)
66#define __WARN_printf(arg...) warn_slowpath(__FILE__, __LINE__, arg) 67#define __WARN_printf(arg...) warn_slowpath_fmt(__FILE__, __LINE__, arg)
67#else 68#else
68#define __WARN_printf(arg...) do { printk(arg); __WARN(); } while (0) 69#define __WARN_printf(arg...) do { printk(arg); __WARN(); } while (0)
69#endif 70#endif
diff --git a/include/asm-generic/local.h b/include/asm-generic/local.h
index dbd6150763e9..fc218444e315 100644
--- a/include/asm-generic/local.h
+++ b/include/asm-generic/local.h
@@ -42,7 +42,7 @@ typedef struct
42 42
43#define local_cmpxchg(l, o, n) atomic_long_cmpxchg((&(l)->a), (o), (n)) 43#define local_cmpxchg(l, o, n) atomic_long_cmpxchg((&(l)->a), (o), (n))
44#define local_xchg(l, n) atomic_long_xchg((&(l)->a), (n)) 44#define local_xchg(l, n) atomic_long_xchg((&(l)->a), (n))
45#define local_add_unless(l, a, u) atomic_long_add_unless((&(l)->a), (a), (u)) 45#define local_add_unless(l, _a, u) atomic_long_add_unless((&(l)->a), (_a), (u))
46#define local_inc_not_zero(l) atomic_long_inc_not_zero(&(l)->a) 46#define local_inc_not_zero(l) atomic_long_inc_not_zero(&(l)->a)
47 47
48/* Non-atomic variants, ie. preemption disabled and won't be touched 48/* Non-atomic variants, ie. preemption disabled and won't be touched
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index eaa06ef6f7d9..89853bcd27a6 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -90,7 +90,6 @@
90/* .data section */ 90/* .data section */
91#define DATA_DATA \ 91#define DATA_DATA \
92 *(.data) \ 92 *(.data) \
93 *(.data.init.refok) \
94 *(.ref.data) \ 93 *(.ref.data) \
95 DEV_KEEP(init.data) \ 94 DEV_KEEP(init.data) \
96 DEV_KEEP(exit.data) \ 95 DEV_KEEP(exit.data) \
@@ -289,8 +288,6 @@
289 *(.text.hot) \ 288 *(.text.hot) \
290 *(.text) \ 289 *(.text) \
291 *(.ref.text) \ 290 *(.ref.text) \
292 *(.text.init.refok) \
293 *(.exit.text.refok) \
294 DEV_KEEP(init.text) \ 291 DEV_KEEP(init.text) \
295 DEV_KEEP(exit.text) \ 292 DEV_KEEP(exit.text) \
296 CPU_KEEP(init.text) \ 293 CPU_KEEP(init.text) \
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/drm/i915_drm.h b/include/drm/i915_drm.h
index 95962fa8398a..8e1e92583fbc 100644
--- a/include/drm/i915_drm.h
+++ b/include/drm/i915_drm.h
@@ -184,6 +184,7 @@ typedef struct _drm_i915_sarea {
184#define DRM_I915_GEM_GET_TILING 0x22 184#define DRM_I915_GEM_GET_TILING 0x22
185#define DRM_I915_GEM_GET_APERTURE 0x23 185#define DRM_I915_GEM_GET_APERTURE 0x23
186#define DRM_I915_GEM_MMAP_GTT 0x24 186#define DRM_I915_GEM_MMAP_GTT 0x24
187#define DRM_I915_GET_PIPE_FROM_CRTC_ID 0x25
187 188
188#define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t) 189#define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t)
189#define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH) 190#define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH)
@@ -219,6 +220,7 @@ typedef struct _drm_i915_sarea {
219#define DRM_IOCTL_I915_GEM_SET_TILING DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_SET_TILING, struct drm_i915_gem_set_tiling) 220#define DRM_IOCTL_I915_GEM_SET_TILING DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_SET_TILING, struct drm_i915_gem_set_tiling)
220#define DRM_IOCTL_I915_GEM_GET_TILING DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_TILING, struct drm_i915_gem_get_tiling) 221#define DRM_IOCTL_I915_GEM_GET_TILING DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_TILING, struct drm_i915_gem_get_tiling)
221#define DRM_IOCTL_I915_GEM_GET_APERTURE DRM_IOR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_APERTURE, struct drm_i915_gem_get_aperture) 222#define DRM_IOCTL_I915_GEM_GET_APERTURE DRM_IOR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_APERTURE, struct drm_i915_gem_get_aperture)
223#define DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GET_PIPE_FROM_CRTC_ID, struct drm_intel_get_pipe_from_crtc_id)
222 224
223/* Allow drivers to submit batchbuffers directly to hardware, relying 225/* Allow drivers to submit batchbuffers directly to hardware, relying
224 * on the security mechanisms provided by hardware. 226 * on the security mechanisms provided by hardware.
@@ -657,4 +659,12 @@ struct drm_i915_gem_get_aperture {
657 __u64 aper_available_size; 659 __u64 aper_available_size;
658}; 660};
659 661
662struct drm_i915_get_pipe_from_crtc_id {
663 /** ID of CRTC being requested **/
664 __u32 crtc_id;
665
666 /** pipe of requested CRTC **/
667 __u32 pipe;
668};
669
660#endif /* _I915_DRM_H_ */ 670#endif /* _I915_DRM_H_ */
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index ca9b9b9bd331..3f0eaa397ef5 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -138,6 +138,7 @@ header-y += qnxtypes.h
138header-y += radeonfb.h 138header-y += radeonfb.h
139header-y += raw.h 139header-y += raw.h
140header-y += resource.h 140header-y += resource.h
141header-y += romfs_fs.h
141header-y += rose.h 142header-y += rose.h
142header-y += serial_reg.h 143header-y += serial_reg.h
143header-y += smbno.h 144header-y += smbno.h
@@ -314,7 +315,6 @@ unifdef-y += irqnr.h
314unifdef-y += reboot.h 315unifdef-y += reboot.h
315unifdef-y += reiserfs_fs.h 316unifdef-y += reiserfs_fs.h
316unifdef-y += reiserfs_xattr.h 317unifdef-y += reiserfs_xattr.h
317unifdef-y += romfs_fs.h
318unifdef-y += route.h 318unifdef-y += route.h
319unifdef-y += rtc.h 319unifdef-y += rtc.h
320unifdef-y += rtnetlink.h 320unifdef-y += rtnetlink.h
diff --git a/include/linux/ata.h b/include/linux/ata.h
index cb79b7a208e1..915da43edee1 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -730,6 +730,34 @@ static inline int ata_id_has_unload(const u16 *id)
730 return 0; 730 return 0;
731} 731}
732 732
733static inline int ata_id_form_factor(const u16 *id)
734{
735 u16 val = id[168];
736
737 if (ata_id_major_version(id) < 7 || val == 0 || val == 0xffff)
738 return 0;
739
740 val &= 0xf;
741
742 if (val > 5)
743 return 0;
744
745 return val;
746}
747
748static inline int ata_id_rotation_rate(const u16 *id)
749{
750 u16 val = id[217];
751
752 if (ata_id_major_version(id) < 7 || val == 0 || val == 0xffff)
753 return 0;
754
755 if (val > 1 && val < 0x401)
756 return 0;
757
758 return val;
759}
760
733static inline int ata_id_has_trim(const u16 *id) 761static inline int ata_id_has_trim(const u16 *id)
734{ 762{
735 if (ata_id_major_version(id) >= 7 && 763 if (ata_id_major_version(id) >= 7 &&
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
85extern int register_binfmt(struct linux_binfmt *); 85extern int __register_binfmt(struct linux_binfmt *fmt, int insert);
86
87/* Registration of default binfmt handlers */
88static 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 */
93static inline int insert_binfmt(struct linux_binfmt *fmt)
94{
95 return __register_binfmt(fmt, 1);
96}
97
86extern void unregister_binfmt(struct linux_binfmt *); 98extern void unregister_binfmt(struct linux_binfmt *);
87 99
88extern int prepare_binprm(struct linux_binprm *); 100extern int prepare_binprm(struct linux_binprm *);
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index a967dd775dbd..56ce53fce72e 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -595,6 +595,7 @@ enum {
595 blk_failfast_driver(rq)) 595 blk_failfast_driver(rq))
596#define blk_rq_started(rq) ((rq)->cmd_flags & REQ_STARTED) 596#define blk_rq_started(rq) ((rq)->cmd_flags & REQ_STARTED)
597#define blk_rq_io_stat(rq) ((rq)->cmd_flags & REQ_IO_STAT) 597#define blk_rq_io_stat(rq) ((rq)->cmd_flags & REQ_IO_STAT)
598#define blk_rq_quiet(rq) ((rq)->cmd_flags & REQ_QUIET)
598 599
599#define blk_account_rq(rq) (blk_rq_started(rq) && (blk_fs_request(rq) || blk_discard_rq(rq))) 600#define blk_account_rq(rq) (blk_rq_started(rq) && (blk_fs_request(rq) || blk_discard_rq(rq)))
600 601
diff --git a/include/linux/device.h b/include/linux/device.h
index 6a69caaac18a..5d5c197bad45 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -384,13 +384,8 @@ struct device {
384 struct device_driver *driver; /* which driver has allocated this 384 struct device_driver *driver; /* which driver has allocated this
385 device */ 385 device */
386 void *driver_data; /* data private to the driver */ 386 void *driver_data; /* data private to the driver */
387 387 void *platform_data; /* Platform specific data, device
388 void *platform_data; /* We will remove platform_data 388 core doesn't touch it */
389 field if all platform devices
390 pass its platform specific data
391 from platform_device->platform_data,
392 other kind of devices should not
393 use platform_data. */
394 struct dev_pm_info power; 389 struct dev_pm_info power;
395 390
396#ifdef CONFIG_NUMA 391#ifdef CONFIG_NUMA
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 2e2aa3df170c..ffefba81c818 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -78,12 +78,18 @@ enum dma_transaction_type {
78 * dependency chains 78 * dependency chains
79 * @DMA_COMPL_SKIP_SRC_UNMAP - set to disable dma-unmapping the source buffer(s) 79 * @DMA_COMPL_SKIP_SRC_UNMAP - set to disable dma-unmapping the source buffer(s)
80 * @DMA_COMPL_SKIP_DEST_UNMAP - set to disable dma-unmapping the destination(s) 80 * @DMA_COMPL_SKIP_DEST_UNMAP - set to disable dma-unmapping the destination(s)
81 * @DMA_COMPL_SRC_UNMAP_SINGLE - set to do the source dma-unmapping as single
82 * (if not set, do the source dma-unmapping as page)
83 * @DMA_COMPL_DEST_UNMAP_SINGLE - set to do the destination dma-unmapping as single
84 * (if not set, do the destination dma-unmapping as page)
81 */ 85 */
82enum dma_ctrl_flags { 86enum dma_ctrl_flags {
83 DMA_PREP_INTERRUPT = (1 << 0), 87 DMA_PREP_INTERRUPT = (1 << 0),
84 DMA_CTRL_ACK = (1 << 1), 88 DMA_CTRL_ACK = (1 << 1),
85 DMA_COMPL_SKIP_SRC_UNMAP = (1 << 2), 89 DMA_COMPL_SKIP_SRC_UNMAP = (1 << 2),
86 DMA_COMPL_SKIP_DEST_UNMAP = (1 << 3), 90 DMA_COMPL_SKIP_DEST_UNMAP = (1 << 3),
91 DMA_COMPL_SRC_UNMAP_SINGLE = (1 << 4),
92 DMA_COMPL_DEST_UNMAP_SINGLE = (1 << 5),
87}; 93};
88 94
89/** 95/**
diff --git a/include/linux/fs.h b/include/linux/fs.h
index d926c2bea166..83d6b4397245 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1775,6 +1775,7 @@ void kill_block_super(struct super_block *sb);
1775void kill_anon_super(struct super_block *sb); 1775void kill_anon_super(struct super_block *sb);
1776void kill_litter_super(struct super_block *sb); 1776void kill_litter_super(struct super_block *sb);
1777void deactivate_super(struct super_block *sb); 1777void deactivate_super(struct super_block *sb);
1778void deactivate_locked_super(struct super_block *sb);
1778int set_anon_super(struct super_block *s, void *data); 1779int set_anon_super(struct super_block *s, void *data);
1779struct super_block *sget(struct file_system_type *type, 1780struct super_block *sget(struct file_system_type *type,
1780 int (*test)(struct super_block *,void *), 1781 int (*test)(struct super_block *,void *),
@@ -2117,7 +2118,7 @@ extern struct file *create_write_pipe(int flags);
2117extern void free_write_pipe(struct file *); 2118extern void free_write_pipe(struct file *);
2118 2119
2119extern struct file *do_filp_open(int dfd, const char *pathname, 2120extern struct file *do_filp_open(int dfd, const char *pathname,
2120 int open_flag, int mode); 2121 int open_flag, int mode, int acc_mode);
2121extern int may_open(struct path *, int, int); 2122extern int may_open(struct path *, int, int);
2122 2123
2123extern int kernel_read(struct file *, unsigned long, char *, unsigned long); 2124extern int kernel_read(struct file *, unsigned long, char *, unsigned long);
@@ -2369,6 +2370,7 @@ extern void file_update_time(struct file *file);
2369 2370
2370extern int generic_show_options(struct seq_file *m, struct vfsmount *mnt); 2371extern int generic_show_options(struct seq_file *m, struct vfsmount *mnt);
2371extern void save_mount_options(struct super_block *sb, char *options); 2372extern void save_mount_options(struct super_block *sb, char *options);
2373extern void replace_mount_options(struct super_block *sb, char *options);
2372 2374
2373static inline ino_t parent_ino(struct dentry *dentry) 2375static inline ino_t parent_ino(struct dentry *dentry)
2374{ 2376{
diff --git a/include/linux/init.h b/include/linux/init.h
index 20a1334e34e9..0e06c176f185 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -62,14 +62,6 @@
62#define __refdata __section(.ref.data) 62#define __refdata __section(.ref.data)
63#define __refconst __section(.ref.rodata) 63#define __refconst __section(.ref.rodata)
64 64
65/* backward compatibility note
66 * A few places hardcode the old section names:
67 * .text.init.refok
68 * .data.init.refok
69 * .exit.text.refok
70 * They should be converted to use the defines from this file
71 */
72
73/* compatibility defines */ 65/* compatibility defines */
74#define __init_refok __ref 66#define __init_refok __ref
75#define __initdata_refok __refdata 67#define __initdata_refok __refdata
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
1333static inline void input_mt_sync(struct input_dev *dev)
1334{
1335 input_event(dev, EV_SYN, SYN_MT_REPORT, 0);
1336}
1337
1314void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int code); 1338void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int code);
1315 1339
1316static inline void input_set_abs_params(struct input_dev *dev, int axis, int min, int max, int fuzz, int flat) 1340static 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);
57extern void mem_cgroup_uncharge_page(struct page *page); 57extern void mem_cgroup_uncharge_page(struct page *page);
58extern void mem_cgroup_uncharge_cache_page(struct page *page); 58extern void mem_cgroup_uncharge_cache_page(struct page *page);
59extern int mem_cgroup_shrink_usage(struct page *page, 59extern 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
62extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan, 62extern 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
158static inline int mem_cgroup_shrink_usage(struct page *page, 158static 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
18extern int sysctl_overcommit_memory; 19extern int sysctl_overcommit_memory;
19extern int sysctl_overcommit_ratio; 20extern int sysctl_overcommit_ratio;
20extern atomic_long_t vm_committed_space; 21extern struct percpu_counter vm_committed_as;
21 22
22#ifdef CONFIG_SMP
23extern void vm_acct_memory(long pages);
24#else
25static inline void vm_acct_memory(long pages) 23static 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
31static inline void vm_unacct_memory(long pages) 28static inline void vm_unacct_memory(long pages)
32{ 29{
diff --git a/include/linux/namei.h b/include/linux/namei.h
index fc2e03579877..518098fe63af 100644
--- a/include/linux/namei.h
+++ b/include/linux/namei.h
@@ -69,7 +69,6 @@ extern int path_lookup(const char *, unsigned, struct nameidata *);
69extern int vfs_path_lookup(struct dentry *, struct vfsmount *, 69extern int vfs_path_lookup(struct dentry *, struct vfsmount *,
70 const char *, unsigned int, struct nameidata *); 70 const char *, unsigned int, struct nameidata *);
71 71
72extern int path_lookup_open(int dfd, const char *name, unsigned lookup_flags, struct nameidata *, int open_flags);
73extern struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry *dentry, 72extern struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry *dentry,
74 int (*open)(struct inode *, struct file *)); 73 int (*open)(struct inode *, struct file *));
75extern struct file *nameidata_to_filp(struct nameidata *nd, int flags); 74extern struct file *nameidata_to_filp(struct nameidata *nd, int flags);
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 {
100enum ctattr_protoinfo_dccp { 100enum 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..c9efe039dc57 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
435extern struct xt_table_info *xt_alloc_table_info(unsigned int size); 432extern struct xt_table_info *xt_alloc_table_info(unsigned int size);
436extern void xt_free_table_info(struct xt_table_info *info); 433extern void xt_free_table_info(struct xt_table_info *info);
437extern 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 */
450struct xt_info_lock {
451 spinlock_t lock;
452 unsigned char readers;
453};
454DECLARE_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 */
469static 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 (likely(!lock->readers++))
476 spin_lock(&lock->lock);
477}
478
479static inline void xt_info_rdunlock_bh(void)
480{
481 struct xt_info_lock *lock = &__get_cpu_var(xt_info_locks);
482
483 if (likely(!--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 */
493static inline void xt_info_wrlock(unsigned int cpu)
494{
495 spin_lock(&per_cpu(xt_info_locks, cpu).lock);
496}
497
498static 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/netfilter/xt_LED.h b/include/linux/netfilter/xt_LED.h
index 4c91a0d770d0..f5509e7524d3 100644
--- a/include/linux/netfilter/xt_LED.h
+++ b/include/linux/netfilter/xt_LED.h
@@ -1,6 +1,8 @@
1#ifndef _XT_LED_H 1#ifndef _XT_LED_H
2#define _XT_LED_H 2#define _XT_LED_H
3 3
4#include <linux/types.h>
5
4struct xt_led_info { 6struct xt_led_info {
5 char id[27]; /* Unique ID for this trigger in the LED class */ 7 char id[27]; /* Unique ID for this trigger in the LED class */
6 __u8 always_blink; /* Blink even if the LED is already on */ 8 __u8 always_blink; /* Blink even if the LED is already on */
diff --git a/include/linux/netfilter/xt_cluster.h b/include/linux/netfilter/xt_cluster.h
index 5e0a0d07b526..886682656f09 100644
--- a/include/linux/netfilter/xt_cluster.h
+++ b/include/linux/netfilter/xt_cluster.h
@@ -12,4 +12,6 @@ struct xt_cluster_match_info {
12 u_int32_t flags; 12 u_int32_t flags;
13}; 13};
14 14
15#define XT_CLUSTER_NODES_MAX 32
16
15#endif /* _XT_CLUSTER_MATCH_H */ 17#endif /* _XT_CLUSTER_MATCH_H */
diff --git a/include/linux/nls.h b/include/linux/nls.h
index 6a882208301a..52b1a76c1b43 100644
--- a/include/linux/nls.h
+++ b/include/linux/nls.h
@@ -58,6 +58,25 @@ static inline int nls_strnicmp(struct nls_table *t, const unsigned char *s1,
58 return 0; 58 return 0;
59} 59}
60 60
61/*
62 * nls_nullsize - return length of null character for codepage
63 * @codepage - codepage for which to return length of NULL terminator
64 *
65 * Since we can't guarantee that the null terminator will be a particular
66 * length, we have to check against the codepage. If there's a problem
67 * determining it, assume a single-byte NULL terminator.
68 */
69static inline int
70nls_nullsize(const struct nls_table *codepage)
71{
72 int charlen;
73 char tmp[NLS_MAX_CHARSET_SIZE];
74
75 charlen = codepage->uni2char(0, tmp, NLS_MAX_CHARSET_SIZE);
76
77 return charlen > 0 ? charlen : 1;
78}
79
61#define MODULE_ALIAS_NLS(name) MODULE_ALIAS("nls_" __stringify(name)) 80#define MODULE_ALIAS_NLS(name) MODULE_ALIAS("nls_" __stringify(name))
62 81
63#endif /* _LINUX_NLS_H */ 82#endif /* _LINUX_NLS_H */
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);
52extern void of_unregister_driver(struct of_platform_driver *drv); 52extern void of_unregister_driver(struct of_platform_driver *drv);
53 53
54/* Platform drivers register/unregister */
55static inline int of_register_platform_driver(struct of_platform_driver *drv)
56{
57 return of_register_driver(drv, &of_platform_bus_type);
58}
59static 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
56extern struct of_device *of_find_device_by_node(struct device_node *np); 66extern 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/platform_device.h b/include/linux/platform_device.h
index 72736fd8223c..b67bb5d7b221 100644
--- a/include/linux/platform_device.h
+++ b/include/linux/platform_device.h
@@ -20,7 +20,6 @@ struct platform_device {
20 struct device dev; 20 struct device dev;
21 u32 num_resources; 21 u32 num_resources;
22 struct resource * resource; 22 struct resource * resource;
23 void *platform_data;
24 23
25 struct platform_device_id *id_entry; 24 struct platform_device_id *id_entry;
26}; 25};
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/reiserfs_fs_sb.h b/include/linux/reiserfs_fs_sb.h
index 6b361d23a499..6473650c28f1 100644
--- a/include/linux/reiserfs_fs_sb.h
+++ b/include/linux/reiserfs_fs_sb.h
@@ -402,7 +402,7 @@ struct reiserfs_sb_info {
402 int reserved_blocks; /* amount of blocks reserved for further allocations */ 402 int reserved_blocks; /* amount of blocks reserved for further allocations */
403 spinlock_t bitmap_lock; /* this lock on now only used to protect reserved_blocks variable */ 403 spinlock_t bitmap_lock; /* this lock on now only used to protect reserved_blocks variable */
404 struct dentry *priv_root; /* root of /.reiserfs_priv */ 404 struct dentry *priv_root; /* root of /.reiserfs_priv */
405 struct dentry *xattr_root; /* root of /.reiserfs_priv/.xa */ 405 struct dentry *xattr_root; /* root of /.reiserfs_priv/xattrs */
406 int j_errno; 406 int j_errno;
407#ifdef CONFIG_QUOTA 407#ifdef CONFIG_QUOTA
408 char *s_qf_names[MAXQUOTAS]; 408 char *s_qf_names[MAXQUOTAS];
@@ -488,7 +488,6 @@ enum reiserfs_mount_options {
488#define reiserfs_data_log(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_DATA_LOG)) 488#define reiserfs_data_log(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_DATA_LOG))
489#define reiserfs_data_ordered(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_DATA_ORDERED)) 489#define reiserfs_data_ordered(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_DATA_ORDERED))
490#define reiserfs_data_writeback(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_DATA_WRITEBACK)) 490#define reiserfs_data_writeback(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_DATA_WRITEBACK))
491#define reiserfs_xattrs(s) ((s)->s_xattr != NULL)
492#define reiserfs_xattrs_user(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_XATTRS_USER)) 491#define reiserfs_xattrs_user(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_XATTRS_USER))
493#define reiserfs_posixacl(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_POSIXACL)) 492#define reiserfs_posixacl(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_POSIXACL))
494#define reiserfs_xattrs_optional(s) (reiserfs_xattrs_user(s) || reiserfs_posixacl(s)) 493#define reiserfs_xattrs_optional(s) (reiserfs_xattrs_user(s) || reiserfs_posixacl(s))
diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h
index dcae01e63e40..99928dce37ea 100644
--- a/include/linux/reiserfs_xattr.h
+++ b/include/linux/reiserfs_xattr.h
@@ -38,8 +38,10 @@ struct nameidata;
38int reiserfs_xattr_register_handlers(void) __init; 38int reiserfs_xattr_register_handlers(void) __init;
39void reiserfs_xattr_unregister_handlers(void); 39void reiserfs_xattr_unregister_handlers(void);
40int reiserfs_xattr_init(struct super_block *sb, int mount_flags); 40int reiserfs_xattr_init(struct super_block *sb, int mount_flags);
41int reiserfs_lookup_privroot(struct super_block *sb);
41int reiserfs_delete_xattrs(struct inode *inode); 42int reiserfs_delete_xattrs(struct inode *inode);
42int reiserfs_chown_xattrs(struct inode *inode, struct iattr *attrs); 43int reiserfs_chown_xattrs(struct inode *inode, struct iattr *attrs);
44int reiserfs_permission(struct inode *inode, int mask);
43 45
44#ifdef CONFIG_REISERFS_FS_XATTR 46#ifdef CONFIG_REISERFS_FS_XATTR
45#define has_xattr_dir(inode) (REISERFS_I(inode)->i_flags & i_has_xattr_dir) 47#define has_xattr_dir(inode) (REISERFS_I(inode)->i_flags & i_has_xattr_dir)
@@ -49,7 +51,6 @@ int reiserfs_setxattr(struct dentry *dentry, const char *name,
49 const void *value, size_t size, int flags); 51 const void *value, size_t size, int flags);
50ssize_t reiserfs_listxattr(struct dentry *dentry, char *buffer, size_t size); 52ssize_t reiserfs_listxattr(struct dentry *dentry, char *buffer, size_t size);
51int reiserfs_removexattr(struct dentry *dentry, const char *name); 53int reiserfs_removexattr(struct dentry *dentry, const char *name);
52int reiserfs_permission(struct inode *inode, int mask);
53 54
54int reiserfs_xattr_get(struct inode *, const char *, void *, size_t); 55int reiserfs_xattr_get(struct inode *, const char *, void *, size_t);
55int reiserfs_xattr_set(struct inode *, const char *, const void *, size_t, int); 56int reiserfs_xattr_set(struct inode *, const char *, const void *, size_t, int);
@@ -97,7 +98,7 @@ static inline size_t reiserfs_xattr_jcreate_nblocks(struct inode *inode)
97 98
98 if ((REISERFS_I(inode)->i_flags & i_has_xattr_dir) == 0) { 99 if ((REISERFS_I(inode)->i_flags & i_has_xattr_dir) == 0) {
99 nblocks += JOURNAL_BLOCKS_PER_OBJECT(inode->i_sb); 100 nblocks += JOURNAL_BLOCKS_PER_OBJECT(inode->i_sb);
100 if (REISERFS_SB(inode->i_sb)->xattr_root == NULL) 101 if (!REISERFS_SB(inode->i_sb)->xattr_root->d_inode)
101 nblocks += JOURNAL_BLOCKS_PER_OBJECT(inode->i_sb); 102 nblocks += JOURNAL_BLOCKS_PER_OBJECT(inode->i_sb);
102 } 103 }
103 104
@@ -116,8 +117,6 @@ static inline void reiserfs_init_xattr_rwsem(struct inode *inode)
116#define reiserfs_listxattr NULL 117#define reiserfs_listxattr NULL
117#define reiserfs_removexattr NULL 118#define reiserfs_removexattr NULL
118 119
119#define reiserfs_permission NULL
120
121static inline void reiserfs_init_xattr_rwsem(struct inode *inode) 120static inline void reiserfs_init_xattr_rwsem(struct inode *inode)
122{ 121{
123} 122}
diff --git a/include/linux/romfs_fs.h b/include/linux/romfs_fs.h
index e20bbf9eb365..c490fbc43fe2 100644
--- a/include/linux/romfs_fs.h
+++ b/include/linux/romfs_fs.h
@@ -53,9 +53,4 @@ struct romfs_inode {
53#define ROMFH_PAD (ROMFH_SIZE-1) 53#define ROMFH_PAD (ROMFH_SIZE-1)
54#define ROMFH_MASK (~ROMFH_PAD) 54#define ROMFH_MASK (~ROMFH_PAD)
55 55
56#ifdef __KERNEL__
57
58/* Not much now */
59
60#endif /* __KERNEL__ */
61#endif 56#endif
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
265static inline void xprt_set_connected(struct rpc_xprt *xprt) 266static inline void xprt_set_connected(struct rpc_xprt *xprt)
266{ 267{
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 40617c1d8976..30520844b8da 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -433,6 +433,7 @@ asmlinkage long sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg);
433asmlinkage long sys_fcntl64(unsigned int fd, 433asmlinkage long sys_fcntl64(unsigned int fd,
434 unsigned int cmd, unsigned long arg); 434 unsigned int cmd, unsigned long arg);
435#endif 435#endif
436asmlinkage long sys_pipe2(int __user *fildes, int flags);
436asmlinkage long sys_dup(unsigned int fildes); 437asmlinkage long sys_dup(unsigned int fildes);
437asmlinkage long sys_dup2(unsigned int oldfd, unsigned int newfd); 438asmlinkage long sys_dup2(unsigned int oldfd, unsigned int newfd);
438asmlinkage long sys_dup3(unsigned int oldfd, unsigned int newfd, int flags); 439asmlinkage long sys_dup3(unsigned int oldfd, unsigned int newfd, int flags);
diff --git a/include/linux/usb/cdc.h b/include/linux/usb/cdc.h
index 3c86ed25a04c..c24124a42ce5 100644
--- a/include/linux/usb/cdc.h
+++ b/include/linux/usb/cdc.h
@@ -17,6 +17,7 @@
17#define USB_CDC_SUBCLASS_DMM 0x09 17#define USB_CDC_SUBCLASS_DMM 0x09
18#define USB_CDC_SUBCLASS_MDLM 0x0a 18#define USB_CDC_SUBCLASS_MDLM 0x0a
19#define USB_CDC_SUBCLASS_OBEX 0x0b 19#define USB_CDC_SUBCLASS_OBEX 0x0b
20#define USB_CDC_SUBCLASS_EEM 0x0c
20 21
21#define USB_CDC_PROTO_NONE 0 22#define USB_CDC_PROTO_NONE 0
22 23
@@ -28,6 +29,8 @@
28#define USB_CDC_ACM_PROTO_AT_CDMA 6 29#define USB_CDC_ACM_PROTO_AT_CDMA 6
29#define USB_CDC_ACM_PROTO_VENDOR 0xff 30#define USB_CDC_ACM_PROTO_VENDOR 0xff
30 31
32#define USB_CDC_PROTO_EEM 7
33
31/*-------------------------------------------------------------------------*/ 34/*-------------------------------------------------------------------------*/
32 35
33/* 36/*
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h
index 242348bb3766..cec79adbe3ea 100644
--- a/include/linux/virtio_net.h
+++ b/include/linux/virtio_net.h
@@ -4,6 +4,7 @@
4 * compatible drivers/servers. */ 4 * compatible drivers/servers. */
5#include <linux/types.h> 5#include <linux/types.h>
6#include <linux/virtio_config.h> 6#include <linux/virtio_config.h>
7#include <linux/if_ether.h>
7 8
8/* The ID for virtio_net */ 9/* The ID for virtio_net */
9#define VIRTIO_ID_NET 1 10#define VIRTIO_ID_NET 1
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,
440int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key); 440int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key);
441int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key); 441int 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/linux/writeback.h b/include/linux/writeback.h
index 9c1ed1fb6ddb..93445477f86a 100644
--- a/include/linux/writeback.h
+++ b/include/linux/writeback.h
@@ -168,8 +168,6 @@ void writeback_set_ratelimit(void);
168/* pdflush.c */ 168/* pdflush.c */
169extern int nr_pdflush_threads; /* Global so it can be exported to sysctl 169extern int nr_pdflush_threads; /* Global so it can be exported to sysctl
170 read-only. */ 170 read-only. */
171extern int nr_pdflush_threads_max; /* Global so it can be exported to sysctl */
172extern int nr_pdflush_threads_min; /* Global so it can be exported to sysctl */
173 171
174 172
175#endif /* WRITEBACK_H */ 173#endif /* WRITEBACK_H */
diff --git a/include/net/9p/client.h b/include/net/9p/client.h
index 4012e07162e5..e26812274b75 100644
--- a/include/net/9p/client.h
+++ b/include/net/9p/client.h
@@ -98,7 +98,6 @@ enum p9_req_status_t {
98struct p9_req_t { 98struct p9_req_t {
99 int status; 99 int status;
100 int t_err; 100 int t_err;
101 u16 flush_tag;
102 wait_queue_head_t *wq; 101 wait_queue_head_t *wq;
103 struct p9_fcall *tc; 102 struct p9_fcall *tc;
104 struct p9_fcall *rc; 103 struct p9_fcall *rc;
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..73aead222b32 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
@@ -455,6 +457,7 @@ int hci_recv_fragment(struct hci_dev *hdev, int type, void *data, int count);
455 457
456int hci_register_sysfs(struct hci_dev *hdev); 458int hci_register_sysfs(struct hci_dev *hdev);
457void hci_unregister_sysfs(struct hci_dev *hdev); 459void hci_unregister_sysfs(struct hci_dev *hdev);
460void hci_conn_init_sysfs(struct hci_conn *conn);
458void hci_conn_add_sysfs(struct hci_conn *conn); 461void hci_conn_add_sysfs(struct hci_conn *conn);
459void hci_conn_del_sysfs(struct hci_conn *conn); 462void hci_conn_del_sysfs(struct hci_conn *conn);
460 463
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 1b94b9bfe2dc..646dbe3962ea 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -41,6 +41,7 @@
41#include <net/ip.h> 41#include <net/ip.h>
42#include <net/tcp_states.h> 42#include <net/tcp_states.h>
43#include <net/inet_ecn.h> 43#include <net/inet_ecn.h>
44#include <net/dst.h>
44 45
45#include <linux/seq_file.h> 46#include <linux/seq_file.h>
46 47
@@ -530,6 +531,17 @@ static inline void tcp_fast_path_check(struct sock *sk)
530 tcp_fast_path_on(tp); 531 tcp_fast_path_on(tp);
531} 532}
532 533
534/* Compute the actual rto_min value */
535static inline u32 tcp_rto_min(struct sock *sk)
536{
537 struct dst_entry *dst = __sk_dst_get(sk);
538 u32 rto_min = TCP_RTO_MIN;
539
540 if (dst && dst_metric_locked(dst, RTAX_RTO_MIN))
541 rto_min = dst_metric_rtt(dst, RTAX_RTO_MIN);
542 return rto_min;
543}
544
533/* Compute the actual receive window we are currently advertising. 545/* Compute the actual receive window we are currently advertising.
534 * Rcv_nxt can be after the window if our peer push more data 546 * Rcv_nxt can be after the window if our peer push more data
535 * than the offered window. 547 * than the offered window.
@@ -895,7 +907,7 @@ static inline int tcp_prequeue(struct sock *sk, struct sk_buff *skb)
895 wake_up_interruptible(sk->sk_sleep); 907 wake_up_interruptible(sk->sk_sleep);
896 if (!inet_csk_ack_scheduled(sk)) 908 if (!inet_csk_ack_scheduled(sk))
897 inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK, 909 inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK,
898 (3 * TCP_RTO_MIN) / 4, 910 (3 * tcp_rto_min(sk)) / 4,
899 TCP_RTO_MAX); 911 TCP_RTO_MAX);
900 } 912 }
901 return 1; 913 return 1;
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 */
151enum fc_well_known_fid { 151enum 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;
36struct scsi_host_template; 36struct scsi_host_template;
37struct scsi_device; 37struct scsi_device;
38struct Scsi_Host; 38struct Scsi_Host;
39struct scsi_target;
39struct scsi_cmnd; 40struct scsi_cmnd;
40struct socket; 41struct socket;
41struct iscsi_transport; 42struct 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);
351extern void iscsi_host_remove(struct Scsi_Host *shost); 352extern void iscsi_host_remove(struct Scsi_Host *shost);
352extern void iscsi_host_free(struct Scsi_Host *shost); 353extern void iscsi_host_free(struct Scsi_Host *shost);
354extern 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*/ 212struct osdv1_security_parameters {
208struct 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*/
221struct 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
229struct osd_security_parameters {
230 union {
231 struct osdv1_security_parameters v1;
232 struct osdv2_security_parameters v2;
233 };
234};
218 235
219struct osdv1_cdb { 236struct 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
225struct osdv2_cdb { 242struct 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
232struct osd_cdb { 248struct 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 */
322struct 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 */
308struct osd_attributes_list_element { 334struct 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
325static inline unsigned osdv1_attr_list_elem_size(unsigned len) 352static 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
331static inline unsigned osdv2_attr_list_elem_size(unsigned len) 358static 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 */
456static 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
425struct osd_data_in_integrity_info { 462struct 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 */
472static 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
431struct osd_timestamp { 478struct 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
553struct osd_capability { 600struct 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/**
diff --git a/include/sound/version.h b/include/sound/version.h
index a7e74e23ad2e..456f1359e1c0 100644
--- a/include/sound/version.h
+++ b/include/sound/version.h
@@ -1,3 +1,3 @@
1/* include/version.h */ 1/* include/version.h */
2#define CONFIG_SND_VERSION "1.0.19" 2#define CONFIG_SND_VERSION "1.0.20"
3#define CONFIG_SND_DATE "" 3#define CONFIG_SND_DATE ""