aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-01-31 15:49:28 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-01-31 15:49:28 -0500
commit638e174688f58200d0deb7435093435e7d737b09 (patch)
treea2cd32dbb41daf0a5d4e69eff1805fd5574c292a
parent8d58d773b745950ac912e028b3c81f4902fbf91d (diff)
parentd195ea4b1456192abe780fd773778cbe9f6d77ea (diff)
Merge branch 'origin'
-rw-r--r--arch/arm/configs/bast_defconfig5
-rw-r--r--arch/arm/configs/collie_defconfig7
-rw-r--r--arch/arm/configs/s3c2410_defconfig5
-rw-r--r--arch/arm/kernel/calls.S661
-rw-r--r--arch/arm/kernel/entry-common.S4
-rw-r--r--arch/arm/mach-integrator/integrator_cp.c4
-rw-r--r--arch/arm/mach-s3c2410/cpu.h3
-rw-r--r--arch/arm/mach-s3c2410/devs.c57
-rw-r--r--arch/arm/mach-s3c2410/dma.c2
-rw-r--r--arch/arm/mach-s3c2410/sleep.S6
-rw-r--r--arch/arm/mm/ioremap.c2
-rw-r--r--arch/arm/mm/mm-armv.c6
-rw-r--r--arch/powerpc/platforms/powermac/feature.c6
-rw-r--r--arch/ppc/syslib/mv64x60.c4
-rw-r--r--arch/sparc/kernel/entry.S2
-rw-r--r--arch/sparc/math-emu/math.c10
-rw-r--r--arch/sparc64/kernel/entry.S2
-rw-r--r--arch/sparc64/kernel/sys32.S1
-rw-r--r--arch/sparc64/kernel/systbls.S2
-rw-r--r--block/elevator.c45
-rw-r--r--block/ll_rw_blk.c7
-rw-r--r--drivers/input/touchscreen/ads7846.c9
-rw-r--r--drivers/misc/ibmasm/uart.c2
-rw-r--r--drivers/net/Kconfig28
-rw-r--r--drivers/net/acenic.c4
-rw-r--r--drivers/net/b44.c5
-rw-r--r--drivers/net/bonding/bond_main.c2
-rw-r--r--drivers/net/mv643xx_eth.c108
-rw-r--r--drivers/net/s2io.c2
-rw-r--r--drivers/net/sungem.c55
-rw-r--r--drivers/net/wireless/hostap/Kconfig2
-rw-r--r--drivers/net/wireless/ipw2100.c49
-rw-r--r--drivers/net/wireless/ipw2200.c7
-rw-r--r--drivers/net/wireless/orinoco_cs.c4
-rw-r--r--drivers/pci/msi.c6
-rw-r--r--drivers/scsi/libata-scsi.c27
-rw-r--r--drivers/serial/21285.c2
-rw-r--r--drivers/serial/8250.c19
-rw-r--r--drivers/serial/Kconfig2
-rw-r--r--drivers/serial/amba-pl010.c4
-rw-r--r--drivers/serial/clps711x.c4
-rw-r--r--drivers/serial/imx.c8
-rw-r--r--drivers/serial/s3c2410.c2
-rw-r--r--drivers/serial/sa1100.c6
-rw-r--r--drivers/serial/serial_core.c16
-rw-r--r--drivers/serial/serial_lh7a40x.c6
-rw-r--r--drivers/serial/sh-sci.c96
-rw-r--r--drivers/serial/sunsu.c14
-rw-r--r--drivers/video/amba-clcd.c54
-rw-r--r--fs/bio.c1
-rw-r--r--include/asm-arm/arch-s3c2410/debug-macro.S6
-rw-r--r--include/asm-arm/arch-s3c2410/map.h38
-rw-r--r--include/asm-arm/arch-s3c2410/regs-serial.h6
-rw-r--r--include/asm-arm/arch-s3c2410/uncompress.h6
-rw-r--r--include/asm-arm/mach/map.h1
-rw-r--r--include/asm-arm/pgtable.h1
-rw-r--r--include/asm-sparc64/spinlock.h24
-rw-r--r--include/linux/blkdev.h6
-rw-r--r--include/linux/netfilter/x_tables.h16
-rw-r--r--include/linux/serial_8250.h2
-rw-r--r--include/linux/serial_core.h72
-rw-r--r--include/net/ieee80211.h4
-rw-r--r--include/scsi/scsi_host.h1
-rw-r--r--kernel/rcutorture.c10
-rw-r--r--kernel/sched.c6
-rw-r--r--kernel/time.c2
-rw-r--r--kernel/user.c25
-rw-r--r--net/core/dev.c5
-rw-r--r--net/core/filter.c6
-rw-r--r--net/core/skbuff.c8
-rw-r--r--net/ieee80211/ieee80211_rx.c26
-rw-r--r--net/ieee80211/ieee80211_wx.c12
-rw-r--r--net/ipv4/igmp.c1
-rw-r--r--net/ipv4/tcp_htcp.c1
-rw-r--r--net/ipv6/mcast.c56
-rw-r--r--net/key/af_key.c2
-rw-r--r--net/packet/af_packet.c16
-rw-r--r--net/sctp/sm_statefuns.c8
-rw-r--r--net/sctp/socket.c2
-rw-r--r--security/seclvl.c4
80 files changed, 966 insertions, 792 deletions
diff --git a/arch/arm/configs/bast_defconfig b/arch/arm/configs/bast_defconfig
index 6886001b5366..4a8564f386af 100644
--- a/arch/arm/configs/bast_defconfig
+++ b/arch/arm/configs/bast_defconfig
@@ -14,8 +14,7 @@ CONFIG_GENERIC_IOMAP=y
14# Code maturity level options 14# Code maturity level options
15# 15#
16CONFIG_EXPERIMENTAL=y 16CONFIG_EXPERIMENTAL=y
17# CONFIG_CLEAN_COMPILE is not set 17CONFIG_CLEAN_COMPILE=y
18CONFIG_BROKEN=y
19CONFIG_BROKEN_ON_SMP=y 18CONFIG_BROKEN_ON_SMP=y
20 19
21# 20#
@@ -360,7 +359,6 @@ CONFIG_BLK_DEV_IDE_BAST=y
360# 359#
361# IEEE 1394 (FireWire) support 360# IEEE 1394 (FireWire) support
362# 361#
363# CONFIG_IEEE1394 is not set
364 362
365# 363#
366# I2O device support 364# I2O device support
@@ -781,7 +779,6 @@ CONFIG_SYSFS=y
781# CONFIG_DEVFS_FS is not set 779# CONFIG_DEVFS_FS is not set
782# CONFIG_DEVPTS_FS_XATTR is not set 780# CONFIG_DEVPTS_FS_XATTR is not set
783# CONFIG_TMPFS is not set 781# CONFIG_TMPFS is not set
784# CONFIG_HUGETLBFS is not set
785# CONFIG_HUGETLB_PAGE is not set 782# CONFIG_HUGETLB_PAGE is not set
786CONFIG_RAMFS=y 783CONFIG_RAMFS=y
787 784
diff --git a/arch/arm/configs/collie_defconfig b/arch/arm/configs/collie_defconfig
index 15468a0cf70e..c9aa878e610a 100644
--- a/arch/arm/configs/collie_defconfig
+++ b/arch/arm/configs/collie_defconfig
@@ -13,8 +13,7 @@ CONFIG_GENERIC_CALIBRATE_DELAY=y
13# Code maturity level options 13# Code maturity level options
14# 14#
15CONFIG_EXPERIMENTAL=y 15CONFIG_EXPERIMENTAL=y
16# CONFIG_CLEAN_COMPILE is not set 16CONFIG_CLEAN_COMPILE=y
17CONFIG_BROKEN=y
18CONFIG_BROKEN_ON_SMP=y 17CONFIG_BROKEN_ON_SMP=y
19CONFIG_LOCK_KERNEL=y 18CONFIG_LOCK_KERNEL=y
20CONFIG_INIT_ENV_ARG_LIMIT=32 19CONFIG_INIT_ENV_ARG_LIMIT=32
@@ -308,9 +307,7 @@ CONFIG_MTD_CFI_I2=y
308# CONFIG_MTD_ROM is not set 307# CONFIG_MTD_ROM is not set
309# CONFIG_MTD_ABSENT is not set 308# CONFIG_MTD_ABSENT is not set
310CONFIG_MTD_OBSOLETE_CHIPS=y 309CONFIG_MTD_OBSOLETE_CHIPS=y
311# CONFIG_MTD_AMDSTD is not set
312CONFIG_MTD_SHARP=y 310CONFIG_MTD_SHARP=y
313# CONFIG_MTD_JEDEC is not set
314 311
315# 312#
316# Mapping drivers for chip access 313# Mapping drivers for chip access
@@ -396,7 +393,6 @@ CONFIG_ATA_OVER_ETH=m
396# 393#
397# IEEE 1394 (FireWire) support 394# IEEE 1394 (FireWire) support
398# 395#
399# CONFIG_IEEE1394 is not set
400 396
401# 397#
402# I2O device support 398# I2O device support
@@ -741,7 +737,6 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
741CONFIG_PROC_FS=y 737CONFIG_PROC_FS=y
742CONFIG_SYSFS=y 738CONFIG_SYSFS=y
743CONFIG_TMPFS=y 739CONFIG_TMPFS=y
744# CONFIG_HUGETLBFS is not set
745# CONFIG_HUGETLB_PAGE is not set 740# CONFIG_HUGETLB_PAGE is not set
746CONFIG_RAMFS=y 741CONFIG_RAMFS=y
747# CONFIG_RELAYFS_FS is not set 742# CONFIG_RELAYFS_FS is not set
diff --git a/arch/arm/configs/s3c2410_defconfig b/arch/arm/configs/s3c2410_defconfig
index 33f31080a98c..1964ccd8a71f 100644
--- a/arch/arm/configs/s3c2410_defconfig
+++ b/arch/arm/configs/s3c2410_defconfig
@@ -13,8 +13,7 @@ CONFIG_GENERIC_CALIBRATE_DELAY=y
13# Code maturity level options 13# Code maturity level options
14# 14#
15CONFIG_EXPERIMENTAL=y 15CONFIG_EXPERIMENTAL=y
16# CONFIG_CLEAN_COMPILE is not set 16CONFIG_CLEAN_COMPILE=y
17CONFIG_BROKEN=y
18CONFIG_BROKEN_ON_SMP=y 17CONFIG_BROKEN_ON_SMP=y
19CONFIG_INIT_ENV_ARG_LIMIT=32 18CONFIG_INIT_ENV_ARG_LIMIT=32
20 19
@@ -473,7 +472,6 @@ CONFIG_BLK_DEV_IDE_BAST=y
473# 472#
474# IEEE 1394 (FireWire) support 473# IEEE 1394 (FireWire) support
475# 474#
476# CONFIG_IEEE1394 is not set
477 475
478# 476#
479# I2O device support 477# I2O device support
@@ -896,7 +894,6 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
896CONFIG_PROC_FS=y 894CONFIG_PROC_FS=y
897CONFIG_SYSFS=y 895CONFIG_SYSFS=y
898# CONFIG_TMPFS is not set 896# CONFIG_TMPFS is not set
899# CONFIG_HUGETLBFS is not set
900# CONFIG_HUGETLB_PAGE is not set 897# CONFIG_HUGETLB_PAGE is not set
901CONFIG_RAMFS=y 898CONFIG_RAMFS=y
902# CONFIG_RELAYFS_FS is not set 899# CONFIG_RELAYFS_FS is not set
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S
index 75e6f9a94713..d058e7c12568 100644
--- a/arch/arm/kernel/calls.S
+++ b/arch/arm/kernel/calls.S
@@ -7,337 +7,334 @@
7 * it under the terms of the GNU General Public License version 2 as 7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 * 9 *
10 * This file is included twice in entry-common.S 10 * This file is included thrice in entry-common.S
11 */ 11 */
12#ifndef NR_syscalls 12/* 0 */ CALL(sys_restart_syscall)
13#define NR_syscalls 328 13 CALL(sys_exit)
14#else 14 CALL(sys_fork_wrapper)
15 15 CALL(sys_read)
16100: 16 CALL(sys_write)
17/* 0 */ .long sys_restart_syscall 17/* 5 */ CALL(sys_open)
18 .long sys_exit 18 CALL(sys_close)
19 .long sys_fork_wrapper 19 CALL(sys_ni_syscall) /* was sys_waitpid */
20 .long sys_read 20 CALL(sys_creat)
21 .long sys_write 21 CALL(sys_link)
22/* 5 */ .long sys_open 22/* 10 */ CALL(sys_unlink)
23 .long sys_close 23 CALL(sys_execve_wrapper)
24 .long sys_ni_syscall /* was sys_waitpid */ 24 CALL(sys_chdir)
25 .long sys_creat 25 CALL(OBSOLETE(sys_time)) /* used by libc4 */
26 .long sys_link 26 CALL(sys_mknod)
27/* 10 */ .long sys_unlink 27/* 15 */ CALL(sys_chmod)
28 .long sys_execve_wrapper 28 CALL(sys_lchown16)
29 .long sys_chdir 29 CALL(sys_ni_syscall) /* was sys_break */
30 .long OBSOLETE(sys_time) /* used by libc4 */ 30 CALL(sys_ni_syscall) /* was sys_stat */
31 .long sys_mknod 31 CALL(sys_lseek)
32/* 15 */ .long sys_chmod 32/* 20 */ CALL(sys_getpid)
33 .long sys_lchown16 33 CALL(sys_mount)
34 .long sys_ni_syscall /* was sys_break */ 34 CALL(OBSOLETE(sys_oldumount)) /* used by libc4 */
35 .long sys_ni_syscall /* was sys_stat */ 35 CALL(sys_setuid16)
36 .long sys_lseek 36 CALL(sys_getuid16)
37/* 20 */ .long sys_getpid 37/* 25 */ CALL(OBSOLETE(sys_stime))
38 .long sys_mount 38 CALL(sys_ptrace)
39 .long OBSOLETE(sys_oldumount) /* used by libc4 */ 39 CALL(OBSOLETE(sys_alarm)) /* used by libc4 */
40 .long sys_setuid16 40 CALL(sys_ni_syscall) /* was sys_fstat */
41 .long sys_getuid16 41 CALL(sys_pause)
42/* 25 */ .long OBSOLETE(sys_stime) 42/* 30 */ CALL(OBSOLETE(sys_utime)) /* used by libc4 */
43 .long sys_ptrace 43 CALL(sys_ni_syscall) /* was sys_stty */
44 .long OBSOLETE(sys_alarm) /* used by libc4 */ 44 CALL(sys_ni_syscall) /* was sys_getty */
45 .long sys_ni_syscall /* was sys_fstat */ 45 CALL(sys_access)
46 .long sys_pause 46 CALL(sys_nice)
47/* 30 */ .long OBSOLETE(sys_utime) /* used by libc4 */ 47/* 35 */ CALL(sys_ni_syscall) /* was sys_ftime */
48 .long sys_ni_syscall /* was sys_stty */ 48 CALL(sys_sync)
49 .long sys_ni_syscall /* was sys_getty */ 49 CALL(sys_kill)
50 .long sys_access 50 CALL(sys_rename)
51 .long sys_nice 51 CALL(sys_mkdir)
52/* 35 */ .long sys_ni_syscall /* was sys_ftime */ 52/* 40 */ CALL(sys_rmdir)
53 .long sys_sync 53 CALL(sys_dup)
54 .long sys_kill 54 CALL(sys_pipe)
55 .long sys_rename 55 CALL(sys_times)
56 .long sys_mkdir 56 CALL(sys_ni_syscall) /* was sys_prof */
57/* 40 */ .long sys_rmdir 57/* 45 */ CALL(sys_brk)
58 .long sys_dup 58 CALL(sys_setgid16)
59 .long sys_pipe 59 CALL(sys_getgid16)
60 .long sys_times 60 CALL(sys_ni_syscall) /* was sys_signal */
61 .long sys_ni_syscall /* was sys_prof */ 61 CALL(sys_geteuid16)
62/* 45 */ .long sys_brk 62/* 50 */ CALL(sys_getegid16)
63 .long sys_setgid16 63 CALL(sys_acct)
64 .long sys_getgid16 64 CALL(sys_umount)
65 .long sys_ni_syscall /* was sys_signal */ 65 CALL(sys_ni_syscall) /* was sys_lock */
66 .long sys_geteuid16 66 CALL(sys_ioctl)
67/* 50 */ .long sys_getegid16 67/* 55 */ CALL(sys_fcntl)
68 .long sys_acct 68 CALL(sys_ni_syscall) /* was sys_mpx */
69 .long sys_umount 69 CALL(sys_setpgid)
70 .long sys_ni_syscall /* was sys_lock */ 70 CALL(sys_ni_syscall) /* was sys_ulimit */
71 .long sys_ioctl 71 CALL(sys_ni_syscall) /* was sys_olduname */
72/* 55 */ .long sys_fcntl 72/* 60 */ CALL(sys_umask)
73 .long sys_ni_syscall /* was sys_mpx */ 73 CALL(sys_chroot)
74 .long sys_setpgid 74 CALL(sys_ustat)
75 .long sys_ni_syscall /* was sys_ulimit */ 75 CALL(sys_dup2)
76 .long sys_ni_syscall /* was sys_olduname */ 76 CALL(sys_getppid)
77/* 60 */ .long sys_umask 77/* 65 */ CALL(sys_getpgrp)
78 .long sys_chroot 78 CALL(sys_setsid)
79 .long sys_ustat 79 CALL(sys_sigaction)
80 .long sys_dup2 80 CALL(sys_ni_syscall) /* was sys_sgetmask */
81 .long sys_getppid 81 CALL(sys_ni_syscall) /* was sys_ssetmask */
82/* 65 */ .long sys_getpgrp 82/* 70 */ CALL(sys_setreuid16)
83 .long sys_setsid 83 CALL(sys_setregid16)
84 .long sys_sigaction 84 CALL(sys_sigsuspend_wrapper)
85 .long sys_ni_syscall /* was sys_sgetmask */ 85 CALL(sys_sigpending)
86 .long sys_ni_syscall /* was sys_ssetmask */ 86 CALL(sys_sethostname)
87/* 70 */ .long sys_setreuid16 87/* 75 */ CALL(sys_setrlimit)
88 .long sys_setregid16 88 CALL(OBSOLETE(sys_old_getrlimit)) /* used by libc4 */
89 .long sys_sigsuspend_wrapper 89 CALL(sys_getrusage)
90 .long sys_sigpending 90 CALL(sys_gettimeofday)
91 .long sys_sethostname 91 CALL(sys_settimeofday)
92/* 75 */ .long sys_setrlimit 92/* 80 */ CALL(sys_getgroups16)
93 .long OBSOLETE(sys_old_getrlimit) /* used by libc4 */ 93 CALL(sys_setgroups16)
94 .long sys_getrusage 94 CALL(OBSOLETE(old_select)) /* used by libc4 */
95 .long sys_gettimeofday 95 CALL(sys_symlink)
96 .long sys_settimeofday 96 CALL(sys_ni_syscall) /* was sys_lstat */
97/* 80 */ .long sys_getgroups16 97/* 85 */ CALL(sys_readlink)
98 .long sys_setgroups16 98 CALL(sys_uselib)
99 .long OBSOLETE(old_select) /* used by libc4 */ 99 CALL(sys_swapon)
100 .long sys_symlink 100 CALL(sys_reboot)
101 .long sys_ni_syscall /* was sys_lstat */ 101 CALL(OBSOLETE(old_readdir)) /* used by libc4 */
102/* 85 */ .long sys_readlink 102/* 90 */ CALL(OBSOLETE(old_mmap)) /* used by libc4 */
103 .long sys_uselib 103 CALL(sys_munmap)
104 .long sys_swapon 104 CALL(sys_truncate)
105 .long sys_reboot 105 CALL(sys_ftruncate)
106 .long OBSOLETE(old_readdir) /* used by libc4 */ 106 CALL(sys_fchmod)
107/* 90 */ .long OBSOLETE(old_mmap) /* used by libc4 */ 107/* 95 */ CALL(sys_fchown16)
108 .long sys_munmap 108 CALL(sys_getpriority)
109 .long sys_truncate 109 CALL(sys_setpriority)
110 .long sys_ftruncate 110 CALL(sys_ni_syscall) /* was sys_profil */
111 .long sys_fchmod 111 CALL(sys_statfs)
112/* 95 */ .long sys_fchown16 112/* 100 */ CALL(sys_fstatfs)
113 .long sys_getpriority 113 CALL(sys_ni_syscall)
114 .long sys_setpriority 114 CALL(OBSOLETE(sys_socketcall))
115 .long sys_ni_syscall /* was sys_profil */ 115 CALL(sys_syslog)
116 .long sys_statfs 116 CALL(sys_setitimer)
117/* 100 */ .long sys_fstatfs 117/* 105 */ CALL(sys_getitimer)
118 .long sys_ni_syscall 118 CALL(sys_newstat)
119 .long OBSOLETE(sys_socketcall) 119 CALL(sys_newlstat)
120 .long sys_syslog 120 CALL(sys_newfstat)
121 .long sys_setitimer 121 CALL(sys_ni_syscall) /* was sys_uname */
122/* 105 */ .long sys_getitimer 122/* 110 */ CALL(sys_ni_syscall) /* was sys_iopl */
123 .long sys_newstat 123 CALL(sys_vhangup)
124 .long sys_newlstat 124 CALL(sys_ni_syscall)
125 .long sys_newfstat 125 CALL(OBSOLETE(sys_syscall)) /* call a syscall */
126 .long sys_ni_syscall /* was sys_uname */ 126 CALL(sys_wait4)
127/* 110 */ .long sys_ni_syscall /* was sys_iopl */ 127/* 115 */ CALL(sys_swapoff)
128 .long sys_vhangup 128 CALL(sys_sysinfo)
129 .long sys_ni_syscall 129 CALL(OBSOLETE(ABI(sys_ipc, sys_oabi_ipc)))
130 .long OBSOLETE(sys_syscall) /* call a syscall */ 130 CALL(sys_fsync)
131 .long sys_wait4 131 CALL(sys_sigreturn_wrapper)
132/* 115 */ .long sys_swapoff 132/* 120 */ CALL(sys_clone_wrapper)
133 .long sys_sysinfo 133 CALL(sys_setdomainname)
134 .long OBSOLETE(ABI(sys_ipc, sys_oabi_ipc)) 134 CALL(sys_newuname)
135 .long sys_fsync 135 CALL(sys_ni_syscall)
136 .long sys_sigreturn_wrapper 136 CALL(sys_adjtimex)
137/* 120 */ .long sys_clone_wrapper 137/* 125 */ CALL(sys_mprotect)
138 .long sys_setdomainname 138 CALL(sys_sigprocmask)
139 .long sys_newuname 139 CALL(sys_ni_syscall) /* was sys_create_module */
140 .long sys_ni_syscall 140 CALL(sys_init_module)
141 .long sys_adjtimex 141 CALL(sys_delete_module)
142/* 125 */ .long sys_mprotect 142/* 130 */ CALL(sys_ni_syscall) /* was sys_get_kernel_syms */
143 .long sys_sigprocmask 143 CALL(sys_quotactl)
144 .long sys_ni_syscall /* was sys_create_module */ 144 CALL(sys_getpgid)
145 .long sys_init_module 145 CALL(sys_fchdir)
146 .long sys_delete_module 146 CALL(sys_bdflush)
147/* 130 */ .long sys_ni_syscall /* was sys_get_kernel_syms */ 147/* 135 */ CALL(sys_sysfs)
148 .long sys_quotactl 148 CALL(sys_personality)
149 .long sys_getpgid 149 CALL(sys_ni_syscall) /* CALL(_sys_afs_syscall) */
150 .long sys_fchdir 150 CALL(sys_setfsuid16)
151 .long sys_bdflush 151 CALL(sys_setfsgid16)
152/* 135 */ .long sys_sysfs 152/* 140 */ CALL(sys_llseek)
153 .long sys_personality 153 CALL(sys_getdents)
154 .long sys_ni_syscall /* .long _sys_afs_syscall */ 154 CALL(sys_select)
155 .long sys_setfsuid16 155 CALL(sys_flock)
156 .long sys_setfsgid16 156 CALL(sys_msync)
157/* 140 */ .long sys_llseek 157/* 145 */ CALL(sys_readv)
158 .long sys_getdents 158 CALL(sys_writev)
159 .long sys_select 159 CALL(sys_getsid)
160 .long sys_flock 160 CALL(sys_fdatasync)
161 .long sys_msync 161 CALL(sys_sysctl)
162/* 145 */ .long sys_readv 162/* 150 */ CALL(sys_mlock)
163 .long sys_writev 163 CALL(sys_munlock)
164 .long sys_getsid 164 CALL(sys_mlockall)
165 .long sys_fdatasync 165 CALL(sys_munlockall)
166 .long sys_sysctl 166 CALL(sys_sched_setparam)
167/* 150 */ .long sys_mlock 167/* 155 */ CALL(sys_sched_getparam)
168 .long sys_munlock 168 CALL(sys_sched_setscheduler)
169 .long sys_mlockall 169 CALL(sys_sched_getscheduler)
170 .long sys_munlockall 170 CALL(sys_sched_yield)
171 .long sys_sched_setparam 171 CALL(sys_sched_get_priority_max)
172/* 155 */ .long sys_sched_getparam 172/* 160 */ CALL(sys_sched_get_priority_min)
173 .long sys_sched_setscheduler 173 CALL(sys_sched_rr_get_interval)
174 .long sys_sched_getscheduler 174 CALL(sys_nanosleep)
175 .long sys_sched_yield 175 CALL(sys_arm_mremap)
176 .long sys_sched_get_priority_max 176 CALL(sys_setresuid16)
177/* 160 */ .long sys_sched_get_priority_min 177/* 165 */ CALL(sys_getresuid16)
178 .long sys_sched_rr_get_interval 178 CALL(sys_ni_syscall)
179 .long sys_nanosleep 179 CALL(sys_ni_syscall) /* was sys_query_module */
180 .long sys_arm_mremap 180 CALL(sys_poll)
181 .long sys_setresuid16 181 CALL(sys_nfsservctl)
182/* 165 */ .long sys_getresuid16 182/* 170 */ CALL(sys_setresgid16)
183 .long sys_ni_syscall 183 CALL(sys_getresgid16)
184 .long sys_ni_syscall /* was sys_query_module */ 184 CALL(sys_prctl)
185 .long sys_poll 185 CALL(sys_rt_sigreturn_wrapper)
186 .long sys_nfsservctl 186 CALL(sys_rt_sigaction)
187/* 170 */ .long sys_setresgid16 187/* 175 */ CALL(sys_rt_sigprocmask)
188 .long sys_getresgid16 188 CALL(sys_rt_sigpending)
189 .long sys_prctl 189 CALL(sys_rt_sigtimedwait)
190 .long sys_rt_sigreturn_wrapper 190 CALL(sys_rt_sigqueueinfo)
191 .long sys_rt_sigaction 191 CALL(sys_rt_sigsuspend_wrapper)
192/* 175 */ .long sys_rt_sigprocmask 192/* 180 */ CALL(ABI(sys_pread64, sys_oabi_pread64))
193 .long sys_rt_sigpending 193 CALL(ABI(sys_pwrite64, sys_oabi_pwrite64))
194 .long sys_rt_sigtimedwait 194 CALL(sys_chown16)
195 .long sys_rt_sigqueueinfo 195 CALL(sys_getcwd)
196 .long sys_rt_sigsuspend_wrapper 196 CALL(sys_capget)
197/* 180 */ .long ABI(sys_pread64, sys_oabi_pread64) 197/* 185 */ CALL(sys_capset)
198 .long ABI(sys_pwrite64, sys_oabi_pwrite64) 198 CALL(sys_sigaltstack_wrapper)
199 .long sys_chown16 199 CALL(sys_sendfile)
200 .long sys_getcwd 200 CALL(sys_ni_syscall)
201 .long sys_capget 201 CALL(sys_ni_syscall)
202/* 185 */ .long sys_capset 202/* 190 */ CALL(sys_vfork_wrapper)
203 .long sys_sigaltstack_wrapper 203 CALL(sys_getrlimit)
204 .long sys_sendfile 204 CALL(sys_mmap2)
205 .long sys_ni_syscall 205 CALL(ABI(sys_truncate64, sys_oabi_truncate64))
206 .long sys_ni_syscall 206 CALL(ABI(sys_ftruncate64, sys_oabi_ftruncate64))
207/* 190 */ .long sys_vfork_wrapper 207/* 195 */ CALL(ABI(sys_stat64, sys_oabi_stat64))
208 .long sys_getrlimit 208 CALL(ABI(sys_lstat64, sys_oabi_lstat64))
209 .long sys_mmap2 209 CALL(ABI(sys_fstat64, sys_oabi_fstat64))
210 .long ABI(sys_truncate64, sys_oabi_truncate64) 210 CALL(sys_lchown)
211 .long ABI(sys_ftruncate64, sys_oabi_ftruncate64) 211 CALL(sys_getuid)
212/* 195 */ .long ABI(sys_stat64, sys_oabi_stat64) 212/* 200 */ CALL(sys_getgid)
213 .long ABI(sys_lstat64, sys_oabi_lstat64) 213 CALL(sys_geteuid)
214 .long ABI(sys_fstat64, sys_oabi_fstat64) 214 CALL(sys_getegid)
215 .long sys_lchown 215 CALL(sys_setreuid)
216 .long sys_getuid 216 CALL(sys_setregid)
217/* 200 */ .long sys_getgid 217/* 205 */ CALL(sys_getgroups)
218 .long sys_geteuid 218 CALL(sys_setgroups)
219 .long sys_getegid 219 CALL(sys_fchown)
220 .long sys_setreuid 220 CALL(sys_setresuid)
221 .long sys_setregid 221 CALL(sys_getresuid)
222/* 205 */ .long sys_getgroups 222/* 210 */ CALL(sys_setresgid)
223 .long sys_setgroups 223 CALL(sys_getresgid)
224 .long sys_fchown 224 CALL(sys_chown)
225 .long sys_setresuid 225 CALL(sys_setuid)
226 .long sys_getresuid 226 CALL(sys_setgid)
227/* 210 */ .long sys_setresgid 227/* 215 */ CALL(sys_setfsuid)
228 .long sys_getresgid 228 CALL(sys_setfsgid)
229 .long sys_chown 229 CALL(sys_getdents64)
230 .long sys_setuid 230 CALL(sys_pivot_root)
231 .long sys_setgid 231 CALL(sys_mincore)
232/* 215 */ .long sys_setfsuid 232/* 220 */ CALL(sys_madvise)
233 .long sys_setfsgid 233 CALL(ABI(sys_fcntl64, sys_oabi_fcntl64))
234 .long sys_getdents64 234 CALL(sys_ni_syscall) /* TUX */
235 .long sys_pivot_root 235 CALL(sys_ni_syscall)
236 .long sys_mincore 236 CALL(sys_gettid)
237/* 220 */ .long sys_madvise 237/* 225 */ CALL(ABI(sys_readahead, sys_oabi_readahead))
238 .long ABI(sys_fcntl64, sys_oabi_fcntl64) 238 CALL(sys_setxattr)
239 .long sys_ni_syscall /* TUX */ 239 CALL(sys_lsetxattr)
240 .long sys_ni_syscall 240 CALL(sys_fsetxattr)
241 .long sys_gettid 241 CALL(sys_getxattr)
242/* 225 */ .long ABI(sys_readahead, sys_oabi_readahead) 242/* 230 */ CALL(sys_lgetxattr)
243 .long sys_setxattr 243 CALL(sys_fgetxattr)
244 .long sys_lsetxattr 244 CALL(sys_listxattr)
245 .long sys_fsetxattr 245 CALL(sys_llistxattr)
246 .long sys_getxattr 246 CALL(sys_flistxattr)
247/* 230 */ .long sys_lgetxattr 247/* 235 */ CALL(sys_removexattr)
248 .long sys_fgetxattr 248 CALL(sys_lremovexattr)
249 .long sys_listxattr 249 CALL(sys_fremovexattr)
250 .long sys_llistxattr 250 CALL(sys_tkill)
251 .long sys_flistxattr 251 CALL(sys_sendfile64)
252/* 235 */ .long sys_removexattr 252/* 240 */ CALL(sys_futex)
253 .long sys_lremovexattr 253 CALL(sys_sched_setaffinity)
254 .long sys_fremovexattr 254 CALL(sys_sched_getaffinity)
255 .long sys_tkill 255 CALL(sys_io_setup)
256 .long sys_sendfile64 256 CALL(sys_io_destroy)
257/* 240 */ .long sys_futex 257/* 245 */ CALL(sys_io_getevents)
258 .long sys_sched_setaffinity 258 CALL(sys_io_submit)
259 .long sys_sched_getaffinity 259 CALL(sys_io_cancel)
260 .long sys_io_setup 260 CALL(sys_exit_group)
261 .long sys_io_destroy 261 CALL(sys_lookup_dcookie)
262/* 245 */ .long sys_io_getevents 262/* 250 */ CALL(sys_epoll_create)
263 .long sys_io_submit 263 CALL(ABI(sys_epoll_ctl, sys_oabi_epoll_ctl))
264 .long sys_io_cancel 264 CALL(ABI(sys_epoll_wait, sys_oabi_epoll_wait))
265 .long sys_exit_group 265 CALL(sys_remap_file_pages)
266 .long sys_lookup_dcookie 266 CALL(sys_ni_syscall) /* sys_set_thread_area */
267/* 250 */ .long sys_epoll_create 267/* 255 */ CALL(sys_ni_syscall) /* sys_get_thread_area */
268 .long ABI(sys_epoll_ctl, sys_oabi_epoll_ctl) 268 CALL(sys_set_tid_address)
269 .long ABI(sys_epoll_wait, sys_oabi_epoll_wait) 269 CALL(sys_timer_create)
270 .long sys_remap_file_pages 270 CALL(sys_timer_settime)
271 .long sys_ni_syscall /* sys_set_thread_area */ 271 CALL(sys_timer_gettime)
272/* 255 */ .long sys_ni_syscall /* sys_get_thread_area */ 272/* 260 */ CALL(sys_timer_getoverrun)
273 .long sys_set_tid_address 273 CALL(sys_timer_delete)
274 .long sys_timer_create 274 CALL(sys_clock_settime)
275 .long sys_timer_settime 275 CALL(sys_clock_gettime)
276 .long sys_timer_gettime 276 CALL(sys_clock_getres)
277/* 260 */ .long sys_timer_getoverrun 277/* 265 */ CALL(sys_clock_nanosleep)
278 .long sys_timer_delete 278 CALL(sys_statfs64_wrapper)
279 .long sys_clock_settime 279 CALL(sys_fstatfs64_wrapper)
280 .long sys_clock_gettime 280 CALL(sys_tgkill)
281 .long sys_clock_getres 281 CALL(sys_utimes)
282/* 265 */ .long sys_clock_nanosleep 282/* 270 */ CALL(sys_arm_fadvise64_64)
283 .long sys_statfs64_wrapper 283 CALL(sys_pciconfig_iobase)
284 .long sys_fstatfs64_wrapper 284 CALL(sys_pciconfig_read)
285 .long sys_tgkill 285 CALL(sys_pciconfig_write)
286 .long sys_utimes 286 CALL(sys_mq_open)
287/* 270 */ .long sys_arm_fadvise64_64 287/* 275 */ CALL(sys_mq_unlink)
288 .long sys_pciconfig_iobase 288 CALL(sys_mq_timedsend)
289 .long sys_pciconfig_read 289 CALL(sys_mq_timedreceive)
290 .long sys_pciconfig_write 290 CALL(sys_mq_notify)
291 .long sys_mq_open 291 CALL(sys_mq_getsetattr)
292/* 275 */ .long sys_mq_unlink 292/* 280 */ CALL(sys_waitid)
293 .long sys_mq_timedsend 293 CALL(sys_socket)
294 .long sys_mq_timedreceive 294 CALL(sys_bind)
295 .long sys_mq_notify 295 CALL(sys_connect)
296 .long sys_mq_getsetattr 296 CALL(sys_listen)
297/* 280 */ .long sys_waitid 297/* 285 */ CALL(sys_accept)
298 .long sys_socket 298 CALL(sys_getsockname)
299 .long sys_bind 299 CALL(sys_getpeername)
300 .long sys_connect 300 CALL(sys_socketpair)
301 .long sys_listen 301 CALL(sys_send)
302/* 285 */ .long sys_accept 302/* 290 */ CALL(sys_sendto)
303 .long sys_getsockname 303 CALL(sys_recv)
304 .long sys_getpeername 304 CALL(sys_recvfrom)
305 .long sys_socketpair 305 CALL(sys_shutdown)
306 .long sys_send 306 CALL(sys_setsockopt)
307/* 290 */ .long sys_sendto 307/* 295 */ CALL(sys_getsockopt)
308 .long sys_recv 308 CALL(sys_sendmsg)
309 .long sys_recvfrom 309 CALL(sys_recvmsg)
310 .long sys_shutdown 310 CALL(ABI(sys_semop, sys_oabi_semop))
311 .long sys_setsockopt 311 CALL(sys_semget)
312/* 295 */ .long sys_getsockopt 312/* 300 */ CALL(sys_semctl)
313 .long sys_sendmsg 313 CALL(sys_msgsnd)
314 .long sys_recvmsg 314 CALL(sys_msgrcv)
315 .long ABI(sys_semop, sys_oabi_semop) 315 CALL(sys_msgget)
316 .long sys_semget 316 CALL(sys_msgctl)
317/* 300 */ .long sys_semctl 317/* 305 */ CALL(sys_shmat)
318 .long sys_msgsnd 318 CALL(sys_shmdt)
319 .long sys_msgrcv 319 CALL(sys_shmget)
320 .long sys_msgget 320 CALL(sys_shmctl)
321 .long sys_msgctl 321 CALL(sys_add_key)
322/* 305 */ .long sys_shmat 322/* 310 */ CALL(sys_request_key)
323 .long sys_shmdt 323 CALL(sys_keyctl)
324 .long sys_shmget 324 CALL(ABI(sys_semtimedop, sys_oabi_semtimedop))
325 .long sys_shmctl 325/* vserver */ CALL(sys_ni_syscall)
326 .long sys_add_key 326 CALL(sys_ioprio_set)
327/* 310 */ .long sys_request_key 327/* 315 */ CALL(sys_ioprio_get)
328 .long sys_keyctl 328 CALL(sys_inotify_init)
329 .long ABI(sys_semtimedop, sys_oabi_semtimedop) 329 CALL(sys_inotify_add_watch)
330/* vserver */ .long sys_ni_syscall 330 CALL(sys_inotify_rm_watch)
331 .long sys_ioprio_set 331 CALL(sys_mbind)
332/* 315 */ .long sys_ioprio_get 332/* 320 */ CALL(sys_get_mempolicy)
333 .long sys_inotify_init 333 CALL(sys_set_mempolicy)
334 .long sys_inotify_add_watch 334#ifndef syscalls_counted
335 .long sys_inotify_rm_watch 335.equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls
336 .long sys_mbind 336#define syscalls_counted
337/* 320 */ .long sys_get_mempolicy
338 .long sys_set_mempolicy
339
340 .rept NR_syscalls - (. - 100b) / 4
341 .long sys_ni_syscall
342 .endr
343#endif 337#endif
338.rept syscalls_padding
339 CALL(sys_ni_syscall)
340.endr
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index 2b92ce85f97f..dbcb11a31f78 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -87,7 +87,11 @@ ENTRY(ret_from_fork)
87 b ret_slow_syscall 87 b ret_slow_syscall
88 88
89 89
90 .equ NR_syscalls,0
91#define CALL(x) .equ NR_syscalls,NR_syscalls+1
90#include "calls.S" 92#include "calls.S"
93#undef CALL
94#define CALL(x) .long x
91 95
92/*============================================================================= 96/*=============================================================================
93 * SWI handler 97 * SWI handler
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c
index 31820170f306..a0724f2b24ce 100644
--- a/arch/arm/mach-integrator/integrator_cp.c
+++ b/arch/arm/mach-integrator/integrator_cp.c
@@ -469,7 +469,9 @@ static void cp_clcd_enable(struct clcd_fb *fb)
469 if (fb->fb.var.bits_per_pixel <= 8) 469 if (fb->fb.var.bits_per_pixel <= 8)
470 val = CM_CTRL_LCDMUXSEL_VGA_8421BPP; 470 val = CM_CTRL_LCDMUXSEL_VGA_8421BPP;
471 else if (fb->fb.var.bits_per_pixel <= 16) 471 else if (fb->fb.var.bits_per_pixel <= 16)
472 val = CM_CTRL_LCDMUXSEL_VGA_16BPP; 472 val = CM_CTRL_LCDMUXSEL_VGA_16BPP
473 | CM_CTRL_LCDEN0 | CM_CTRL_LCDEN1
474 | CM_CTRL_STATIC1 | CM_CTRL_STATIC2;
473 else 475 else
474 val = 0; /* no idea for this, don't trust the docs */ 476 val = 0; /* no idea for this, don't trust the docs */
475 477
diff --git a/arch/arm/mach-s3c2410/cpu.h b/arch/arm/mach-s3c2410/cpu.h
index 9cbe5eef492b..fc1067783f6d 100644
--- a/arch/arm/mach-s3c2410/cpu.h
+++ b/arch/arm/mach-s3c2410/cpu.h
@@ -17,11 +17,12 @@
17 * 14-Jan-2005 BJD Added s3c24xx_init_clocks() call 17 * 14-Jan-2005 BJD Added s3c24xx_init_clocks() call
18 * 10-Mar-2005 LCVR Changed S3C2410_{VA,SZ} to S3C24XX_{VA,SZ} & IODESC_ENT 18 * 10-Mar-2005 LCVR Changed S3C2410_{VA,SZ} to S3C24XX_{VA,SZ} & IODESC_ENT
19 * 14-Mar-2005 BJD Updated for __iomem 19 * 14-Mar-2005 BJD Updated for __iomem
20 * 15-Jan-2006 LCVR Updated S3C2410_PA_##x to new S3C24XX_PA_##x macro
20*/ 21*/
21 22
22/* todo - fix when rmk changes iodescs to use `void __iomem *` */ 23/* todo - fix when rmk changes iodescs to use `void __iomem *` */
23 24
24#define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, __phys_to_pfn(S3C2410_PA_##x), S3C24XX_SZ_##x, MT_DEVICE } 25#define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, __phys_to_pfn(S3C24XX_PA_##x), S3C24XX_SZ_##x, MT_DEVICE }
25 26
26#ifndef MHZ 27#ifndef MHZ
27#define MHZ (1000*1000) 28#define MHZ (1000*1000)
diff --git a/arch/arm/mach-s3c2410/devs.c b/arch/arm/mach-s3c2410/devs.c
index f58406e6ef5a..b8d994a24d1c 100644
--- a/arch/arm/mach-s3c2410/devs.c
+++ b/arch/arm/mach-s3c2410/devs.c
@@ -10,6 +10,7 @@
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 * 11 *
12 * Modifications: 12 * Modifications:
13 * 15-Jan-2006 LCVR Using S3C24XX_PA_##x macro for common S3C24XX devices
13 * 10-Mar-2005 LCVR Changed S3C2410_{VA,SZ} to S3C24XX_{VA,SZ} 14 * 10-Mar-2005 LCVR Changed S3C2410_{VA,SZ} to S3C24XX_{VA,SZ}
14 * 10-Feb-2005 BJD Added camera from guillaume.gourat@nexvision.tv 15 * 10-Feb-2005 BJD Added camera from guillaume.gourat@nexvision.tv
15 * 29-Aug-2004 BJD Added timers 0 through 3 16 * 29-Aug-2004 BJD Added timers 0 through 3
@@ -46,8 +47,8 @@ struct platform_device *s3c24xx_uart_devs[3];
46 47
47static struct resource s3c_usb_resource[] = { 48static struct resource s3c_usb_resource[] = {
48 [0] = { 49 [0] = {
49 .start = S3C2410_PA_USBHOST, 50 .start = S3C24XX_PA_USBHOST,
50 .end = S3C2410_PA_USBHOST + S3C24XX_SZ_USBHOST - 1, 51 .end = S3C24XX_PA_USBHOST + S3C24XX_SZ_USBHOST - 1,
51 .flags = IORESOURCE_MEM, 52 .flags = IORESOURCE_MEM,
52 }, 53 },
53 [1] = { 54 [1] = {
@@ -76,8 +77,8 @@ EXPORT_SYMBOL(s3c_device_usb);
76 77
77static struct resource s3c_lcd_resource[] = { 78static struct resource s3c_lcd_resource[] = {
78 [0] = { 79 [0] = {
79 .start = S3C2410_PA_LCD, 80 .start = S3C24XX_PA_LCD,
80 .end = S3C2410_PA_LCD + S3C24XX_SZ_LCD - 1, 81 .end = S3C24XX_PA_LCD + S3C24XX_SZ_LCD - 1,
81 .flags = IORESOURCE_MEM, 82 .flags = IORESOURCE_MEM,
82 }, 83 },
83 [1] = { 84 [1] = {
@@ -139,8 +140,8 @@ EXPORT_SYMBOL(s3c_device_nand);
139 140
140static struct resource s3c_usbgadget_resource[] = { 141static struct resource s3c_usbgadget_resource[] = {
141 [0] = { 142 [0] = {
142 .start = S3C2410_PA_USBDEV, 143 .start = S3C24XX_PA_USBDEV,
143 .end = S3C2410_PA_USBDEV + S3C24XX_SZ_USBDEV - 1, 144 .end = S3C24XX_PA_USBDEV + S3C24XX_SZ_USBDEV - 1,
144 .flags = IORESOURCE_MEM, 145 .flags = IORESOURCE_MEM,
145 }, 146 },
146 [1] = { 147 [1] = {
@@ -164,8 +165,8 @@ EXPORT_SYMBOL(s3c_device_usbgadget);
164 165
165static struct resource s3c_wdt_resource[] = { 166static struct resource s3c_wdt_resource[] = {
166 [0] = { 167 [0] = {
167 .start = S3C2410_PA_WATCHDOG, 168 .start = S3C24XX_PA_WATCHDOG,
168 .end = S3C2410_PA_WATCHDOG + S3C24XX_SZ_WATCHDOG - 1, 169 .end = S3C24XX_PA_WATCHDOG + S3C24XX_SZ_WATCHDOG - 1,
169 .flags = IORESOURCE_MEM, 170 .flags = IORESOURCE_MEM,
170 }, 171 },
171 [1] = { 172 [1] = {
@@ -189,8 +190,8 @@ EXPORT_SYMBOL(s3c_device_wdt);
189 190
190static struct resource s3c_i2c_resource[] = { 191static struct resource s3c_i2c_resource[] = {
191 [0] = { 192 [0] = {
192 .start = S3C2410_PA_IIC, 193 .start = S3C24XX_PA_IIC,
193 .end = S3C2410_PA_IIC + S3C24XX_SZ_IIC - 1, 194 .end = S3C24XX_PA_IIC + S3C24XX_SZ_IIC - 1,
194 .flags = IORESOURCE_MEM, 195 .flags = IORESOURCE_MEM,
195 }, 196 },
196 [1] = { 197 [1] = {
@@ -214,8 +215,8 @@ EXPORT_SYMBOL(s3c_device_i2c);
214 215
215static struct resource s3c_iis_resource[] = { 216static struct resource s3c_iis_resource[] = {
216 [0] = { 217 [0] = {
217 .start = S3C2410_PA_IIS, 218 .start = S3C24XX_PA_IIS,
218 .end = S3C2410_PA_IIS + S3C24XX_SZ_IIS -1, 219 .end = S3C24XX_PA_IIS + S3C24XX_SZ_IIS -1,
219 .flags = IORESOURCE_MEM, 220 .flags = IORESOURCE_MEM,
220 } 221 }
221}; 222};
@@ -239,8 +240,8 @@ EXPORT_SYMBOL(s3c_device_iis);
239 240
240static struct resource s3c_rtc_resource[] = { 241static struct resource s3c_rtc_resource[] = {
241 [0] = { 242 [0] = {
242 .start = S3C2410_PA_RTC, 243 .start = S3C24XX_PA_RTC,
243 .end = S3C2410_PA_RTC + 0xff, 244 .end = S3C24XX_PA_RTC + 0xff,
244 .flags = IORESOURCE_MEM, 245 .flags = IORESOURCE_MEM,
245 }, 246 },
246 [1] = { 247 [1] = {
@@ -268,8 +269,8 @@ EXPORT_SYMBOL(s3c_device_rtc);
268 269
269static struct resource s3c_adc_resource[] = { 270static struct resource s3c_adc_resource[] = {
270 [0] = { 271 [0] = {
271 .start = S3C2410_PA_ADC, 272 .start = S3C24XX_PA_ADC,
272 .end = S3C2410_PA_ADC + S3C24XX_SZ_ADC - 1, 273 .end = S3C24XX_PA_ADC + S3C24XX_SZ_ADC - 1,
273 .flags = IORESOURCE_MEM, 274 .flags = IORESOURCE_MEM,
274 }, 275 },
275 [1] = { 276 [1] = {
@@ -316,8 +317,8 @@ EXPORT_SYMBOL(s3c_device_sdi);
316 317
317static struct resource s3c_spi0_resource[] = { 318static struct resource s3c_spi0_resource[] = {
318 [0] = { 319 [0] = {
319 .start = S3C2410_PA_SPI, 320 .start = S3C24XX_PA_SPI,
320 .end = S3C2410_PA_SPI + 0x1f, 321 .end = S3C24XX_PA_SPI + 0x1f,
321 .flags = IORESOURCE_MEM, 322 .flags = IORESOURCE_MEM,
322 }, 323 },
323 [1] = { 324 [1] = {
@@ -341,8 +342,8 @@ EXPORT_SYMBOL(s3c_device_spi0);
341 342
342static struct resource s3c_spi1_resource[] = { 343static struct resource s3c_spi1_resource[] = {
343 [0] = { 344 [0] = {
344 .start = S3C2410_PA_SPI + 0x20, 345 .start = S3C24XX_PA_SPI + 0x20,
345 .end = S3C2410_PA_SPI + 0x20 + 0x1f, 346 .end = S3C24XX_PA_SPI + 0x20 + 0x1f,
346 .flags = IORESOURCE_MEM, 347 .flags = IORESOURCE_MEM,
347 }, 348 },
348 [1] = { 349 [1] = {
@@ -366,8 +367,8 @@ EXPORT_SYMBOL(s3c_device_spi1);
366 367
367static struct resource s3c_timer0_resource[] = { 368static struct resource s3c_timer0_resource[] = {
368 [0] = { 369 [0] = {
369 .start = S3C2410_PA_TIMER + 0x0C, 370 .start = S3C24XX_PA_TIMER + 0x0C,
370 .end = S3C2410_PA_TIMER + 0x0C + 0xB, 371 .end = S3C24XX_PA_TIMER + 0x0C + 0xB,
371 .flags = IORESOURCE_MEM, 372 .flags = IORESOURCE_MEM,
372 }, 373 },
373 [1] = { 374 [1] = {
@@ -391,8 +392,8 @@ EXPORT_SYMBOL(s3c_device_timer0);
391 392
392static struct resource s3c_timer1_resource[] = { 393static struct resource s3c_timer1_resource[] = {
393 [0] = { 394 [0] = {
394 .start = S3C2410_PA_TIMER + 0x18, 395 .start = S3C24XX_PA_TIMER + 0x18,
395 .end = S3C2410_PA_TIMER + 0x23, 396 .end = S3C24XX_PA_TIMER + 0x23,
396 .flags = IORESOURCE_MEM, 397 .flags = IORESOURCE_MEM,
397 }, 398 },
398 [1] = { 399 [1] = {
@@ -416,8 +417,8 @@ EXPORT_SYMBOL(s3c_device_timer1);
416 417
417static struct resource s3c_timer2_resource[] = { 418static struct resource s3c_timer2_resource[] = {
418 [0] = { 419 [0] = {
419 .start = S3C2410_PA_TIMER + 0x24, 420 .start = S3C24XX_PA_TIMER + 0x24,
420 .end = S3C2410_PA_TIMER + 0x2F, 421 .end = S3C24XX_PA_TIMER + 0x2F,
421 .flags = IORESOURCE_MEM, 422 .flags = IORESOURCE_MEM,
422 }, 423 },
423 [1] = { 424 [1] = {
@@ -441,8 +442,8 @@ EXPORT_SYMBOL(s3c_device_timer2);
441 442
442static struct resource s3c_timer3_resource[] = { 443static struct resource s3c_timer3_resource[] = {
443 [0] = { 444 [0] = {
444 .start = S3C2410_PA_TIMER + 0x30, 445 .start = S3C24XX_PA_TIMER + 0x30,
445 .end = S3C2410_PA_TIMER + 0x3B, 446 .end = S3C24XX_PA_TIMER + 0x3B,
446 .flags = IORESOURCE_MEM, 447 .flags = IORESOURCE_MEM,
447 }, 448 },
448 [1] = { 449 [1] = {
diff --git a/arch/arm/mach-s3c2410/dma.c b/arch/arm/mach-s3c2410/dma.c
index 65feaf20d23e..4dbd8e758ea6 100644
--- a/arch/arm/mach-s3c2410/dma.c
+++ b/arch/arm/mach-s3c2410/dma.c
@@ -1152,7 +1152,7 @@ static int __init s3c2410_init_dma(void)
1152 1152
1153 printk("S3C2410 DMA Driver, (c) 2003-2004 Simtec Electronics\n"); 1153 printk("S3C2410 DMA Driver, (c) 2003-2004 Simtec Electronics\n");
1154 1154
1155 dma_base = ioremap(S3C2410_PA_DMA, 0x200); 1155 dma_base = ioremap(S3C24XX_PA_DMA, 0x200);
1156 if (dma_base == NULL) { 1156 if (dma_base == NULL) {
1157 printk(KERN_ERR "dma failed to remap register block\n"); 1157 printk(KERN_ERR "dma failed to remap register block\n");
1158 return -ENOMEM; 1158 return -ENOMEM;
diff --git a/arch/arm/mach-s3c2410/sleep.S b/arch/arm/mach-s3c2410/sleep.S
index 61768dac7fee..e9a055b779b7 100644
--- a/arch/arm/mach-s3c2410/sleep.S
+++ b/arch/arm/mach-s3c2410/sleep.S
@@ -133,12 +133,12 @@ ENTRY(s3c2410_cpu_resume)
133 @@ load UART to allow us to print the two characters for 133 @@ load UART to allow us to print the two characters for
134 @@ resume debug 134 @@ resume debug
135 135
136 mov r2, #S3C2410_PA_UART & 0xff000000 136 mov r2, #S3C24XX_PA_UART & 0xff000000
137 orr r2, r2, #S3C2410_PA_UART & 0xff000 137 orr r2, r2, #S3C24XX_PA_UART & 0xff000
138 138
139#if 0 139#if 0
140 /* SMDK2440 LED set */ 140 /* SMDK2440 LED set */
141 mov r14, #S3C2410_PA_GPIO 141 mov r14, #S3C24XX_PA_GPIO
142 ldr r12, [ r14, #0x54 ] 142 ldr r12, [ r14, #0x54 ]
143 bic r12, r12, #3<<4 143 bic r12, r12, #3<<4
144 orr r12, r12, #1<<7 144 orr r12, r12, #1<<7
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
index de3ce1eec2ec..da9b35974118 100644
--- a/arch/arm/mm/ioremap.c
+++ b/arch/arm/mm/ioremap.c
@@ -142,7 +142,7 @@ __ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size,
142 return NULL; 142 return NULL;
143 addr = (unsigned long)area->addr; 143 addr = (unsigned long)area->addr;
144 if (remap_area_pages(addr, pfn, size, flags)) { 144 if (remap_area_pages(addr, pfn, size, flags)) {
145 vfree(addr); 145 vfree((void *)addr);
146 return NULL; 146 return NULL;
147 } 147 }
148 return (void __iomem *) (offset + (char *)addr); 148 return (void __iomem *) (offset + (char *)addr);
diff --git a/arch/arm/mm/mm-armv.c b/arch/arm/mm/mm-armv.c
index d0245a31d4dd..ef8d30a185a9 100644
--- a/arch/arm/mm/mm-armv.c
+++ b/arch/arm/mm/mm-armv.c
@@ -343,6 +343,12 @@ static struct mem_types mem_types[] __initdata = {
343 PMD_SECT_AP_WRITE | PMD_SECT_BUFFERABLE | 343 PMD_SECT_AP_WRITE | PMD_SECT_BUFFERABLE |
344 PMD_SECT_TEX(1), 344 PMD_SECT_TEX(1),
345 .domain = DOMAIN_IO, 345 .domain = DOMAIN_IO,
346 },
347 [MT_NONSHARED_DEVICE] = {
348 .prot_l1 = PMD_TYPE_TABLE,
349 .prot_sect = PMD_TYPE_SECT | PMD_SECT_NONSHARED_DEV |
350 PMD_SECT_AP_WRITE,
351 .domain = DOMAIN_IO,
346 } 352 }
347}; 353};
348 354
diff --git a/arch/powerpc/platforms/powermac/feature.c b/arch/powerpc/platforms/powermac/feature.c
index 558dd0692092..2296f3d46ca8 100644
--- a/arch/powerpc/platforms/powermac/feature.c
+++ b/arch/powerpc/platforms/powermac/feature.c
@@ -910,16 +910,18 @@ core99_gmac_phy_reset(struct device_node *node, long param, long value)
910 macio->type != macio_intrepid) 910 macio->type != macio_intrepid)
911 return -ENODEV; 911 return -ENODEV;
912 912
913 printk(KERN_DEBUG "Hard reset of PHY chip ...\n");
914
913 LOCK(flags); 915 LOCK(flags);
914 MACIO_OUT8(KL_GPIO_ETH_PHY_RESET, KEYLARGO_GPIO_OUTPUT_ENABLE); 916 MACIO_OUT8(KL_GPIO_ETH_PHY_RESET, KEYLARGO_GPIO_OUTPUT_ENABLE);
915 (void)MACIO_IN8(KL_GPIO_ETH_PHY_RESET); 917 (void)MACIO_IN8(KL_GPIO_ETH_PHY_RESET);
916 UNLOCK(flags); 918 UNLOCK(flags);
917 mdelay(10); 919 msleep(10);
918 LOCK(flags); 920 LOCK(flags);
919 MACIO_OUT8(KL_GPIO_ETH_PHY_RESET, /*KEYLARGO_GPIO_OUTPUT_ENABLE | */ 921 MACIO_OUT8(KL_GPIO_ETH_PHY_RESET, /*KEYLARGO_GPIO_OUTPUT_ENABLE | */
920 KEYLARGO_GPIO_OUTOUT_DATA); 922 KEYLARGO_GPIO_OUTOUT_DATA);
921 UNLOCK(flags); 923 UNLOCK(flags);
922 mdelay(10); 924 msleep(10);
923 925
924 return 0; 926 return 0;
925} 927}
diff --git a/arch/ppc/syslib/mv64x60.c b/arch/ppc/syslib/mv64x60.c
index 94ea346b7b4b..1f01b7e2376b 100644
--- a/arch/ppc/syslib/mv64x60.c
+++ b/arch/ppc/syslib/mv64x60.c
@@ -313,7 +313,7 @@ static struct platform_device mpsc1_device = {
313}; 313};
314#endif 314#endif
315 315
316#ifdef CONFIG_MV643XX_ETH 316#if defined(CONFIG_MV643XX_ETH) || defined(CONFIG_MV643XX_ETH_MODULE)
317static struct resource mv64x60_eth_shared_resources[] = { 317static struct resource mv64x60_eth_shared_resources[] = {
318 [0] = { 318 [0] = {
319 .name = "ethernet shared base", 319 .name = "ethernet shared base",
@@ -456,7 +456,7 @@ static struct platform_device *mv64x60_pd_devs[] __initdata = {
456 &mpsc0_device, 456 &mpsc0_device,
457 &mpsc1_device, 457 &mpsc1_device,
458#endif 458#endif
459#ifdef CONFIG_MV643XX_ETH 459#if defined(CONFIG_MV643XX_ETH) || defined(CONFIG_MV643XX_ETH_MODULE)
460 &mv64x60_eth_shared_device, 460 &mv64x60_eth_shared_device,
461#endif 461#endif
462#ifdef CONFIG_MV643XX_ETH_0 462#ifdef CONFIG_MV643XX_ETH_0
diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S
index c51d08d218ef..267ec8f6fb58 100644
--- a/arch/sparc/kernel/entry.S
+++ b/arch/sparc/kernel/entry.S
@@ -38,7 +38,7 @@
38 38
39#define curptr g6 39#define curptr g6
40 40
41#define NR_SYSCALLS 284 /* Each OS is different... */ 41#define NR_SYSCALLS 299 /* Each OS is different... */
42 42
43/* These are just handy. */ 43/* These are just handy. */
44#define _SV save %sp, -STACKFRAME_SZ, %sp 44#define _SV save %sp, -STACKFRAME_SZ, %sp
diff --git a/arch/sparc/math-emu/math.c b/arch/sparc/math-emu/math.c
index be2c80932e26..8613b3eb877c 100644
--- a/arch/sparc/math-emu/math.c
+++ b/arch/sparc/math-emu/math.c
@@ -323,11 +323,6 @@ static int do_one_mathemu(u32 insn, unsigned long *pfsr, unsigned long *fregs)
323 case FMOVS: 323 case FMOVS:
324 case FABSS: 324 case FABSS:
325 case FNEGS: TYPE(2,1,0,1,0,0,0); break; 325 case FNEGS: TYPE(2,1,0,1,0,0,0); break;
326 default:
327#ifdef DEBUG_MATHEMU
328 printk("unknown FPop1: %03lx\n",(insn>>5)&0x1ff);
329#endif
330 break;
331 } 326 }
332 } else if ((insn & 0xc1f80000) == 0x81a80000) /* FPOP2 */ { 327 } else if ((insn & 0xc1f80000) == 0x81a80000) /* FPOP2 */ {
333 switch ((insn >> 5) & 0x1ff) { 328 switch ((insn >> 5) & 0x1ff) {
@@ -337,11 +332,6 @@ static int do_one_mathemu(u32 insn, unsigned long *pfsr, unsigned long *fregs)
337 case FCMPED: TYPE(3,0,0,2,1,2,1); break; 332 case FCMPED: TYPE(3,0,0,2,1,2,1); break;
338 case FCMPQ: TYPE(3,0,0,3,1,3,1); break; 333 case FCMPQ: TYPE(3,0,0,3,1,3,1); break;
339 case FCMPEQ: TYPE(3,0,0,3,1,3,1); break; 334 case FCMPEQ: TYPE(3,0,0,3,1,3,1); break;
340 default:
341#ifdef DEBUG_MATHEMU
342 printk("unknown FPop2: %03lx\n",(insn>>5)&0x1ff);
343#endif
344 break;
345 } 335 }
346 } 336 }
347 337
diff --git a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S
index e50e56e4ab61..12911e7463f2 100644
--- a/arch/sparc64/kernel/entry.S
+++ b/arch/sparc64/kernel/entry.S
@@ -25,7 +25,7 @@
25 25
26#define curptr g6 26#define curptr g6
27 27
28#define NR_SYSCALLS 284 /* Each OS is different... */ 28#define NR_SYSCALLS 299 /* Each OS is different... */
29 29
30 .text 30 .text
31 .align 32 31 .align 32
diff --git a/arch/sparc64/kernel/sys32.S b/arch/sparc64/kernel/sys32.S
index 9cd272ac3ac1..60b59375aa78 100644
--- a/arch/sparc64/kernel/sys32.S
+++ b/arch/sparc64/kernel/sys32.S
@@ -84,7 +84,6 @@ SIGN2(sys32_fadvise64_64, compat_sys_fadvise64_64, %o0, %o5)
84SIGN2(sys32_bdflush, sys_bdflush, %o0, %o1) 84SIGN2(sys32_bdflush, sys_bdflush, %o0, %o1)
85SIGN1(sys32_mlockall, sys_mlockall, %o0) 85SIGN1(sys32_mlockall, sys_mlockall, %o0)
86SIGN1(sys32_nfsservctl, compat_sys_nfsservctl, %o0) 86SIGN1(sys32_nfsservctl, compat_sys_nfsservctl, %o0)
87SIGN1(sys32_clock_settime, compat_sys_clock_settime, %o1)
88SIGN1(sys32_clock_nanosleep, compat_sys_clock_nanosleep, %o1) 87SIGN1(sys32_clock_nanosleep, compat_sys_clock_nanosleep, %o1)
89SIGN1(sys32_timer_settime, compat_sys_timer_settime, %o1) 88SIGN1(sys32_timer_settime, compat_sys_timer_settime, %o1)
90SIGN1(sys32_io_submit, compat_sys_io_submit, %o1) 89SIGN1(sys32_io_submit, compat_sys_io_submit, %o1)
diff --git a/arch/sparc64/kernel/systbls.S b/arch/sparc64/kernel/systbls.S
index bf0fc5bfbfbe..2881faf36635 100644
--- a/arch/sparc64/kernel/systbls.S
+++ b/arch/sparc64/kernel/systbls.S
@@ -71,7 +71,7 @@ sys_call_table32:
71/*240*/ .word sys_munlockall, sys32_sched_setparam, sys32_sched_getparam, sys32_sched_setscheduler, sys32_sched_getscheduler 71/*240*/ .word sys_munlockall, sys32_sched_setparam, sys32_sched_getparam, sys32_sched_setscheduler, sys32_sched_getscheduler
72 .word sys_sched_yield, sys32_sched_get_priority_max, sys32_sched_get_priority_min, sys32_sched_rr_get_interval, compat_sys_nanosleep 72 .word sys_sched_yield, sys32_sched_get_priority_max, sys32_sched_get_priority_min, sys32_sched_rr_get_interval, compat_sys_nanosleep
73/*250*/ .word sys32_mremap, sys32_sysctl, sys32_getsid, sys_fdatasync, sys32_nfsservctl 73/*250*/ .word sys32_mremap, sys32_sysctl, sys32_getsid, sys_fdatasync, sys32_nfsservctl
74 .word sys_ni_syscall, sys32_clock_settime, compat_sys_clock_gettime, compat_sys_clock_getres, sys32_clock_nanosleep 74 .word sys_ni_syscall, compat_sys_clock_settime, compat_sys_clock_gettime, compat_sys_clock_getres, sys32_clock_nanosleep
75/*260*/ .word compat_sys_sched_getaffinity, compat_sys_sched_setaffinity, sys32_timer_settime, compat_sys_timer_gettime, sys_timer_getoverrun 75/*260*/ .word compat_sys_sched_getaffinity, compat_sys_sched_setaffinity, sys32_timer_settime, compat_sys_timer_gettime, sys_timer_getoverrun
76 .word sys_timer_delete, compat_sys_timer_create, sys_ni_syscall, compat_sys_io_setup, sys_io_destroy 76 .word sys_timer_delete, compat_sys_timer_create, sys_ni_syscall, compat_sys_io_setup, sys_io_destroy
77/*270*/ .word sys32_io_submit, sys_io_cancel, compat_sys_io_getevents, sys32_mq_open, sys_mq_unlink 77/*270*/ .word sys32_io_submit, sys_io_cancel, compat_sys_io_getevents, sys32_mq_open, sys_mq_unlink
diff --git a/block/elevator.c b/block/elevator.c
index c9f424d5399c..96a61e029ce5 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -139,35 +139,16 @@ static int elevator_attach(request_queue_t *q, struct elevator_type *e,
139 139
140static char chosen_elevator[16]; 140static char chosen_elevator[16];
141 141
142static void elevator_setup_default(void) 142static int __init elevator_setup(char *str)
143{ 143{
144 struct elevator_type *e;
145
146 /*
147 * If default has not been set, use the compiled-in selection.
148 */
149 if (!chosen_elevator[0])
150 strcpy(chosen_elevator, CONFIG_DEFAULT_IOSCHED);
151
152 /* 144 /*
153 * Be backwards-compatible with previous kernels, so users 145 * Be backwards-compatible with previous kernels, so users
154 * won't get the wrong elevator. 146 * won't get the wrong elevator.
155 */ 147 */
156 if (!strcmp(chosen_elevator, "as")) 148 if (!strcmp(str, "as"))
157 strcpy(chosen_elevator, "anticipatory"); 149 strcpy(chosen_elevator, "anticipatory");
158
159 /*
160 * If the given scheduler is not available, fall back to the default
161 */
162 if ((e = elevator_find(chosen_elevator)))
163 elevator_put(e);
164 else 150 else
165 strcpy(chosen_elevator, CONFIG_DEFAULT_IOSCHED); 151 strncpy(chosen_elevator, str, sizeof(chosen_elevator) - 1);
166}
167
168static int __init elevator_setup(char *str)
169{
170 strncpy(chosen_elevator, str, sizeof(chosen_elevator) - 1);
171 return 0; 152 return 0;
172} 153}
173 154
@@ -184,14 +165,16 @@ int elevator_init(request_queue_t *q, char *name)
184 q->end_sector = 0; 165 q->end_sector = 0;
185 q->boundary_rq = NULL; 166 q->boundary_rq = NULL;
186 167
187 elevator_setup_default(); 168 if (name && !(e = elevator_get(name)))
169 return -EINVAL;
188 170
189 if (!name) 171 if (!e && *chosen_elevator && !(e = elevator_get(chosen_elevator)))
190 name = chosen_elevator; 172 printk("I/O scheduler %s not found\n", chosen_elevator);
191 173
192 e = elevator_get(name); 174 if (!e && !(e = elevator_get(CONFIG_DEFAULT_IOSCHED))) {
193 if (!e) 175 printk("Default I/O scheduler not found, using no-op\n");
194 return -EINVAL; 176 e = elevator_get("noop");
177 }
195 178
196 eq = kmalloc(sizeof(struct elevator_queue), GFP_KERNEL); 179 eq = kmalloc(sizeof(struct elevator_queue), GFP_KERNEL);
197 if (!eq) { 180 if (!eq) {
@@ -669,8 +652,10 @@ int elv_register(struct elevator_type *e)
669 spin_unlock_irq(&elv_list_lock); 652 spin_unlock_irq(&elv_list_lock);
670 653
671 printk(KERN_INFO "io scheduler %s registered", e->elevator_name); 654 printk(KERN_INFO "io scheduler %s registered", e->elevator_name);
672 if (!strcmp(e->elevator_name, chosen_elevator)) 655 if (!strcmp(e->elevator_name, chosen_elevator) ||
673 printk(" (default)"); 656 (!*chosen_elevator &&
657 !strcmp(e->elevator_name, CONFIG_DEFAULT_IOSCHED)))
658 printk(" (default)");
674 printk("\n"); 659 printk("\n");
675 return 0; 660 return 0;
676} 661}
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index 8e27d0ab0d7c..d38b4afa37ef 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -304,6 +304,7 @@ static inline void rq_init(request_queue_t *q, struct request *rq)
304 * blk_queue_ordered - does this queue support ordered writes 304 * blk_queue_ordered - does this queue support ordered writes
305 * @q: the request queue 305 * @q: the request queue
306 * @ordered: one of QUEUE_ORDERED_* 306 * @ordered: one of QUEUE_ORDERED_*
307 * @prepare_flush_fn: rq setup helper for cache flush ordered writes
307 * 308 *
308 * Description: 309 * Description:
309 * For journalled file systems, doing ordered writes on a commit 310 * For journalled file systems, doing ordered writes on a commit
@@ -332,6 +333,7 @@ int blk_queue_ordered(request_queue_t *q, unsigned ordered,
332 return -EINVAL; 333 return -EINVAL;
333 } 334 }
334 335
336 q->ordered = ordered;
335 q->next_ordered = ordered; 337 q->next_ordered = ordered;
336 q->prepare_flush_fn = prepare_flush_fn; 338 q->prepare_flush_fn = prepare_flush_fn;
337 339
@@ -662,7 +664,7 @@ EXPORT_SYMBOL(blk_queue_bounce_limit);
662 * Enables a low level driver to set an upper limit on the size of 664 * Enables a low level driver to set an upper limit on the size of
663 * received requests. 665 * received requests.
664 **/ 666 **/
665void blk_queue_max_sectors(request_queue_t *q, unsigned short max_sectors) 667void blk_queue_max_sectors(request_queue_t *q, unsigned int max_sectors)
666{ 668{
667 if ((max_sectors << 9) < PAGE_CACHE_SIZE) { 669 if ((max_sectors << 9) < PAGE_CACHE_SIZE) {
668 max_sectors = 1 << (PAGE_CACHE_SHIFT - 9); 670 max_sectors = 1 << (PAGE_CACHE_SHIFT - 9);
@@ -2632,6 +2634,7 @@ EXPORT_SYMBOL(blk_put_request);
2632/** 2634/**
2633 * blk_end_sync_rq - executes a completion event on a request 2635 * blk_end_sync_rq - executes a completion event on a request
2634 * @rq: request to complete 2636 * @rq: request to complete
2637 * @error: end io status of the request
2635 */ 2638 */
2636void blk_end_sync_rq(struct request *rq, int error) 2639void blk_end_sync_rq(struct request *rq, int error)
2637{ 2640{
@@ -3153,7 +3156,7 @@ static int __end_that_request_first(struct request *req, int uptodate,
3153 if (blk_fs_request(req) && req->rq_disk) { 3156 if (blk_fs_request(req) && req->rq_disk) {
3154 const int rw = rq_data_dir(req); 3157 const int rw = rq_data_dir(req);
3155 3158
3156 __disk_stat_add(req->rq_disk, sectors[rw], nr_bytes >> 9); 3159 disk_stat_add(req->rq_disk, sectors[rw], nr_bytes >> 9);
3157 } 3160 }
3158 3161
3159 total_bytes = bio_nbytes = 0; 3162 total_bytes = bio_nbytes = 0;
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index dd8c6a9ffc76..b45a45ca7cc9 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -29,9 +29,6 @@
29#ifdef CONFIG_ARCH_OMAP 29#ifdef CONFIG_ARCH_OMAP
30#include <asm/arch/gpio.h> 30#include <asm/arch/gpio.h>
31#endif 31#endif
32
33#else
34#define set_irq_type(irq,type) do{}while(0)
35#endif 32#endif
36 33
37 34
@@ -509,14 +506,14 @@ static int __devinit ads7846_probe(struct spi_device *spi)
509 ts->msg.complete = ads7846_rx; 506 ts->msg.complete = ads7846_rx;
510 ts->msg.context = ts; 507 ts->msg.context = ts;
511 508
512 if (request_irq(spi->irq, ads7846_irq, SA_SAMPLE_RANDOM, 509 if (request_irq(spi->irq, ads7846_irq,
513 spi->dev.bus_id, ts)) { 510 SA_SAMPLE_RANDOM | SA_TRIGGER_FALLING,
511 spi->dev.bus_id, ts)) {
514 dev_dbg(&spi->dev, "irq %d busy?\n", spi->irq); 512 dev_dbg(&spi->dev, "irq %d busy?\n", spi->irq);
515 input_unregister_device(&ts->input); 513 input_unregister_device(&ts->input);
516 kfree(ts); 514 kfree(ts);
517 return -EBUSY; 515 return -EBUSY;
518 } 516 }
519 set_irq_type(spi->irq, IRQT_FALLING);
520 517
521 dev_info(&spi->dev, "touchscreen, irq %d\n", spi->irq); 518 dev_info(&spi->dev, "touchscreen, irq %d\n", spi->irq);
522 519
diff --git a/drivers/misc/ibmasm/uart.c b/drivers/misc/ibmasm/uart.c
index 7e98434cfa37..9783caf49696 100644
--- a/drivers/misc/ibmasm/uart.c
+++ b/drivers/misc/ibmasm/uart.c
@@ -50,7 +50,7 @@ void ibmasm_register_uart(struct service_processor *sp)
50 memset(&uport, 0, sizeof(struct uart_port)); 50 memset(&uport, 0, sizeof(struct uart_port));
51 uport.irq = sp->irq; 51 uport.irq = sp->irq;
52 uport.uartclk = 3686400; 52 uport.uartclk = 3686400;
53 uport.flags = UPF_AUTOPROBE | UPF_SHARE_IRQ; 53 uport.flags = UPF_SHARE_IRQ;
54 uport.iotype = UPIO_MEM; 54 uport.iotype = UPIO_MEM;
55 uport.membase = iomem_base; 55 uport.membase = iomem_base;
56 56
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 626508afe1b1..6a6a08441804 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -2034,13 +2034,28 @@ config SKGE
2034 It does not support the link failover and network management 2034 It does not support the link failover and network management
2035 features that "portable" vendor supplied sk98lin driver does. 2035 features that "portable" vendor supplied sk98lin driver does.
2036 2036
2037 This driver supports adapters based on the original Yukon chipset:
2038 Marvell 88E8001, Belkin F5D5005, CNet GigaCard, DLink DGE-530T,
2039 Linksys EG1032/EG1064, 3Com 3C940/3C940B, SysKonnect SK-9871/9872.
2040
2041 It does not support the newer Yukon2 chipset: a separate driver,
2042 sky2, is provided for Yukon2-based adapters.
2043
2044 To compile this driver as a module, choose M here: the module
2045 will be called skge. This is recommended.
2037 2046
2038config SKY2 2047config SKY2
2039 tristate "SysKonnect Yukon2 support (EXPERIMENTAL)" 2048 tristate "SysKonnect Yukon2 support (EXPERIMENTAL)"
2040 depends on PCI && EXPERIMENTAL 2049 depends on PCI && EXPERIMENTAL
2041 select CRC32 2050 select CRC32
2042 ---help--- 2051 ---help---
2043 This driver support the Marvell Yukon 2 Gigabit Ethernet adapter. 2052 This driver supports Gigabit Ethernet adapters based on the the
2053 Marvell Yukon 2 chipset:
2054 Marvell 88E8021/88E8022/88E8035/88E8036/88E8038/88E8050/88E8052/
2055 88E8053/88E8055/88E8061/88E8062, SysKonnect SK-9E21D/SK-9S21
2056
2057 This driver does not support the original Yukon chipset: a seperate
2058 driver, skge, is provided for Yukon-based adapters.
2044 2059
2045 To compile this driver as a module, choose M here: the module 2060 To compile this driver as a module, choose M here: the module
2046 will be called sky2. This is recommended. 2061 will be called sky2. This is recommended.
@@ -2050,8 +2065,15 @@ config SK98LIN
2050 depends on PCI 2065 depends on PCI
2051 ---help--- 2066 ---help---
2052 Say Y here if you have a Marvell Yukon or SysKonnect SK-98xx/SK-95xx 2067 Say Y here if you have a Marvell Yukon or SysKonnect SK-98xx/SK-95xx
2053 compliant Gigabit Ethernet Adapter. The following adapters are supported 2068 compliant Gigabit Ethernet Adapter.
2054 by this driver: 2069
2070 This driver supports the original Yukon chipset. A cleaner driver is
2071 also available (skge) which seems to work better than this one.
2072
2073 This driver does not support the newer Yukon2 chipset. A seperate
2074 driver, sky2, is provided to support Yukon2-based adapters.
2075
2076 The following adapters are supported by this driver:
2055 - 3Com 3C940 Gigabit LOM Ethernet Adapter 2077 - 3Com 3C940 Gigabit LOM Ethernet Adapter
2056 - 3Com 3C941 Gigabit LOM Ethernet Adapter 2078 - 3Com 3C941 Gigabit LOM Ethernet Adapter
2057 - Allied Telesyn AT-2970LX Gigabit Ethernet Adapter 2079 - Allied Telesyn AT-2970LX Gigabit Ethernet Adapter
diff --git a/drivers/net/acenic.c b/drivers/net/acenic.c
index b8953de5664a..b508812e97ac 100644
--- a/drivers/net/acenic.c
+++ b/drivers/net/acenic.c
@@ -1002,6 +1002,8 @@ static int __devinit ace_init(struct net_device *dev)
1002 1002
1003 mac1 = 0; 1003 mac1 = 0;
1004 for(i = 0; i < 4; i++) { 1004 for(i = 0; i < 4; i++) {
1005 int tmp;
1006
1005 mac1 = mac1 << 8; 1007 mac1 = mac1 << 8;
1006 tmp = read_eeprom_byte(dev, 0x8c+i); 1008 tmp = read_eeprom_byte(dev, 0x8c+i);
1007 if (tmp < 0) { 1009 if (tmp < 0) {
@@ -1012,6 +1014,8 @@ static int __devinit ace_init(struct net_device *dev)
1012 } 1014 }
1013 mac2 = 0; 1015 mac2 = 0;
1014 for(i = 4; i < 8; i++) { 1016 for(i = 4; i < 8; i++) {
1017 int tmp;
1018
1015 mac2 = mac2 << 8; 1019 mac2 = mac2 << 8;
1016 tmp = read_eeprom_byte(dev, 0x8c+i); 1020 tmp = read_eeprom_byte(dev, 0x8c+i);
1017 if (tmp < 0) { 1021 if (tmp < 0) {
diff --git a/drivers/net/b44.c b/drivers/net/b44.c
index df9d6e80c4f2..c3267e4e1bb0 100644
--- a/drivers/net/b44.c
+++ b/drivers/net/b44.c
@@ -1399,7 +1399,6 @@ static int b44_open(struct net_device *dev)
1399 b44_init_rings(bp); 1399 b44_init_rings(bp);
1400 b44_init_hw(bp); 1400 b44_init_hw(bp);
1401 1401
1402 netif_carrier_off(dev);
1403 b44_check_phy(bp); 1402 b44_check_phy(bp);
1404 1403
1405 err = request_irq(dev->irq, b44_interrupt, SA_SHIRQ, dev->name, dev); 1404 err = request_irq(dev->irq, b44_interrupt, SA_SHIRQ, dev->name, dev);
@@ -1464,7 +1463,7 @@ static int b44_close(struct net_device *dev)
1464#endif 1463#endif
1465 b44_halt(bp); 1464 b44_halt(bp);
1466 b44_free_rings(bp); 1465 b44_free_rings(bp);
1467 netif_carrier_off(bp->dev); 1466 netif_carrier_off(dev);
1468 1467
1469 spin_unlock_irq(&bp->lock); 1468 spin_unlock_irq(&bp->lock);
1470 1469
@@ -2000,6 +1999,8 @@ static int __devinit b44_init_one(struct pci_dev *pdev,
2000 dev->irq = pdev->irq; 1999 dev->irq = pdev->irq;
2001 SET_ETHTOOL_OPS(dev, &b44_ethtool_ops); 2000 SET_ETHTOOL_OPS(dev, &b44_ethtool_ops);
2002 2001
2002 netif_carrier_off(dev);
2003
2003 err = b44_get_invariants(bp); 2004 err = b44_get_invariants(bp);
2004 if (err) { 2005 if (err) {
2005 printk(KERN_ERR PFX "Problem fetching invariants of chip, " 2006 printk(KERN_ERR PFX "Problem fetching invariants of chip, "
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 2582d98ef5c3..4ff006c37626 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -576,7 +576,7 @@ static int bond_update_speed_duplex(struct slave *slave)
576 slave->duplex = DUPLEX_FULL; 576 slave->duplex = DUPLEX_FULL;
577 577
578 if (slave_dev->ethtool_ops) { 578 if (slave_dev->ethtool_ops) {
579 u32 res; 579 int res;
580 580
581 if (!slave_dev->ethtool_ops->get_settings) { 581 if (!slave_dev->ethtool_ops->get_settings) {
582 return -1; 582 return -1;
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index 40ae36b20c9d..7ef4b0434a3f 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -444,6 +444,7 @@ static int mv643xx_eth_receive_queue(struct net_device *dev)
444 netif_rx(skb); 444 netif_rx(skb);
445#endif 445#endif
446 } 446 }
447 dev->last_rx = jiffies;
447 } 448 }
448 449
449 return received_packets; 450 return received_packets;
@@ -461,7 +462,7 @@ static int mv643xx_eth_receive_queue(struct net_device *dev)
461 */ 462 */
462 463
463static irqreturn_t mv643xx_eth_int_handler(int irq, void *dev_id, 464static irqreturn_t mv643xx_eth_int_handler(int irq, void *dev_id,
464 struct pt_regs *regs) 465 struct pt_regs *regs)
465{ 466{
466 struct net_device *dev = (struct net_device *)dev_id; 467 struct net_device *dev = (struct net_device *)dev_id;
467 struct mv643xx_private *mp = netdev_priv(dev); 468 struct mv643xx_private *mp = netdev_priv(dev);
@@ -1047,16 +1048,15 @@ static int mv643xx_poll(struct net_device *dev, int *budget)
1047 1048
1048static inline unsigned int has_tiny_unaligned_frags(struct sk_buff *skb) 1049static inline unsigned int has_tiny_unaligned_frags(struct sk_buff *skb)
1049{ 1050{
1050 unsigned int frag; 1051 unsigned int frag;
1051 skb_frag_t *fragp; 1052 skb_frag_t *fragp;
1052 1053
1053 for (frag = 0; frag < skb_shinfo(skb)->nr_frags; frag++) { 1054 for (frag = 0; frag < skb_shinfo(skb)->nr_frags; frag++) {
1054 fragp = &skb_shinfo(skb)->frags[frag]; 1055 fragp = &skb_shinfo(skb)->frags[frag];
1055 if (fragp->size <= 8 && fragp->page_offset & 0x7) 1056 if (fragp->size <= 8 && fragp->page_offset & 0x7)
1056 return 1; 1057 return 1;
1057 1058 }
1058 } 1059 return 0;
1059 return 0;
1060} 1060}
1061 1061
1062 1062
@@ -2137,26 +2137,26 @@ static void eth_port_set_multicast_list(struct net_device *dev)
2137 */ 2137 */
2138 if ((dev->flags & IFF_PROMISC) || (dev->flags & IFF_ALLMULTI)) { 2138 if ((dev->flags & IFF_PROMISC) || (dev->flags & IFF_ALLMULTI)) {
2139 for (table_index = 0; table_index <= 0xFC; table_index += 4) { 2139 for (table_index = 0; table_index <= 0xFC; table_index += 4) {
2140 /* Set all entries in DA filter special multicast 2140 /* Set all entries in DA filter special multicast
2141 * table (Ex_dFSMT) 2141 * table (Ex_dFSMT)
2142 * Set for ETH_Q0 for now 2142 * Set for ETH_Q0 for now
2143 * Bits 2143 * Bits
2144 * 0 Accept=1, Drop=0 2144 * 0 Accept=1, Drop=0
2145 * 3-1 Queue ETH_Q0=0 2145 * 3-1 Queue ETH_Q0=0
2146 * 7-4 Reserved = 0; 2146 * 7-4 Reserved = 0;
2147 */ 2147 */
2148 mv_write(MV643XX_ETH_DA_FILTER_SPECIAL_MULTICAST_TABLE_BASE(eth_port_num) + table_index, 0x01010101); 2148 mv_write(MV643XX_ETH_DA_FILTER_SPECIAL_MULTICAST_TABLE_BASE(eth_port_num) + table_index, 0x01010101);
2149 2149
2150 /* Set all entries in DA filter other multicast 2150 /* Set all entries in DA filter other multicast
2151 * table (Ex_dFOMT) 2151 * table (Ex_dFOMT)
2152 * Set for ETH_Q0 for now 2152 * Set for ETH_Q0 for now
2153 * Bits 2153 * Bits
2154 * 0 Accept=1, Drop=0 2154 * 0 Accept=1, Drop=0
2155 * 3-1 Queue ETH_Q0=0 2155 * 3-1 Queue ETH_Q0=0
2156 * 7-4 Reserved = 0; 2156 * 7-4 Reserved = 0;
2157 */ 2157 */
2158 mv_write(MV643XX_ETH_DA_FILTER_OTHER_MULTICAST_TABLE_BASE(eth_port_num) + table_index, 0x01010101); 2158 mv_write(MV643XX_ETH_DA_FILTER_OTHER_MULTICAST_TABLE_BASE(eth_port_num) + table_index, 0x01010101);
2159 } 2159 }
2160 return; 2160 return;
2161 } 2161 }
2162 2162
@@ -2617,7 +2617,6 @@ static ETH_FUNC_RET_STATUS eth_port_send(struct mv643xx_private *mp,
2617 struct eth_tx_desc *current_descriptor; 2617 struct eth_tx_desc *current_descriptor;
2618 struct eth_tx_desc *first_descriptor; 2618 struct eth_tx_desc *first_descriptor;
2619 u32 command; 2619 u32 command;
2620 unsigned long flags;
2621 2620
2622 /* Do not process Tx ring in case of Tx ring resource error */ 2621 /* Do not process Tx ring in case of Tx ring resource error */
2623 if (mp->tx_resource_err) 2622 if (mp->tx_resource_err)
@@ -2634,8 +2633,6 @@ static ETH_FUNC_RET_STATUS eth_port_send(struct mv643xx_private *mp,
2634 return ETH_ERROR; 2633 return ETH_ERROR;
2635 } 2634 }
2636 2635
2637 spin_lock_irqsave(&mp->lock, flags);
2638
2639 mp->tx_ring_skbs++; 2636 mp->tx_ring_skbs++;
2640 BUG_ON(mp->tx_ring_skbs > mp->tx_ring_size); 2637 BUG_ON(mp->tx_ring_skbs > mp->tx_ring_size);
2641 2638
@@ -2685,15 +2682,11 @@ static ETH_FUNC_RET_STATUS eth_port_send(struct mv643xx_private *mp,
2685 mp->tx_resource_err = 1; 2682 mp->tx_resource_err = 1;
2686 mp->tx_curr_desc_q = tx_first_desc; 2683 mp->tx_curr_desc_q = tx_first_desc;
2687 2684
2688 spin_unlock_irqrestore(&mp->lock, flags);
2689
2690 return ETH_QUEUE_LAST_RESOURCE; 2685 return ETH_QUEUE_LAST_RESOURCE;
2691 } 2686 }
2692 2687
2693 mp->tx_curr_desc_q = tx_next_desc; 2688 mp->tx_curr_desc_q = tx_next_desc;
2694 2689
2695 spin_unlock_irqrestore(&mp->lock, flags);
2696
2697 return ETH_OK; 2690 return ETH_OK;
2698} 2691}
2699#else 2692#else
@@ -2704,14 +2697,11 @@ static ETH_FUNC_RET_STATUS eth_port_send(struct mv643xx_private *mp,
2704 int tx_desc_used; 2697 int tx_desc_used;
2705 struct eth_tx_desc *current_descriptor; 2698 struct eth_tx_desc *current_descriptor;
2706 unsigned int command_status; 2699 unsigned int command_status;
2707 unsigned long flags;
2708 2700
2709 /* Do not process Tx ring in case of Tx ring resource error */ 2701 /* Do not process Tx ring in case of Tx ring resource error */
2710 if (mp->tx_resource_err) 2702 if (mp->tx_resource_err)
2711 return ETH_QUEUE_FULL; 2703 return ETH_QUEUE_FULL;
2712 2704
2713 spin_lock_irqsave(&mp->lock, flags);
2714
2715 mp->tx_ring_skbs++; 2705 mp->tx_ring_skbs++;
2716 BUG_ON(mp->tx_ring_skbs > mp->tx_ring_size); 2706 BUG_ON(mp->tx_ring_skbs > mp->tx_ring_size);
2717 2707
@@ -2742,12 +2732,9 @@ static ETH_FUNC_RET_STATUS eth_port_send(struct mv643xx_private *mp,
2742 /* Check for ring index overlap in the Tx desc ring */ 2732 /* Check for ring index overlap in the Tx desc ring */
2743 if (tx_desc_curr == tx_desc_used) { 2733 if (tx_desc_curr == tx_desc_used) {
2744 mp->tx_resource_err = 1; 2734 mp->tx_resource_err = 1;
2745
2746 spin_unlock_irqrestore(&mp->lock, flags);
2747 return ETH_QUEUE_LAST_RESOURCE; 2735 return ETH_QUEUE_LAST_RESOURCE;
2748 } 2736 }
2749 2737
2750 spin_unlock_irqrestore(&mp->lock, flags);
2751 return ETH_OK; 2738 return ETH_OK;
2752} 2739}
2753#endif 2740#endif
@@ -2898,8 +2885,10 @@ static ETH_FUNC_RET_STATUS eth_port_receive(struct mv643xx_private *mp,
2898 p_pkt_info->return_info = mp->rx_skb[rx_curr_desc]; 2885 p_pkt_info->return_info = mp->rx_skb[rx_curr_desc];
2899 p_pkt_info->l4i_chk = p_rx_desc->buf_size; 2886 p_pkt_info->l4i_chk = p_rx_desc->buf_size;
2900 2887
2901 /* Clean the return info field to indicate that the packet has been */ 2888 /*
2902 /* moved to the upper layers */ 2889 * Clean the return info field to indicate that the
2890 * packet has been moved to the upper layers
2891 */
2903 mp->rx_skb[rx_curr_desc] = NULL; 2892 mp->rx_skb[rx_curr_desc] = NULL;
2904 2893
2905 /* Update current index in data structure */ 2894 /* Update current index in data structure */
@@ -2980,7 +2969,7 @@ struct mv643xx_stats {
2980}; 2969};
2981 2970
2982#define MV643XX_STAT(m) sizeof(((struct mv643xx_private *)0)->m), \ 2971#define MV643XX_STAT(m) sizeof(((struct mv643xx_private *)0)->m), \
2983 offsetof(struct mv643xx_private, m) 2972 offsetof(struct mv643xx_private, m)
2984 2973
2985static const struct mv643xx_stats mv643xx_gstrings_stats[] = { 2974static const struct mv643xx_stats mv643xx_gstrings_stats[] = {
2986 { "rx_packets", MV643XX_STAT(stats.rx_packets) }, 2975 { "rx_packets", MV643XX_STAT(stats.rx_packets) },
@@ -3131,9 +3120,8 @@ mv643xx_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
3131 return 0; 3120 return 0;
3132} 3121}
3133 3122
3134static void 3123static void mv643xx_get_drvinfo(struct net_device *netdev,
3135mv643xx_get_drvinfo(struct net_device *netdev, 3124 struct ethtool_drvinfo *drvinfo)
3136 struct ethtool_drvinfo *drvinfo)
3137{ 3125{
3138 strncpy(drvinfo->driver, mv643xx_driver_name, 32); 3126 strncpy(drvinfo->driver, mv643xx_driver_name, 32);
3139 strncpy(drvinfo->version, mv643xx_driver_version, 32); 3127 strncpy(drvinfo->version, mv643xx_driver_version, 32);
@@ -3142,39 +3130,37 @@ mv643xx_get_drvinfo(struct net_device *netdev,
3142 drvinfo->n_stats = MV643XX_STATS_LEN; 3130 drvinfo->n_stats = MV643XX_STATS_LEN;
3143} 3131}
3144 3132
3145static int 3133static int mv643xx_get_stats_count(struct net_device *netdev)
3146mv643xx_get_stats_count(struct net_device *netdev)
3147{ 3134{
3148 return MV643XX_STATS_LEN; 3135 return MV643XX_STATS_LEN;
3149} 3136}
3150 3137
3151static void 3138static void mv643xx_get_ethtool_stats(struct net_device *netdev,
3152mv643xx_get_ethtool_stats(struct net_device *netdev, 3139 struct ethtool_stats *stats, uint64_t *data)
3153 struct ethtool_stats *stats, uint64_t *data)
3154{ 3140{
3155 struct mv643xx_private *mp = netdev->priv; 3141 struct mv643xx_private *mp = netdev->priv;
3156 int i; 3142 int i;
3157 3143
3158 eth_update_mib_counters(mp); 3144 eth_update_mib_counters(mp);
3159 3145
3160 for(i = 0; i < MV643XX_STATS_LEN; i++) { 3146 for (i = 0; i < MV643XX_STATS_LEN; i++) {
3161 char *p = (char *)mp+mv643xx_gstrings_stats[i].stat_offset; 3147 char *p = (char *)mp+mv643xx_gstrings_stats[i].stat_offset;
3162 data[i] = (mv643xx_gstrings_stats[i].sizeof_stat == 3148 data[i] = (mv643xx_gstrings_stats[i].sizeof_stat ==
3163 sizeof(uint64_t)) ? *(uint64_t *)p : *(uint32_t *)p; 3149 sizeof(uint64_t)) ? *(uint64_t *)p : *(uint32_t *)p;
3164 } 3150 }
3165} 3151}
3166 3152
3167static void 3153static void mv643xx_get_strings(struct net_device *netdev, uint32_t stringset,
3168mv643xx_get_strings(struct net_device *netdev, uint32_t stringset, uint8_t *data) 3154 uint8_t *data)
3169{ 3155{
3170 int i; 3156 int i;
3171 3157
3172 switch(stringset) { 3158 switch(stringset) {
3173 case ETH_SS_STATS: 3159 case ETH_SS_STATS:
3174 for (i=0; i < MV643XX_STATS_LEN; i++) { 3160 for (i=0; i < MV643XX_STATS_LEN; i++) {
3175 memcpy(data + i * ETH_GSTRING_LEN, 3161 memcpy(data + i * ETH_GSTRING_LEN,
3176 mv643xx_gstrings_stats[i].stat_string, 3162 mv643xx_gstrings_stats[i].stat_string,
3177 ETH_GSTRING_LEN); 3163 ETH_GSTRING_LEN);
3178 } 3164 }
3179 break; 3165 break;
3180 } 3166 }
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 89c46787676c..49b597cbc19a 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -3586,7 +3586,7 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev)
3586 txdp->Buffer_Pointer = (u64) pci_map_page 3586 txdp->Buffer_Pointer = (u64) pci_map_page
3587 (sp->pdev, frag->page, frag->page_offset, 3587 (sp->pdev, frag->page, frag->page_offset,
3588 frag->size, PCI_DMA_TODEVICE); 3588 frag->size, PCI_DMA_TODEVICE);
3589 txdp->Control_1 |= TXD_BUFFER0_SIZE(frag->size); 3589 txdp->Control_1 = TXD_BUFFER0_SIZE(frag->size);
3590 if (skb_shinfo(skb)->ufo_size) 3590 if (skb_shinfo(skb)->ufo_size)
3591 txdp->Control_1 |= TXD_UFO_EN; 3591 txdp->Control_1 |= TXD_UFO_EN;
3592 } 3592 }
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c
index 28ce47a02408..55f3b856236e 100644
--- a/drivers/net/sungem.c
+++ b/drivers/net/sungem.c
@@ -1653,36 +1653,40 @@ static void gem_init_rings(struct gem *gp)
1653/* Init PHY interface and start link poll state machine */ 1653/* Init PHY interface and start link poll state machine */
1654static void gem_init_phy(struct gem *gp) 1654static void gem_init_phy(struct gem *gp)
1655{ 1655{
1656 u32 mifcfg; 1656 u32 mif_cfg;
1657 1657
1658 /* Revert MIF CFG setting done on stop_phy */ 1658 /* Revert MIF CFG setting done on stop_phy */
1659 mifcfg = readl(gp->regs + MIF_CFG); 1659 mif_cfg = readl(gp->regs + MIF_CFG);
1660 mifcfg &= ~MIF_CFG_BBMODE; 1660 mif_cfg &= ~(MIF_CFG_PSELECT|MIF_CFG_POLL|MIF_CFG_BBMODE|MIF_CFG_MDI1);
1661 writel(mifcfg, gp->regs + MIF_CFG); 1661 mif_cfg |= MIF_CFG_MDI0;
1662 writel(mif_cfg, gp->regs + MIF_CFG);
1663 writel(PCS_DMODE_MGM, gp->regs + PCS_DMODE);
1664 writel(MAC_XIFCFG_OE, gp->regs + MAC_XIFCFG);
1662 1665
1663 if (gp->pdev->vendor == PCI_VENDOR_ID_APPLE) { 1666 if (gp->pdev->vendor == PCI_VENDOR_ID_APPLE) {
1664 int i; 1667 int i;
1668 u16 ctrl;
1665 1669
1666 /* Those delay sucks, the HW seem to love them though, I'll
1667 * serisouly consider breaking some locks here to be able
1668 * to schedule instead
1669 */
1670 for (i = 0; i < 3; i++) {
1671#ifdef CONFIG_PPC_PMAC 1670#ifdef CONFIG_PPC_PMAC
1672 pmac_call_feature(PMAC_FTR_GMAC_PHY_RESET, gp->of_node, 0, 0); 1671 pmac_call_feature(PMAC_FTR_GMAC_PHY_RESET, gp->of_node, 0, 0);
1673 msleep(20);
1674#endif 1672#endif
1675 /* Some PHYs used by apple have problem getting back to us, 1673
1676 * we do an additional reset here 1674 /* Some PHYs used by apple have problem getting back
1677 */ 1675 * to us, we do an additional reset here
1678 phy_write(gp, MII_BMCR, BMCR_RESET); 1676 */
1679 msleep(20); 1677 phy_write(gp, MII_BMCR, BMCR_RESET);
1680 if (phy_read(gp, MII_BMCR) != 0xffff) 1678 for (i = 0; i < 50; i++) {
1679 if ((phy_read(gp, MII_BMCR) & BMCR_RESET) == 0)
1681 break; 1680 break;
1682 if (i == 2) 1681 msleep(10);
1683 printk(KERN_WARNING "%s: GMAC PHY not responding !\n",
1684 gp->dev->name);
1685 } 1682 }
1683 if (i == 50)
1684 printk(KERN_WARNING "%s: GMAC PHY not responding !\n",
1685 gp->dev->name);
1686 /* Make sure isolate is off */
1687 ctrl = phy_read(gp, MII_BMCR);
1688 if (ctrl & BMCR_ISOLATE)
1689 phy_write(gp, MII_BMCR, ctrl & ~BMCR_ISOLATE);
1686 } 1690 }
1687 1691
1688 if (gp->pdev->vendor == PCI_VENDOR_ID_SUN && 1692 if (gp->pdev->vendor == PCI_VENDOR_ID_SUN &&
@@ -2119,7 +2123,7 @@ static void gem_reinit_chip(struct gem *gp)
2119/* Must be invoked with no lock held. */ 2123/* Must be invoked with no lock held. */
2120static void gem_stop_phy(struct gem *gp, int wol) 2124static void gem_stop_phy(struct gem *gp, int wol)
2121{ 2125{
2122 u32 mifcfg; 2126 u32 mif_cfg;
2123 unsigned long flags; 2127 unsigned long flags;
2124 2128
2125 /* Let the chip settle down a bit, it seems that helps 2129 /* Let the chip settle down a bit, it seems that helps
@@ -2130,9 +2134,9 @@ static void gem_stop_phy(struct gem *gp, int wol)
2130 /* Make sure we aren't polling PHY status change. We 2134 /* Make sure we aren't polling PHY status change. We
2131 * don't currently use that feature though 2135 * don't currently use that feature though
2132 */ 2136 */
2133 mifcfg = readl(gp->regs + MIF_CFG); 2137 mif_cfg = readl(gp->regs + MIF_CFG);
2134 mifcfg &= ~MIF_CFG_POLL; 2138 mif_cfg &= ~MIF_CFG_POLL;
2135 writel(mifcfg, gp->regs + MIF_CFG); 2139 writel(mif_cfg, gp->regs + MIF_CFG);
2136 2140
2137 if (wol && gp->has_wol) { 2141 if (wol && gp->has_wol) {
2138 unsigned char *e = &gp->dev->dev_addr[0]; 2142 unsigned char *e = &gp->dev->dev_addr[0];
@@ -2182,7 +2186,8 @@ static void gem_stop_phy(struct gem *gp, int wol)
2182 /* According to Apple, we must set the MDIO pins to this begnign 2186 /* According to Apple, we must set the MDIO pins to this begnign
2183 * state or we may 1) eat more current, 2) damage some PHYs 2187 * state or we may 1) eat more current, 2) damage some PHYs
2184 */ 2188 */
2185 writel(mifcfg | MIF_CFG_BBMODE, gp->regs + MIF_CFG); 2189 mif_cfg = 0;
2190 writel(mif_cfg | MIF_CFG_BBMODE, gp->regs + MIF_CFG);
2186 writel(0, gp->regs + MIF_BBCLK); 2191 writel(0, gp->regs + MIF_BBCLK);
2187 writel(0, gp->regs + MIF_BBDATA); 2192 writel(0, gp->regs + MIF_BBDATA);
2188 writel(0, gp->regs + MIF_BBOENAB); 2193 writel(0, gp->regs + MIF_BBOENAB);
diff --git a/drivers/net/wireless/hostap/Kconfig b/drivers/net/wireless/hostap/Kconfig
index c8f6286dd35f..308f773ad566 100644
--- a/drivers/net/wireless/hostap/Kconfig
+++ b/drivers/net/wireless/hostap/Kconfig
@@ -75,7 +75,7 @@ config HOSTAP_PCI
75 75
76config HOSTAP_CS 76config HOSTAP_CS
77 tristate "Host AP driver for Prism2/2.5/3 PC Cards" 77 tristate "Host AP driver for Prism2/2.5/3 PC Cards"
78 depends on PCMCIA!=n && HOSTAP 78 depends on PCMCIA && HOSTAP
79 ---help--- 79 ---help---
80 Host AP driver's version for Prism2/2.5/3 PC Cards. 80 Host AP driver's version for Prism2/2.5/3 PC Cards.
81 81
diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c
index 8bf02763b5c7..6290c9f7e939 100644
--- a/drivers/net/wireless/ipw2100.c
+++ b/drivers/net/wireless/ipw2100.c
@@ -2201,6 +2201,17 @@ static int ipw2100_alloc_skb(struct ipw2100_priv *priv,
2201#define SEARCH_SNAPSHOT 1 2201#define SEARCH_SNAPSHOT 1
2202 2202
2203#define SNAPSHOT_ADDR(ofs) (priv->snapshot[((ofs) >> 12) & 0xff] + ((ofs) & 0xfff)) 2203#define SNAPSHOT_ADDR(ofs) (priv->snapshot[((ofs) >> 12) & 0xff] + ((ofs) & 0xfff))
2204static void ipw2100_snapshot_free(struct ipw2100_priv *priv)
2205{
2206 int i;
2207 if (!priv->snapshot[0])
2208 return;
2209 for (i = 0; i < 0x30; i++)
2210 kfree(priv->snapshot[i]);
2211 priv->snapshot[0] = NULL;
2212}
2213
2214#ifdef CONFIG_IPW2100_DEBUG_C3
2204static int ipw2100_snapshot_alloc(struct ipw2100_priv *priv) 2215static int ipw2100_snapshot_alloc(struct ipw2100_priv *priv)
2205{ 2216{
2206 int i; 2217 int i;
@@ -2221,16 +2232,6 @@ static int ipw2100_snapshot_alloc(struct ipw2100_priv *priv)
2221 return 1; 2232 return 1;
2222} 2233}
2223 2234
2224static void ipw2100_snapshot_free(struct ipw2100_priv *priv)
2225{
2226 int i;
2227 if (!priv->snapshot[0])
2228 return;
2229 for (i = 0; i < 0x30; i++)
2230 kfree(priv->snapshot[i]);
2231 priv->snapshot[0] = NULL;
2232}
2233
2234static u32 ipw2100_match_buf(struct ipw2100_priv *priv, u8 * in_buf, 2235static u32 ipw2100_match_buf(struct ipw2100_priv *priv, u8 * in_buf,
2235 size_t len, int mode) 2236 size_t len, int mode)
2236{ 2237{
@@ -2269,6 +2270,7 @@ static u32 ipw2100_match_buf(struct ipw2100_priv *priv, u8 * in_buf,
2269 2270
2270 return ret; 2271 return ret;
2271} 2272}
2273#endif
2272 2274
2273/* 2275/*
2274 * 2276 *
@@ -7112,11 +7114,17 @@ static int ipw2100_wx_set_txpow(struct net_device *dev,
7112{ 7114{
7113 struct ipw2100_priv *priv = ieee80211_priv(dev); 7115 struct ipw2100_priv *priv = ieee80211_priv(dev);
7114 int err = 0, value; 7116 int err = 0, value;
7117
7118 if (ipw_radio_kill_sw(priv, wrqu->txpower.disabled))
7119 return -EINPROGRESS;
7115 7120
7116 if (priv->ieee->iw_mode != IW_MODE_ADHOC) 7121 if (priv->ieee->iw_mode != IW_MODE_ADHOC)
7122 return 0;
7123
7124 if ((wrqu->txpower.flags & IW_TXPOW_TYPE) != IW_TXPOW_DBM)
7117 return -EINVAL; 7125 return -EINVAL;
7118 7126
7119 if (wrqu->txpower.disabled == 1 || wrqu->txpower.fixed == 0) 7127 if (wrqu->txpower.fixed == 0)
7120 value = IPW_TX_POWER_DEFAULT; 7128 value = IPW_TX_POWER_DEFAULT;
7121 else { 7129 else {
7122 if (wrqu->txpower.value < IPW_TX_POWER_MIN_DBM || 7130 if (wrqu->txpower.value < IPW_TX_POWER_MIN_DBM ||
@@ -7151,24 +7159,19 @@ static int ipw2100_wx_get_txpow(struct net_device *dev,
7151 7159
7152 struct ipw2100_priv *priv = ieee80211_priv(dev); 7160 struct ipw2100_priv *priv = ieee80211_priv(dev);
7153 7161
7154 if (priv->ieee->iw_mode != IW_MODE_ADHOC) { 7162 wrqu->txpower.disabled = (priv->status & STATUS_RF_KILL_MASK) ? 1 : 0;
7155 wrqu->power.disabled = 1;
7156 return 0;
7157 }
7158 7163
7159 if (priv->tx_power == IPW_TX_POWER_DEFAULT) { 7164 if (priv->tx_power == IPW_TX_POWER_DEFAULT) {
7160 wrqu->power.fixed = 0; 7165 wrqu->txpower.fixed = 0;
7161 wrqu->power.value = IPW_TX_POWER_MAX_DBM; 7166 wrqu->txpower.value = IPW_TX_POWER_MAX_DBM;
7162 wrqu->power.disabled = 1;
7163 } else { 7167 } else {
7164 wrqu->power.disabled = 0; 7168 wrqu->txpower.fixed = 1;
7165 wrqu->power.fixed = 1; 7169 wrqu->txpower.value = priv->tx_power;
7166 wrqu->power.value = priv->tx_power;
7167 } 7170 }
7168 7171
7169 wrqu->power.flags = IW_TXPOW_DBM; 7172 wrqu->txpower.flags = IW_TXPOW_DBM;
7170 7173
7171 IPW_DEBUG_WX("GET TX Power -> %d \n", wrqu->power.value); 7174 IPW_DEBUG_WX("GET TX Power -> %d \n", wrqu->txpower.value);
7172 7175
7173 return 0; 7176 return 0;
7174} 7177}
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c
index 4c28e332ecc3..916b24c544e2 100644
--- a/drivers/net/wireless/ipw2200.c
+++ b/drivers/net/wireless/ipw2200.c
@@ -8012,6 +8012,10 @@ static int ipw_sw_reset(struct ipw_priv *priv, int init)
8012 else 8012 else
8013 IPW_DEBUG_INFO("Auto adhoc creation disabled.\n"); 8013 IPW_DEBUG_INFO("Auto adhoc creation disabled.\n");
8014 8014
8015 priv->config &= ~CFG_STATIC_ESSID;
8016 priv->essid_len = 0;
8017 memset(priv->essid, 0, IW_ESSID_MAX_SIZE);
8018
8015 if (disable) { 8019 if (disable) {
8016 priv->status |= STATUS_RF_KILL_SW; 8020 priv->status |= STATUS_RF_KILL_SW;
8017 IPW_DEBUG_INFO("Radio disabled.\n"); 8021 IPW_DEBUG_INFO("Radio disabled.\n");
@@ -11035,7 +11039,6 @@ static int ipw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
11035 net_dev->set_multicast_list = ipw_net_set_multicast_list; 11039 net_dev->set_multicast_list = ipw_net_set_multicast_list;
11036 net_dev->set_mac_address = ipw_net_set_mac_address; 11040 net_dev->set_mac_address = ipw_net_set_mac_address;
11037 priv->wireless_data.spy_data = &priv->ieee->spy_data; 11041 priv->wireless_data.spy_data = &priv->ieee->spy_data;
11038 priv->wireless_data.ieee80211 = priv->ieee;
11039 net_dev->wireless_data = &priv->wireless_data; 11042 net_dev->wireless_data = &priv->wireless_data;
11040 net_dev->wireless_handlers = &ipw_wx_handler_def; 11043 net_dev->wireless_handlers = &ipw_wx_handler_def;
11041 net_dev->ethtool_ops = &ipw_ethtool_ops; 11044 net_dev->ethtool_ops = &ipw_ethtool_ops;
@@ -11121,8 +11124,8 @@ static void ipw_pci_remove(struct pci_dev *pdev)
11121 /* Free MAC hash list for ADHOC */ 11124 /* Free MAC hash list for ADHOC */
11122 for (i = 0; i < IPW_IBSS_MAC_HASH_SIZE; i++) { 11125 for (i = 0; i < IPW_IBSS_MAC_HASH_SIZE; i++) {
11123 list_for_each_safe(p, q, &priv->ibss_mac_hash[i]) { 11126 list_for_each_safe(p, q, &priv->ibss_mac_hash[i]) {
11124 kfree(list_entry(p, struct ipw_ibss_seq, list));
11125 list_del(p); 11127 list_del(p);
11128 kfree(list_entry(p, struct ipw_ibss_seq, list));
11126 } 11129 }
11127 } 11130 }
11128 11131
diff --git a/drivers/net/wireless/orinoco_cs.c b/drivers/net/wireless/orinoco_cs.c
index b664708481cc..3c128b692bce 100644
--- a/drivers/net/wireless/orinoco_cs.c
+++ b/drivers/net/wireless/orinoco_cs.c
@@ -261,13 +261,13 @@ orinoco_cs_config(dev_link_t *link)
261 /* Note that the CIS values need to be rescaled */ 261 /* Note that the CIS values need to be rescaled */
262 if (cfg->vcc.present & (1 << CISTPL_POWER_VNOM)) { 262 if (cfg->vcc.present & (1 << CISTPL_POWER_VNOM)) {
263 if (conf.Vcc != cfg->vcc.param[CISTPL_POWER_VNOM] / 10000) { 263 if (conf.Vcc != cfg->vcc.param[CISTPL_POWER_VNOM] / 10000) {
264 DEBUG(2, "orinoco_cs_config: Vcc mismatch (conf.Vcc = %d, CIS = %d)\n", conf.Vcc, cfg->vcc.param[CISTPL_POWER_VNOM] / 10000); 264 DEBUG(2, "orinoco_cs_config: Vcc mismatch (conf.Vcc = %d, cfg CIS = %d)\n", conf.Vcc, cfg->vcc.param[CISTPL_POWER_VNOM] / 10000);
265 if (!ignore_cis_vcc) 265 if (!ignore_cis_vcc)
266 goto next_entry; 266 goto next_entry;
267 } 267 }
268 } else if (dflt.vcc.present & (1 << CISTPL_POWER_VNOM)) { 268 } else if (dflt.vcc.present & (1 << CISTPL_POWER_VNOM)) {
269 if (conf.Vcc != dflt.vcc.param[CISTPL_POWER_VNOM] / 10000) { 269 if (conf.Vcc != dflt.vcc.param[CISTPL_POWER_VNOM] / 10000) {
270 DEBUG(2, "orinoco_cs_config: Vcc mismatch (conf.Vcc = %d, CIS = %d)\n", conf.Vcc, dflt.vcc.param[CISTPL_POWER_VNOM] / 10000); 270 DEBUG(2, "orinoco_cs_config: Vcc mismatch (conf.Vcc = %d, dflt CIS = %d)\n", conf.Vcc, dflt.vcc.param[CISTPL_POWER_VNOM] / 10000);
271 if(!ignore_cis_vcc) 271 if(!ignore_cis_vcc)
272 goto next_entry; 272 goto next_entry;
273 } 273 }
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 202b7507a357..8e1ba0b7a8e4 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -416,7 +416,9 @@ static void attach_msi_entry(struct msi_desc *entry, int vector)
416 416
417static void irq_handler_init(int cap_id, int pos, int mask) 417static void irq_handler_init(int cap_id, int pos, int mask)
418{ 418{
419 spin_lock(&irq_desc[pos].lock); 419 unsigned long flags;
420
421 spin_lock_irqsave(&irq_desc[pos].lock, flags);
420 if (cap_id == PCI_CAP_ID_MSIX) 422 if (cap_id == PCI_CAP_ID_MSIX)
421 irq_desc[pos].handler = &msix_irq_type; 423 irq_desc[pos].handler = &msix_irq_type;
422 else { 424 else {
@@ -425,7 +427,7 @@ static void irq_handler_init(int cap_id, int pos, int mask)
425 else 427 else
426 irq_desc[pos].handler = &msi_irq_w_maskbit_type; 428 irq_desc[pos].handler = &msi_irq_w_maskbit_type;
427 } 429 }
428 spin_unlock(&irq_desc[pos].lock); 430 spin_unlock_irqrestore(&irq_desc[pos].lock, flags);
429} 431}
430 432
431static void enable_msi_mode(struct pci_dev *dev, int pos, int type) 433static void enable_msi_mode(struct pci_dev *dev, int pos, int type)
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
index cfbceb504718..07b1e7cc61df 100644
--- a/drivers/scsi/libata-scsi.c
+++ b/drivers/scsi/libata-scsi.c
@@ -1700,6 +1700,31 @@ static unsigned int ata_msense_rw_recovery(u8 **ptr_io, const u8 *last)
1700 return sizeof(def_rw_recovery_mpage); 1700 return sizeof(def_rw_recovery_mpage);
1701} 1701}
1702 1702
1703/*
1704 * We can turn this into a real blacklist if it's needed, for now just
1705 * blacklist any Maxtor BANC1G10 revision firmware
1706 */
1707static int ata_dev_supports_fua(u16 *id)
1708{
1709 unsigned char model[41], fw[9];
1710
1711 if (!ata_id_has_fua(id))
1712 return 0;
1713
1714 model[40] = '\0';
1715 fw[8] = '\0';
1716
1717 ata_dev_id_string(id, model, ATA_ID_PROD_OFS, sizeof(model) - 1);
1718 ata_dev_id_string(id, fw, ATA_ID_FW_REV_OFS, sizeof(fw) - 1);
1719
1720 if (strncmp(model, "Maxtor", 6))
1721 return 1;
1722 if (strncmp(fw, "BANC1G10", 8))
1723 return 1;
1724
1725 return 0; /* blacklisted */
1726}
1727
1703/** 1728/**
1704 * ata_scsiop_mode_sense - Simulate MODE SENSE 6, 10 commands 1729 * ata_scsiop_mode_sense - Simulate MODE SENSE 6, 10 commands
1705 * @args: device IDENTIFY data / SCSI command of interest. 1730 * @args: device IDENTIFY data / SCSI command of interest.
@@ -1797,7 +1822,7 @@ unsigned int ata_scsiop_mode_sense(struct ata_scsi_args *args, u8 *rbuf,
1797 return 0; 1822 return 0;
1798 1823
1799 dpofua = 0; 1824 dpofua = 0;
1800 if (ata_id_has_fua(args->id) && dev->flags & ATA_DFLAG_LBA48 && 1825 if (ata_dev_supports_fua(args->id) && dev->flags & ATA_DFLAG_LBA48 &&
1801 (!(dev->flags & ATA_DFLAG_PIO) || dev->multi_count)) 1826 (!(dev->flags & ATA_DFLAG_PIO) || dev->multi_count))
1802 dpofua = 1 << 4; 1827 dpofua = 1 << 4;
1803 1828
diff --git a/drivers/serial/21285.c b/drivers/serial/21285.c
index 221999bcf8fe..7aef7518b0d1 100644
--- a/drivers/serial/21285.c
+++ b/drivers/serial/21285.c
@@ -366,7 +366,7 @@ static struct uart_port serial21285_port = {
366 .irq = NO_IRQ, 366 .irq = NO_IRQ,
367 .fifosize = 16, 367 .fifosize = 16,
368 .ops = &serial21285_ops, 368 .ops = &serial21285_ops,
369 .flags = ASYNC_BOOT_AUTOCONF, 369 .flags = UPF_BOOT_AUTOCONF,
370}; 370};
371 371
372static void serial21285_setup_ports(void) 372static void serial21285_setup_ports(void)
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index bc36edff2058..179c1f065e60 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -31,7 +31,6 @@
31#include <linux/init.h> 31#include <linux/init.h>
32#include <linux/console.h> 32#include <linux/console.h>
33#include <linux/sysrq.h> 33#include <linux/sysrq.h>
34#include <linux/mca.h>
35#include <linux/delay.h> 34#include <linux/delay.h>
36#include <linux/platform_device.h> 35#include <linux/platform_device.h>
37#include <linux/tty.h> 36#include <linux/tty.h>
@@ -2027,12 +2026,6 @@ static void serial8250_config_port(struct uart_port *port, int flags)
2027 int ret; 2026 int ret;
2028 2027
2029 /* 2028 /*
2030 * Don't probe for MCA ports on non-MCA machines.
2031 */
2032 if (up->port.flags & UPF_BOOT_ONLYMCA && !MCA_bus)
2033 return;
2034
2035 /*
2036 * Find the region that we can probe for. This in turn 2029 * Find the region that we can probe for. This in turn
2037 * tells us whether we can probe for the type of port. 2030 * tells us whether we can probe for the type of port.
2038 */ 2031 */
@@ -2164,7 +2157,7 @@ serial8250_register_ports(struct uart_driver *drv, struct device *dev)
2164/* 2157/*
2165 * Wait for transmitter & holding register to empty 2158 * Wait for transmitter & holding register to empty
2166 */ 2159 */
2167static inline void wait_for_xmitr(struct uart_8250_port *up) 2160static inline void wait_for_xmitr(struct uart_8250_port *up, int bits)
2168{ 2161{
2169 unsigned int status, tmout = 10000; 2162 unsigned int status, tmout = 10000;
2170 2163
@@ -2178,7 +2171,7 @@ static inline void wait_for_xmitr(struct uart_8250_port *up)
2178 if (--tmout == 0) 2171 if (--tmout == 0)
2179 break; 2172 break;
2180 udelay(1); 2173 udelay(1);
2181 } while ((status & BOTH_EMPTY) != BOTH_EMPTY); 2174 } while ((status & bits) != bits);
2182 2175
2183 /* Wait up to 1s for flow control if necessary */ 2176 /* Wait up to 1s for flow control if necessary */
2184 if (up->port.flags & UPF_CONS_FLOW) { 2177 if (up->port.flags & UPF_CONS_FLOW) {
@@ -2218,7 +2211,7 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count)
2218 * Now, do each character 2211 * Now, do each character
2219 */ 2212 */
2220 for (i = 0; i < count; i++, s++) { 2213 for (i = 0; i < count; i++, s++) {
2221 wait_for_xmitr(up); 2214 wait_for_xmitr(up, UART_LSR_THRE);
2222 2215
2223 /* 2216 /*
2224 * Send the character out. 2217 * Send the character out.
@@ -2226,7 +2219,7 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count)
2226 */ 2219 */
2227 serial_out(up, UART_TX, *s); 2220 serial_out(up, UART_TX, *s);
2228 if (*s == 10) { 2221 if (*s == 10) {
2229 wait_for_xmitr(up); 2222 wait_for_xmitr(up, UART_LSR_THRE);
2230 serial_out(up, UART_TX, 13); 2223 serial_out(up, UART_TX, 13);
2231 } 2224 }
2232 } 2225 }
@@ -2235,8 +2228,8 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count)
2235 * Finally, wait for transmitter to become empty 2228 * Finally, wait for transmitter to become empty
2236 * and restore the IER 2229 * and restore the IER
2237 */ 2230 */
2238 wait_for_xmitr(up); 2231 wait_for_xmitr(up, BOTH_EMPTY);
2239 serial_out(up, UART_IER, ier); 2232 serial_out(up, UART_IER, ier | UART_IER_THRI);
2240} 2233}
2241 2234
2242static int serial8250_console_setup(struct console *co, char *options) 2235static int serial8250_console_setup(struct console *co, char *options)
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index 9fd1925de361..0d38f0f2ae29 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -23,7 +23,7 @@ config SERIAL_8250
23 work.) 23 work.)
24 24
25 To compile this driver as a module, choose M here: the 25 To compile this driver as a module, choose M here: the
26 module will be called serial. 26 module will be called 8250.
27 [WARNING: Do not compile this driver as a module if you are using 27 [WARNING: Do not compile this driver as a module if you are using
28 non-standard serial ports, since the configuration information will 28 non-standard serial ports, since the configuration information will
29 be lost when the driver is unloaded. This limitation may be lifted 29 be lost when the driver is unloaded. This limitation may be lifted
diff --git a/drivers/serial/amba-pl010.c b/drivers/serial/amba-pl010.c
index 3490022e9fdc..429de2723a1c 100644
--- a/drivers/serial/amba-pl010.c
+++ b/drivers/serial/amba-pl010.c
@@ -566,7 +566,7 @@ static struct uart_amba_port amba_ports[UART_NR] = {
566 .uartclk = 14745600, 566 .uartclk = 14745600,
567 .fifosize = 16, 567 .fifosize = 16,
568 .ops = &amba_pl010_pops, 568 .ops = &amba_pl010_pops,
569 .flags = ASYNC_BOOT_AUTOCONF, 569 .flags = UPF_BOOT_AUTOCONF,
570 .line = 0, 570 .line = 0,
571 }, 571 },
572 .dtr_mask = 1 << 5, 572 .dtr_mask = 1 << 5,
@@ -581,7 +581,7 @@ static struct uart_amba_port amba_ports[UART_NR] = {
581 .uartclk = 14745600, 581 .uartclk = 14745600,
582 .fifosize = 16, 582 .fifosize = 16,
583 .ops = &amba_pl010_pops, 583 .ops = &amba_pl010_pops,
584 .flags = ASYNC_BOOT_AUTOCONF, 584 .flags = UPF_BOOT_AUTOCONF,
585 .line = 1, 585 .line = 1,
586 }, 586 },
587 .dtr_mask = 1 << 7, 587 .dtr_mask = 1 << 7,
diff --git a/drivers/serial/clps711x.c b/drivers/serial/clps711x.c
index 8ef999481f93..ce7b2e4ecd17 100644
--- a/drivers/serial/clps711x.c
+++ b/drivers/serial/clps711x.c
@@ -410,7 +410,7 @@ static struct uart_port clps711x_ports[UART_NR] = {
410 .fifosize = 16, 410 .fifosize = 16,
411 .ops = &clps711x_pops, 411 .ops = &clps711x_pops,
412 .line = 0, 412 .line = 0,
413 .flags = ASYNC_BOOT_AUTOCONF, 413 .flags = UPF_BOOT_AUTOCONF,
414 }, 414 },
415 { 415 {
416 .iobase = SYSCON2, 416 .iobase = SYSCON2,
@@ -419,7 +419,7 @@ static struct uart_port clps711x_ports[UART_NR] = {
419 .fifosize = 16, 419 .fifosize = 16,
420 .ops = &clps711x_pops, 420 .ops = &clps711x_pops,
421 .line = 1, 421 .line = 1,
422 .flags = ASYNC_BOOT_AUTOCONF, 422 .flags = UPF_BOOT_AUTOCONF,
423 } 423 }
424}; 424};
425 425
diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c
index 587cc6a95114..858048efe1ed 100644
--- a/drivers/serial/imx.c
+++ b/drivers/serial/imx.c
@@ -402,10 +402,10 @@ static int imx_startup(struct uart_port *port)
402 DRIVER_NAME, sport); 402 DRIVER_NAME, sport);
403 if (retval) goto error_out2; 403 if (retval) goto error_out2;
404 404
405 retval = request_irq(sport->rtsirq, imx_rtsint, 0, 405 retval = request_irq(sport->rtsirq, imx_rtsint,
406 SA_TRIGGER_FALLING | SA_TRIGGER_RISING,
406 DRIVER_NAME, sport); 407 DRIVER_NAME, sport);
407 if (retval) goto error_out3; 408 if (retval) goto error_out3;
408 set_irq_type(sport->rtsirq, IRQT_BOTHEDGE);
409 409
410 /* 410 /*
411 * Finally, clear and enable interrupts 411 * Finally, clear and enable interrupts
@@ -674,7 +674,7 @@ static struct imx_port imx_ports[] = {
674 .irq = UART1_MINT_RX, 674 .irq = UART1_MINT_RX,
675 .uartclk = 16000000, 675 .uartclk = 16000000,
676 .fifosize = 8, 676 .fifosize = 8,
677 .flags = ASYNC_BOOT_AUTOCONF, 677 .flags = UPF_BOOT_AUTOCONF,
678 .ops = &imx_pops, 678 .ops = &imx_pops,
679 .line = 0, 679 .line = 0,
680 }, 680 },
@@ -690,7 +690,7 @@ static struct imx_port imx_ports[] = {
690 .irq = UART2_MINT_RX, 690 .irq = UART2_MINT_RX,
691 .uartclk = 16000000, 691 .uartclk = 16000000,
692 .fifosize = 8, 692 .fifosize = 8,
693 .flags = ASYNC_BOOT_AUTOCONF, 693 .flags = UPF_BOOT_AUTOCONF,
694 .ops = &imx_pops, 694 .ops = &imx_pops,
695 .line = 1, 695 .line = 1,
696 }, 696 },
diff --git a/drivers/serial/s3c2410.c b/drivers/serial/s3c2410.c
index eb4883efb7c6..0a2dd6c5b95f 100644
--- a/drivers/serial/s3c2410.c
+++ b/drivers/serial/s3c2410.c
@@ -1060,7 +1060,7 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport,
1060 dbg("resource %p (%lx..%lx)\n", res, res->start, res->end); 1060 dbg("resource %p (%lx..%lx)\n", res, res->start, res->end);
1061 1061
1062 port->mapbase = res->start; 1062 port->mapbase = res->start;
1063 port->membase = S3C24XX_VA_UART + (res->start - S3C2410_PA_UART); 1063 port->membase = S3C24XX_VA_UART + (res->start - S3C24XX_PA_UART);
1064 port->irq = platform_get_irq(platdev, 0); 1064 port->irq = platform_get_irq(platdev, 0);
1065 1065
1066 ourport->clk = clk_get(&platdev->dev, "uart"); 1066 ourport->clk = clk_get(&platdev->dev, "uart");
diff --git a/drivers/serial/sa1100.c b/drivers/serial/sa1100.c
index 1bd93168f504..ff7b60b4de37 100644
--- a/drivers/serial/sa1100.c
+++ b/drivers/serial/sa1100.c
@@ -665,21 +665,21 @@ void __init sa1100_register_uart(int idx, int port)
665 sa1100_ports[idx].port.membase = (void __iomem *)&Ser1UTCR0; 665 sa1100_ports[idx].port.membase = (void __iomem *)&Ser1UTCR0;
666 sa1100_ports[idx].port.mapbase = _Ser1UTCR0; 666 sa1100_ports[idx].port.mapbase = _Ser1UTCR0;
667 sa1100_ports[idx].port.irq = IRQ_Ser1UART; 667 sa1100_ports[idx].port.irq = IRQ_Ser1UART;
668 sa1100_ports[idx].port.flags = ASYNC_BOOT_AUTOCONF; 668 sa1100_ports[idx].port.flags = UPF_BOOT_AUTOCONF;
669 break; 669 break;
670 670
671 case 2: 671 case 2:
672 sa1100_ports[idx].port.membase = (void __iomem *)&Ser2UTCR0; 672 sa1100_ports[idx].port.membase = (void __iomem *)&Ser2UTCR0;
673 sa1100_ports[idx].port.mapbase = _Ser2UTCR0; 673 sa1100_ports[idx].port.mapbase = _Ser2UTCR0;
674 sa1100_ports[idx].port.irq = IRQ_Ser2ICP; 674 sa1100_ports[idx].port.irq = IRQ_Ser2ICP;
675 sa1100_ports[idx].port.flags = ASYNC_BOOT_AUTOCONF; 675 sa1100_ports[idx].port.flags = UPF_BOOT_AUTOCONF;
676 break; 676 break;
677 677
678 case 3: 678 case 3:
679 sa1100_ports[idx].port.membase = (void __iomem *)&Ser3UTCR0; 679 sa1100_ports[idx].port.membase = (void __iomem *)&Ser3UTCR0;
680 sa1100_ports[idx].port.mapbase = _Ser3UTCR0; 680 sa1100_ports[idx].port.mapbase = _Ser3UTCR0;
681 sa1100_ports[idx].port.irq = IRQ_Ser3UART; 681 sa1100_ports[idx].port.irq = IRQ_Ser3UART;
682 sa1100_ports[idx].port.flags = ASYNC_BOOT_AUTOCONF; 682 sa1100_ports[idx].port.flags = UPF_BOOT_AUTOCONF;
683 break; 683 break;
684 684
685 default: 685 default:
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index 943770470b9d..0717abfdae06 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -332,7 +332,7 @@ uart_get_baud_rate(struct uart_port *port, struct termios *termios,
332 struct termios *old, unsigned int min, unsigned int max) 332 struct termios *old, unsigned int min, unsigned int max)
333{ 333{
334 unsigned int try, baud, altbaud = 38400; 334 unsigned int try, baud, altbaud = 38400;
335 unsigned int flags = port->flags & UPF_SPD_MASK; 335 upf_t flags = port->flags & UPF_SPD_MASK;
336 336
337 if (flags == UPF_SPD_HI) 337 if (flags == UPF_SPD_HI)
338 altbaud = 57600; 338 altbaud = 57600;
@@ -615,8 +615,9 @@ static int uart_set_info(struct uart_state *state,
615 struct serial_struct new_serial; 615 struct serial_struct new_serial;
616 struct uart_port *port = state->port; 616 struct uart_port *port = state->port;
617 unsigned long new_port; 617 unsigned long new_port;
618 unsigned int change_irq, change_port, old_flags, closing_wait; 618 unsigned int change_irq, change_port, closing_wait;
619 unsigned int old_custom_divisor, close_delay; 619 unsigned int old_custom_divisor, close_delay;
620 upf_t old_flags, new_flags;
620 int retval = 0; 621 int retval = 0;
621 622
622 if (copy_from_user(&new_serial, newinfo, sizeof(new_serial))) 623 if (copy_from_user(&new_serial, newinfo, sizeof(new_serial)))
@@ -655,6 +656,7 @@ static int uart_set_info(struct uart_state *state,
655 new_serial.type != port->type; 656 new_serial.type != port->type;
656 657
657 old_flags = port->flags; 658 old_flags = port->flags;
659 new_flags = new_serial.flags;
658 old_custom_divisor = port->custom_divisor; 660 old_custom_divisor = port->custom_divisor;
659 661
660 if (!capable(CAP_SYS_ADMIN)) { 662 if (!capable(CAP_SYS_ADMIN)) {
@@ -664,10 +666,10 @@ static int uart_set_info(struct uart_state *state,
664 (close_delay != state->close_delay) || 666 (close_delay != state->close_delay) ||
665 (closing_wait != state->closing_wait) || 667 (closing_wait != state->closing_wait) ||
666 (new_serial.xmit_fifo_size != port->fifosize) || 668 (new_serial.xmit_fifo_size != port->fifosize) ||
667 (((new_serial.flags ^ old_flags) & ~UPF_USR_MASK) != 0)) 669 (((new_flags ^ old_flags) & ~UPF_USR_MASK) != 0))
668 goto exit; 670 goto exit;
669 port->flags = ((port->flags & ~UPF_USR_MASK) | 671 port->flags = ((port->flags & ~UPF_USR_MASK) |
670 (new_serial.flags & UPF_USR_MASK)); 672 (new_flags & UPF_USR_MASK));
671 port->custom_divisor = new_serial.custom_divisor; 673 port->custom_divisor = new_serial.custom_divisor;
672 goto check_and_exit; 674 goto check_and_exit;
673 } 675 }
@@ -764,7 +766,7 @@ static int uart_set_info(struct uart_state *state,
764 port->irq = new_serial.irq; 766 port->irq = new_serial.irq;
765 port->uartclk = new_serial.baud_base * 16; 767 port->uartclk = new_serial.baud_base * 16;
766 port->flags = (port->flags & ~UPF_CHANGE_MASK) | 768 port->flags = (port->flags & ~UPF_CHANGE_MASK) |
767 (new_serial.flags & UPF_CHANGE_MASK); 769 (new_flags & UPF_CHANGE_MASK);
768 port->custom_divisor = new_serial.custom_divisor; 770 port->custom_divisor = new_serial.custom_divisor;
769 state->close_delay = close_delay; 771 state->close_delay = close_delay;
770 state->closing_wait = closing_wait; 772 state->closing_wait = closing_wait;
@@ -1870,7 +1872,7 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *port)
1870 mutex_lock(&state->mutex); 1872 mutex_lock(&state->mutex);
1871 1873
1872 if (state->info && state->info->flags & UIF_INITIALIZED) { 1874 if (state->info && state->info->flags & UIF_INITIALIZED) {
1873 struct uart_ops *ops = port->ops; 1875 const struct uart_ops *ops = port->ops;
1874 1876
1875 spin_lock_irq(&port->lock); 1877 spin_lock_irq(&port->lock);
1876 ops->stop_tx(port); 1878 ops->stop_tx(port);
@@ -1932,7 +1934,7 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *port)
1932 } 1934 }
1933 1935
1934 if (state->info && state->info->flags & UIF_INITIALIZED) { 1936 if (state->info && state->info->flags & UIF_INITIALIZED) {
1935 struct uart_ops *ops = port->ops; 1937 const struct uart_ops *ops = port->ops;
1936 int ret; 1938 int ret;
1937 1939
1938 ops->set_mctrl(port, 0); 1940 ops->set_mctrl(port, 0);
diff --git a/drivers/serial/serial_lh7a40x.c b/drivers/serial/serial_lh7a40x.c
index d4a1f0e798c1..d0490f67f597 100644
--- a/drivers/serial/serial_lh7a40x.c
+++ b/drivers/serial/serial_lh7a40x.c
@@ -506,7 +506,7 @@ static struct uart_port_lh7a40x lh7a40x_ports[DEV_NR] = {
506 .uartclk = 14745600/2, 506 .uartclk = 14745600/2,
507 .fifosize = 16, 507 .fifosize = 16,
508 .ops = &lh7a40x_uart_ops, 508 .ops = &lh7a40x_uart_ops,
509 .flags = ASYNC_BOOT_AUTOCONF, 509 .flags = UPF_BOOT_AUTOCONF,
510 .line = 0, 510 .line = 0,
511 }, 511 },
512 }, 512 },
@@ -519,7 +519,7 @@ static struct uart_port_lh7a40x lh7a40x_ports[DEV_NR] = {
519 .uartclk = 14745600/2, 519 .uartclk = 14745600/2,
520 .fifosize = 16, 520 .fifosize = 16,
521 .ops = &lh7a40x_uart_ops, 521 .ops = &lh7a40x_uart_ops,
522 .flags = ASYNC_BOOT_AUTOCONF, 522 .flags = UPF_BOOT_AUTOCONF,
523 .line = 1, 523 .line = 1,
524 }, 524 },
525 }, 525 },
@@ -532,7 +532,7 @@ static struct uart_port_lh7a40x lh7a40x_ports[DEV_NR] = {
532 .uartclk = 14745600/2, 532 .uartclk = 14745600/2,
533 .fifosize = 16, 533 .fifosize = 16,
534 .ops = &lh7a40x_uart_ops, 534 .ops = &lh7a40x_uart_ops,
535 .flags = ASYNC_BOOT_AUTOCONF, 535 .flags = UPF_BOOT_AUTOCONF,
536 .line = 2, 536 .line = 2,
537 }, 537 },
538 }, 538 },
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c
index a9e070759628..0111206327ca 100644
--- a/drivers/serial/sh-sci.c
+++ b/drivers/serial/sh-sci.c
@@ -1113,10 +1113,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = {
1113 .port = { 1113 .port = {
1114 .membase = (void *)0xfffffe80, 1114 .membase = (void *)0xfffffe80,
1115 .mapbase = 0xfffffe80, 1115 .mapbase = 0xfffffe80,
1116 .iotype = SERIAL_IO_MEM, 1116 .iotype = UPIO_MEM,
1117 .irq = 25, 1117 .irq = 25,
1118 .ops = &sci_uart_ops, 1118 .ops = &sci_uart_ops,
1119 .flags = ASYNC_BOOT_AUTOCONF, 1119 .flags = UPF_BOOT_AUTOCONF,
1120 .line = 0, 1120 .line = 0,
1121 }, 1121 },
1122 .type = PORT_SCI, 1122 .type = PORT_SCI,
@@ -1128,10 +1128,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = {
1128 .port = { 1128 .port = {
1129 .membase = (void *)SCIF0, 1129 .membase = (void *)SCIF0,
1130 .mapbase = SCIF0, 1130 .mapbase = SCIF0,
1131 .iotype = SERIAL_IO_MEM, 1131 .iotype = UPIO_MEM,
1132 .irq = 55, 1132 .irq = 55,
1133 .ops = &sci_uart_ops, 1133 .ops = &sci_uart_ops,
1134 .flags = ASYNC_BOOT_AUTOCONF, 1134 .flags = UPF_BOOT_AUTOCONF,
1135 .line = 0, 1135 .line = 0,
1136 }, 1136 },
1137 .type = PORT_SCIF, 1137 .type = PORT_SCIF,
@@ -1142,10 +1142,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = {
1142 .port = { 1142 .port = {
1143 .membase = (void *)SCIF2, 1143 .membase = (void *)SCIF2,
1144 .mapbase = SCIF2, 1144 .mapbase = SCIF2,
1145 .iotype = SERIAL_IO_MEM, 1145 .iotype = UPIO_MEM,
1146 .irq = 59, 1146 .irq = 59,
1147 .ops = &sci_uart_ops, 1147 .ops = &sci_uart_ops,
1148 .flags = ASYNC_BOOT_AUTOCONF, 1148 .flags = UPF_BOOT_AUTOCONF,
1149 .line = 1, 1149 .line = 1,
1150 }, 1150 },
1151 .type = PORT_SCIF, 1151 .type = PORT_SCIF,
@@ -1157,10 +1157,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = {
1157 .port = { 1157 .port = {
1158 .membase = (void *)0xfffffe80, 1158 .membase = (void *)0xfffffe80,
1159 .mapbase = 0xfffffe80, 1159 .mapbase = 0xfffffe80,
1160 .iotype = SERIAL_IO_MEM, 1160 .iotype = UPIO_MEM,
1161 .irq = 25, 1161 .irq = 25,
1162 .ops = &sci_uart_ops, 1162 .ops = &sci_uart_ops,
1163 .flags = ASYNC_BOOT_AUTOCONF, 1163 .flags = UPF_BOOT_AUTOCONF,
1164 .line = 0, 1164 .line = 0,
1165 }, 1165 },
1166 .type = PORT_SCI, 1166 .type = PORT_SCI,
@@ -1171,10 +1171,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = {
1171 .port = { 1171 .port = {
1172 .membase = (void *)0xa4000150, 1172 .membase = (void *)0xa4000150,
1173 .mapbase = 0xa4000150, 1173 .mapbase = 0xa4000150,
1174 .iotype = SERIAL_IO_MEM, 1174 .iotype = UPIO_MEM,
1175 .irq = 59, 1175 .irq = 59,
1176 .ops = &sci_uart_ops, 1176 .ops = &sci_uart_ops,
1177 .flags = ASYNC_BOOT_AUTOCONF, 1177 .flags = UPF_BOOT_AUTOCONF,
1178 .line = 1, 1178 .line = 1,
1179 }, 1179 },
1180 .type = PORT_SCIF, 1180 .type = PORT_SCIF,
@@ -1185,10 +1185,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = {
1185 .port = { 1185 .port = {
1186 .membase = (void *)0xa4000140, 1186 .membase = (void *)0xa4000140,
1187 .mapbase = 0xa4000140, 1187 .mapbase = 0xa4000140,
1188 .iotype = SERIAL_IO_MEM, 1188 .iotype = UPIO_MEM,
1189 .irq = 55, 1189 .irq = 55,
1190 .ops = &sci_uart_ops, 1190 .ops = &sci_uart_ops,
1191 .flags = ASYNC_BOOT_AUTOCONF, 1191 .flags = UPF_BOOT_AUTOCONF,
1192 .line = 2, 1192 .line = 2,
1193 }, 1193 },
1194 .type = PORT_IRDA, 1194 .type = PORT_IRDA,
@@ -1200,10 +1200,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = {
1200 .port = { 1200 .port = {
1201 .membase = (void *)0xA4430000, 1201 .membase = (void *)0xA4430000,
1202 .mapbase = 0xA4430000, 1202 .mapbase = 0xA4430000,
1203 .iotype = SERIAL_IO_MEM, 1203 .iotype = UPIO_MEM,
1204 .irq = 25, 1204 .irq = 25,
1205 .ops = &sci_uart_ops, 1205 .ops = &sci_uart_ops,
1206 .flags = ASYNC_BOOT_AUTOCONF, 1206 .flags = UPF_BOOT_AUTOCONF,
1207 .line = 0, 1207 .line = 0,
1208 }, 1208 },
1209 .type = PORT_SCIF, 1209 .type = PORT_SCIF,
@@ -1215,10 +1215,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = {
1215 .port = { 1215 .port = {
1216 .membase = (void *)0xffe00000, 1216 .membase = (void *)0xffe00000,
1217 .mapbase = 0xffe00000, 1217 .mapbase = 0xffe00000,
1218 .iotype = SERIAL_IO_MEM, 1218 .iotype = UPIO_MEM,
1219 .irq = 25, 1219 .irq = 25,
1220 .ops = &sci_uart_ops, 1220 .ops = &sci_uart_ops,
1221 .flags = ASYNC_BOOT_AUTOCONF, 1221 .flags = UPF_BOOT_AUTOCONF,
1222 .line = 0, 1222 .line = 0,
1223 }, 1223 },
1224 .type = PORT_SCIF, 1224 .type = PORT_SCIF,
@@ -1230,10 +1230,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = {
1230 .port = { 1230 .port = {
1231 .membase = (void *)0xffe80000, 1231 .membase = (void *)0xffe80000,
1232 .mapbase = 0xffe80000, 1232 .mapbase = 0xffe80000,
1233 .iotype = SERIAL_IO_MEM, 1233 .iotype = UPIO_MEM,
1234 .irq = 43, 1234 .irq = 43,
1235 .ops = &sci_uart_ops, 1235 .ops = &sci_uart_ops,
1236 .flags = ASYNC_BOOT_AUTOCONF, 1236 .flags = UPF_BOOT_AUTOCONF,
1237 .line = 0, 1237 .line = 0,
1238 }, 1238 },
1239 .type = PORT_SCIF, 1239 .type = PORT_SCIF,
@@ -1245,10 +1245,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = {
1245 .port = { 1245 .port = {
1246 .membase = (void *)0xffe00000, 1246 .membase = (void *)0xffe00000,
1247 .mapbase = 0xffe00000, 1247 .mapbase = 0xffe00000,
1248 .iotype = SERIAL_IO_MEM, 1248 .iotype = UPIO_MEM,
1249 .irq = 25, 1249 .irq = 25,
1250 .ops = &sci_uart_ops, 1250 .ops = &sci_uart_ops,
1251 .flags = ASYNC_BOOT_AUTOCONF, 1251 .flags = UPF_BOOT_AUTOCONF,
1252 .line = 0, 1252 .line = 0,
1253 }, 1253 },
1254 .type = PORT_SCI, 1254 .type = PORT_SCI,
@@ -1259,10 +1259,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = {
1259 .port = { 1259 .port = {
1260 .membase = (void *)0xffe80000, 1260 .membase = (void *)0xffe80000,
1261 .mapbase = 0xffe80000, 1261 .mapbase = 0xffe80000,
1262 .iotype = SERIAL_IO_MEM, 1262 .iotype = UPIO_MEM,
1263 .irq = 43, 1263 .irq = 43,
1264 .ops = &sci_uart_ops, 1264 .ops = &sci_uart_ops,
1265 .flags = ASYNC_BOOT_AUTOCONF, 1265 .flags = UPF_BOOT_AUTOCONF,
1266 .line = 1, 1266 .line = 1,
1267 }, 1267 },
1268 .type = PORT_SCIF, 1268 .type = PORT_SCIF,
@@ -1274,10 +1274,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = {
1274 .port = { 1274 .port = {
1275 .membase = (void *)0xfe600000, 1275 .membase = (void *)0xfe600000,
1276 .mapbase = 0xfe600000, 1276 .mapbase = 0xfe600000,
1277 .iotype = SERIAL_IO_MEM, 1277 .iotype = UPIO_MEM,
1278 .irq = 55, 1278 .irq = 55,
1279 .ops = &sci_uart_ops, 1279 .ops = &sci_uart_ops,
1280 .flags = ASYNC_BOOT_AUTOCONF, 1280 .flags = UPF_BOOT_AUTOCONF,
1281 .line = 0, 1281 .line = 0,
1282 }, 1282 },
1283 .type = PORT_SCIF, 1283 .type = PORT_SCIF,
@@ -1288,10 +1288,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = {
1288 .port = { 1288 .port = {
1289 .membase = (void *)0xfe610000, 1289 .membase = (void *)0xfe610000,
1290 .mapbase = 0xfe610000, 1290 .mapbase = 0xfe610000,
1291 .iotype = SERIAL_IO_MEM, 1291 .iotype = UPIO_MEM,
1292 .irq = 75, 1292 .irq = 75,
1293 .ops = &sci_uart_ops, 1293 .ops = &sci_uart_ops,
1294 .flags = ASYNC_BOOT_AUTOCONF, 1294 .flags = UPF_BOOT_AUTOCONF,
1295 .line = 1, 1295 .line = 1,
1296 }, 1296 },
1297 .type = PORT_SCIF, 1297 .type = PORT_SCIF,
@@ -1302,10 +1302,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = {
1302 .port = { 1302 .port = {
1303 .membase = (void *)0xfe620000, 1303 .membase = (void *)0xfe620000,
1304 .mapbase = 0xfe620000, 1304 .mapbase = 0xfe620000,
1305 .iotype = SERIAL_IO_MEM, 1305 .iotype = UPIO_MEM,
1306 .irq = 79, 1306 .irq = 79,
1307 .ops = &sci_uart_ops, 1307 .ops = &sci_uart_ops,
1308 .flags = ASYNC_BOOT_AUTOCONF, 1308 .flags = UPF_BOOT_AUTOCONF,
1309 .line = 2, 1309 .line = 2,
1310 }, 1310 },
1311 .type = PORT_SCIF, 1311 .type = PORT_SCIF,
@@ -1317,10 +1317,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = {
1317 .port = { 1317 .port = {
1318 .membase = (void *)0xffe80000, 1318 .membase = (void *)0xffe80000,
1319 .mapbase = 0xffe80000, 1319 .mapbase = 0xffe80000,
1320 .iotype = SERIAL_IO_MEM, 1320 .iotype = UPIO_MEM,
1321 .irq = 43, 1321 .irq = 43,
1322 .ops = &sci_uart_ops, 1322 .ops = &sci_uart_ops,
1323 .flags = ASYNC_BOOT_AUTOCONF, 1323 .flags = UPF_BOOT_AUTOCONF,
1324 .line = 0, 1324 .line = 0,
1325 }, 1325 },
1326 .type = PORT_SCIF, 1326 .type = PORT_SCIF,
@@ -1332,10 +1332,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = {
1332 .port = { 1332 .port = {
1333 .membase = (void *)0xffe00000, 1333 .membase = (void *)0xffe00000,
1334 .mapbase = 0xffe00000, 1334 .mapbase = 0xffe00000,
1335 .iotype = SERIAL_IO_MEM, 1335 .iotype = UPIO_MEM,
1336 .irq = 26, 1336 .irq = 26,
1337 .ops = &sci_uart_ops, 1337 .ops = &sci_uart_ops,
1338 .flags = ASYNC_BOOT_AUTOCONF, 1338 .flags = UPF_BOOT_AUTOCONF,
1339 .line = 0, 1339 .line = 0,
1340 }, 1340 },
1341 .type = PORT_SCIF, 1341 .type = PORT_SCIF,
@@ -1346,10 +1346,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = {
1346 .port = { 1346 .port = {
1347 .membase = (void *)0xffe80000, 1347 .membase = (void *)0xffe80000,
1348 .mapbase = 0xffe80000, 1348 .mapbase = 0xffe80000,
1349 .iotype = SERIAL_IO_MEM, 1349 .iotype = UPIO_MEM,
1350 .irq = 43, 1350 .irq = 43,
1351 .ops = &sci_uart_ops, 1351 .ops = &sci_uart_ops,
1352 .flags = ASYNC_BOOT_AUTOCONF, 1352 .flags = UPF_BOOT_AUTOCONF,
1353 .line = 1, 1353 .line = 1,
1354 }, 1354 },
1355 .type = PORT_SCIF, 1355 .type = PORT_SCIF,
@@ -1359,10 +1359,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = {
1359#elif defined(CONFIG_CPU_SUBTYPE_SH5_101) || defined(CONFIG_CPU_SUBTYPE_SH5_103) 1359#elif defined(CONFIG_CPU_SUBTYPE_SH5_101) || defined(CONFIG_CPU_SUBTYPE_SH5_103)
1360 { 1360 {
1361 .port = { 1361 .port = {
1362 .iotype = SERIAL_IO_MEM, 1362 .iotype = UPIO_MEM,
1363 .irq = 42, 1363 .irq = 42,
1364 .ops = &sci_uart_ops, 1364 .ops = &sci_uart_ops,
1365 .flags = ASYNC_BOOT_AUTOCONF, 1365 .flags = UPF_BOOT_AUTOCONF,
1366 .line = 0, 1366 .line = 0,
1367 }, 1367 },
1368 .type = PORT_SCIF, 1368 .type = PORT_SCIF,
@@ -1374,10 +1374,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = {
1374 .port = { 1374 .port = {
1375 .membase = (void *)0x00ffffb0, 1375 .membase = (void *)0x00ffffb0,
1376 .mapbase = 0x00ffffb0, 1376 .mapbase = 0x00ffffb0,
1377 .iotype = SERIAL_IO_MEM, 1377 .iotype = UPIO_MEM,
1378 .irq = 54, 1378 .irq = 54,
1379 .ops = &sci_uart_ops, 1379 .ops = &sci_uart_ops,
1380 .flags = ASYNC_BOOT_AUTOCONF, 1380 .flags = UPF_BOOT_AUTOCONF,
1381 .line = 0, 1381 .line = 0,
1382 }, 1382 },
1383 .type = PORT_SCI, 1383 .type = PORT_SCI,
@@ -1388,10 +1388,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = {
1388 .port = { 1388 .port = {
1389 .membase = (void *)0x00ffffb8, 1389 .membase = (void *)0x00ffffb8,
1390 .mapbase = 0x00ffffb8, 1390 .mapbase = 0x00ffffb8,
1391 .iotype = SERIAL_IO_MEM, 1391 .iotype = UPIO_MEM,
1392 .irq = 58, 1392 .irq = 58,
1393 .ops = &sci_uart_ops, 1393 .ops = &sci_uart_ops,
1394 .flags = ASYNC_BOOT_AUTOCONF, 1394 .flags = UPF_BOOT_AUTOCONF,
1395 .line = 1, 1395 .line = 1,
1396 }, 1396 },
1397 .type = PORT_SCI, 1397 .type = PORT_SCI,
@@ -1402,10 +1402,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = {
1402 .port = { 1402 .port = {
1403 .membase = (void *)0x00ffffc0, 1403 .membase = (void *)0x00ffffc0,
1404 .mapbase = 0x00ffffc0, 1404 .mapbase = 0x00ffffc0,
1405 .iotype = SERIAL_IO_MEM, 1405 .iotype = UPIO_MEM,
1406 .irq = 62, 1406 .irq = 62,
1407 .ops = &sci_uart_ops, 1407 .ops = &sci_uart_ops,
1408 .flags = ASYNC_BOOT_AUTOCONF, 1408 .flags = UPF_BOOT_AUTOCONF,
1409 .line = 2, 1409 .line = 2,
1410 }, 1410 },
1411 .type = PORT_SCI, 1411 .type = PORT_SCI,
@@ -1417,10 +1417,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = {
1417 .port = { 1417 .port = {
1418 .membase = (void *)0x00ffff78, 1418 .membase = (void *)0x00ffff78,
1419 .mapbase = 0x00ffff78, 1419 .mapbase = 0x00ffff78,
1420 .iotype = SERIAL_IO_MEM, 1420 .iotype = UPIO_MEM,
1421 .irq = 90, 1421 .irq = 90,
1422 .ops = &sci_uart_ops, 1422 .ops = &sci_uart_ops,
1423 .flags = ASYNC_BOOT_AUTOCONF, 1423 .flags = UPF_BOOT_AUTOCONF,
1424 .line = 0, 1424 .line = 0,
1425 }, 1425 },
1426 .type = PORT_SCI, 1426 .type = PORT_SCI,
@@ -1431,10 +1431,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = {
1431 .port = { 1431 .port = {
1432 .membase = (void *)0x00ffff80, 1432 .membase = (void *)0x00ffff80,
1433 .mapbase = 0x00ffff80, 1433 .mapbase = 0x00ffff80,
1434 .iotype = SERIAL_IO_MEM, 1434 .iotype = UPIO_MEM,
1435 .irq = 94, 1435 .irq = 94,
1436 .ops = &sci_uart_ops, 1436 .ops = &sci_uart_ops,
1437 .flags = ASYNC_BOOT_AUTOCONF, 1437 .flags = UPF_BOOT_AUTOCONF,
1438 .line = 1, 1438 .line = 1,
1439 }, 1439 },
1440 .type = PORT_SCI, 1440 .type = PORT_SCI,
@@ -1445,10 +1445,10 @@ static struct sci_port sci_ports[SCI_NPORTS] = {
1445 .port = { 1445 .port = {
1446 .membase = (void *)0x00ffff88, 1446 .membase = (void *)0x00ffff88,
1447 .mapbase = 0x00ffff88, 1447 .mapbase = 0x00ffff88,
1448 .iotype = SERIAL_IO_MEM, 1448 .iotype = UPIO_MEM,
1449 .irq = 98, 1449 .irq = 98,
1450 .ops = &sci_uart_ops, 1450 .ops = &sci_uart_ops,
1451 .flags = ASYNC_BOOT_AUTOCONF, 1451 .flags = UPF_BOOT_AUTOCONF,
1452 .line = 2, 1452 .line = 2,
1453 }, 1453 },
1454 .type = PORT_SCI, 1454 .type = PORT_SCI,
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c
index 9a3665b34d97..bc67442c6b4c 100644
--- a/drivers/serial/sunsu.c
+++ b/drivers/serial/sunsu.c
@@ -669,7 +669,7 @@ static int sunsu_startup(struct uart_port *port)
669 * if it is, then bail out, because there's likely no UART 669 * if it is, then bail out, because there's likely no UART
670 * here. 670 * here.
671 */ 671 */
672 if (!(up->port.flags & ASYNC_BUGGY_UART) && 672 if (!(up->port.flags & UPF_BUGGY_UART) &&
673 (serial_inp(up, UART_LSR) == 0xff)) { 673 (serial_inp(up, UART_LSR) == 0xff)) {
674 printk("ttyS%d: LSR safety check engaged!\n", up->port.line); 674 printk("ttyS%d: LSR safety check engaged!\n", up->port.line);
675 return -ENODEV; 675 return -ENODEV;
@@ -707,7 +707,7 @@ static int sunsu_startup(struct uart_port *port)
707 up->ier = UART_IER_RLSI | UART_IER_RDI; 707 up->ier = UART_IER_RLSI | UART_IER_RDI;
708 serial_outp(up, UART_IER, up->ier); 708 serial_outp(up, UART_IER, up->ier);
709 709
710 if (up->port.flags & ASYNC_FOURPORT) { 710 if (up->port.flags & UPF_FOURPORT) {
711 unsigned int icp; 711 unsigned int icp;
712 /* 712 /*
713 * Enable interrupts on the AST Fourport board 713 * Enable interrupts on the AST Fourport board
@@ -740,7 +740,7 @@ static void sunsu_shutdown(struct uart_port *port)
740 serial_outp(up, UART_IER, 0); 740 serial_outp(up, UART_IER, 0);
741 741
742 spin_lock_irqsave(&up->port.lock, flags); 742 spin_lock_irqsave(&up->port.lock, flags);
743 if (up->port.flags & ASYNC_FOURPORT) { 743 if (up->port.flags & UPF_FOURPORT) {
744 /* reset interrupts on the AST Fourport board */ 744 /* reset interrupts on the AST Fourport board */
745 inb((up->port.iobase & 0xfe0) | 0x1f); 745 inb((up->port.iobase & 0xfe0) | 0x1f);
746 up->port.mctrl |= TIOCM_OUT1; 746 up->port.mctrl |= TIOCM_OUT1;
@@ -1132,7 +1132,7 @@ ebus_done:
1132 1132
1133 spin_lock_irqsave(&up->port.lock, flags); 1133 spin_lock_irqsave(&up->port.lock, flags);
1134 1134
1135 if (!(up->port.flags & ASYNC_BUGGY_UART)) { 1135 if (!(up->port.flags & UPF_BUGGY_UART)) {
1136 /* 1136 /*
1137 * Do a simple existence test first; if we fail this, there's 1137 * Do a simple existence test first; if we fail this, there's
1138 * no point trying anything else. 1138 * no point trying anything else.
@@ -1170,7 +1170,7 @@ ebus_done:
1170 * manufacturer would be stupid enough to design a board 1170 * manufacturer would be stupid enough to design a board
1171 * that conflicts with COM 1-4 --- we hope! 1171 * that conflicts with COM 1-4 --- we hope!
1172 */ 1172 */
1173 if (!(up->port.flags & ASYNC_SKIP_TEST)) { 1173 if (!(up->port.flags & UPF_SKIP_TEST)) {
1174 serial_outp(up, UART_MCR, UART_MCR_LOOP | 0x0A); 1174 serial_outp(up, UART_MCR, UART_MCR_LOOP | 0x0A);
1175 status1 = serial_inp(up, UART_MSR) & 0xF0; 1175 status1 = serial_inp(up, UART_MSR) & 0xF0;
1176 serial_outp(up, UART_MCR, save_mcr); 1176 serial_outp(up, UART_MCR, save_mcr);
@@ -1371,7 +1371,7 @@ static __inline__ void wait_for_xmitr(struct uart_sunsu_port *up)
1371 } while ((status & BOTH_EMPTY) != BOTH_EMPTY); 1371 } while ((status & BOTH_EMPTY) != BOTH_EMPTY);
1372 1372
1373 /* Wait up to 1s for flow control if necessary */ 1373 /* Wait up to 1s for flow control if necessary */
1374 if (up->port.flags & ASYNC_CONS_FLOW) { 1374 if (up->port.flags & UPF_CONS_FLOW) {
1375 tmout = 1000000; 1375 tmout = 1000000;
1376 while (--tmout && 1376 while (--tmout &&
1377 ((serial_in(up, UART_MSR) & UART_MSR_CTS) == 0)) 1377 ((serial_in(up, UART_MSR) & UART_MSR_CTS) == 0))
@@ -1513,7 +1513,7 @@ static int __init sunsu_serial_init(void)
1513 up->su_type == SU_PORT_KBD) 1513 up->su_type == SU_PORT_KBD)
1514 continue; 1514 continue;
1515 1515
1516 up->port.flags |= ASYNC_BOOT_AUTOCONF; 1516 up->port.flags |= UPF_BOOT_AUTOCONF;
1517 up->port.type = PORT_UNKNOWN; 1517 up->port.type = PORT_UNKNOWN;
1518 up->port.uartclk = (SU_BASE_BAUD * 16); 1518 up->port.uartclk = (SU_BASE_BAUD * 16);
1519 1519
diff --git a/drivers/video/amba-clcd.c b/drivers/video/amba-clcd.c
index b2187175d03f..6761b68c35e9 100644
--- a/drivers/video/amba-clcd.c
+++ b/drivers/video/amba-clcd.c
@@ -116,9 +116,10 @@ clcdfb_set_bitfields(struct clcd_fb *fb, struct fb_var_screeninfo *var)
116 int ret = 0; 116 int ret = 0;
117 117
118 memset(&var->transp, 0, sizeof(var->transp)); 118 memset(&var->transp, 0, sizeof(var->transp));
119 memset(&var->red, 0, sizeof(var->red)); 119
120 memset(&var->green, 0, sizeof(var->green)); 120 var->red.msb_right = 0;
121 memset(&var->blue, 0, sizeof(var->blue)); 121 var->green.msb_right = 0;
122 var->blue.msb_right = 0;
122 123
123 switch (var->bits_per_pixel) { 124 switch (var->bits_per_pixel) {
124 case 1: 125 case 1:
@@ -133,34 +134,20 @@ clcdfb_set_bitfields(struct clcd_fb *fb, struct fb_var_screeninfo *var)
133 var->blue.offset = 0; 134 var->blue.offset = 0;
134 break; 135 break;
135 case 16: 136 case 16:
136 var->red.length = 5; 137 var->red.length = 5;
137 var->green.length = 6; 138 var->blue.length = 5;
138 var->blue.length = 5; 139 /*
139 if (fb->panel->cntl & CNTL_BGR) { 140 * Green length can be 5 or 6 depending whether
140 var->red.offset = 11; 141 * we're operating in RGB555 or RGB565 mode.
141 var->green.offset = 5; 142 */
142 var->blue.offset = 0; 143 if (var->green.length != 5 && var->green.length != 6)
143 } else { 144 var->green.length = 6;
144 var->red.offset = 0;
145 var->green.offset = 5;
146 var->blue.offset = 11;
147 }
148 break; 145 break;
149 case 32: 146 case 32:
150 if (fb->panel->cntl & CNTL_LCDTFT) { 147 if (fb->panel->cntl & CNTL_LCDTFT) {
151 var->red.length = 8; 148 var->red.length = 8;
152 var->green.length = 8; 149 var->green.length = 8;
153 var->blue.length = 8; 150 var->blue.length = 8;
154
155 if (fb->panel->cntl & CNTL_BGR) {
156 var->red.offset = 16;
157 var->green.offset = 8;
158 var->blue.offset = 0;
159 } else {
160 var->red.offset = 0;
161 var->green.offset = 8;
162 var->blue.offset = 16;
163 }
164 break; 151 break;
165 } 152 }
166 default: 153 default:
@@ -168,6 +155,23 @@ clcdfb_set_bitfields(struct clcd_fb *fb, struct fb_var_screeninfo *var)
168 break; 155 break;
169 } 156 }
170 157
158 /*
159 * >= 16bpp displays have separate colour component bitfields
160 * encoded in the pixel data. Calculate their position from
161 * the bitfield length defined above.
162 */
163 if (ret == 0 && var->bits_per_pixel >= 16) {
164 if (fb->panel->cntl & CNTL_BGR) {
165 var->blue.offset = 0;
166 var->green.offset = var->blue.offset + var->blue.length;
167 var->red.offset = var->green.offset + var->green.length;
168 } else {
169 var->red.offset = 0;
170 var->green.offset = var->red.offset + var->red.length;
171 var->blue.offset = var->green.offset + var->green.length;
172 }
173 }
174
171 return ret; 175 return ret;
172} 176}
173 177
diff --git a/fs/bio.c b/fs/bio.c
index bbc442b8c867..1f3bb501c262 100644
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -411,6 +411,7 @@ static int __bio_add_page(request_queue_t *q, struct bio *bio, struct page
411 411
412/** 412/**
413 * bio_add_pc_page - attempt to add page to bio 413 * bio_add_pc_page - attempt to add page to bio
414 * @q: the target queue
414 * @bio: destination bio 415 * @bio: destination bio
415 * @page: page to add 416 * @page: page to add
416 * @len: vec entry length 417 * @len: vec entry length
diff --git a/include/asm-arm/arch-s3c2410/debug-macro.S b/include/asm-arm/arch-s3c2410/debug-macro.S
index abfbe45cd17c..5f8223e700d3 100644
--- a/include/asm-arm/arch-s3c2410/debug-macro.S
+++ b/include/asm-arm/arch-s3c2410/debug-macro.S
@@ -25,7 +25,7 @@
25 .macro addruart, rx 25 .macro addruart, rx
26 mrc p15, 0, \rx, c1, c0 26 mrc p15, 0, \rx, c1, c0
27 tst \rx, #1 27 tst \rx, #1
28 ldreq \rx, = S3C2410_PA_UART 28 ldreq \rx, = S3C24XX_PA_UART
29 ldrne \rx, = S3C24XX_VA_UART 29 ldrne \rx, = S3C24XX_VA_UART
30#if CONFIG_DEBUG_S3C2410_UART != 0 30#if CONFIG_DEBUG_S3C2410_UART != 0
31 add \rx, \rx, #(S3C2410_UART1_OFF * CONFIG_DEBUG_S3C2410_UART) 31 add \rx, \rx, #(S3C2410_UART1_OFF * CONFIG_DEBUG_S3C2410_UART)
@@ -44,7 +44,7 @@
441003: 441003:
45 mrc p15, 0, \rd, c1, c0 45 mrc p15, 0, \rd, c1, c0
46 tst \rd, #1 46 tst \rd, #1
47 addeq \rd, \rx, #(S3C2410_PA_GPIO - S3C2410_PA_UART) 47 addeq \rd, \rx, #(S3C24XX_PA_GPIO - S3C24XX_PA_UART)
48 addne \rd, \rx, #(S3C24XX_VA_GPIO - S3C24XX_VA_UART) 48 addne \rd, \rx, #(S3C24XX_VA_GPIO - S3C24XX_VA_UART)
49 bic \rd, \rd, #0xff000 49 bic \rd, \rd, #0xff000
50 ldr \rd, [ \rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0) ] 50 ldr \rd, [ \rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0) ]
@@ -75,7 +75,7 @@
751003: 751003:
76 mrc p15, 0, \rd, c1, c0 76 mrc p15, 0, \rd, c1, c0
77 tst \rd, #1 77 tst \rd, #1
78 addeq \rd, \rx, #(S3C2410_PA_GPIO - S3C2410_PA_UART) 78 addeq \rd, \rx, #(S3C24XX_PA_GPIO - S3C24XX_PA_UART)
79 addne \rd, \rx, #(S3C24XX_VA_GPIO - S3C24XX_VA_UART) 79 addne \rd, \rx, #(S3C24XX_VA_GPIO - S3C24XX_VA_UART)
80 bic \rd, \rd, #0xff000 80 bic \rd, \rd, #0xff000
81 ldr \rd, [ \rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0) ] 81 ldr \rd, [ \rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0) ]
diff --git a/include/asm-arm/arch-s3c2410/map.h b/include/asm-arm/arch-s3c2410/map.h
index 1833ea5c4220..c380d264a847 100644
--- a/include/asm-arm/arch-s3c2410/map.h
+++ b/include/asm-arm/arch-s3c2410/map.h
@@ -14,6 +14,7 @@
14 * 06-Jan-2003 BJD Linux 2.6.0 version, moved bast specifics out 14 * 06-Jan-2003 BJD Linux 2.6.0 version, moved bast specifics out
15 * 10-Feb-2005 BJD Added CAMIF definition from guillaume.gourat@nexvision.tv 15 * 10-Feb-2005 BJD Added CAMIF definition from guillaume.gourat@nexvision.tv
16 * 10-Mar-2005 LCVR Added support to S3C2400, changed {VA,SZ} names 16 * 10-Mar-2005 LCVR Added support to S3C2400, changed {VA,SZ} names
17 * 15-Jan-2006 LCVR Added S3C24XX_PA macros for common S3C24XX resources
17*/ 18*/
18 19
19#ifndef __ASM_ARCH_MAP_H 20#ifndef __ASM_ARCH_MAP_H
@@ -188,5 +189,42 @@
188 189
189#define S3C2400_SDRAM_PA (S3C2400_CS6) 190#define S3C2400_SDRAM_PA (S3C2400_CS6)
190 191
192/* Use a single interface for common resources between S3C24XX cpus */
193
194#ifdef CONFIG_CPU_S3C2400
195#define S3C24XX_PA_IRQ S3C2400_PA_IRQ
196#define S3C24XX_PA_MEMCTRL S3C2400_PA_MEMCTRL
197#define S3C24XX_PA_USBHOST S3C2400_PA_USBHOST
198#define S3C24XX_PA_DMA S3C2400_PA_DMA
199#define S3C24XX_PA_CLKPWR S3C2400_PA_CLKPWR
200#define S3C24XX_PA_LCD S3C2400_PA_LCD
201#define S3C24XX_PA_UART S3C2400_PA_UART
202#define S3C24XX_PA_TIMER S3C2400_PA_TIMER
203#define S3C24XX_PA_USBDEV S3C2400_PA_USBDEV
204#define S3C24XX_PA_WATCHDOG S3C2400_PA_WATCHDOG
205#define S3C24XX_PA_IIC S3C2400_PA_IIC
206#define S3C24XX_PA_IIS S3C2400_PA_IIS
207#define S3C24XX_PA_GPIO S3C2400_PA_GPIO
208#define S3C24XX_PA_RTC S3C2400_PA_RTC
209#define S3C24XX_PA_ADC S3C2400_PA_ADC
210#define S3C24XX_PA_SPI S3C2400_PA_SPI
211#else
212#define S3C24XX_PA_IRQ S3C2410_PA_IRQ
213#define S3C24XX_PA_MEMCTRL S3C2410_PA_MEMCTRL
214#define S3C24XX_PA_USBHOST S3C2410_PA_USBHOST
215#define S3C24XX_PA_DMA S3C2410_PA_DMA
216#define S3C24XX_PA_CLKPWR S3C2410_PA_CLKPWR
217#define S3C24XX_PA_LCD S3C2410_PA_LCD
218#define S3C24XX_PA_UART S3C2410_PA_UART
219#define S3C24XX_PA_TIMER S3C2410_PA_TIMER
220#define S3C24XX_PA_USBDEV S3C2410_PA_USBDEV
221#define S3C24XX_PA_WATCHDOG S3C2410_PA_WATCHDOG
222#define S3C24XX_PA_IIC S3C2410_PA_IIC
223#define S3C24XX_PA_IIS S3C2410_PA_IIS
224#define S3C24XX_PA_GPIO S3C2410_PA_GPIO
225#define S3C24XX_PA_RTC S3C2410_PA_RTC
226#define S3C24XX_PA_ADC S3C2410_PA_ADC
227#define S3C24XX_PA_SPI S3C2410_PA_SPI
228#endif
191 229
192#endif /* __ASM_ARCH_MAP_H */ 230#endif /* __ASM_ARCH_MAP_H */
diff --git a/include/asm-arm/arch-s3c2410/regs-serial.h b/include/asm-arm/arch-s3c2410/regs-serial.h
index ce1bbbaad6d3..83b01254c4ac 100644
--- a/include/asm-arm/arch-s3c2410/regs-serial.h
+++ b/include/asm-arm/arch-s3c2410/regs-serial.h
@@ -39,9 +39,9 @@
39#define S3C24XX_VA_UART1 (S3C24XX_VA_UART + 0x4000 ) 39#define S3C24XX_VA_UART1 (S3C24XX_VA_UART + 0x4000 )
40#define S3C24XX_VA_UART2 (S3C24XX_VA_UART + 0x8000 ) 40#define S3C24XX_VA_UART2 (S3C24XX_VA_UART + 0x8000 )
41 41
42#define S3C2410_PA_UART0 (S3C2410_PA_UART) 42#define S3C2410_PA_UART0 (S3C24XX_PA_UART)
43#define S3C2410_PA_UART1 (S3C2410_PA_UART + 0x4000 ) 43#define S3C2410_PA_UART1 (S3C24XX_PA_UART + 0x4000 )
44#define S3C2410_PA_UART2 (S3C2410_PA_UART + 0x8000 ) 44#define S3C2410_PA_UART2 (S3C24XX_PA_UART + 0x8000 )
45 45
46#define S3C2410_URXH (0x24) 46#define S3C2410_URXH (0x24)
47#define S3C2410_UTXH (0x20) 47#define S3C2410_UTXH (0x20)
diff --git a/include/asm-arm/arch-s3c2410/uncompress.h b/include/asm-arm/arch-s3c2410/uncompress.h
index ddd1578a7ee0..4367ec054b51 100644
--- a/include/asm-arm/arch-s3c2410/uncompress.h
+++ b/include/asm-arm/arch-s3c2410/uncompress.h
@@ -35,13 +35,13 @@
35#undef S3C2410_GPIOREG 35#undef S3C2410_GPIOREG
36#undef S3C2410_WDOGREG 36#undef S3C2410_WDOGREG
37 37
38#define S3C2410_GPIOREG(x) ((S3C2410_PA_GPIO + (x))) 38#define S3C2410_GPIOREG(x) ((S3C24XX_PA_GPIO + (x)))
39#define S3C2410_WDOGREG(x) ((S3C2410_PA_WATCHDOG + (x))) 39#define S3C2410_WDOGREG(x) ((S3C24XX_PA_WATCHDOG + (x)))
40 40
41/* how many bytes we allow into the FIFO at a time in FIFO mode */ 41/* how many bytes we allow into the FIFO at a time in FIFO mode */
42#define FIFO_MAX (14) 42#define FIFO_MAX (14)
43 43
44#define uart_base S3C2410_PA_UART + (0x4000*CONFIG_S3C2410_LOWLEVEL_UART_PORT) 44#define uart_base S3C24XX_PA_UART + (0x4000*CONFIG_S3C2410_LOWLEVEL_UART_PORT)
45 45
46static __inline__ void 46static __inline__ void
47uart_wr(unsigned int reg, unsigned int val) 47uart_wr(unsigned int reg, unsigned int val)
diff --git a/include/asm-arm/mach/map.h b/include/asm-arm/mach/map.h
index 3351b77fab36..e8ea67c97c73 100644
--- a/include/asm-arm/mach/map.h
+++ b/include/asm-arm/mach/map.h
@@ -26,6 +26,7 @@ struct meminfo;
26#define MT_MEMORY 5 26#define MT_MEMORY 5
27#define MT_ROM 6 27#define MT_ROM 6
28#define MT_IXP2000_DEVICE 7 28#define MT_IXP2000_DEVICE 7
29#define MT_NONSHARED_DEVICE 8
29 30
30extern void create_memmap_holes(struct meminfo *); 31extern void create_memmap_holes(struct meminfo *);
31extern void memtable_init(struct meminfo *); 32extern void memtable_init(struct meminfo *);
diff --git a/include/asm-arm/pgtable.h b/include/asm-arm/pgtable.h
index 5a0d19b466b0..70e00d08345e 100644
--- a/include/asm-arm/pgtable.h
+++ b/include/asm-arm/pgtable.h
@@ -168,6 +168,7 @@ extern void __pgd_error(const char *file, int line, unsigned long val);
168#define PMD_SECT_WB (PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE) 168#define PMD_SECT_WB (PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE)
169#define PMD_SECT_MINICACHE (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE) 169#define PMD_SECT_MINICACHE (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE)
170#define PMD_SECT_WBWA (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE) 170#define PMD_SECT_WBWA (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE)
171#define PMD_SECT_NONSHARED_DEV (PMD_SECT_TEX(2))
171 172
172/* 173/*
173 * - coarse table (not used) 174 * - coarse table (not used)
diff --git a/include/asm-sparc64/spinlock.h b/include/asm-sparc64/spinlock.h
index ec85d12d73b9..508c416e9d6a 100644
--- a/include/asm-sparc64/spinlock.h
+++ b/include/asm-sparc64/spinlock.h
@@ -131,6 +131,28 @@ static void inline __read_lock(raw_rwlock_t *lock)
131 : "memory"); 131 : "memory");
132} 132}
133 133
134static int inline __read_trylock(raw_rwlock_t *lock)
135{
136 int tmp1, tmp2;
137
138 __asm__ __volatile__ (
139"1: ldsw [%2], %0\n"
140" brlz,a,pn %0, 2f\n"
141" mov 0, %0\n"
142" add %0, 1, %1\n"
143" cas [%2], %0, %1\n"
144" cmp %0, %1\n"
145" membar #StoreLoad | #StoreStore\n"
146" bne,pn %%icc, 1b\n"
147" mov 1, %0\n"
148"2:"
149 : "=&r" (tmp1), "=&r" (tmp2)
150 : "r" (lock)
151 : "memory");
152
153 return tmp1;
154}
155
134static void inline __read_unlock(raw_rwlock_t *lock) 156static void inline __read_unlock(raw_rwlock_t *lock)
135{ 157{
136 unsigned long tmp1, tmp2; 158 unsigned long tmp1, tmp2;
@@ -211,12 +233,12 @@ static int inline __write_trylock(raw_rwlock_t *lock)
211} 233}
212 234
213#define __raw_read_lock(p) __read_lock(p) 235#define __raw_read_lock(p) __read_lock(p)
236#define __raw_read_trylock(p) __read_trylock(p)
214#define __raw_read_unlock(p) __read_unlock(p) 237#define __raw_read_unlock(p) __read_unlock(p)
215#define __raw_write_lock(p) __write_lock(p) 238#define __raw_write_lock(p) __write_lock(p)
216#define __raw_write_unlock(p) __write_unlock(p) 239#define __raw_write_unlock(p) __write_unlock(p)
217#define __raw_write_trylock(p) __write_trylock(p) 240#define __raw_write_trylock(p) __write_trylock(p)
218 241
219#define __raw_read_trylock(lock) generic__raw_read_trylock(lock)
220#define __raw_read_can_lock(rw) (!((rw)->lock & 0x80000000UL)) 242#define __raw_read_can_lock(rw) (!((rw)->lock & 0x80000000UL))
221#define __raw_write_can_lock(rw) (!(rw)->lock) 243#define __raw_write_can_lock(rw) (!(rw)->lock)
222 244
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 02a585faa62c..860e7a485a5f 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -392,8 +392,8 @@ struct request_queue
392 unsigned int nr_congestion_off; 392 unsigned int nr_congestion_off;
393 unsigned int nr_batching; 393 unsigned int nr_batching;
394 394
395 unsigned short max_sectors; 395 unsigned int max_sectors;
396 unsigned short max_hw_sectors; 396 unsigned int max_hw_sectors;
397 unsigned short max_phys_segments; 397 unsigned short max_phys_segments;
398 unsigned short max_hw_segments; 398 unsigned short max_hw_segments;
399 unsigned short hardsect_size; 399 unsigned short hardsect_size;
@@ -697,7 +697,7 @@ extern request_queue_t *blk_init_queue(request_fn_proc *, spinlock_t *);
697extern void blk_cleanup_queue(request_queue_t *); 697extern void blk_cleanup_queue(request_queue_t *);
698extern void blk_queue_make_request(request_queue_t *, make_request_fn *); 698extern void blk_queue_make_request(request_queue_t *, make_request_fn *);
699extern void blk_queue_bounce_limit(request_queue_t *, u64); 699extern void blk_queue_bounce_limit(request_queue_t *, u64);
700extern void blk_queue_max_sectors(request_queue_t *, unsigned short); 700extern void blk_queue_max_sectors(request_queue_t *, unsigned int);
701extern void blk_queue_max_phys_segments(request_queue_t *, unsigned short); 701extern void blk_queue_max_phys_segments(request_queue_t *, unsigned short);
702extern void blk_queue_max_hw_segments(request_queue_t *, unsigned short); 702extern void blk_queue_max_hw_segments(request_queue_t *, unsigned short);
703extern void blk_queue_max_segment_size(request_queue_t *, unsigned int); 703extern void blk_queue_max_segment_size(request_queue_t *, unsigned int);
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h
index 59ff6c430cf6..6500d4e59d46 100644
--- a/include/linux/netfilter/x_tables.h
+++ b/include/linux/netfilter/x_tables.h
@@ -19,7 +19,21 @@ struct xt_get_revision
19/* For standard target */ 19/* For standard target */
20#define XT_RETURN (-NF_REPEAT - 1) 20#define XT_RETURN (-NF_REPEAT - 1)
21 21
22#define XT_ALIGN(s) (((s) + (__alignof__(u_int64_t)-1)) & ~(__alignof__(u_int64_t)-1)) 22/* this is a dummy structure to find out the alignment requirement for a struct
23 * containing all the fundamental data types that are used in ipt_entry,
24 * ip6t_entry and arpt_entry. This sucks, and it is a hack. It will be my
25 * personal pleasure to remove it -HW
26 */
27struct _xt_align
28{
29 u_int8_t u8;
30 u_int16_t u16;
31 u_int32_t u32;
32 u_int64_t u64;
33};
34
35#define XT_ALIGN(s) (((s) + (__alignof__(struct _xt_align)-1)) \
36 & ~(__alignof__(struct _xt_align)-1))
23 37
24/* Standard return verdict, or do jump. */ 38/* Standard return verdict, or do jump. */
25#define XT_STANDARD_TARGET "" 39#define XT_STANDARD_TARGET ""
diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h
index cee302aefdb7..73b464f0926a 100644
--- a/include/linux/serial_8250.h
+++ b/include/linux/serial_8250.h
@@ -26,7 +26,7 @@ struct plat_serial8250_port {
26 unsigned char regshift; /* register shift */ 26 unsigned char regshift; /* register shift */
27 unsigned char iotype; /* UPIO_* */ 27 unsigned char iotype; /* UPIO_* */
28 unsigned char hub6; 28 unsigned char hub6;
29 unsigned int flags; /* UPF_* flags */ 29 upf_t flags; /* UPF_* flags */
30}; 30};
31 31
32/* 32/*
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index ec351005bf9d..4041122dabfc 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -203,6 +203,8 @@ struct uart_icount {
203 __u32 buf_overrun; 203 __u32 buf_overrun;
204}; 204};
205 205
206typedef unsigned int __bitwise__ upf_t;
207
206struct uart_port { 208struct uart_port {
207 spinlock_t lock; /* port lock */ 209 spinlock_t lock; /* port lock */
208 unsigned int iobase; /* in/out[bwl] */ 210 unsigned int iobase; /* in/out[bwl] */
@@ -230,36 +232,34 @@ struct uart_port {
230 unsigned long sysrq; /* sysrq timeout */ 232 unsigned long sysrq; /* sysrq timeout */
231#endif 233#endif
232 234
233 unsigned int flags; 235 upf_t flags;
234 236
235#define UPF_FOURPORT (1 << 1) 237#define UPF_FOURPORT ((__force upf_t) (1 << 1))
236#define UPF_SAK (1 << 2) 238#define UPF_SAK ((__force upf_t) (1 << 2))
237#define UPF_SPD_MASK (0x1030) 239#define UPF_SPD_MASK ((__force upf_t) (0x1030))
238#define UPF_SPD_HI (0x0010) 240#define UPF_SPD_HI ((__force upf_t) (0x0010))
239#define UPF_SPD_VHI (0x0020) 241#define UPF_SPD_VHI ((__force upf_t) (0x0020))
240#define UPF_SPD_CUST (0x0030) 242#define UPF_SPD_CUST ((__force upf_t) (0x0030))
241#define UPF_SPD_SHI (0x1000) 243#define UPF_SPD_SHI ((__force upf_t) (0x1000))
242#define UPF_SPD_WARP (0x1010) 244#define UPF_SPD_WARP ((__force upf_t) (0x1010))
243#define UPF_SKIP_TEST (1 << 6) 245#define UPF_SKIP_TEST ((__force upf_t) (1 << 6))
244#define UPF_AUTO_IRQ (1 << 7) 246#define UPF_AUTO_IRQ ((__force upf_t) (1 << 7))
245#define UPF_HARDPPS_CD (1 << 11) 247#define UPF_HARDPPS_CD ((__force upf_t) (1 << 11))
246#define UPF_LOW_LATENCY (1 << 13) 248#define UPF_LOW_LATENCY ((__force upf_t) (1 << 13))
247#define UPF_BUGGY_UART (1 << 14) 249#define UPF_BUGGY_UART ((__force upf_t) (1 << 14))
248#define UPF_AUTOPROBE (1 << 15) 250#define UPF_MAGIC_MULTIPLIER ((__force upf_t) (1 << 16))
249#define UPF_MAGIC_MULTIPLIER (1 << 16) 251#define UPF_CONS_FLOW ((__force upf_t) (1 << 23))
250#define UPF_BOOT_ONLYMCA (1 << 22) 252#define UPF_SHARE_IRQ ((__force upf_t) (1 << 24))
251#define UPF_CONS_FLOW (1 << 23) 253#define UPF_BOOT_AUTOCONF ((__force upf_t) (1 << 28))
252#define UPF_SHARE_IRQ (1 << 24) 254#define UPF_IOREMAP ((__force upf_t) (1 << 31))
253#define UPF_BOOT_AUTOCONF (1 << 28) 255
254#define UPF_IOREMAP (1 << 31) 256#define UPF_CHANGE_MASK ((__force upf_t) (0x17fff))
255 257#define UPF_USR_MASK ((__force upf_t) (UPF_SPD_MASK|UPF_LOW_LATENCY))
256#define UPF_CHANGE_MASK (0x17fff)
257#define UPF_USR_MASK (UPF_SPD_MASK|UPF_LOW_LATENCY)
258 258
259 unsigned int mctrl; /* current modem ctrl settings */ 259 unsigned int mctrl; /* current modem ctrl settings */
260 unsigned int timeout; /* character-based timeout */ 260 unsigned int timeout; /* character-based timeout */
261 unsigned int type; /* port type */ 261 unsigned int type; /* port type */
262 struct uart_ops *ops; 262 const struct uart_ops *ops;
263 unsigned int custom_divisor; 263 unsigned int custom_divisor;
264 unsigned int line; /* port index */ 264 unsigned int line; /* port index */
265 unsigned long mapbase; /* for ioremap */ 265 unsigned long mapbase; /* for ioremap */
@@ -289,6 +289,9 @@ struct uart_state {
289}; 289};
290 290
291#define UART_XMIT_SIZE PAGE_SIZE 291#define UART_XMIT_SIZE PAGE_SIZE
292
293typedef unsigned int __bitwise__ uif_t;
294
292/* 295/*
293 * This is the state information which is only valid when the port 296 * This is the state information which is only valid when the port
294 * is open; it may be freed by the core driver once the device has 297 * is open; it may be freed by the core driver once the device has
@@ -298,17 +301,16 @@ struct uart_state {
298struct uart_info { 301struct uart_info {
299 struct tty_struct *tty; 302 struct tty_struct *tty;
300 struct circ_buf xmit; 303 struct circ_buf xmit;
301 unsigned int flags; 304 uif_t flags;
302 305
303/* 306/*
304 * These are the flags that specific to info->flags, and reflect our 307 * Definitions for info->flags. These are _private_ to serial_core, and
305 * internal state. They can not be accessed via port->flags. Low 308 * are specific to this structure. They may be queried by low level drivers.
306 * level drivers must not change these, but may query them instead.
307 */ 309 */
308#define UIF_CHECK_CD (1 << 25) 310#define UIF_CHECK_CD ((__force uif_t) (1 << 25))
309#define UIF_CTS_FLOW (1 << 26) 311#define UIF_CTS_FLOW ((__force uif_t) (1 << 26))
310#define UIF_NORMAL_ACTIVE (1 << 29) 312#define UIF_NORMAL_ACTIVE ((__force uif_t) (1 << 29))
311#define UIF_INITIALIZED (1 << 31) 313#define UIF_INITIALIZED ((__force uif_t) (1 << 31))
312 314
313 int blocked_open; 315 int blocked_open;
314 316
@@ -430,7 +432,7 @@ static inline int uart_handle_break(struct uart_port *port)
430 port->sysrq = 0; 432 port->sysrq = 0;
431 } 433 }
432#endif 434#endif
433 if (info->flags & UPF_SAK) 435 if (port->flags & UPF_SAK)
434 do_SAK(info->tty); 436 do_SAK(info->tty);
435 return 0; 437 return 0;
436} 438}
diff --git a/include/net/ieee80211.h b/include/net/ieee80211.h
index df05f468fa5c..9a92aef8b0b2 100644
--- a/include/net/ieee80211.h
+++ b/include/net/ieee80211.h
@@ -803,9 +803,9 @@ enum ieee80211_state {
803#define IEEE80211_24GHZ_MAX_CHANNEL 14 803#define IEEE80211_24GHZ_MAX_CHANNEL 14
804#define IEEE80211_24GHZ_CHANNELS 14 804#define IEEE80211_24GHZ_CHANNELS 14
805 805
806#define IEEE80211_52GHZ_MIN_CHANNEL 36 806#define IEEE80211_52GHZ_MIN_CHANNEL 34
807#define IEEE80211_52GHZ_MAX_CHANNEL 165 807#define IEEE80211_52GHZ_MAX_CHANNEL 165
808#define IEEE80211_52GHZ_CHANNELS 32 808#define IEEE80211_52GHZ_CHANNELS 131
809 809
810enum { 810enum {
811 IEEE80211_CH_PASSIVE_ONLY = (1 << 0), 811 IEEE80211_CH_PASSIVE_ONLY = (1 << 0),
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
index 467274a764d1..827992949c4b 100644
--- a/include/scsi/scsi_host.h
+++ b/include/scsi/scsi_host.h
@@ -554,7 +554,6 @@ struct Scsi_Host {
554 /* 554 /*
555 * ordered write support 555 * ordered write support
556 */ 556 */
557 unsigned ordered_flush:1;
558 unsigned ordered_tag:1; 557 unsigned ordered_tag:1;
559 558
560 /* 559 /*
diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c
index 773219907dd8..7712912dbc84 100644
--- a/kernel/rcutorture.c
+++ b/kernel/rcutorture.c
@@ -114,16 +114,16 @@ rcu_torture_alloc(void)
114{ 114{
115 struct list_head *p; 115 struct list_head *p;
116 116
117 spin_lock(&rcu_torture_lock); 117 spin_lock_bh(&rcu_torture_lock);
118 if (list_empty(&rcu_torture_freelist)) { 118 if (list_empty(&rcu_torture_freelist)) {
119 atomic_inc(&n_rcu_torture_alloc_fail); 119 atomic_inc(&n_rcu_torture_alloc_fail);
120 spin_unlock(&rcu_torture_lock); 120 spin_unlock_bh(&rcu_torture_lock);
121 return NULL; 121 return NULL;
122 } 122 }
123 atomic_inc(&n_rcu_torture_alloc); 123 atomic_inc(&n_rcu_torture_alloc);
124 p = rcu_torture_freelist.next; 124 p = rcu_torture_freelist.next;
125 list_del_init(p); 125 list_del_init(p);
126 spin_unlock(&rcu_torture_lock); 126 spin_unlock_bh(&rcu_torture_lock);
127 return container_of(p, struct rcu_torture, rtort_free); 127 return container_of(p, struct rcu_torture, rtort_free);
128} 128}
129 129
@@ -134,9 +134,9 @@ static void
134rcu_torture_free(struct rcu_torture *p) 134rcu_torture_free(struct rcu_torture *p)
135{ 135{
136 atomic_inc(&n_rcu_torture_free); 136 atomic_inc(&n_rcu_torture_free);
137 spin_lock(&rcu_torture_lock); 137 spin_lock_bh(&rcu_torture_lock);
138 list_add_tail(&p->rtort_free, &rcu_torture_freelist); 138 list_add_tail(&p->rtort_free, &rcu_torture_freelist);
139 spin_unlock(&rcu_torture_lock); 139 spin_unlock_bh(&rcu_torture_lock);
140} 140}
141 141
142static void 142static void
diff --git a/kernel/sched.c b/kernel/sched.c
index 3ee2ae45125f..ec7fd9cee306 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -5141,7 +5141,7 @@ static void init_sched_build_groups(struct sched_group groups[], cpumask_t span,
5141#define SEARCH_SCOPE 2 5141#define SEARCH_SCOPE 2
5142#define MIN_CACHE_SIZE (64*1024U) 5142#define MIN_CACHE_SIZE (64*1024U)
5143#define DEFAULT_CACHE_SIZE (5*1024*1024U) 5143#define DEFAULT_CACHE_SIZE (5*1024*1024U)
5144#define ITERATIONS 2 5144#define ITERATIONS 1
5145#define SIZE_THRESH 130 5145#define SIZE_THRESH 130
5146#define COST_THRESH 130 5146#define COST_THRESH 130
5147 5147
@@ -5480,9 +5480,9 @@ static unsigned long long measure_migration_cost(int cpu1, int cpu2)
5480 break; 5480 break;
5481 } 5481 }
5482 /* 5482 /*
5483 * Increase the cachesize in 5% steps: 5483 * Increase the cachesize in 10% steps:
5484 */ 5484 */
5485 size = size * 20 / 19; 5485 size = size * 10 / 9;
5486 } 5486 }
5487 5487
5488 if (migration_debug) 5488 if (migration_debug)
diff --git a/kernel/time.c b/kernel/time.c
index 7477b1d2079e..1f23e683d6aa 100644
--- a/kernel/time.c
+++ b/kernel/time.c
@@ -155,7 +155,7 @@ int do_sys_settimeofday(struct timespec *tv, struct timezone *tz)
155 static int firsttime = 1; 155 static int firsttime = 1;
156 int error = 0; 156 int error = 0;
157 157
158 if (!timespec_valid(tv)) 158 if (tv && !timespec_valid(tv))
159 return -EINVAL; 159 return -EINVAL;
160 160
161 error = security_settime(tv, tz); 161 error = security_settime(tv, tz);
diff --git a/kernel/user.c b/kernel/user.c
index 89e562feb1b1..d1ae2349347e 100644
--- a/kernel/user.c
+++ b/kernel/user.c
@@ -13,6 +13,7 @@
13#include <linux/slab.h> 13#include <linux/slab.h>
14#include <linux/bitops.h> 14#include <linux/bitops.h>
15#include <linux/key.h> 15#include <linux/key.h>
16#include <linux/interrupt.h>
16 17
17/* 18/*
18 * UID task count cache, to get fast user lookup in "alloc_uid" 19 * UID task count cache, to get fast user lookup in "alloc_uid"
@@ -27,6 +28,12 @@
27 28
28static kmem_cache_t *uid_cachep; 29static kmem_cache_t *uid_cachep;
29static struct list_head uidhash_table[UIDHASH_SZ]; 30static struct list_head uidhash_table[UIDHASH_SZ];
31
32/*
33 * The uidhash_lock is mostly taken from process context, but it is
34 * occasionally also taken from softirq/tasklet context, when
35 * task-structs get RCU-freed. Hence all locking must be softirq-safe.
36 */
30static DEFINE_SPINLOCK(uidhash_lock); 37static DEFINE_SPINLOCK(uidhash_lock);
31 38
32struct user_struct root_user = { 39struct user_struct root_user = {
@@ -83,14 +90,15 @@ struct user_struct *find_user(uid_t uid)
83{ 90{
84 struct user_struct *ret; 91 struct user_struct *ret;
85 92
86 spin_lock(&uidhash_lock); 93 spin_lock_bh(&uidhash_lock);
87 ret = uid_hash_find(uid, uidhashentry(uid)); 94 ret = uid_hash_find(uid, uidhashentry(uid));
88 spin_unlock(&uidhash_lock); 95 spin_unlock_bh(&uidhash_lock);
89 return ret; 96 return ret;
90} 97}
91 98
92void free_uid(struct user_struct *up) 99void free_uid(struct user_struct *up)
93{ 100{
101 local_bh_disable();
94 if (up && atomic_dec_and_lock(&up->__count, &uidhash_lock)) { 102 if (up && atomic_dec_and_lock(&up->__count, &uidhash_lock)) {
95 uid_hash_remove(up); 103 uid_hash_remove(up);
96 key_put(up->uid_keyring); 104 key_put(up->uid_keyring);
@@ -98,6 +106,7 @@ void free_uid(struct user_struct *up)
98 kmem_cache_free(uid_cachep, up); 106 kmem_cache_free(uid_cachep, up);
99 spin_unlock(&uidhash_lock); 107 spin_unlock(&uidhash_lock);
100 } 108 }
109 local_bh_enable();
101} 110}
102 111
103struct user_struct * alloc_uid(uid_t uid) 112struct user_struct * alloc_uid(uid_t uid)
@@ -105,9 +114,9 @@ struct user_struct * alloc_uid(uid_t uid)
105 struct list_head *hashent = uidhashentry(uid); 114 struct list_head *hashent = uidhashentry(uid);
106 struct user_struct *up; 115 struct user_struct *up;
107 116
108 spin_lock(&uidhash_lock); 117 spin_lock_bh(&uidhash_lock);
109 up = uid_hash_find(uid, hashent); 118 up = uid_hash_find(uid, hashent);
110 spin_unlock(&uidhash_lock); 119 spin_unlock_bh(&uidhash_lock);
111 120
112 if (!up) { 121 if (!up) {
113 struct user_struct *new; 122 struct user_struct *new;
@@ -137,7 +146,7 @@ struct user_struct * alloc_uid(uid_t uid)
137 * Before adding this, check whether we raced 146 * Before adding this, check whether we raced
138 * on adding the same user already.. 147 * on adding the same user already..
139 */ 148 */
140 spin_lock(&uidhash_lock); 149 spin_lock_bh(&uidhash_lock);
141 up = uid_hash_find(uid, hashent); 150 up = uid_hash_find(uid, hashent);
142 if (up) { 151 if (up) {
143 key_put(new->uid_keyring); 152 key_put(new->uid_keyring);
@@ -147,7 +156,7 @@ struct user_struct * alloc_uid(uid_t uid)
147 uid_hash_insert(new, hashent); 156 uid_hash_insert(new, hashent);
148 up = new; 157 up = new;
149 } 158 }
150 spin_unlock(&uidhash_lock); 159 spin_unlock_bh(&uidhash_lock);
151 160
152 } 161 }
153 return up; 162 return up;
@@ -183,9 +192,9 @@ static int __init uid_cache_init(void)
183 INIT_LIST_HEAD(uidhash_table + n); 192 INIT_LIST_HEAD(uidhash_table + n);
184 193
185 /* Insert the root user immediately (init already runs as root) */ 194 /* Insert the root user immediately (init already runs as root) */
186 spin_lock(&uidhash_lock); 195 spin_lock_bh(&uidhash_lock);
187 uid_hash_insert(&root_user, uidhashentry(0)); 196 uid_hash_insert(&root_user, uidhashentry(0));
188 spin_unlock(&uidhash_lock); 197 spin_unlock_bh(&uidhash_lock);
189 198
190 return 0; 199 return 0;
191} 200}
diff --git a/net/core/dev.c b/net/core/dev.c
index fd070a098f20..ffb82073056e 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2543,13 +2543,14 @@ int dev_ioctl(unsigned int cmd, void __user *arg)
2543 case SIOCBONDENSLAVE: 2543 case SIOCBONDENSLAVE:
2544 case SIOCBONDRELEASE: 2544 case SIOCBONDRELEASE:
2545 case SIOCBONDSETHWADDR: 2545 case SIOCBONDSETHWADDR:
2546 case SIOCBONDSLAVEINFOQUERY:
2547 case SIOCBONDINFOQUERY:
2548 case SIOCBONDCHANGEACTIVE: 2546 case SIOCBONDCHANGEACTIVE:
2549 case SIOCBRADDIF: 2547 case SIOCBRADDIF:
2550 case SIOCBRDELIF: 2548 case SIOCBRDELIF:
2551 if (!capable(CAP_NET_ADMIN)) 2549 if (!capable(CAP_NET_ADMIN))
2552 return -EPERM; 2550 return -EPERM;
2551 /* fall through */
2552 case SIOCBONDSLAVEINFOQUERY:
2553 case SIOCBONDINFOQUERY:
2553 dev_load(ifr.ifr_name); 2554 dev_load(ifr.ifr_name);
2554 rtnl_lock(); 2555 rtnl_lock();
2555 ret = dev_ifsioc(&ifr, cmd); 2556 ret = dev_ifsioc(&ifr, cmd);
diff --git a/net/core/filter.c b/net/core/filter.c
index 9540946a48f3..93fbd01d2259 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -64,7 +64,7 @@ static inline void *load_pointer(struct sk_buff *skb, int k,
64} 64}
65 65
66/** 66/**
67 * sk_run_filter - run a filter on a socket 67 * sk_run_filter - run a filter on a socket
68 * @skb: buffer to run the filter on 68 * @skb: buffer to run the filter on
69 * @filter: filter to apply 69 * @filter: filter to apply
70 * @flen: length of filter 70 * @flen: length of filter
@@ -78,8 +78,8 @@ unsigned int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int
78{ 78{
79 struct sock_filter *fentry; /* We walk down these */ 79 struct sock_filter *fentry; /* We walk down these */
80 void *ptr; 80 void *ptr;
81 u32 A = 0; /* Accumulator */ 81 u32 A = 0; /* Accumulator */
82 u32 X = 0; /* Index Register */ 82 u32 X = 0; /* Index Register */
83 u32 mem[BPF_MEMWORDS]; /* Scratch Memory Store */ 83 u32 mem[BPF_MEMWORDS]; /* Scratch Memory Store */
84 u32 tmp; 84 u32 tmp;
85 int k; 85 int k;
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index d0732e9c8560..6766f118f070 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -135,13 +135,15 @@ void skb_under_panic(struct sk_buff *skb, int sz, void *here)
135struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask, 135struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask,
136 int fclone) 136 int fclone)
137{ 137{
138 kmem_cache_t *cache;
138 struct skb_shared_info *shinfo; 139 struct skb_shared_info *shinfo;
139 struct sk_buff *skb; 140 struct sk_buff *skb;
140 u8 *data; 141 u8 *data;
141 142
143 cache = fclone ? skbuff_fclone_cache : skbuff_head_cache;
144
142 /* Get the HEAD */ 145 /* Get the HEAD */
143 skb = kmem_cache_alloc(fclone ? skbuff_fclone_cache : skbuff_head_cache, 146 skb = kmem_cache_alloc(cache, gfp_mask & ~__GFP_DMA);
144 gfp_mask & ~__GFP_DMA);
145 if (!skb) 147 if (!skb)
146 goto out; 148 goto out;
147 149
@@ -180,7 +182,7 @@ struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask,
180out: 182out:
181 return skb; 183 return skb;
182nodata: 184nodata:
183 kmem_cache_free(skbuff_head_cache, skb); 185 kmem_cache_free(cache, skb);
184 skb = NULL; 186 skb = NULL;
185 goto out; 187 goto out;
186} 188}
diff --git a/net/ieee80211/ieee80211_rx.c b/net/ieee80211/ieee80211_rx.c
index 7a121802faa9..960aa78cdb97 100644
--- a/net/ieee80211/ieee80211_rx.c
+++ b/net/ieee80211/ieee80211_rx.c
@@ -350,6 +350,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
350 u8 src[ETH_ALEN]; 350 u8 src[ETH_ALEN];
351 struct ieee80211_crypt_data *crypt = NULL; 351 struct ieee80211_crypt_data *crypt = NULL;
352 int keyidx = 0; 352 int keyidx = 0;
353 int can_be_decrypted = 0;
353 354
354 hdr = (struct ieee80211_hdr_4addr *)skb->data; 355 hdr = (struct ieee80211_hdr_4addr *)skb->data;
355 stats = &ieee->stats; 356 stats = &ieee->stats;
@@ -410,12 +411,23 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
410 return 1; 411 return 1;
411 } 412 }
412 413
413 if (is_multicast_ether_addr(hdr->addr1) 414 can_be_decrypted = (is_multicast_ether_addr(hdr->addr1) ||
414 ? ieee->host_mc_decrypt : ieee->host_decrypt) { 415 is_broadcast_ether_addr(hdr->addr2)) ?
416 ieee->host_mc_decrypt : ieee->host_decrypt;
417
418 if (can_be_decrypted) {
415 int idx = 0; 419 int idx = 0;
416 if (skb->len >= hdrlen + 3) 420 if (skb->len >= hdrlen + 3) {
421 /* Top two-bits of byte 3 are the key index */
417 idx = skb->data[hdrlen + 3] >> 6; 422 idx = skb->data[hdrlen + 3] >> 6;
423 }
424
425 /* ieee->crypt[] is WEP_KEY (4) in length. Given that idx
426 * is only allowed 2-bits of storage, no value of idx can
427 * be provided via above code that would result in idx
428 * being out of range */
418 crypt = ieee->crypt[idx]; 429 crypt = ieee->crypt[idx];
430
419#ifdef NOT_YET 431#ifdef NOT_YET
420 sta = NULL; 432 sta = NULL;
421 433
@@ -553,7 +565,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
553 565
554 /* skb: hdr + (possibly fragmented, possibly encrypted) payload */ 566 /* skb: hdr + (possibly fragmented, possibly encrypted) payload */
555 567
556 if (ieee->host_decrypt && (fc & IEEE80211_FCTL_PROTECTED) && 568 if ((fc & IEEE80211_FCTL_PROTECTED) && can_be_decrypted &&
557 (keyidx = ieee80211_rx_frame_decrypt(ieee, skb, crypt)) < 0) 569 (keyidx = ieee80211_rx_frame_decrypt(ieee, skb, crypt)) < 0)
558 goto rx_dropped; 570 goto rx_dropped;
559 571
@@ -617,7 +629,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
617 629
618 /* skb: hdr + (possible reassembled) full MSDU payload; possibly still 630 /* skb: hdr + (possible reassembled) full MSDU payload; possibly still
619 * encrypted/authenticated */ 631 * encrypted/authenticated */
620 if (ieee->host_decrypt && (fc & IEEE80211_FCTL_PROTECTED) && 632 if ((fc & IEEE80211_FCTL_PROTECTED) && can_be_decrypted &&
621 ieee80211_rx_frame_decrypt_msdu(ieee, skb, keyidx, crypt)) 633 ieee80211_rx_frame_decrypt_msdu(ieee, skb, keyidx, crypt))
622 goto rx_dropped; 634 goto rx_dropped;
623 635
@@ -1439,7 +1451,7 @@ void ieee80211_rx_mgt(struct ieee80211_device *ieee,
1439 break; 1451 break;
1440 1452
1441 case IEEE80211_STYPE_PROBE_REQ: 1453 case IEEE80211_STYPE_PROBE_REQ:
1442 IEEE80211_DEBUG_MGMT("recieved auth (%d)\n", 1454 IEEE80211_DEBUG_MGMT("received auth (%d)\n",
1443 WLAN_FC_GET_STYPE(le16_to_cpu 1455 WLAN_FC_GET_STYPE(le16_to_cpu
1444 (header->frame_ctl))); 1456 (header->frame_ctl)));
1445 1457
@@ -1473,7 +1485,7 @@ void ieee80211_rx_mgt(struct ieee80211_device *ieee,
1473 break; 1485 break;
1474 case IEEE80211_STYPE_AUTH: 1486 case IEEE80211_STYPE_AUTH:
1475 1487
1476 IEEE80211_DEBUG_MGMT("recieved auth (%d)\n", 1488 IEEE80211_DEBUG_MGMT("received auth (%d)\n",
1477 WLAN_FC_GET_STYPE(le16_to_cpu 1489 WLAN_FC_GET_STYPE(le16_to_cpu
1478 (header->frame_ctl))); 1490 (header->frame_ctl)));
1479 1491
diff --git a/net/ieee80211/ieee80211_wx.c b/net/ieee80211/ieee80211_wx.c
index 23e1630f50b7..f87c6b89f845 100644
--- a/net/ieee80211/ieee80211_wx.c
+++ b/net/ieee80211/ieee80211_wx.c
@@ -232,15 +232,18 @@ static char *ipw2100_translate_scan(struct ieee80211_device *ieee,
232 return start; 232 return start;
233} 233}
234 234
235#define SCAN_ITEM_SIZE 128
236
235int ieee80211_wx_get_scan(struct ieee80211_device *ieee, 237int ieee80211_wx_get_scan(struct ieee80211_device *ieee,
236 struct iw_request_info *info, 238 struct iw_request_info *info,
237 union iwreq_data *wrqu, char *extra) 239 union iwreq_data *wrqu, char *extra)
238{ 240{
239 struct ieee80211_network *network; 241 struct ieee80211_network *network;
240 unsigned long flags; 242 unsigned long flags;
243 int err = 0;
241 244
242 char *ev = extra; 245 char *ev = extra;
243 char *stop = ev + IW_SCAN_MAX_DATA; 246 char *stop = ev + wrqu->data.length;
244 int i = 0; 247 int i = 0;
245 248
246 IEEE80211_DEBUG_WX("Getting scan\n"); 249 IEEE80211_DEBUG_WX("Getting scan\n");
@@ -249,6 +252,11 @@ int ieee80211_wx_get_scan(struct ieee80211_device *ieee,
249 252
250 list_for_each_entry(network, &ieee->network_list, list) { 253 list_for_each_entry(network, &ieee->network_list, list) {
251 i++; 254 i++;
255 if (stop - ev < SCAN_ITEM_SIZE) {
256 err = -E2BIG;
257 break;
258 }
259
252 if (ieee->scan_age == 0 || 260 if (ieee->scan_age == 0 ||
253 time_after(network->last_scanned + ieee->scan_age, jiffies)) 261 time_after(network->last_scanned + ieee->scan_age, jiffies))
254 ev = ipw2100_translate_scan(ieee, ev, stop, network); 262 ev = ipw2100_translate_scan(ieee, ev, stop, network);
@@ -270,7 +278,7 @@ int ieee80211_wx_get_scan(struct ieee80211_device *ieee,
270 278
271 IEEE80211_DEBUG_WX("exit: %d networks returned.\n", i); 279 IEEE80211_DEBUG_WX("exit: %d networks returned.\n", i);
272 280
273 return 0; 281 return err;
274} 282}
275 283
276int ieee80211_wx_set_encode(struct ieee80211_device *ieee, 284int ieee80211_wx_set_encode(struct ieee80211_device *ieee,
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
index d8ce7133cd8f..f70ba622c856 100644
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -970,7 +970,6 @@ int igmp_rcv(struct sk_buff *skb)
970 case IGMP_MTRACE_RESP: 970 case IGMP_MTRACE_RESP:
971 break; 971 break;
972 default: 972 default:
973 NETDEBUG(KERN_DEBUG "New IGMP type=%d, why we do not know about it?\n", ih->type);
974 } 973 }
975 974
976drop: 975drop:
diff --git a/net/ipv4/tcp_htcp.c b/net/ipv4/tcp_htcp.c
index 3284cfb993e6..128de4d7c0b7 100644
--- a/net/ipv4/tcp_htcp.c
+++ b/net/ipv4/tcp_htcp.c
@@ -230,7 +230,6 @@ static void htcp_cong_avoid(struct sock *sk, u32 ack, u32 rtt,
230 if (tp->snd_cwnd < tp->snd_cwnd_clamp) 230 if (tp->snd_cwnd < tp->snd_cwnd_clamp)
231 tp->snd_cwnd++; 231 tp->snd_cwnd++;
232 tp->snd_cwnd_cnt = 0; 232 tp->snd_cwnd_cnt = 0;
233 ca->ccount++;
234 } 233 }
235 } 234 }
236} 235}
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index 6c05c7978bef..4420948a1bfe 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -1252,8 +1252,7 @@ int igmp6_event_query(struct sk_buff *skb)
1252 } 1252 }
1253 } else { 1253 } else {
1254 for (ma = idev->mc_list; ma; ma=ma->next) { 1254 for (ma = idev->mc_list; ma; ma=ma->next) {
1255 if (group_type != IPV6_ADDR_ANY && 1255 if (!ipv6_addr_equal(group, &ma->mca_addr))
1256 !ipv6_addr_equal(group, &ma->mca_addr))
1257 continue; 1256 continue;
1258 spin_lock_bh(&ma->mca_lock); 1257 spin_lock_bh(&ma->mca_lock);
1259 if (ma->mca_flags & MAF_TIMER_RUNNING) { 1258 if (ma->mca_flags & MAF_TIMER_RUNNING) {
@@ -1268,11 +1267,10 @@ int igmp6_event_query(struct sk_buff *skb)
1268 ma->mca_flags &= ~MAF_GSQUERY; 1267 ma->mca_flags &= ~MAF_GSQUERY;
1269 } 1268 }
1270 if (!(ma->mca_flags & MAF_GSQUERY) || 1269 if (!(ma->mca_flags & MAF_GSQUERY) ||
1271 mld_marksources(ma, ntohs(mlh2->nsrcs), mlh2->srcs)) 1270 mld_marksources(ma, ntohs(mlh2->nsrcs), mlh2->srcs))
1272 igmp6_group_queried(ma, max_delay); 1271 igmp6_group_queried(ma, max_delay);
1273 spin_unlock_bh(&ma->mca_lock); 1272 spin_unlock_bh(&ma->mca_lock);
1274 if (group_type != IPV6_ADDR_ANY) 1273 break;
1275 break;
1276 } 1274 }
1277 } 1275 }
1278 read_unlock_bh(&idev->lock); 1276 read_unlock_bh(&idev->lock);
@@ -1351,7 +1349,7 @@ static int is_in(struct ifmcaddr6 *pmc, struct ip6_sf_list *psf, int type,
1351 * in all filters 1349 * in all filters
1352 */ 1350 */
1353 if (psf->sf_count[MCAST_INCLUDE]) 1351 if (psf->sf_count[MCAST_INCLUDE])
1354 return 0; 1352 return type == MLD2_MODE_IS_INCLUDE;
1355 return pmc->mca_sfcount[MCAST_EXCLUDE] == 1353 return pmc->mca_sfcount[MCAST_EXCLUDE] ==
1356 psf->sf_count[MCAST_EXCLUDE]; 1354 psf->sf_count[MCAST_EXCLUDE];
1357 } 1355 }
@@ -1966,7 +1964,7 @@ static void sf_markstate(struct ifmcaddr6 *pmc)
1966 1964
1967static int sf_setstate(struct ifmcaddr6 *pmc) 1965static int sf_setstate(struct ifmcaddr6 *pmc)
1968{ 1966{
1969 struct ip6_sf_list *psf; 1967 struct ip6_sf_list *psf, *dpsf;
1970 int mca_xcount = pmc->mca_sfcount[MCAST_EXCLUDE]; 1968 int mca_xcount = pmc->mca_sfcount[MCAST_EXCLUDE];
1971 int qrv = pmc->idev->mc_qrv; 1969 int qrv = pmc->idev->mc_qrv;
1972 int new_in, rv; 1970 int new_in, rv;
@@ -1978,8 +1976,48 @@ static int sf_setstate(struct ifmcaddr6 *pmc)
1978 !psf->sf_count[MCAST_INCLUDE]; 1976 !psf->sf_count[MCAST_INCLUDE];
1979 } else 1977 } else
1980 new_in = psf->sf_count[MCAST_INCLUDE] != 0; 1978 new_in = psf->sf_count[MCAST_INCLUDE] != 0;
1981 if (new_in != psf->sf_oldin) { 1979 if (new_in) {
1982 psf->sf_crcount = qrv; 1980 if (!psf->sf_oldin) {
1981 struct ip6_sf_list *prev = 0;
1982
1983 for (dpsf=pmc->mca_tomb; dpsf;
1984 dpsf=dpsf->sf_next) {
1985 if (ipv6_addr_equal(&dpsf->sf_addr,
1986 &psf->sf_addr))
1987 break;
1988 prev = dpsf;
1989 }
1990 if (dpsf) {
1991 if (prev)
1992 prev->sf_next = dpsf->sf_next;
1993 else
1994 pmc->mca_tomb = dpsf->sf_next;
1995 kfree(dpsf);
1996 }
1997 psf->sf_crcount = qrv;
1998 rv++;
1999 }
2000 } else if (psf->sf_oldin) {
2001 psf->sf_crcount = 0;
2002 /*
2003 * add or update "delete" records if an active filter
2004 * is now inactive
2005 */
2006 for (dpsf=pmc->mca_tomb; dpsf; dpsf=dpsf->sf_next)
2007 if (ipv6_addr_equal(&dpsf->sf_addr,
2008 &psf->sf_addr))
2009 break;
2010 if (!dpsf) {
2011 dpsf = (struct ip6_sf_list *)
2012 kmalloc(sizeof(*dpsf), GFP_ATOMIC);
2013 if (!dpsf)
2014 continue;
2015 *dpsf = *psf;
2016 /* pmc->mca_lock held by callers */
2017 dpsf->sf_next = pmc->mca_tomb;
2018 pmc->mca_tomb = dpsf;
2019 }
2020 dpsf->sf_crcount = qrv;
1983 rv++; 2021 rv++;
1984 } 2022 }
1985 } 2023 }
diff --git a/net/key/af_key.c b/net/key/af_key.c
index 43f1ce74187d..ae86d237a456 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -1620,6 +1620,7 @@ static int key_notify_sa_flush(struct km_event *c)
1620 return -ENOBUFS; 1620 return -ENOBUFS;
1621 hdr = (struct sadb_msg *) skb_put(skb, sizeof(struct sadb_msg)); 1621 hdr = (struct sadb_msg *) skb_put(skb, sizeof(struct sadb_msg));
1622 hdr->sadb_msg_satype = pfkey_proto2satype(c->data.proto); 1622 hdr->sadb_msg_satype = pfkey_proto2satype(c->data.proto);
1623 hdr->sadb_msg_type = SADB_FLUSH;
1623 hdr->sadb_msg_seq = c->seq; 1624 hdr->sadb_msg_seq = c->seq;
1624 hdr->sadb_msg_pid = c->pid; 1625 hdr->sadb_msg_pid = c->pid;
1625 hdr->sadb_msg_version = PF_KEY_V2; 1626 hdr->sadb_msg_version = PF_KEY_V2;
@@ -2385,6 +2386,7 @@ static int key_notify_policy_flush(struct km_event *c)
2385 if (!skb_out) 2386 if (!skb_out)
2386 return -ENOBUFS; 2387 return -ENOBUFS;
2387 hdr = (struct sadb_msg *) skb_put(skb_out, sizeof(struct sadb_msg)); 2388 hdr = (struct sadb_msg *) skb_put(skb_out, sizeof(struct sadb_msg));
2389 hdr->sadb_msg_type = SADB_X_SPDFLUSH;
2388 hdr->sadb_msg_seq = c->seq; 2390 hdr->sadb_msg_seq = c->seq;
2389 hdr->sadb_msg_pid = c->pid; 2391 hdr->sadb_msg_pid = c->pid;
2390 hdr->sadb_msg_version = PF_KEY_V2; 2392 hdr->sadb_msg_version = PF_KEY_V2;
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index ee93abc71cb8..9db7dbdb16e6 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -365,7 +365,7 @@ static int packet_sendmsg_spkt(struct kiocb *iocb, struct socket *sock,
365 */ 365 */
366 366
367 err = -EMSGSIZE; 367 err = -EMSGSIZE;
368 if(len>dev->mtu+dev->hard_header_len) 368 if (len > dev->mtu + dev->hard_header_len)
369 goto out_unlock; 369 goto out_unlock;
370 370
371 err = -ENOBUFS; 371 err = -ENOBUFS;
@@ -935,7 +935,7 @@ static int packet_bind_spkt(struct socket *sock, struct sockaddr *uaddr, int add
935 * Check legality 935 * Check legality
936 */ 936 */
937 937
938 if(addr_len!=sizeof(struct sockaddr)) 938 if (addr_len != sizeof(struct sockaddr))
939 return -EINVAL; 939 return -EINVAL;
940 strlcpy(name,uaddr->sa_data,sizeof(name)); 940 strlcpy(name,uaddr->sa_data,sizeof(name));
941 941
@@ -1092,7 +1092,7 @@ static int packet_recvmsg(struct kiocb *iocb, struct socket *sock,
1092 * retries. 1092 * retries.
1093 */ 1093 */
1094 1094
1095 if(skb==NULL) 1095 if (skb == NULL)
1096 goto out; 1096 goto out;
1097 1097
1098 /* 1098 /*
@@ -1392,8 +1392,8 @@ static int packet_getsockopt(struct socket *sock, int level, int optname,
1392 if (level != SOL_PACKET) 1392 if (level != SOL_PACKET)
1393 return -ENOPROTOOPT; 1393 return -ENOPROTOOPT;
1394 1394
1395 if (get_user(len,optlen)) 1395 if (get_user(len, optlen))
1396 return -EFAULT; 1396 return -EFAULT;
1397 1397
1398 if (len < 0) 1398 if (len < 0)
1399 return -EINVAL; 1399 return -EINVAL;
@@ -1419,9 +1419,9 @@ static int packet_getsockopt(struct socket *sock, int level, int optname,
1419 return -ENOPROTOOPT; 1419 return -ENOPROTOOPT;
1420 } 1420 }
1421 1421
1422 if (put_user(len, optlen)) 1422 if (put_user(len, optlen))
1423 return -EFAULT; 1423 return -EFAULT;
1424 return 0; 1424 return 0;
1425} 1425}
1426 1426
1427 1427
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index 71c9a961c321..2b9a832b29a7 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -884,7 +884,7 @@ sctp_disposition_t sctp_sf_sendbeat_8_3(const struct sctp_endpoint *ep,
884{ 884{
885 struct sctp_transport *transport = (struct sctp_transport *) arg; 885 struct sctp_transport *transport = (struct sctp_transport *) arg;
886 886
887 if (asoc->overall_error_count > asoc->max_retrans) { 887 if (asoc->overall_error_count >= asoc->max_retrans) {
888 /* CMD_ASSOC_FAILED calls CMD_DELETE_TCB. */ 888 /* CMD_ASSOC_FAILED calls CMD_DELETE_TCB. */
889 sctp_add_cmd_sf(commands, SCTP_CMD_ASSOC_FAILED, 889 sctp_add_cmd_sf(commands, SCTP_CMD_ASSOC_FAILED,
890 SCTP_U32(SCTP_ERROR_NO_ERROR)); 890 SCTP_U32(SCTP_ERROR_NO_ERROR));
@@ -2122,7 +2122,7 @@ static sctp_disposition_t sctp_sf_do_5_2_6_stale(const struct sctp_endpoint *ep,
2122 struct sctp_bind_addr *bp; 2122 struct sctp_bind_addr *bp;
2123 int attempts = asoc->init_err_counter + 1; 2123 int attempts = asoc->init_err_counter + 1;
2124 2124
2125 if (attempts >= asoc->max_init_attempts) { 2125 if (attempts > asoc->max_init_attempts) {
2126 sctp_add_cmd_sf(commands, SCTP_CMD_INIT_FAILED, 2126 sctp_add_cmd_sf(commands, SCTP_CMD_INIT_FAILED,
2127 SCTP_U32(SCTP_ERROR_STALE_COOKIE)); 2127 SCTP_U32(SCTP_ERROR_STALE_COOKIE));
2128 return SCTP_DISPOSITION_DELETE_TCB; 2128 return SCTP_DISPOSITION_DELETE_TCB;
@@ -4640,7 +4640,7 @@ sctp_disposition_t sctp_sf_t1_init_timer_expire(const struct sctp_endpoint *ep,
4640 4640
4641 SCTP_DEBUG_PRINTK("Timer T1 expired (INIT).\n"); 4641 SCTP_DEBUG_PRINTK("Timer T1 expired (INIT).\n");
4642 4642
4643 if (attempts < asoc->max_init_attempts) { 4643 if (attempts <= asoc->max_init_attempts) {
4644 bp = (struct sctp_bind_addr *) &asoc->base.bind_addr; 4644 bp = (struct sctp_bind_addr *) &asoc->base.bind_addr;
4645 repl = sctp_make_init(asoc, bp, GFP_ATOMIC, 0); 4645 repl = sctp_make_init(asoc, bp, GFP_ATOMIC, 0);
4646 if (!repl) 4646 if (!repl)
@@ -4697,7 +4697,7 @@ sctp_disposition_t sctp_sf_t1_cookie_timer_expire(const struct sctp_endpoint *ep
4697 4697
4698 SCTP_DEBUG_PRINTK("Timer T1 expired (COOKIE-ECHO).\n"); 4698 SCTP_DEBUG_PRINTK("Timer T1 expired (COOKIE-ECHO).\n");
4699 4699
4700 if (attempts < asoc->max_init_attempts) { 4700 if (attempts <= asoc->max_init_attempts) {
4701 repl = sctp_make_cookie_echo(asoc, NULL); 4701 repl = sctp_make_cookie_echo(asoc, NULL);
4702 if (!repl) 4702 if (!repl)
4703 return SCTP_DISPOSITION_NOMEM; 4703 return SCTP_DISPOSITION_NOMEM;
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index fb1821d9f338..0ea947eb6813 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -5426,7 +5426,7 @@ out:
5426 return err; 5426 return err;
5427 5427
5428do_error: 5428do_error:
5429 if (asoc->init_err_counter + 1 >= asoc->max_init_attempts) 5429 if (asoc->init_err_counter + 1 > asoc->max_init_attempts)
5430 err = -ETIMEDOUT; 5430 err = -ETIMEDOUT;
5431 else 5431 else
5432 err = -ECONNREFUSED; 5432 err = -ECONNREFUSED;
diff --git a/security/seclvl.c b/security/seclvl.c
index 1caac0164643..8529ea6f7aa8 100644
--- a/security/seclvl.c
+++ b/security/seclvl.c
@@ -368,8 +368,8 @@ static int seclvl_capable(struct task_struct *tsk, int cap)
368 */ 368 */
369static int seclvl_settime(struct timespec *tv, struct timezone *tz) 369static int seclvl_settime(struct timespec *tv, struct timezone *tz)
370{ 370{
371 struct timespec now; 371 if (tv && seclvl > 1) {
372 if (seclvl > 1) { 372 struct timespec now;
373 now = current_kernel_time(); 373 now = current_kernel_time();
374 if (tv->tv_sec < now.tv_sec || 374 if (tv->tv_sec < now.tv_sec ||
375 (tv->tv_sec == now.tv_sec && tv->tv_nsec < now.tv_nsec)) { 375 (tv->tv_sec == now.tv_sec && tv->tv_nsec < now.tv_nsec)) {