aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--Documentation/feature-removal-schedule.txt13
-rw-r--r--Documentation/kernel-parameters.txt8
-rw-r--r--Documentation/networking/ip-sysctl.txt12
-rw-r--r--MAINTAINERS10
-rw-r--r--Makefile11
-rw-r--r--arch/arm/configs/pnx4008_defconfig715
-rw-r--r--arch/arm/mach-s3c2410/Kconfig8
-rw-r--r--arch/arm/mach-s3c2410/irq.h5
-rw-r--r--arch/arm/mach-s3c2410/s3c2412.c29
-rw-r--r--arch/arm/mm/proc-xscale.S2
-rw-r--r--arch/i386/kernel/entry.S4
-rw-r--r--arch/i386/kernel/setup.c32
-rw-r--r--arch/i386/oprofile/nmi_int.c2
-rw-r--r--arch/i386/pci/common.c5
-rw-r--r--arch/i386/pci/mmconfig.c34
-rw-r--r--arch/i386/pci/pci.h3
-rw-r--r--arch/sparc/kernel/sys_sparc.c10
-rw-r--r--arch/sparc64/kernel/sys_sparc.c10
-rw-r--r--arch/x86_64/kernel/e820.c29
-rw-r--r--arch/x86_64/pci/mmconfig.c34
-rw-r--r--drivers/atm/he.c11
-rw-r--r--drivers/char/hvc_console.c1
-rw-r--r--drivers/char/ipmi/ipmi_si_intf.c9
-rw-r--r--drivers/infiniband/core/cma.c2
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_multicast.c1
-rw-r--r--drivers/infiniband/ulp/srp/ib_srp.c14
-rw-r--r--drivers/mtd/chips/cfi_cmdset_0001.c87
-rw-r--r--drivers/mtd/chips/cfi_cmdset_0002.c111
-rw-r--r--drivers/mtd/chips/jedec_probe.c14
-rw-r--r--drivers/mtd/devices/block2mtd.c93
-rw-r--r--drivers/mtd/devices/m25p80.c12
-rw-r--r--drivers/mtd/devices/pmc551.c4
-rw-r--r--drivers/mtd/maps/Kconfig12
-rw-r--r--drivers/mtd/mtdchar.c9
-rw-r--r--drivers/mtd/nand/Kconfig2
-rw-r--r--drivers/mtd/nand/nand_base.c6
-rw-r--r--drivers/mtd/nand/sharpsl.c7
-rw-r--r--drivers/net/e1000/e1000_main.c8
-rw-r--r--drivers/net/mv643xx_eth.c2
-rw-r--r--drivers/net/wireless/zd1211rw/zd_chip.c61
-rw-r--r--drivers/net/wireless/zd1211rw/zd_mac.c43
-rw-r--r--drivers/net/wireless/zd1211rw/zd_mac.h11
-rw-r--r--drivers/s390/net/Kconfig9
-rw-r--r--drivers/s390/net/Makefile1
-rw-r--r--drivers/s390/net/ctcmain.c3
-rw-r--r--drivers/s390/net/iucv.c4
-rw-r--r--drivers/s390/net/lcs.c13
-rw-r--r--drivers/s390/net/netiucv.c80
-rw-r--r--drivers/s390/net/qeth.h73
-rw-r--r--drivers/s390/net/qeth_eddp.c5
-rw-r--r--drivers/s390/net/qeth_main.c517
-rw-r--r--drivers/s390/net/qeth_proc.c23
-rw-r--r--drivers/s390/net/qeth_sys.c64
-rw-r--r--drivers/s390/net/qeth_tso.h2
-rw-r--r--drivers/sbus/char/openprom.c13
-rw-r--r--drivers/serial/s3c2410.c2
-rw-r--r--fs/ext2/balloc.c1
-rw-r--r--fs/ext2/ialloc.c1
-rw-r--r--fs/ext2/super.c41
-rw-r--r--fs/ext3/inode.c2
-rw-r--r--fs/ext3/super.c42
-rw-r--r--fs/jffs2/nodelist.c6
-rw-r--r--fs/jffs2/nodelist.h1
-rw-r--r--fs/jffs2/summary.c5
-rw-r--r--fs/jffs2/xattr.c1
-rw-r--r--fs/nfs/nfs4proc.c6
-rw-r--r--fs/nfs/read.c6
-rw-r--r--fs/nfs/write.c4
-rw-r--r--include/asm-alpha/Kbuild2
-rw-r--r--include/asm-alpha/compiler.h3
-rw-r--r--include/asm-alpha/page.h6
-rw-r--r--include/asm-arm/arch-s3c2410/regs-power.h34
-rw-r--r--include/asm-arm/elf.h2
-rw-r--r--include/asm-arm/page.h4
-rw-r--r--include/asm-i386/system.h8
-rw-r--r--include/asm-i386/unistd.h4
-rw-r--r--include/asm-ia64/Kbuild2
-rw-r--r--include/asm-ia64/page.h4
-rw-r--r--include/asm-ia64/ptrace.h10
-rw-r--r--include/asm-ia64/ustack.h7
-rw-r--r--include/asm-m68k/page.h8
-rw-r--r--include/asm-parisc/page.h18
-rw-r--r--include/asm-s390/debug.h2
-rw-r--r--include/asm-s390/elf.h28
-rw-r--r--include/asm-x86_64/elf.h20
-rw-r--r--include/asm-x86_64/signal.h2
-rw-r--r--include/asm-x86_64/unistd.h16
-rw-r--r--include/asm-x86_64/vsyscall.h3
-rw-r--r--include/linux/mtd/cfi.h13
-rw-r--r--include/linux/netfilter/Kbuild2
-rw-r--r--init/Kconfig56
-rw-r--r--kernel/irq/chip.c6
-rw-r--r--kernel/irq/resend.c3
-rw-r--r--kernel/kmod.c5
-rw-r--r--net/Kconfig2
-rw-r--r--net/atm/clip.c2
-rw-r--r--net/bridge/br_stp_bpdu.c2
-rw-r--r--net/core/neighbour.c3
-rw-r--r--net/ipv4/fib_trie.c8
-rw-r--r--net/ipv4/ipvs/ip_vs_ftp.c27
-rw-r--r--net/ipv4/tcp_input.c2
-rw-r--r--net/ipv4/tcp_lp.c35
-rw-r--r--net/ipv6/datagram.c2
-rw-r--r--net/ipv6/icmp.c4
-rw-r--r--net/ipv6/ipv6_sockglue.c4
-rw-r--r--net/ipv6/raw.c2
-rw-r--r--net/netfilter/xt_quota.c2
-rw-r--r--net/packet/af_packet.c4
-rw-r--r--net/sched/sch_generic.c2
-rw-r--r--scripts/Makefile.headersinst8
-rw-r--r--scripts/Makefile.host2
112 files changed, 1501 insertions, 1302 deletions
diff --git a/.gitignore b/.gitignore
index b1f5b9df2ae1..e1d5c17c12c2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,6 +12,9 @@
12*.ko 12*.ko
13*.so 13*.so
14*.mod.c 14*.mod.c
15*.i
16*.lst
17*.symtypes
15 18
16# 19#
17# Top-level generic files 20# Top-level generic files
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index d1cd5f93e028..552507fe9a7e 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -281,3 +281,16 @@ Why: The deferred output hooks are a layering violation causing unusual
281Who: Patrick McHardy <kaber@trash.net> 281Who: Patrick McHardy <kaber@trash.net>
282 282
283--------------------------- 283---------------------------
284
285What: frame diverter
286When: November 2006
287Why: The frame diverter is included in most distribution kernels, but is
288 broken. It does not correctly handle many things:
289 - IPV6
290 - non-linear skb's
291 - network device RCU on removal
292 - input frames not correctly checked for protocol errors
293 It also adds allocation overhead even if not enabled.
294 It is not clear if anyone is still using it.
295Who: Stephen Hemminger <shemminger@osdl.org>
296
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 7947cede8712..71d05f481727 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -697,6 +697,12 @@ running once the system is up.
697 ips= [HW,SCSI] Adaptec / IBM ServeRAID controller 697 ips= [HW,SCSI] Adaptec / IBM ServeRAID controller
698 See header of drivers/scsi/ips.c. 698 See header of drivers/scsi/ips.c.
699 699
700 ports= [IP_VS_FTP] IPVS ftp helper module
701 Default is 21.
702 Up to 8 (IP_VS_APP_MAX_PORTS) ports
703 may be specified.
704 Format: <port>,<port>....
705
700 irqfixup [HW] 706 irqfixup [HW]
701 When an interrupt is not handled search all handlers 707 When an interrupt is not handled search all handlers
702 for it. Intended to get systems with badly broken 708 for it. Intended to get systems with badly broken
@@ -1183,8 +1189,6 @@ running once the system is up.
1183 Mechanism 2. 1189 Mechanism 2.
1184 nommconf [IA-32,X86_64] Disable use of MMCONFIG for PCI 1190 nommconf [IA-32,X86_64] Disable use of MMCONFIG for PCI
1185 Configuration 1191 Configuration
1186 mmconf [IA-32,X86_64] Force MMCONFIG. This is useful
1187 to override the builtin blacklist.
1188 nomsi [MSI] If the PCI_MSI kernel config parameter is 1192 nomsi [MSI] If the PCI_MSI kernel config parameter is
1189 enabled, this kernel boot option can be used to 1193 enabled, this kernel boot option can be used to
1190 disable the use of MSI interrupts system-wide. 1194 disable the use of MSI interrupts system-wide.
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
index 3e0c017e7877..90ed78110fd4 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -102,9 +102,15 @@ inet_peer_gc_maxtime - INTEGER
102TCP variables: 102TCP variables:
103 103
104tcp_abc - INTEGER 104tcp_abc - INTEGER
105 Controls Appropriate Byte Count defined in RFC3465. If set to 105 Controls Appropriate Byte Count (ABC) defined in RFC3465.
106 0 then does congestion avoid once per ack. 1 is conservative 106 ABC is a way of increasing congestion window (cwnd) more slowly
107 value, and 2 is more agressive. 107 in response to partial acknowledgments.
108 Possible values are:
109 0 increase cwnd once per acknowledgment (no ABC)
110 1 increase cwnd once per acknowledgment of full sized segment
111 2 allow increase cwnd by two if acknowledgment is
112 of two segments to compensate for delayed acknowledgments.
113 Default: 0 (off)
108 114
109tcp_syn_retries - INTEGER 115tcp_syn_retries - INTEGER
110 Number of times initial SYNs for an active TCP connection attempt 116 Number of times initial SYNs for an active TCP connection attempt
diff --git a/MAINTAINERS b/MAINTAINERS
index 7e86286ddf1e..11b59d2c7cf5 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -416,7 +416,7 @@ S: Supported
416ATM 416ATM
417P: Chas Williams 417P: Chas Williams
418M: chas@cmf.nrl.navy.mil 418M: chas@cmf.nrl.navy.mil
419L: linux-atm-general@lists.sourceforge.net 419L: linux-atm-general@lists.sourceforge.net (subscribers-only)
420W: http://linux-atm.sourceforge.net 420W: http://linux-atm.sourceforge.net
421S: Maintained 421S: Maintained
422 422
@@ -2817,6 +2817,14 @@ M: hadi@cyberus.ca
2817L: netdev@vger.kernel.org 2817L: netdev@vger.kernel.org
2818S: Maintained 2818S: Maintained
2819 2819
2820TCP LOW PRIORITY MODULE
2821P: Wong Hoi Sing, Edison
2822M: hswong3i@gmail.com
2823P: Hung Hing Lun, Mike
2824M: hlhung3i@gmail.com
2825W: http://tcp-lp-mod.sourceforge.net/
2826S: Maintained
2827
2820TI OMAP RANDOM NUMBER GENERATOR SUPPORT 2828TI OMAP RANDOM NUMBER GENERATOR SUPPORT
2821P: Deepak Saxena 2829P: Deepak Saxena
2822M: dsaxena@plexity.net 2830M: dsaxena@plexity.net
diff --git a/Makefile b/Makefile
index eab5a8c2ee49..edfc2fdf76c9 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,8 @@
1VERSION = 2 1VERSION = 2
2PATCHLEVEL = 6 2PATCHLEVEL = 6
3SUBLEVEL = 18 3SUBLEVEL = 18
4EXTRAVERSION = -rc7 4EXTRAVERSION =
5NAME=Crazed Snow-Weasel 5NAME=Avast! A bilge rat!
6 6
7# *DOCUMENTATION* 7# *DOCUMENTATION*
8# To see a list of typical targets execute "make help" 8# To see a list of typical targets execute "make help"
@@ -889,7 +889,7 @@ depend dep:
889 889
890# --------------------------------------------------------------------------- 890# ---------------------------------------------------------------------------
891# Kernel headers 891# Kernel headers
892INSTALL_HDR_PATH=$(MODLIB)/abi 892INSTALL_HDR_PATH=$(objtree)/usr
893export INSTALL_HDR_PATH 893export INSTALL_HDR_PATH
894 894
895PHONY += headers_install 895PHONY += headers_install
@@ -986,7 +986,7 @@ CLEAN_FILES += vmlinux System.map \
986 .tmp_kallsyms* .tmp_version .tmp_vmlinux* .tmp_System.map 986 .tmp_kallsyms* .tmp_version .tmp_vmlinux* .tmp_System.map
987 987
988# Directories & files removed with 'make mrproper' 988# Directories & files removed with 'make mrproper'
989MRPROPER_DIRS += include/config include2 989MRPROPER_DIRS += include/config include2 usr/include
990MRPROPER_FILES += .config .config.old include/asm .version .old_version \ 990MRPROPER_FILES += .config .config.old include/asm .version .old_version \
991 include/linux/autoconf.h include/linux/version.h \ 991 include/linux/autoconf.h include/linux/version.h \
992 include/linux/utsrelease.h \ 992 include/linux/utsrelease.h \
@@ -1077,11 +1077,12 @@ help:
1077 @echo ' kernelrelease - Output the release version string' 1077 @echo ' kernelrelease - Output the release version string'
1078 @echo ' kernelversion - Output the version stored in Makefile' 1078 @echo ' kernelversion - Output the version stored in Makefile'
1079 @echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH' 1079 @echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'
1080 @echo ' (default: /lib/modules/$$VERSION/abi)' 1080 @echo ' (default: $(INSTALL_HDR_PATH))'
1081 @echo '' 1081 @echo ''
1082 @echo 'Static analysers' 1082 @echo 'Static analysers'
1083 @echo ' checkstack - Generate a list of stack hogs' 1083 @echo ' checkstack - Generate a list of stack hogs'
1084 @echo ' namespacecheck - Name space analysis on compiled kernel' 1084 @echo ' namespacecheck - Name space analysis on compiled kernel'
1085 @echo ' headers_check - Sanity check on exported headers'
1085 @echo '' 1086 @echo ''
1086 @echo 'Kernel packaging:' 1087 @echo 'Kernel packaging:'
1087 @$(MAKE) $(build)=$(package-dir) help 1088 @$(MAKE) $(build)=$(package-dir) help
diff --git a/arch/arm/configs/pnx4008_defconfig b/arch/arm/configs/pnx4008_defconfig
index 8a078d479d57..a4989f44baaa 100644
--- a/arch/arm/configs/pnx4008_defconfig
+++ b/arch/arm/configs/pnx4008_defconfig
@@ -1,14 +1,18 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.17-rc1 3# Linux kernel version: 2.6.18-rc6
4# Thu Apr 6 17:05:58 2006 4# Mon Sep 11 13:59:24 2006
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_MMU=y 7CONFIG_MMU=y
8CONFIG_GENERIC_HARDIRQS=y
9CONFIG_HARDIRQS_SW_RESEND=y
10CONFIG_GENERIC_IRQ_PROBE=y
8CONFIG_RWSEM_GENERIC_SPINLOCK=y 11CONFIG_RWSEM_GENERIC_SPINLOCK=y
9CONFIG_GENERIC_HWEIGHT=y 12CONFIG_GENERIC_HWEIGHT=y
10CONFIG_GENERIC_CALIBRATE_DELAY=y 13CONFIG_GENERIC_CALIBRATE_DELAY=y
11CONFIG_VECTORS_BASE=0xffff0000 14CONFIG_VECTORS_BASE=0xffff0000
15CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
12 16
13# 17#
14# Code maturity level options 18# Code maturity level options
@@ -28,6 +32,7 @@ CONFIG_SYSVIPC=y
28CONFIG_POSIX_MQUEUE=y 32CONFIG_POSIX_MQUEUE=y
29CONFIG_BSD_PROCESS_ACCT=y 33CONFIG_BSD_PROCESS_ACCT=y
30# CONFIG_BSD_PROCESS_ACCT_V3 is not set 34# CONFIG_BSD_PROCESS_ACCT_V3 is not set
35# CONFIG_TASKSTATS is not set
31CONFIG_SYSCTL=y 36CONFIG_SYSCTL=y
32CONFIG_AUDIT=y 37CONFIG_AUDIT=y
33# CONFIG_IKCONFIG is not set 38# CONFIG_IKCONFIG is not set
@@ -44,14 +49,15 @@ CONFIG_PRINTK=y
44CONFIG_BUG=y 49CONFIG_BUG=y
45CONFIG_ELF_CORE=y 50CONFIG_ELF_CORE=y
46CONFIG_BASE_FULL=y 51CONFIG_BASE_FULL=y
52CONFIG_RT_MUTEXES=y
47CONFIG_FUTEX=y 53CONFIG_FUTEX=y
48CONFIG_EPOLL=y 54CONFIG_EPOLL=y
49CONFIG_SHMEM=y 55CONFIG_SHMEM=y
50CONFIG_SLAB=y 56CONFIG_SLAB=y
57CONFIG_VM_EVENT_COUNTERS=y
51# CONFIG_TINY_SHMEM is not set 58# CONFIG_TINY_SHMEM is not set
52CONFIG_BASE_SMALL=0 59CONFIG_BASE_SMALL=0
53# CONFIG_SLOB is not set 60# CONFIG_SLOB is not set
54CONFIG_OBSOLETE_INTERMODULE=m
55 61
56# 62#
57# Loadable module support 63# Loadable module support
@@ -84,18 +90,26 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
84# 90#
85# System Type 91# System Type
86# 92#
93# CONFIG_ARCH_AAEC2000 is not set
94# CONFIG_ARCH_INTEGRATOR is not set
95# CONFIG_ARCH_REALVIEW is not set
96# CONFIG_ARCH_VERSATILE is not set
97# CONFIG_ARCH_AT91 is not set
87# CONFIG_ARCH_CLPS7500 is not set 98# CONFIG_ARCH_CLPS7500 is not set
88# CONFIG_ARCH_CLPS711X is not set 99# CONFIG_ARCH_CLPS711X is not set
89# CONFIG_ARCH_CO285 is not set 100# CONFIG_ARCH_CO285 is not set
90# CONFIG_ARCH_EBSA110 is not set 101# CONFIG_ARCH_EBSA110 is not set
91# CONFIG_ARCH_EP93XX is not set 102# CONFIG_ARCH_EP93XX is not set
92# CONFIG_ARCH_FOOTBRIDGE is not set 103# CONFIG_ARCH_FOOTBRIDGE is not set
93# CONFIG_ARCH_INTEGRATOR is not set 104# CONFIG_ARCH_NETX is not set
105# CONFIG_ARCH_H720X is not set
106# CONFIG_ARCH_IMX is not set
94# CONFIG_ARCH_IOP3XX is not set 107# CONFIG_ARCH_IOP3XX is not set
95# CONFIG_ARCH_IXP4XX is not set 108# CONFIG_ARCH_IXP4XX is not set
96# CONFIG_ARCH_IXP2000 is not set 109# CONFIG_ARCH_IXP2000 is not set
97# CONFIG_ARCH_IXP23XX is not set 110# CONFIG_ARCH_IXP23XX is not set
98# CONFIG_ARCH_L7200 is not set 111# CONFIG_ARCH_L7200 is not set
112CONFIG_ARCH_PNX4008=y
99# CONFIG_ARCH_PXA is not set 113# CONFIG_ARCH_PXA is not set
100# CONFIG_ARCH_RPC is not set 114# CONFIG_ARCH_RPC is not set
101# CONFIG_ARCH_SA1100 is not set 115# CONFIG_ARCH_SA1100 is not set
@@ -103,13 +117,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
103# CONFIG_ARCH_SHARK is not set 117# CONFIG_ARCH_SHARK is not set
104# CONFIG_ARCH_LH7A40X is not set 118# CONFIG_ARCH_LH7A40X is not set
105# CONFIG_ARCH_OMAP is not set 119# CONFIG_ARCH_OMAP is not set
106# CONFIG_ARCH_VERSATILE is not set
107# CONFIG_ARCH_REALVIEW is not set
108# CONFIG_ARCH_IMX is not set
109# CONFIG_ARCH_H720X is not set
110# CONFIG_ARCH_AAEC2000 is not set
111# CONFIG_ARCH_AT91RM9200 is not set
112CONFIG_ARCH_PNX4008=y
113 120
114# 121#
115# Processor Type 122# Processor Type
@@ -138,15 +145,7 @@ CONFIG_ARM_THUMB=y
138# 145#
139# PCCARD (PCMCIA/CardBus) support 146# PCCARD (PCMCIA/CardBus) support
140# 147#
141CONFIG_PCCARD=m 148# CONFIG_PCCARD is not set
142# CONFIG_PCMCIA_DEBUG is not set
143CONFIG_PCMCIA=m
144CONFIG_PCMCIA_LOAD_CIS=y
145CONFIG_PCMCIA_IOCTL=y
146
147#
148# PC-card bridges
149#
150 149
151# 150#
152# Kernel Features 151# Kernel Features
@@ -164,13 +163,14 @@ CONFIG_FLATMEM=y
164CONFIG_FLAT_NODE_MEM_MAP=y 163CONFIG_FLAT_NODE_MEM_MAP=y
165# CONFIG_SPARSEMEM_STATIC is not set 164# CONFIG_SPARSEMEM_STATIC is not set
166CONFIG_SPLIT_PTLOCK_CPUS=4096 165CONFIG_SPLIT_PTLOCK_CPUS=4096
166# CONFIG_RESOURCES_64BIT is not set
167CONFIG_ALIGNMENT_TRAP=y 167CONFIG_ALIGNMENT_TRAP=y
168 168
169# 169#
170# Boot options 170# Boot options
171# 171#
172CONFIG_ZBOOT_ROM_TEXT=0 172CONFIG_ZBOOT_ROM_TEXT=0x0
173CONFIG_ZBOOT_ROM_BSS=0 173CONFIG_ZBOOT_ROM_BSS=0x0
174CONFIG_CMDLINE="mem=64M console=ttyS0,115200" 174CONFIG_CMDLINE="mem=64M console=ttyS0,115200"
175# CONFIG_XIP_KERNEL is not set 175# CONFIG_XIP_KERNEL is not set
176 176
@@ -181,7 +181,8 @@ CONFIG_CMDLINE="mem=64M console=ttyS0,115200"
181# 181#
182# At least one emulation must be selected 182# At least one emulation must be selected
183# 183#
184# CONFIG_FPE_NWFPE is not set 184CONFIG_FPE_NWFPE=y
185# CONFIG_FPE_NWFPE_XP is not set
185# CONFIG_FPE_FASTFPE is not set 186# CONFIG_FPE_FASTFPE is not set
186# CONFIG_VFP is not set 187# CONFIG_VFP is not set
187 188
@@ -199,7 +200,7 @@ CONFIG_BINFMT_MISC=m
199CONFIG_PM=y 200CONFIG_PM=y
200CONFIG_PM_LEGACY=y 201CONFIG_PM_LEGACY=y
201# CONFIG_PM_DEBUG is not set 202# CONFIG_PM_DEBUG is not set
202CONFIG_APM=m 203# CONFIG_APM is not set
203 204
204# 205#
205# Networking 206# Networking
@@ -210,12 +211,12 @@ CONFIG_NET=y
210# Networking options 211# Networking options
211# 212#
212# CONFIG_NETDEBUG is not set 213# CONFIG_NETDEBUG is not set
213CONFIG_PACKET=m 214CONFIG_PACKET=y
214CONFIG_PACKET_MMAP=y 215CONFIG_PACKET_MMAP=y
215CONFIG_UNIX=m 216CONFIG_UNIX=y
216CONFIG_XFRM=y 217CONFIG_XFRM=y
217CONFIG_XFRM_USER=m 218# CONFIG_XFRM_USER is not set
218CONFIG_NET_KEY=m 219# CONFIG_NET_KEY is not set
219CONFIG_INET=y 220CONFIG_INET=y
220CONFIG_IP_MULTICAST=y 221CONFIG_IP_MULTICAST=y
221CONFIG_IP_ADVANCED_ROUTER=y 222CONFIG_IP_ADVANCED_ROUTER=y
@@ -227,10 +228,12 @@ CONFIG_IP_ROUTE_FWMARK=y
227CONFIG_IP_ROUTE_MULTIPATH=y 228CONFIG_IP_ROUTE_MULTIPATH=y
228# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set 229# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
229CONFIG_IP_ROUTE_VERBOSE=y 230CONFIG_IP_ROUTE_VERBOSE=y
230# CONFIG_IP_PNP is not set 231CONFIG_IP_PNP=y
231CONFIG_NET_IPIP=m 232CONFIG_IP_PNP_DHCP=y
232CONFIG_NET_IPGRE=m 233CONFIG_IP_PNP_BOOTP=y
233CONFIG_NET_IPGRE_BROADCAST=y 234# CONFIG_IP_PNP_RARP is not set
235# CONFIG_NET_IPIP is not set
236# CONFIG_NET_IPGRE is not set
234CONFIG_IP_MROUTE=y 237CONFIG_IP_MROUTE=y
235CONFIG_IP_PIMSM_V1=y 238CONFIG_IP_PIMSM_V1=y
236CONFIG_IP_PIMSM_V2=y 239CONFIG_IP_PIMSM_V2=y
@@ -241,6 +244,8 @@ CONFIG_INET_ESP=m
241CONFIG_INET_IPCOMP=m 244CONFIG_INET_IPCOMP=m
242CONFIG_INET_XFRM_TUNNEL=m 245CONFIG_INET_XFRM_TUNNEL=m
243CONFIG_INET_TUNNEL=m 246CONFIG_INET_TUNNEL=m
247CONFIG_INET_XFRM_MODE_TRANSPORT=y
248CONFIG_INET_XFRM_MODE_TUNNEL=y
244CONFIG_INET_DIAG=y 249CONFIG_INET_DIAG=y
245CONFIG_INET_TCP_DIAG=y 250CONFIG_INET_TCP_DIAG=y
246# CONFIG_TCP_CONG_ADVANCED is not set 251# CONFIG_TCP_CONG_ADVANCED is not set
@@ -287,7 +292,10 @@ CONFIG_INET6_ESP=m
287CONFIG_INET6_IPCOMP=m 292CONFIG_INET6_IPCOMP=m
288CONFIG_INET6_XFRM_TUNNEL=m 293CONFIG_INET6_XFRM_TUNNEL=m
289CONFIG_INET6_TUNNEL=m 294CONFIG_INET6_TUNNEL=m
295CONFIG_INET6_XFRM_MODE_TRANSPORT=m
296CONFIG_INET6_XFRM_MODE_TUNNEL=m
290CONFIG_IPV6_TUNNEL=m 297CONFIG_IPV6_TUNNEL=m
298# CONFIG_NETWORK_SECMARK is not set
291CONFIG_NETFILTER=y 299CONFIG_NETFILTER=y
292# CONFIG_NETFILTER_DEBUG is not set 300# CONFIG_NETFILTER_DEBUG is not set
293CONFIG_BRIDGE_NETFILTER=y 301CONFIG_BRIDGE_NETFILTER=y
@@ -313,6 +321,7 @@ CONFIG_IP_NF_TFTP=m
313CONFIG_IP_NF_AMANDA=m 321CONFIG_IP_NF_AMANDA=m
314# CONFIG_IP_NF_PPTP is not set 322# CONFIG_IP_NF_PPTP is not set
315# CONFIG_IP_NF_H323 is not set 323# CONFIG_IP_NF_H323 is not set
324# CONFIG_IP_NF_SIP is not set
316CONFIG_IP_NF_QUEUE=m 325CONFIG_IP_NF_QUEUE=m
317 326
318# 327#
@@ -384,7 +393,7 @@ CONFIG_LLC2=m
384CONFIG_IPX=m 393CONFIG_IPX=m
385# CONFIG_IPX_INTERN is not set 394# CONFIG_IPX_INTERN is not set
386CONFIG_ATALK=m 395CONFIG_ATALK=m
387CONFIG_DEV_APPLETALK=y 396CONFIG_DEV_APPLETALK=m
388CONFIG_IPDDP=m 397CONFIG_IPDDP=m
389CONFIG_IPDDP_ENCAP=y 398CONFIG_IPDDP_ENCAP=y
390CONFIG_IPDDP_DECAP=y 399CONFIG_IPDDP_DECAP=y
@@ -445,110 +454,9 @@ CONFIG_NET_ESTIMATOR=y
445# Network testing 454# Network testing
446# 455#
447CONFIG_NET_PKTGEN=m 456CONFIG_NET_PKTGEN=m
448CONFIG_HAMRADIO=y 457# CONFIG_HAMRADIO is not set
449 458# CONFIG_IRDA is not set
450# 459# CONFIG_BT is not set
451# Packet Radio protocols
452#
453CONFIG_AX25=m
454# CONFIG_AX25_DAMA_SLAVE is not set
455CONFIG_NETROM=m
456CONFIG_ROSE=m
457
458#
459# AX.25 network device drivers
460#
461CONFIG_MKISS=m
462CONFIG_6PACK=m
463CONFIG_BPQETHER=m
464CONFIG_BAYCOM_SER_FDX=m
465CONFIG_BAYCOM_SER_HDX=m
466CONFIG_BAYCOM_PAR=m
467CONFIG_BAYCOM_EPP=m
468CONFIG_YAM=m
469CONFIG_IRDA=m
470
471#
472# IrDA protocols
473#
474CONFIG_IRLAN=m
475CONFIG_IRNET=m
476CONFIG_IRCOMM=m
477# CONFIG_IRDA_ULTRA is not set
478
479#
480# IrDA options
481#
482CONFIG_IRDA_CACHE_LAST_LSAP=y
483CONFIG_IRDA_FAST_RR=y
484CONFIG_IRDA_DEBUG=y
485
486#
487# Infrared-port device drivers
488#
489
490#
491# SIR device drivers
492#
493CONFIG_IRTTY_SIR=m
494
495#
496# Dongle support
497#
498CONFIG_DONGLE=y
499CONFIG_ESI_DONGLE=m
500CONFIG_ACTISYS_DONGLE=m
501CONFIG_TEKRAM_DONGLE=m
502# CONFIG_TOIM3232_DONGLE is not set
503CONFIG_LITELINK_DONGLE=m
504CONFIG_MA600_DONGLE=m
505CONFIG_GIRBIL_DONGLE=m
506CONFIG_MCP2120_DONGLE=m
507CONFIG_OLD_BELKIN_DONGLE=m
508CONFIG_ACT200L_DONGLE=m
509
510#
511# Old SIR device drivers
512#
513CONFIG_IRPORT_SIR=m
514
515#
516# Old Serial dongle support
517#
518# CONFIG_DONGLE_OLD is not set
519
520#
521# FIR device drivers
522#
523CONFIG_USB_IRDA=m
524CONFIG_SIGMATEL_FIR=m
525CONFIG_BT=m
526CONFIG_BT_L2CAP=m
527CONFIG_BT_SCO=m
528CONFIG_BT_RFCOMM=m
529CONFIG_BT_RFCOMM_TTY=y
530CONFIG_BT_BNEP=m
531CONFIG_BT_BNEP_MC_FILTER=y
532CONFIG_BT_BNEP_PROTO_FILTER=y
533CONFIG_BT_CMTP=m
534CONFIG_BT_HIDP=m
535
536#
537# Bluetooth device drivers
538#
539CONFIG_BT_HCIUSB=m
540CONFIG_BT_HCIUSB_SCO=y
541CONFIG_BT_HCIUART=m
542CONFIG_BT_HCIUART_H4=y
543CONFIG_BT_HCIUART_BCSP=y
544CONFIG_BT_HCIBCM203X=m
545# CONFIG_BT_HCIBPA10X is not set
546CONFIG_BT_HCIBFUSB=m
547CONFIG_BT_HCIDTL1=m
548CONFIG_BT_HCIBT3C=m
549CONFIG_BT_HCIBLUECARD=m
550CONFIG_BT_HCIBTUART=m
551CONFIG_BT_HCIVHCI=m
552CONFIG_IEEE80211=m 460CONFIG_IEEE80211=m
553# CONFIG_IEEE80211_DEBUG is not set 461# CONFIG_IEEE80211_DEBUG is not set
554# CONFIG_IEEE80211_CRYPT_WEP is not set 462# CONFIG_IEEE80211_CRYPT_WEP is not set
@@ -566,8 +474,9 @@ CONFIG_WIRELESS_EXT=y
566# 474#
567CONFIG_STANDALONE=y 475CONFIG_STANDALONE=y
568CONFIG_PREVENT_FIRMWARE_BUILD=y 476CONFIG_PREVENT_FIRMWARE_BUILD=y
569CONFIG_FW_LOADER=m 477CONFIG_FW_LOADER=y
570# CONFIG_DEBUG_DRIVER is not set 478# CONFIG_DEBUG_DRIVER is not set
479# CONFIG_SYS_HYPERVISOR is not set
571 480
572# 481#
573# Connector - unified userspace <-> kernelspace linker 482# Connector - unified userspace <-> kernelspace linker
@@ -577,11 +486,11 @@ CONFIG_FW_LOADER=m
577# 486#
578# Memory Technology Devices (MTD) 487# Memory Technology Devices (MTD)
579# 488#
580CONFIG_MTD=m 489CONFIG_MTD=y
581# CONFIG_MTD_DEBUG is not set 490# CONFIG_MTD_DEBUG is not set
582CONFIG_MTD_CONCAT=m 491CONFIG_MTD_CONCAT=y
583CONFIG_MTD_PARTITIONS=y 492CONFIG_MTD_PARTITIONS=y
584CONFIG_MTD_REDBOOT_PARTS=m 493CONFIG_MTD_REDBOOT_PARTS=y
585CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 494CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
586# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set 495# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
587# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set 496# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
@@ -591,22 +500,18 @@ CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
591# 500#
592# User Modules And Translation Layers 501# User Modules And Translation Layers
593# 502#
594CONFIG_MTD_CHAR=m 503CONFIG_MTD_CHAR=y
595CONFIG_MTD_BLOCK=m 504CONFIG_MTD_BLOCK=y
596CONFIG_MTD_BLOCK_RO=m 505# CONFIG_FTL is not set
597CONFIG_FTL=m 506# CONFIG_NFTL is not set
598CONFIG_NFTL=m 507# CONFIG_INFTL is not set
599CONFIG_NFTL_RW=y
600CONFIG_INFTL=m
601# CONFIG_RFD_FTL is not set 508# CONFIG_RFD_FTL is not set
602 509
603# 510#
604# RAM/ROM/Flash chip drivers 511# RAM/ROM/Flash chip drivers
605# 512#
606CONFIG_MTD_CFI=m 513# CONFIG_MTD_CFI is not set
607CONFIG_MTD_JEDECPROBE=m 514# CONFIG_MTD_JEDECPROBE is not set
608CONFIG_MTD_GEN_PROBE=m
609# CONFIG_MTD_CFI_ADV_OPTIONS is not set
610CONFIG_MTD_MAP_BANK_WIDTH_1=y 515CONFIG_MTD_MAP_BANK_WIDTH_1=y
611CONFIG_MTD_MAP_BANK_WIDTH_2=y 516CONFIG_MTD_MAP_BANK_WIDTH_2=y
612CONFIG_MTD_MAP_BANK_WIDTH_4=y 517CONFIG_MTD_MAP_BANK_WIDTH_4=y
@@ -617,36 +522,27 @@ CONFIG_MTD_CFI_I1=y
617CONFIG_MTD_CFI_I2=y 522CONFIG_MTD_CFI_I2=y
618# CONFIG_MTD_CFI_I4 is not set 523# CONFIG_MTD_CFI_I4 is not set
619# CONFIG_MTD_CFI_I8 is not set 524# CONFIG_MTD_CFI_I8 is not set
620CONFIG_MTD_CFI_INTELEXT=m 525# CONFIG_MTD_RAM is not set
621CONFIG_MTD_CFI_AMDSTD=m 526# CONFIG_MTD_ROM is not set
622CONFIG_MTD_CFI_STAA=m 527# CONFIG_MTD_ABSENT is not set
623CONFIG_MTD_CFI_UTIL=m
624CONFIG_MTD_RAM=m
625CONFIG_MTD_ROM=m
626CONFIG_MTD_ABSENT=m
627# CONFIG_MTD_OBSOLETE_CHIPS is not set 528# CONFIG_MTD_OBSOLETE_CHIPS is not set
628 529
629# 530#
630# Mapping drivers for chip access 531# Mapping drivers for chip access
631# 532#
632CONFIG_MTD_COMPLEX_MAPPINGS=y 533# CONFIG_MTD_COMPLEX_MAPPINGS is not set
633CONFIG_MTD_PHYSMAP=m
634CONFIG_MTD_PHYSMAP_START=0x8000000
635CONFIG_MTD_PHYSMAP_LEN=0x4000000
636CONFIG_MTD_PHYSMAP_BANKWIDTH=2
637# CONFIG_MTD_ARM_INTEGRATOR is not set
638# CONFIG_MTD_IMPA7 is not set
639# CONFIG_MTD_PLATRAM is not set 534# CONFIG_MTD_PLATRAM is not set
640 535
641# 536#
642# Self-contained MTD device drivers 537# Self-contained MTD device drivers
643# 538#
539# CONFIG_MTD_DATAFLASH is not set
540# CONFIG_MTD_M25P80 is not set
644CONFIG_MTD_SLRAM=m 541CONFIG_MTD_SLRAM=m
645CONFIG_MTD_PHRAM=m 542CONFIG_MTD_PHRAM=m
646CONFIG_MTD_MTDRAM=m 543CONFIG_MTD_MTDRAM=m
647CONFIG_MTDRAM_TOTAL_SIZE=4096 544CONFIG_MTDRAM_TOTAL_SIZE=4096
648CONFIG_MTDRAM_ERASE_SIZE=128 545CONFIG_MTDRAM_ERASE_SIZE=128
649CONFIG_MTD_BLKMTD=m
650# CONFIG_MTD_BLOCK2MTD is not set 546# CONFIG_MTD_BLOCK2MTD is not set
651 547
652# 548#
@@ -663,14 +559,12 @@ CONFIG_MTD_DOCPROBE_ADDRESS=0
663# 559#
664# NAND Flash Device Drivers 560# NAND Flash Device Drivers
665# 561#
666CONFIG_MTD_NAND=m 562CONFIG_MTD_NAND=y
667# CONFIG_MTD_NAND_VERIFY_WRITE is not set 563# CONFIG_MTD_NAND_VERIFY_WRITE is not set
668CONFIG_MTD_NAND_IDS=m 564# CONFIG_MTD_NAND_ECC_SMC is not set
669CONFIG_MTD_NAND_DISKONCHIP=m 565CONFIG_MTD_NAND_IDS=y
670# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set 566# CONFIG_MTD_NAND_DISKONCHIP is not set
671CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 567CONFIG_MTD_NAND_NANDSIM=m
672# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set
673# CONFIG_MTD_NAND_NANDSIM is not set
674 568
675# 569#
676# OneNAND Flash Device Drivers 570# OneNAND Flash Device Drivers
@@ -680,15 +574,7 @@ CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0
680# 574#
681# Parallel port support 575# Parallel port support
682# 576#
683CONFIG_PARPORT=m 577# CONFIG_PARPORT is not set
684CONFIG_PARPORT_PC=m
685CONFIG_PARPORT_PC_FIFO=y
686# CONFIG_PARPORT_PC_SUPERIO is not set
687CONFIG_PARPORT_PC_PCMCIA=m
688CONFIG_PARPORT_NOT_PC=y
689# CONFIG_PARPORT_ARC is not set
690# CONFIG_PARPORT_GSC is not set
691CONFIG_PARPORT_1284=y
692 578
693# 579#
694# Plug and Play support 580# Plug and Play support
@@ -697,45 +583,15 @@ CONFIG_PARPORT_1284=y
697# 583#
698# Block devices 584# Block devices
699# 585#
700CONFIG_PARIDE=m
701CONFIG_PARIDE_PARPORT=m
702
703#
704# Parallel IDE high-level drivers
705#
706CONFIG_PARIDE_PD=m
707CONFIG_PARIDE_PCD=m
708CONFIG_PARIDE_PF=m
709CONFIG_PARIDE_PT=m
710CONFIG_PARIDE_PG=m
711
712#
713# Parallel IDE protocol modules
714#
715CONFIG_PARIDE_ATEN=m
716CONFIG_PARIDE_BPCK=m
717CONFIG_PARIDE_BPCK6=m
718CONFIG_PARIDE_COMM=m
719CONFIG_PARIDE_DSTR=m
720CONFIG_PARIDE_FIT2=m
721CONFIG_PARIDE_FIT3=m
722CONFIG_PARIDE_EPAT=m
723# CONFIG_PARIDE_EPATC8 is not set
724CONFIG_PARIDE_EPIA=m
725CONFIG_PARIDE_FRIQ=m
726CONFIG_PARIDE_FRPW=m
727CONFIG_PARIDE_KBIC=m
728CONFIG_PARIDE_KTTI=m
729CONFIG_PARIDE_ON20=m
730CONFIG_PARIDE_ON26=m
731# CONFIG_BLK_DEV_COW_COMMON is not set 586# CONFIG_BLK_DEV_COW_COMMON is not set
732CONFIG_BLK_DEV_LOOP=m 587CONFIG_BLK_DEV_LOOP=y
733CONFIG_BLK_DEV_CRYPTOLOOP=m 588CONFIG_BLK_DEV_CRYPTOLOOP=y
734CONFIG_BLK_DEV_NBD=m 589CONFIG_BLK_DEV_NBD=y
735# CONFIG_BLK_DEV_UB is not set 590# CONFIG_BLK_DEV_UB is not set
736CONFIG_BLK_DEV_RAM=y 591CONFIG_BLK_DEV_RAM=y
737CONFIG_BLK_DEV_RAM_COUNT=16 592CONFIG_BLK_DEV_RAM_COUNT=16
738CONFIG_BLK_DEV_RAM_SIZE=8192 593CONFIG_BLK_DEV_RAM_SIZE=8192
594CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
739CONFIG_BLK_DEV_INITRD=y 595CONFIG_BLK_DEV_INITRD=y
740CONFIG_CDROM_PKTCDVD=m 596CONFIG_CDROM_PKTCDVD=m
741CONFIG_CDROM_PKTCDVD_BUFFERS=8 597CONFIG_CDROM_PKTCDVD_BUFFERS=8
@@ -743,34 +599,6 @@ CONFIG_CDROM_PKTCDVD_BUFFERS=8
743# CONFIG_ATA_OVER_ETH is not set 599# CONFIG_ATA_OVER_ETH is not set
744 600
745# 601#
746# ATA/ATAPI/MFM/RLL support
747#
748CONFIG_IDE=m
749CONFIG_BLK_DEV_IDE=m
750
751#
752# Please see Documentation/ide.txt for help/info on IDE drives
753#
754# CONFIG_BLK_DEV_IDE_SATA is not set
755CONFIG_BLK_DEV_IDEDISK=m
756# CONFIG_IDEDISK_MULTI_MODE is not set
757CONFIG_BLK_DEV_IDECS=m
758CONFIG_BLK_DEV_IDECD=m
759CONFIG_BLK_DEV_IDETAPE=m
760CONFIG_BLK_DEV_IDEFLOPPY=m
761CONFIG_BLK_DEV_IDESCSI=m
762# CONFIG_IDE_TASK_IOCTL is not set
763
764#
765# IDE chipset support/bugfixes
766#
767CONFIG_IDE_GENERIC=m
768# CONFIG_IDE_ARM is not set
769# CONFIG_BLK_DEV_IDEDMA is not set
770# CONFIG_IDEDMA_AUTO is not set
771# CONFIG_BLK_DEV_HD is not set
772
773#
774# SCSI device support 602# SCSI device support
775# 603#
776# CONFIG_RAID_ATTRS is not set 604# CONFIG_RAID_ATTRS is not set
@@ -808,41 +636,12 @@ CONFIG_SCSI_FC_ATTRS=m
808# 636#
809# CONFIG_ISCSI_TCP is not set 637# CONFIG_ISCSI_TCP is not set
810CONFIG_SCSI_SATA=m 638CONFIG_SCSI_SATA=m
811CONFIG_SCSI_PPA=m
812CONFIG_SCSI_IMM=m
813# CONFIG_SCSI_IZIP_EPP16 is not set
814# CONFIG_SCSI_IZIP_SLOW_CTR is not set
815CONFIG_SCSI_DEBUG=m 639CONFIG_SCSI_DEBUG=m
816 640
817# 641#
818# PCMCIA SCSI adapter support
819#
820CONFIG_PCMCIA_AHA152X=m
821CONFIG_PCMCIA_FDOMAIN=m
822CONFIG_PCMCIA_NINJA_SCSI=m
823CONFIG_PCMCIA_QLOGIC=m
824CONFIG_PCMCIA_SYM53C500=m
825
826#
827# Multi-device support (RAID and LVM) 642# Multi-device support (RAID and LVM)
828# 643#
829CONFIG_MD=y 644# CONFIG_MD is not set
830CONFIG_BLK_DEV_MD=m
831CONFIG_MD_LINEAR=m
832CONFIG_MD_RAID0=m
833CONFIG_MD_RAID1=m
834CONFIG_MD_RAID10=m
835CONFIG_MD_RAID5=m
836# CONFIG_MD_RAID5_RESHAPE is not set
837CONFIG_MD_RAID6=m
838CONFIG_MD_MULTIPATH=m
839CONFIG_MD_FAULTY=m
840CONFIG_BLK_DEV_DM=m
841CONFIG_DM_CRYPT=m
842CONFIG_DM_SNAPSHOT=m
843CONFIG_DM_MIRROR=m
844CONFIG_DM_ZERO=m
845# CONFIG_DM_MULTIPATH is not set
846 645
847# 646#
848# Fusion MPT device support 647# Fusion MPT device support
@@ -878,9 +677,6 @@ CONFIG_NET_ETHERNET=y
878CONFIG_MII=m 677CONFIG_MII=m
879# CONFIG_SMC91X is not set 678# CONFIG_SMC91X is not set
880# CONFIG_DM9000 is not set 679# CONFIG_DM9000 is not set
881CONFIG_NET_POCKET=y
882CONFIG_DE600=m
883CONFIG_DE620=m
884 680
885# 681#
886# Ethernet (1000 Mbit) 682# Ethernet (1000 Mbit)
@@ -904,49 +700,13 @@ CONFIG_NET_RADIO=y
904# Obsolete Wireless cards support (pre-802.11) 700# Obsolete Wireless cards support (pre-802.11)
905# 701#
906CONFIG_STRIP=m 702CONFIG_STRIP=m
907CONFIG_PCMCIA_WAVELAN=m 703# CONFIG_USB_ZD1201 is not set
908CONFIG_PCMCIA_NETWAVE=m
909
910#
911# Wireless 802.11 Frequency Hopping cards support
912#
913CONFIG_PCMCIA_RAYCS=m
914
915#
916# Wireless 802.11b ISA/PCI cards support
917#
918CONFIG_HERMES=m
919CONFIG_ATMEL=m
920
921#
922# Wireless 802.11b Pcmcia/Cardbus cards support
923#
924CONFIG_PCMCIA_HERMES=m
925# CONFIG_PCMCIA_SPECTRUM is not set
926CONFIG_AIRO_CS=m
927CONFIG_PCMCIA_ATMEL=m
928CONFIG_PCMCIA_WL3501=m
929# CONFIG_HOSTAP is not set 704# CONFIG_HOSTAP is not set
930CONFIG_NET_WIRELESS=y
931
932#
933# PCMCIA network device support
934#
935CONFIG_NET_PCMCIA=y
936CONFIG_PCMCIA_3C589=m
937CONFIG_PCMCIA_3C574=m
938CONFIG_PCMCIA_FMVJ18X=m
939CONFIG_PCMCIA_PCNET=m
940CONFIG_PCMCIA_NMCLAN=m
941CONFIG_PCMCIA_SMC91C92=m
942CONFIG_PCMCIA_XIRC2PS=m
943CONFIG_PCMCIA_AXNET=m
944 705
945# 706#
946# Wan interfaces 707# Wan interfaces
947# 708#
948CONFIG_WAN=y 709CONFIG_WAN=y
949CONFIG_SYNCLINK_SYNCPPP=m
950CONFIG_HDLC=m 710CONFIG_HDLC=m
951CONFIG_HDLC_RAW=y 711CONFIG_HDLC_RAW=y
952CONFIG_HDLC_RAW_ETH=y 712CONFIG_HDLC_RAW_ETH=y
@@ -966,7 +726,6 @@ CONFIG_X25_ASY=m
966# 726#
967# CONFIG_ATM_DUMMY is not set 727# CONFIG_ATM_DUMMY is not set
968CONFIG_ATM_TCP=m 728CONFIG_ATM_TCP=m
969CONFIG_PLIP=m
970CONFIG_PPP=m 729CONFIG_PPP=m
971CONFIG_PPP_MULTILINK=y 730CONFIG_PPP_MULTILINK=y
972CONFIG_PPP_FILTER=y 731CONFIG_PPP_FILTER=y
@@ -991,114 +750,7 @@ CONFIG_NET_POLL_CONTROLLER=y
991# 750#
992# ISDN subsystem 751# ISDN subsystem
993# 752#
994CONFIG_ISDN=m 753# CONFIG_ISDN is not set
995
996#
997# Old ISDN4Linux
998#
999CONFIG_ISDN_I4L=m
1000CONFIG_ISDN_PPP=y
1001CONFIG_ISDN_PPP_VJ=y
1002CONFIG_ISDN_MPP=y
1003CONFIG_IPPP_FILTER=y
1004CONFIG_ISDN_PPP_BSDCOMP=m
1005CONFIG_ISDN_AUDIO=y
1006CONFIG_ISDN_TTY_FAX=y
1007CONFIG_ISDN_X25=y
1008
1009#
1010# ISDN feature submodules
1011#
1012CONFIG_ISDN_DRV_LOOP=m
1013CONFIG_ISDN_DIVERSION=m
1014
1015#
1016# ISDN4Linux hardware drivers
1017#
1018
1019#
1020# Passive cards
1021#
1022CONFIG_ISDN_DRV_HISAX=m
1023
1024#
1025# D-channel protocol features
1026#
1027CONFIG_HISAX_EURO=y
1028CONFIG_DE_AOC=y
1029# CONFIG_HISAX_NO_SENDCOMPLETE is not set
1030# CONFIG_HISAX_NO_LLC is not set
1031# CONFIG_HISAX_NO_KEYPAD is not set
1032CONFIG_HISAX_1TR6=y
1033CONFIG_HISAX_NI1=y
1034CONFIG_HISAX_MAX_CARDS=8
1035
1036#
1037# HiSax supported cards
1038#
1039CONFIG_HISAX_16_3=y
1040CONFIG_HISAX_S0BOX=y
1041CONFIG_HISAX_FRITZPCI=y
1042CONFIG_HISAX_AVM_A1_PCMCIA=y
1043CONFIG_HISAX_ELSA=y
1044CONFIG_HISAX_DIEHLDIVA=y
1045CONFIG_HISAX_SEDLBAUER=y
1046CONFIG_HISAX_NICCY=y
1047CONFIG_HISAX_GAZEL=y
1048CONFIG_HISAX_HFC_SX=y
1049# CONFIG_HISAX_DEBUG is not set
1050
1051#
1052# HiSax PCMCIA card service modules
1053#
1054CONFIG_HISAX_SEDLBAUER_CS=m
1055CONFIG_HISAX_ELSA_CS=m
1056CONFIG_HISAX_AVM_A1_CS=m
1057CONFIG_HISAX_TELES_CS=m
1058
1059#
1060# HiSax sub driver modules
1061#
1062CONFIG_HISAX_ST5481=m
1063CONFIG_HISAX_HFCUSB=m
1064# CONFIG_HISAX_HFC4S8S is not set
1065CONFIG_HISAX_HDLC=y
1066
1067#
1068# Active cards
1069#
1070
1071#
1072# Siemens Gigaset
1073#
1074# CONFIG_ISDN_DRV_GIGASET is not set
1075
1076#
1077# CAPI subsystem
1078#
1079CONFIG_ISDN_CAPI=m
1080CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
1081CONFIG_ISDN_CAPI_MIDDLEWARE=y
1082CONFIG_ISDN_CAPI_CAPI20=m
1083CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
1084CONFIG_ISDN_CAPI_CAPIFS=m
1085CONFIG_ISDN_CAPI_CAPIDRV=m
1086
1087#
1088# CAPI hardware drivers
1089#
1090
1091#
1092# Active AVM cards
1093#
1094CONFIG_CAPI_AVM=y
1095CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
1096CONFIG_ISDN_DRV_AVMB1_AVM_CS=m
1097
1098#
1099# Active Eicon DIVA Server cards
1100#
1101CONFIG_CAPI_EICON=y
1102 754
1103# 755#
1104# Input device support 756# Input device support
@@ -1108,10 +760,7 @@ CONFIG_INPUT=y
1108# 760#
1109# Userland interfaces 761# Userland interfaces
1110# 762#
1111CONFIG_INPUT_MOUSEDEV=m 763# CONFIG_INPUT_MOUSEDEV is not set
1112CONFIG_INPUT_MOUSEDEV_PSAUX=y
1113CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
1114CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
1115CONFIG_INPUT_JOYDEV=m 764CONFIG_INPUT_JOYDEV=m
1116CONFIG_INPUT_TSDEV=m 765CONFIG_INPUT_TSDEV=m
1117CONFIG_INPUT_TSDEV_SCREEN_X=240 766CONFIG_INPUT_TSDEV_SCREEN_X=240
@@ -1153,11 +802,9 @@ CONFIG_JOYSTICK_SPACEORB=m
1153CONFIG_JOYSTICK_SPACEBALL=m 802CONFIG_JOYSTICK_SPACEBALL=m
1154CONFIG_JOYSTICK_STINGER=m 803CONFIG_JOYSTICK_STINGER=m
1155# CONFIG_JOYSTICK_TWIDJOY is not set 804# CONFIG_JOYSTICK_TWIDJOY is not set
1156CONFIG_JOYSTICK_DB9=m
1157CONFIG_JOYSTICK_GAMECON=m
1158CONFIG_JOYSTICK_TURBOGRAFX=m
1159CONFIG_JOYSTICK_JOYDUMP=m 805CONFIG_JOYSTICK_JOYDUMP=m
1160CONFIG_INPUT_TOUCHSCREEN=y 806CONFIG_INPUT_TOUCHSCREEN=y
807# CONFIG_TOUCHSCREEN_ADS7846 is not set
1161CONFIG_TOUCHSCREEN_GUNZE=m 808CONFIG_TOUCHSCREEN_GUNZE=m
1162# CONFIG_TOUCHSCREEN_ELO is not set 809# CONFIG_TOUCHSCREEN_ELO is not set
1163# CONFIG_TOUCHSCREEN_MTOUCH is not set 810# CONFIG_TOUCHSCREEN_MTOUCH is not set
@@ -1170,7 +817,6 @@ CONFIG_INPUT_UINPUT=m
1170# 817#
1171CONFIG_SERIO=y 818CONFIG_SERIO=y
1172CONFIG_SERIO_SERPORT=m 819CONFIG_SERIO_SERPORT=m
1173CONFIG_SERIO_PARKBD=m
1174CONFIG_SERIO_LIBPS2=y 820CONFIG_SERIO_LIBPS2=y
1175CONFIG_SERIO_RAW=m 821CONFIG_SERIO_RAW=m
1176CONFIG_GAMEPORT=m 822CONFIG_GAMEPORT=m
@@ -1183,32 +829,14 @@ CONFIG_GAMEPORT_L4=m
1183CONFIG_VT=y 829CONFIG_VT=y
1184CONFIG_VT_CONSOLE=y 830CONFIG_VT_CONSOLE=y
1185CONFIG_HW_CONSOLE=y 831CONFIG_HW_CONSOLE=y
1186CONFIG_SERIAL_NONSTANDARD=y 832# CONFIG_VT_HW_CONSOLE_BINDING is not set
1187CONFIG_COMPUTONE=m 833# CONFIG_SERIAL_NONSTANDARD is not set
1188CONFIG_ROCKETPORT=m
1189CONFIG_CYCLADES=m
1190# CONFIG_CYZ_INTR is not set
1191CONFIG_DIGIEPCA=m
1192CONFIG_MOXA_INTELLIO=m
1193CONFIG_MOXA_SMARTIO=m
1194# CONFIG_ISI is not set
1195CONFIG_SYNCLINKMP=m
1196CONFIG_N_HDLC=m
1197# CONFIG_RISCOM8 is not set
1198# CONFIG_SPECIALIX is not set
1199CONFIG_SX=m
1200CONFIG_RIO=m
1201CONFIG_RIO_OLDPCI=y
1202CONFIG_STALDRV=y
1203CONFIG_STALLION=m
1204CONFIG_ISTALLION=m
1205 834
1206# 835#
1207# Serial drivers 836# Serial drivers
1208# 837#
1209CONFIG_SERIAL_8250=y 838CONFIG_SERIAL_8250=y
1210CONFIG_SERIAL_8250_CONSOLE=y 839CONFIG_SERIAL_8250_CONSOLE=y
1211CONFIG_SERIAL_8250_CS=m
1212CONFIG_SERIAL_8250_NR_UARTS=4 840CONFIG_SERIAL_8250_NR_UARTS=4
1213CONFIG_SERIAL_8250_RUNTIME_UARTS=4 841CONFIG_SERIAL_8250_RUNTIME_UARTS=4
1214CONFIG_SERIAL_8250_EXTENDED=y 842CONFIG_SERIAL_8250_EXTENDED=y
@@ -1225,20 +853,11 @@ CONFIG_SERIAL_CORE_CONSOLE=y
1225CONFIG_UNIX98_PTYS=y 853CONFIG_UNIX98_PTYS=y
1226CONFIG_LEGACY_PTYS=y 854CONFIG_LEGACY_PTYS=y
1227CONFIG_LEGACY_PTY_COUNT=256 855CONFIG_LEGACY_PTY_COUNT=256
1228CONFIG_PRINTER=m
1229# CONFIG_LP_CONSOLE is not set
1230CONFIG_PPDEV=m
1231CONFIG_TIPAR=m
1232 856
1233# 857#
1234# IPMI 858# IPMI
1235# 859#
1236CONFIG_IPMI_HANDLER=m 860# CONFIG_IPMI_HANDLER is not set
1237# CONFIG_IPMI_PANIC_EVENT is not set
1238CONFIG_IPMI_DEVICE_INTERFACE=m
1239CONFIG_IPMI_SI=m
1240CONFIG_IPMI_WATCHDOG=m
1241CONFIG_IPMI_POWEROFF=m
1242 861
1243# 862#
1244# Watchdog Cards 863# Watchdog Cards
@@ -1255,22 +874,15 @@ CONFIG_SOFT_WATCHDOG=m
1255# USB-based Watchdog Cards 874# USB-based Watchdog Cards
1256# 875#
1257CONFIG_USBPCWATCHDOG=m 876CONFIG_USBPCWATCHDOG=m
1258CONFIG_NVRAM=m 877CONFIG_HW_RANDOM=y
1259CONFIG_DTLK=m 878# CONFIG_NVRAM is not set
1260CONFIG_R3964=m 879# CONFIG_DTLK is not set
880# CONFIG_R3964 is not set
1261 881
1262# 882#
1263# Ftape, the floppy tape device driver 883# Ftape, the floppy tape device driver
1264# 884#
1265 885# CONFIG_RAW_DRIVER is not set
1266#
1267# PCMCIA character devices
1268#
1269CONFIG_SYNCLINK_CS=m
1270# CONFIG_CARDMAN_4000 is not set
1271# CONFIG_CARDMAN_4040 is not set
1272CONFIG_RAW_DRIVER=m
1273CONFIG_MAX_RAW_DEVS=256
1274 886
1275# 887#
1276# TPM devices 888# TPM devices
@@ -1281,8 +893,8 @@ CONFIG_MAX_RAW_DEVS=256
1281# 893#
1282# I2C support 894# I2C support
1283# 895#
1284CONFIG_I2C=m 896CONFIG_I2C=y
1285CONFIG_I2C_CHARDEV=m 897CONFIG_I2C_CHARDEV=y
1286 898
1287# 899#
1288# I2C Algorithms 900# I2C Algorithms
@@ -1294,11 +906,10 @@ CONFIG_I2C_ALGOPCA=m
1294# 906#
1295# I2C Hardware Bus support 907# I2C Hardware Bus support
1296# 908#
1297CONFIG_I2C_ISA=m 909# CONFIG_I2C_OCORES is not set
1298CONFIG_I2C_PARPORT=m 910# CONFIG_I2C_PARPORT_LIGHT is not set
1299CONFIG_I2C_PARPORT_LIGHT=m 911# CONFIG_I2C_STUB is not set
1300CONFIG_I2C_STUB=m 912# CONFIG_I2C_PCA_ISA is not set
1301CONFIG_I2C_PCA_ISA=m
1302 913
1303# 914#
1304# Miscellaneous I2C Chip support 915# Miscellaneous I2C Chip support
@@ -1318,66 +929,28 @@ CONFIG_SENSORS_PCF8591=m
1318# 929#
1319# SPI support 930# SPI support
1320# 931#
1321# CONFIG_SPI is not set 932CONFIG_SPI=y
1322# CONFIG_SPI_MASTER is not set 933# CONFIG_SPI_DEBUG is not set
934CONFIG_SPI_MASTER=y
1323 935
1324# 936#
1325# Dallas's 1-wire bus 937# SPI Master Controller Drivers
1326# 938#
1327CONFIG_W1=m 939CONFIG_SPI_BITBANG=y
1328 940
1329# 941#
1330# 1-wire Bus Masters 942# SPI Protocol Masters
1331# 943#
1332# CONFIG_W1_MASTER_DS9490 is not set
1333# CONFIG_W1_MASTER_DS2482 is not set
1334 944
1335# 945#
1336# 1-wire Slaves 946# Dallas's 1-wire bus
1337# 947#
1338# CONFIG_W1_SLAVE_THERM is not set
1339# CONFIG_W1_SLAVE_SMEM is not set
1340# CONFIG_W1_SLAVE_DS2433 is not set
1341 948
1342# 949#
1343# Hardware Monitoring support 950# Hardware Monitoring support
1344# 951#
1345CONFIG_HWMON=y 952# CONFIG_HWMON is not set
1346CONFIG_HWMON_VID=m 953# CONFIG_HWMON_VID is not set
1347CONFIG_SENSORS_ADM1021=m
1348CONFIG_SENSORS_ADM1025=m
1349CONFIG_SENSORS_ADM1026=m
1350CONFIG_SENSORS_ADM1031=m
1351# CONFIG_SENSORS_ADM9240 is not set
1352CONFIG_SENSORS_ASB100=m
1353# CONFIG_SENSORS_ATXP1 is not set
1354CONFIG_SENSORS_DS1621=m
1355# CONFIG_SENSORS_F71805F is not set
1356CONFIG_SENSORS_FSCHER=m
1357# CONFIG_SENSORS_FSCPOS is not set
1358CONFIG_SENSORS_GL518SM=m
1359# CONFIG_SENSORS_GL520SM is not set
1360CONFIG_SENSORS_IT87=m
1361CONFIG_SENSORS_LM63=m
1362CONFIG_SENSORS_LM75=m
1363CONFIG_SENSORS_LM77=m
1364CONFIG_SENSORS_LM78=m
1365CONFIG_SENSORS_LM80=m
1366CONFIG_SENSORS_LM83=m
1367CONFIG_SENSORS_LM85=m
1368CONFIG_SENSORS_LM87=m
1369CONFIG_SENSORS_LM90=m
1370# CONFIG_SENSORS_LM92 is not set
1371CONFIG_SENSORS_MAX1619=m
1372CONFIG_SENSORS_PC87360=m
1373CONFIG_SENSORS_SMSC47M1=m
1374# CONFIG_SENSORS_SMSC47B397 is not set
1375CONFIG_SENSORS_W83781D=m
1376# CONFIG_SENSORS_W83792D is not set
1377CONFIG_SENSORS_W83L785TS=m
1378CONFIG_SENSORS_W83627HF=m
1379# CONFIG_SENSORS_W83627EHF is not set
1380# CONFIG_HWMON_DEBUG_CHIP is not set
1381 954
1382# 955#
1383# Misc devices 956# Misc devices
@@ -1389,9 +962,18 @@ CONFIG_SENSORS_W83627HF=m
1389# CONFIG_NEW_LEDS is not set 962# CONFIG_NEW_LEDS is not set
1390 963
1391# 964#
965# LED drivers
966#
967
968#
969# LED Triggers
970#
971
972#
1392# Multimedia devices 973# Multimedia devices
1393# 974#
1394# CONFIG_VIDEO_DEV is not set 975# CONFIG_VIDEO_DEV is not set
976CONFIG_VIDEO_V4L2=y
1395 977
1396# 978#
1397# Digital Video Broadcasting Devices 979# Digital Video Broadcasting Devices
@@ -1460,18 +1042,25 @@ CONFIG_DVB_TDA10021=m
1460CONFIG_DVB_STV0297=m 1042CONFIG_DVB_STV0297=m
1461 1043
1462# 1044#
1463# ATSC (North American/Korean Terresterial DTV) frontends 1045# ATSC (North American/Korean Terrestrial/Cable DTV) frontends
1464# 1046#
1465# CONFIG_DVB_NXT200X is not set 1047# CONFIG_DVB_NXT200X is not set
1466# CONFIG_DVB_OR51211 is not set 1048# CONFIG_DVB_OR51211 is not set
1467# CONFIG_DVB_OR51132 is not set 1049# CONFIG_DVB_OR51132 is not set
1468# CONFIG_DVB_BCM3510 is not set 1050# CONFIG_DVB_BCM3510 is not set
1469# CONFIG_DVB_LGDT330X is not set 1051# CONFIG_DVB_LGDT330X is not set
1052
1053#
1054# Miscellaneous devices
1055#
1056CONFIG_DVB_LNBP21=m
1057# CONFIG_DVB_ISL6421 is not set
1470# CONFIG_USB_DABUSB is not set 1058# CONFIG_USB_DABUSB is not set
1471 1059
1472# 1060#
1473# Graphics support 1061# Graphics support
1474# 1062#
1063CONFIG_FIRMWARE_EDID=y
1475# CONFIG_FB is not set 1064# CONFIG_FB is not set
1476 1065
1477# 1066#
@@ -1479,6 +1068,7 @@ CONFIG_DVB_STV0297=m
1479# 1068#
1480# CONFIG_VGA_CONSOLE is not set 1069# CONFIG_VGA_CONSOLE is not set
1481CONFIG_DUMMY_CONSOLE=y 1070CONFIG_DUMMY_CONSOLE=y
1071# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1482 1072
1483# 1073#
1484# Sound 1074# Sound
@@ -1526,17 +1116,12 @@ CONFIG_SND_MPU401=m
1526CONFIG_SND_USB_AUDIO=m 1116CONFIG_SND_USB_AUDIO=m
1527 1117
1528# 1118#
1529# PCMCIA devices
1530#
1531
1532#
1533# Open Sound System 1119# Open Sound System
1534# 1120#
1535CONFIG_SOUND_PRIME=m 1121CONFIG_SOUND_PRIME=m
1536# CONFIG_OBSOLETE_OSS_DRIVER is not set 1122# CONFIG_OSS_OBSOLETE_DRIVER is not set
1537# CONFIG_SOUND_MSNDCLAS is not set 1123# CONFIG_SOUND_MSNDCLAS is not set
1538# CONFIG_SOUND_MSNDPIN is not set 1124# CONFIG_SOUND_MSNDPIN is not set
1539CONFIG_SOUND_TVMIXER=m
1540 1125
1541# 1126#
1542# USB support 1127# USB support
@@ -1544,7 +1129,7 @@ CONFIG_SOUND_TVMIXER=m
1544CONFIG_USB_ARCH_HAS_HCD=y 1129CONFIG_USB_ARCH_HAS_HCD=y
1545# CONFIG_USB_ARCH_HAS_OHCI is not set 1130# CONFIG_USB_ARCH_HAS_OHCI is not set
1546# CONFIG_USB_ARCH_HAS_EHCI is not set 1131# CONFIG_USB_ARCH_HAS_EHCI is not set
1547CONFIG_USB=m 1132CONFIG_USB=y
1548# CONFIG_USB_DEBUG is not set 1133# CONFIG_USB_DEBUG is not set
1549 1134
1550# 1135#
@@ -1561,7 +1146,6 @@ CONFIG_USB_BANDWIDTH=y
1561# 1146#
1562# CONFIG_USB_ISP116X_HCD is not set 1147# CONFIG_USB_ISP116X_HCD is not set
1563CONFIG_USB_SL811_HCD=m 1148CONFIG_USB_SL811_HCD=m
1564# CONFIG_USB_SL811_CS is not set
1565 1149
1566# 1150#
1567# USB Device Class drivers 1151# USB Device Class drivers
@@ -1580,7 +1164,6 @@ CONFIG_USB_STORAGE=m
1580# CONFIG_USB_STORAGE_DEBUG is not set 1164# CONFIG_USB_STORAGE_DEBUG is not set
1581CONFIG_USB_STORAGE_DATAFAB=y 1165CONFIG_USB_STORAGE_DATAFAB=y
1582CONFIG_USB_STORAGE_FREECOM=y 1166CONFIG_USB_STORAGE_FREECOM=y
1583CONFIG_USB_STORAGE_ISD200=y
1584CONFIG_USB_STORAGE_DPCM=y 1167CONFIG_USB_STORAGE_DPCM=y
1585CONFIG_USB_STORAGE_USBAT=y 1168CONFIG_USB_STORAGE_USBAT=y
1586CONFIG_USB_STORAGE_SDDR09=y 1169CONFIG_USB_STORAGE_SDDR09=y
@@ -1608,9 +1191,7 @@ CONFIG_USB_WACOM=m
1608# CONFIG_USB_ACECAD is not set 1191# CONFIG_USB_ACECAD is not set
1609CONFIG_USB_KBTAB=m 1192CONFIG_USB_KBTAB=m
1610CONFIG_USB_POWERMATE=m 1193CONFIG_USB_POWERMATE=m
1611CONFIG_USB_MTOUCH=m 1194# CONFIG_USB_TOUCHSCREEN is not set
1612# CONFIG_USB_ITMTOUCH is not set
1613CONFIG_USB_EGALAX=m
1614# CONFIG_USB_YEALINK is not set 1195# CONFIG_USB_YEALINK is not set
1615CONFIG_USB_XPAD=m 1196CONFIG_USB_XPAD=m
1616CONFIG_USB_ATI_REMOTE=m 1197CONFIG_USB_ATI_REMOTE=m
@@ -1640,13 +1221,11 @@ CONFIG_USB_NET_NET1080=m
1640# CONFIG_USB_NET_RNDIS_HOST is not set 1221# CONFIG_USB_NET_RNDIS_HOST is not set
1641# CONFIG_USB_NET_CDC_SUBSET is not set 1222# CONFIG_USB_NET_CDC_SUBSET is not set
1642CONFIG_USB_NET_ZAURUS=m 1223CONFIG_USB_NET_ZAURUS=m
1643# CONFIG_USB_ZD1201 is not set
1644CONFIG_USB_MON=y 1224CONFIG_USB_MON=y
1645 1225
1646# 1226#
1647# USB port drivers 1227# USB port drivers
1648# 1228#
1649CONFIG_USB_USS720=m
1650 1229
1651# 1230#
1652# USB Serial Converter support 1231# USB Serial Converter support
@@ -1654,7 +1233,7 @@ CONFIG_USB_USS720=m
1654CONFIG_USB_SERIAL=m 1233CONFIG_USB_SERIAL=m
1655CONFIG_USB_SERIAL_GENERIC=y 1234CONFIG_USB_SERIAL_GENERIC=y
1656# CONFIG_USB_SERIAL_AIRPRIME is not set 1235# CONFIG_USB_SERIAL_AIRPRIME is not set
1657# CONFIG_USB_SERIAL_ANYDATA is not set 1236# CONFIG_USB_SERIAL_ARK3116 is not set
1658CONFIG_USB_SERIAL_BELKIN=m 1237CONFIG_USB_SERIAL_BELKIN=m
1659CONFIG_USB_SERIAL_WHITEHEAT=m 1238CONFIG_USB_SERIAL_WHITEHEAT=m
1660CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m 1239CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
@@ -1662,6 +1241,7 @@ CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
1662CONFIG_USB_SERIAL_CYPRESS_M8=m 1241CONFIG_USB_SERIAL_CYPRESS_M8=m
1663CONFIG_USB_SERIAL_EMPEG=m 1242CONFIG_USB_SERIAL_EMPEG=m
1664CONFIG_USB_SERIAL_FTDI_SIO=m 1243CONFIG_USB_SERIAL_FTDI_SIO=m
1244# CONFIG_USB_SERIAL_FUNSOFT is not set
1665CONFIG_USB_SERIAL_VISOR=m 1245CONFIG_USB_SERIAL_VISOR=m
1666CONFIG_USB_SERIAL_IPAQ=m 1246CONFIG_USB_SERIAL_IPAQ=m
1667CONFIG_USB_SERIAL_IR=m 1247CONFIG_USB_SERIAL_IR=m
@@ -1691,9 +1271,11 @@ CONFIG_USB_SERIAL_PL2303=m
1691# CONFIG_USB_SERIAL_HP4X is not set 1271# CONFIG_USB_SERIAL_HP4X is not set
1692CONFIG_USB_SERIAL_SAFE=m 1272CONFIG_USB_SERIAL_SAFE=m
1693# CONFIG_USB_SERIAL_SAFE_PADDED is not set 1273# CONFIG_USB_SERIAL_SAFE_PADDED is not set
1274# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
1694# CONFIG_USB_SERIAL_TI is not set 1275# CONFIG_USB_SERIAL_TI is not set
1695CONFIG_USB_SERIAL_CYBERJACK=m 1276CONFIG_USB_SERIAL_CYBERJACK=m
1696CONFIG_USB_SERIAL_XIRCOM=m 1277CONFIG_USB_SERIAL_XIRCOM=m
1278# CONFIG_USB_SERIAL_OPTION is not set
1697CONFIG_USB_SERIAL_OMNINET=m 1279CONFIG_USB_SERIAL_OMNINET=m
1698CONFIG_USB_EZUSB=y 1280CONFIG_USB_EZUSB=y
1699 1281
@@ -1707,10 +1289,12 @@ CONFIG_USB_RIO500=m
1707CONFIG_USB_LEGOTOWER=m 1289CONFIG_USB_LEGOTOWER=m
1708CONFIG_USB_LCD=m 1290CONFIG_USB_LCD=m
1709CONFIG_USB_LED=m 1291CONFIG_USB_LED=m
1292# CONFIG_USB_CYPRESS_CY7C63 is not set
1710CONFIG_USB_CYTHERM=m 1293CONFIG_USB_CYTHERM=m
1711CONFIG_USB_PHIDGETKIT=m 1294CONFIG_USB_PHIDGETKIT=m
1712CONFIG_USB_PHIDGETSERVO=m 1295CONFIG_USB_PHIDGETSERVO=m
1713# CONFIG_USB_IDMOUSE is not set 1296# CONFIG_USB_IDMOUSE is not set
1297# CONFIG_USB_APPLEDISPLAY is not set
1714# CONFIG_USB_LD is not set 1298# CONFIG_USB_LD is not set
1715CONFIG_USB_TEST=m 1299CONFIG_USB_TEST=m
1716 1300
@@ -1787,7 +1371,6 @@ CONFIG_JFS_POSIX_ACL=y
1787CONFIG_JFS_STATISTICS=y 1371CONFIG_JFS_STATISTICS=y
1788CONFIG_FS_POSIX_ACL=y 1372CONFIG_FS_POSIX_ACL=y
1789CONFIG_XFS_FS=m 1373CONFIG_XFS_FS=m
1790CONFIG_XFS_EXPORT=y
1791CONFIG_XFS_QUOTA=y 1374CONFIG_XFS_QUOTA=y
1792CONFIG_XFS_SECURITY=y 1375CONFIG_XFS_SECURITY=y
1793CONFIG_XFS_POSIX_ACL=y 1376CONFIG_XFS_POSIX_ACL=y
@@ -1796,6 +1379,7 @@ CONFIG_XFS_RT=y
1796CONFIG_MINIX_FS=m 1379CONFIG_MINIX_FS=m
1797CONFIG_ROMFS_FS=m 1380CONFIG_ROMFS_FS=m
1798CONFIG_INOTIFY=y 1381CONFIG_INOTIFY=y
1382CONFIG_INOTIFY_USER=y
1799CONFIG_QUOTA=y 1383CONFIG_QUOTA=y
1800CONFIG_QFMT_V1=m 1384CONFIG_QFMT_V1=m
1801CONFIG_QFMT_V2=m 1385CONFIG_QFMT_V2=m
@@ -1856,6 +1440,7 @@ CONFIG_JFFS2_FS=m
1856CONFIG_JFFS2_FS_DEBUG=0 1440CONFIG_JFFS2_FS_DEBUG=0
1857CONFIG_JFFS2_FS_WRITEBUFFER=y 1441CONFIG_JFFS2_FS_WRITEBUFFER=y
1858# CONFIG_JFFS2_SUMMARY is not set 1442# CONFIG_JFFS2_SUMMARY is not set
1443# CONFIG_JFFS2_FS_XATTR is not set
1859# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set 1444# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
1860CONFIG_JFFS2_ZLIB=y 1445CONFIG_JFFS2_ZLIB=y
1861CONFIG_JFFS2_RTIME=y 1446CONFIG_JFFS2_RTIME=y
@@ -1866,11 +1451,13 @@ CONFIG_HPFS_FS=m
1866CONFIG_QNX4FS_FS=m 1451CONFIG_QNX4FS_FS=m
1867CONFIG_SYSV_FS=m 1452CONFIG_SYSV_FS=m
1868CONFIG_UFS_FS=m 1453CONFIG_UFS_FS=m
1454# CONFIG_UFS_FS_WRITE is not set
1455# CONFIG_UFS_DEBUG is not set
1869 1456
1870# 1457#
1871# Network File Systems 1458# Network File Systems
1872# 1459#
1873CONFIG_NFS_FS=m 1460CONFIG_NFS_FS=y
1874CONFIG_NFS_V3=y 1461CONFIG_NFS_V3=y
1875# CONFIG_NFS_V3_ACL is not set 1462# CONFIG_NFS_V3_ACL is not set
1876CONFIG_NFS_V4=y 1463CONFIG_NFS_V4=y
@@ -1880,19 +1467,22 @@ CONFIG_NFSD_V3=y
1880# CONFIG_NFSD_V3_ACL is not set 1467# CONFIG_NFSD_V3_ACL is not set
1881CONFIG_NFSD_V4=y 1468CONFIG_NFSD_V4=y
1882CONFIG_NFSD_TCP=y 1469CONFIG_NFSD_TCP=y
1883CONFIG_LOCKD=m 1470CONFIG_ROOT_NFS=y
1471CONFIG_LOCKD=y
1884CONFIG_LOCKD_V4=y 1472CONFIG_LOCKD_V4=y
1885CONFIG_EXPORTFS=m 1473CONFIG_EXPORTFS=m
1886CONFIG_NFS_COMMON=y 1474CONFIG_NFS_COMMON=y
1887CONFIG_SUNRPC=m 1475CONFIG_SUNRPC=y
1888CONFIG_SUNRPC_GSS=m 1476CONFIG_SUNRPC_GSS=y
1889CONFIG_RPCSEC_GSS_KRB5=m 1477CONFIG_RPCSEC_GSS_KRB5=y
1890CONFIG_RPCSEC_GSS_SPKM3=m 1478CONFIG_RPCSEC_GSS_SPKM3=m
1891CONFIG_SMB_FS=m 1479CONFIG_SMB_FS=m
1892# CONFIG_SMB_NLS_DEFAULT is not set 1480# CONFIG_SMB_NLS_DEFAULT is not set
1893CONFIG_CIFS=m 1481CONFIG_CIFS=m
1894# CONFIG_CIFS_STATS is not set 1482# CONFIG_CIFS_STATS is not set
1483# CONFIG_CIFS_WEAK_PW_HASH is not set
1895# CONFIG_CIFS_XATTR is not set 1484# CONFIG_CIFS_XATTR is not set
1485# CONFIG_CIFS_DEBUG2 is not set
1896# CONFIG_CIFS_EXPERIMENTAL is not set 1486# CONFIG_CIFS_EXPERIMENTAL is not set
1897CONFIG_NCP_FS=m 1487CONFIG_NCP_FS=m
1898CONFIG_NCPFS_PACKET_SIGNING=y 1488CONFIG_NCPFS_PACKET_SIGNING=y
@@ -1940,7 +1530,7 @@ CONFIG_SUN_PARTITION=y
1940# 1530#
1941# Native Language Support 1531# Native Language Support
1942# 1532#
1943CONFIG_NLS=y 1533CONFIG_NLS=m
1944CONFIG_NLS_DEFAULT="cp437" 1534CONFIG_NLS_DEFAULT="cp437"
1945CONFIG_NLS_CODEPAGE_437=m 1535CONFIG_NLS_CODEPAGE_437=m
1946CONFIG_NLS_CODEPAGE_737=m 1536CONFIG_NLS_CODEPAGE_737=m
@@ -1984,26 +1574,29 @@ CONFIG_NLS_UTF8=m
1984# 1574#
1985# Profiling support 1575# Profiling support
1986# 1576#
1987CONFIG_PROFILING=y 1577# CONFIG_PROFILING is not set
1988CONFIG_OPROFILE=m
1989 1578
1990# 1579#
1991# Kernel hacking 1580# Kernel hacking
1992# 1581#
1993# CONFIG_PRINTK_TIME is not set 1582# CONFIG_PRINTK_TIME is not set
1994CONFIG_MAGIC_SYSRQ=y 1583CONFIG_MAGIC_SYSRQ=y
1584# CONFIG_UNUSED_SYMBOLS is not set
1995CONFIG_DEBUG_KERNEL=y 1585CONFIG_DEBUG_KERNEL=y
1996CONFIG_LOG_BUF_SHIFT=14 1586CONFIG_LOG_BUF_SHIFT=14
1997CONFIG_DETECT_SOFTLOCKUP=y 1587CONFIG_DETECT_SOFTLOCKUP=y
1998# CONFIG_SCHEDSTATS is not set 1588# CONFIG_SCHEDSTATS is not set
1999# CONFIG_DEBUG_SLAB is not set 1589# CONFIG_DEBUG_SLAB is not set
2000CONFIG_DEBUG_PREEMPT=y 1590# CONFIG_DEBUG_RT_MUTEXES is not set
2001CONFIG_DEBUG_MUTEXES=y 1591# CONFIG_RT_MUTEX_TESTER is not set
2002# CONFIG_DEBUG_SPINLOCK is not set 1592# CONFIG_DEBUG_SPINLOCK is not set
1593CONFIG_DEBUG_MUTEXES=y
1594# CONFIG_DEBUG_RWSEMS is not set
2003# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1595# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1596# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
2004# CONFIG_DEBUG_KOBJECT is not set 1597# CONFIG_DEBUG_KOBJECT is not set
2005# CONFIG_DEBUG_BUGVERBOSE is not set 1598# CONFIG_DEBUG_BUGVERBOSE is not set
2006CONFIG_DEBUG_INFO=y 1599# CONFIG_DEBUG_INFO is not set
2007# CONFIG_DEBUG_FS is not set 1600# CONFIG_DEBUG_FS is not set
2008# CONFIG_DEBUG_VM is not set 1601# CONFIG_DEBUG_VM is not set
2009CONFIG_FRAME_POINTER=y 1602CONFIG_FRAME_POINTER=y
@@ -2013,8 +1606,7 @@ CONFIG_FORCED_INLINING=y
2013# CONFIG_DEBUG_USER is not set 1606# CONFIG_DEBUG_USER is not set
2014# CONFIG_DEBUG_WAITQ is not set 1607# CONFIG_DEBUG_WAITQ is not set
2015# CONFIG_DEBUG_ERRORS is not set 1608# CONFIG_DEBUG_ERRORS is not set
2016CONFIG_DEBUG_LL=y 1609# CONFIG_DEBUG_LL is not set
2017# CONFIG_DEBUG_ICEDCC is not set
2018 1610
2019# 1611#
2020# Security options 1612# Security options
@@ -2039,7 +1631,7 @@ CONFIG_CRYPTO_SHA256=m
2039CONFIG_CRYPTO_SHA512=m 1631CONFIG_CRYPTO_SHA512=m
2040CONFIG_CRYPTO_WP512=m 1632CONFIG_CRYPTO_WP512=m
2041# CONFIG_CRYPTO_TGR192 is not set 1633# CONFIG_CRYPTO_TGR192 is not set
2042CONFIG_CRYPTO_DES=m 1634CONFIG_CRYPTO_DES=y
2043CONFIG_CRYPTO_BLOWFISH=m 1635CONFIG_CRYPTO_BLOWFISH=m
2044CONFIG_CRYPTO_TWOFISH=m 1636CONFIG_CRYPTO_TWOFISH=m
2045CONFIG_CRYPTO_SERPENT=m 1637CONFIG_CRYPTO_SERPENT=m
@@ -2068,5 +1660,6 @@ CONFIG_CRC32=y
2068CONFIG_LIBCRC32C=m 1660CONFIG_LIBCRC32C=m
2069CONFIG_ZLIB_INFLATE=y 1661CONFIG_ZLIB_INFLATE=y
2070CONFIG_ZLIB_DEFLATE=m 1662CONFIG_ZLIB_DEFLATE=m
2071CONFIG_REED_SOLOMON=m 1663CONFIG_TEXTSEARCH=y
2072CONFIG_REED_SOLOMON_DEC16=y 1664CONFIG_TEXTSEARCH_KMP=m
1665CONFIG_PLIST=y
diff --git a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig
index b4171dd43df0..bbd138be6a70 100644
--- a/arch/arm/mach-s3c2410/Kconfig
+++ b/arch/arm/mach-s3c2410/Kconfig
@@ -81,9 +81,17 @@ config SMDK2440_CPU2442
81 depends on ARCH_S3C2440 81 depends on ARCH_S3C2440
82 select CPU_S3C2442 82 select CPU_S3C2442
83 83
84config MACH_S3C2413
85 bool
86 help
87 Internal node for S3C2413 verison of SMDK2413, so that
88 machine_is_s3c2413() will work when MACH_SMDK2413 is
89 selected
90
84config MACH_SMDK2413 91config MACH_SMDK2413
85 bool "SMDK2413" 92 bool "SMDK2413"
86 select CPU_S3C2412 93 select CPU_S3C2412
94 select MACH_S3C2413
87 select MACH_SMDK 95 select MACH_SMDK
88 help 96 help
89 Say Y here if you are using an SMDK2413 97 Say Y here if you are using an SMDK2413
diff --git a/arch/arm/mach-s3c2410/irq.h b/arch/arm/mach-s3c2410/irq.h
index f7cc4c983de5..842a9f42c97b 100644
--- a/arch/arm/mach-s3c2410/irq.h
+++ b/arch/arm/mach-s3c2410/irq.h
@@ -100,5 +100,10 @@ s3c_irqsub_ack(unsigned int irqno, unsigned int parentmask, unsigned int group)
100 100
101/* exported for use in arch/arm/mach-s3c2410 */ 101/* exported for use in arch/arm/mach-s3c2410 */
102 102
103#ifdef CONFIG_PM
103extern int s3c_irq_wake(unsigned int irqno, unsigned int state); 104extern int s3c_irq_wake(unsigned int irqno, unsigned int state);
105#else
106#define s3c_irq_wake NULL
107#endif
108
104extern int s3c_irqext_type(unsigned int irq, unsigned int type); 109extern int s3c_irqext_type(unsigned int irq, unsigned int type);
diff --git a/arch/arm/mach-s3c2410/s3c2412.c b/arch/arm/mach-s3c2410/s3c2412.c
index e24ffd5e478b..2d163f7600be 100644
--- a/arch/arm/mach-s3c2410/s3c2412.c
+++ b/arch/arm/mach-s3c2410/s3c2412.c
@@ -35,11 +35,15 @@
35#include <asm/mach/irq.h> 35#include <asm/mach/irq.h>
36 36
37#include <asm/hardware.h> 37#include <asm/hardware.h>
38#include <asm/proc-fns.h>
38#include <asm/io.h> 39#include <asm/io.h>
39#include <asm/irq.h> 40#include <asm/irq.h>
40 41
42#include <asm/arch/idle.h>
43
41#include <asm/arch/regs-clock.h> 44#include <asm/arch/regs-clock.h>
42#include <asm/arch/regs-serial.h> 45#include <asm/arch/regs-serial.h>
46#include <asm/arch/regs-power.h>
43#include <asm/arch/regs-gpio.h> 47#include <asm/arch/regs-gpio.h>
44#include <asm/arch/regs-gpioj.h> 48#include <asm/arch/regs-gpioj.h>
45#include <asm/arch/regs-dsc.h> 49#include <asm/arch/regs-dsc.h>
@@ -75,6 +79,27 @@ void __init s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no)
75 s3c_device_nand.name = "s3c2412-nand"; 79 s3c_device_nand.name = "s3c2412-nand";
76} 80}
77 81
82/* s3c2412_idle
83 *
84 * use the standard idle call by ensuring the idle mode
85 * in power config, then issuing the idle co-processor
86 * instruction
87*/
88
89static void s3c2412_idle(void)
90{
91 unsigned long tmp;
92
93 /* ensure our idle mode is to go to idle */
94
95 tmp = __raw_readl(S3C2412_PWRCFG);
96 tmp &= ~S3C2412_PWRCFG_STANDBYWFI_MASK;
97 tmp |= S3C2412_PWRCFG_STANDBYWFI_IDLE;
98 __raw_writel(tmp, S3C2412_PWRCFG);
99
100 cpu_do_idle();
101}
102
78/* s3c2412_map_io 103/* s3c2412_map_io
79 * 104 *
80 * register the standard cpu IO areas, and any passed in from the 105 * register the standard cpu IO areas, and any passed in from the
@@ -87,6 +112,10 @@ void __init s3c2412_map_io(struct map_desc *mach_desc, int mach_size)
87 112
88 s3c24xx_va_gpio2 = S3C24XX_VA_GPIO + 0x10; 113 s3c24xx_va_gpio2 = S3C24XX_VA_GPIO + 0x10;
89 114
115 /* set our idle function */
116
117 s3c24xx_idle = s3c2412_idle;
118
90 /* register our io-tables */ 119 /* register our io-tables */
91 120
92 iotable_init(s3c2412_iodesc, ARRAY_SIZE(s3c2412_iodesc)); 121 iotable_init(s3c2412_iodesc, ARRAY_SIZE(s3c2412_iodesc));
diff --git a/arch/arm/mm/proc-xscale.S b/arch/arm/mm/proc-xscale.S
index 561bff73a036..3ca0c92e98a2 100644
--- a/arch/arm/mm/proc-xscale.S
+++ b/arch/arm/mm/proc-xscale.S
@@ -644,7 +644,7 @@ __80219_proc_info:
644 .type __8032x_proc_info,#object 644 .type __8032x_proc_info,#object
645__8032x_proc_info: 645__8032x_proc_info:
646 .long 0x69052420 646 .long 0x69052420
647 .long 0xffffffe0 647 .long 0xfffff7e0
648 .long PMD_TYPE_SECT | \ 648 .long PMD_TYPE_SECT | \
649 PMD_SECT_BUFFERABLE | \ 649 PMD_SECT_BUFFERABLE | \
650 PMD_SECT_CACHEABLE | \ 650 PMD_SECT_CACHEABLE | \
diff --git a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S
index 37a7d2eaf4a0..87f9f60b803b 100644
--- a/arch/i386/kernel/entry.S
+++ b/arch/i386/kernel/entry.S
@@ -209,6 +209,10 @@ ENTRY(ret_from_fork)
209 GET_THREAD_INFO(%ebp) 209 GET_THREAD_INFO(%ebp)
210 popl %eax 210 popl %eax
211 CFI_ADJUST_CFA_OFFSET -4 211 CFI_ADJUST_CFA_OFFSET -4
212 pushl $0x0202 # Reset kernel eflags
213 CFI_ADJUST_CFA_OFFSET 4
214 popfl
215 CFI_ADJUST_CFA_OFFSET -4
212 jmp syscall_exit 216 jmp syscall_exit
213 CFI_ENDPROC 217 CFI_ENDPROC
214 218
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c
index 345ffb7d904d..f1682206d304 100644
--- a/arch/i386/kernel/setup.c
+++ b/arch/i386/kernel/setup.c
@@ -956,6 +956,38 @@ efi_memory_present_wrapper(unsigned long start, unsigned long end, void *arg)
956 return 0; 956 return 0;
957} 957}
958 958
959 /*
960 * This function checks if the entire range <start,end> is mapped with type.
961 *
962 * Note: this function only works correct if the e820 table is sorted and
963 * not-overlapping, which is the case
964 */
965int __init
966e820_all_mapped(unsigned long s, unsigned long e, unsigned type)
967{
968 u64 start = s;
969 u64 end = e;
970 int i;
971 for (i = 0; i < e820.nr_map; i++) {
972 struct e820entry *ei = &e820.map[i];
973 if (type && ei->type != type)
974 continue;
975 /* is the region (part) in overlap with the current region ?*/
976 if (ei->addr >= end || ei->addr + ei->size <= start)
977 continue;
978 /* if the region is at the beginning of <start,end> we move
979 * start to the end of the region since it's ok until there
980 */
981 if (ei->addr <= start)
982 start = ei->addr + ei->size;
983 /* if start is now at or beyond end, we're done, full
984 * coverage */
985 if (start >= end)
986 return 1; /* we're done */
987 }
988 return 0;
989}
990
959/* 991/*
960 * Find the highest page frame number we have available 992 * Find the highest page frame number we have available
961 */ 993 */
diff --git a/arch/i386/oprofile/nmi_int.c b/arch/i386/oprofile/nmi_int.c
index c8c1df8ff2b4..5f8dc8a21bd7 100644
--- a/arch/i386/oprofile/nmi_int.c
+++ b/arch/i386/oprofile/nmi_int.c
@@ -337,6 +337,8 @@ static int __init ppro_init(char ** cpu_type)
337 337
338 if (cpu_model == 14) 338 if (cpu_model == 14)
339 *cpu_type = "i386/core"; 339 *cpu_type = "i386/core";
340 else if (cpu_model == 15)
341 *cpu_type = "i386/core_2";
340 else if (cpu_model > 0xd) 342 else if (cpu_model > 0xd)
341 return 0; 343 return 0;
342 else if (cpu_model == 9) { 344 else if (cpu_model == 9) {
diff --git a/arch/i386/pci/common.c b/arch/i386/pci/common.c
index 1220dd828ce3..0a362e3aeac5 100644
--- a/arch/i386/pci/common.c
+++ b/arch/i386/pci/common.c
@@ -237,11 +237,6 @@ char * __devinit pcibios_setup(char *str)
237 pci_probe &= ~PCI_PROBE_MMCONF; 237 pci_probe &= ~PCI_PROBE_MMCONF;
238 return NULL; 238 return NULL;
239 } 239 }
240 /* override DMI blacklist */
241 else if (!strcmp(str, "mmconf")) {
242 pci_probe |= PCI_PROBE_MMCONF_FORCE;
243 return NULL;
244 }
245#endif 240#endif
246 else if (!strcmp(str, "noacpi")) { 241 else if (!strcmp(str, "noacpi")) {
247 acpi_noirq_set(); 242 acpi_noirq_set();
diff --git a/arch/i386/pci/mmconfig.c b/arch/i386/pci/mmconfig.c
index ef5a2faa7d82..972180f738d9 100644
--- a/arch/i386/pci/mmconfig.c
+++ b/arch/i386/pci/mmconfig.c
@@ -12,7 +12,6 @@
12#include <linux/pci.h> 12#include <linux/pci.h>
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/acpi.h> 14#include <linux/acpi.h>
15#include <linux/dmi.h>
16#include <asm/e820.h> 15#include <asm/e820.h>
17#include "pci.h" 16#include "pci.h"
18 17
@@ -188,31 +187,9 @@ static __init void unreachable_devices(void)
188 } 187 }
189} 188}
190 189
191static int disable_mcfg(struct dmi_system_id *d)
192{
193 printk("PCI: %s detected. Disabling MCFG.\n", d->ident);
194 pci_probe &= ~PCI_PROBE_MMCONF;
195 return 0;
196}
197
198static struct dmi_system_id __initdata dmi_bad_mcfg[] = {
199 /* Has broken MCFG table that makes the system hang when used */
200 {
201 .callback = disable_mcfg,
202 .ident = "Intel D3C5105 SDV",
203 .matches = {
204 DMI_MATCH(DMI_BIOS_VENDOR, "Intel"),
205 DMI_MATCH(DMI_BOARD_NAME, "D26928"),
206 },
207 },
208 {}
209};
210
211void __init pci_mmcfg_init(void) 190void __init pci_mmcfg_init(void)
212{ 191{
213 dmi_check_system(dmi_bad_mcfg); 192 if ((pci_probe & PCI_PROBE_MMCONF) == 0)
214
215 if ((pci_probe & (PCI_PROBE_MMCONF_FORCE|PCI_PROBE_MMCONF)) == 0)
216 return; 193 return;
217 194
218 acpi_table_parse(ACPI_MCFG, acpi_parse_mcfg); 195 acpi_table_parse(ACPI_MCFG, acpi_parse_mcfg);
@@ -221,6 +198,15 @@ void __init pci_mmcfg_init(void)
221 (pci_mmcfg_config[0].base_address == 0)) 198 (pci_mmcfg_config[0].base_address == 0))
222 return; 199 return;
223 200
201 if (!e820_all_mapped(pci_mmcfg_config[0].base_address,
202 pci_mmcfg_config[0].base_address + MMCONFIG_APER_MIN,
203 E820_RESERVED)) {
204 printk(KERN_ERR "PCI: BIOS Bug: MCFG area at %x is not E820-reserved\n",
205 pci_mmcfg_config[0].base_address);
206 printk(KERN_ERR "PCI: Not using MMCONFIG.\n");
207 return;
208 }
209
224 printk(KERN_INFO "PCI: Using MMCONFIG\n"); 210 printk(KERN_INFO "PCI: Using MMCONFIG\n");
225 raw_pci_ops = &pci_mmcfg; 211 raw_pci_ops = &pci_mmcfg;
226 pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF; 212 pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF;
diff --git a/arch/i386/pci/pci.h b/arch/i386/pci/pci.h
index 49a849b3a241..bf4e79335388 100644
--- a/arch/i386/pci/pci.h
+++ b/arch/i386/pci/pci.h
@@ -16,8 +16,7 @@
16#define PCI_PROBE_CONF1 0x0002 16#define PCI_PROBE_CONF1 0x0002
17#define PCI_PROBE_CONF2 0x0004 17#define PCI_PROBE_CONF2 0x0004
18#define PCI_PROBE_MMCONF 0x0008 18#define PCI_PROBE_MMCONF 0x0008
19#define PCI_PROBE_MMCONF_FORCE 0x0010 19#define PCI_PROBE_MASK 0x000f
20#define PCI_PROBE_MASK 0x00ff
21 20
22#define PCI_NO_SORT 0x0100 21#define PCI_NO_SORT 0x0100
23#define PCI_BIOS_SORT 0x0200 22#define PCI_BIOS_SORT 0x0200
diff --git a/arch/sparc/kernel/sys_sparc.c b/arch/sparc/kernel/sys_sparc.c
index 94ff58c9d4a9..896863fb208a 100644
--- a/arch/sparc/kernel/sys_sparc.c
+++ b/arch/sparc/kernel/sys_sparc.c
@@ -470,19 +470,21 @@ asmlinkage int sys_getdomainname(char __user *name, int len)
470{ 470{
471 int nlen, err; 471 int nlen, err;
472 472
473 if (len < 0 || len > __NEW_UTS_LEN) 473 if (len < 0)
474 return -EINVAL; 474 return -EINVAL;
475 475
476 down_read(&uts_sem); 476 down_read(&uts_sem);
477 477
478 nlen = strlen(system_utsname.domainname) + 1; 478 nlen = strlen(system_utsname.domainname) + 1;
479 if (nlen < len) 479 err = -EINVAL;
480 len = nlen; 480 if (nlen > len)
481 goto out;
481 482
482 err = -EFAULT; 483 err = -EFAULT;
483 if (!copy_to_user(name, system_utsname.domainname, len)) 484 if (!copy_to_user(name, system_utsname.domainname, nlen))
484 err = 0; 485 err = 0;
485 486
487out:
486 up_read(&uts_sem); 488 up_read(&uts_sem);
487 return err; 489 return err;
488} 490}
diff --git a/arch/sparc64/kernel/sys_sparc.c b/arch/sparc64/kernel/sys_sparc.c
index bf5f14ee73de..c608c947e6c3 100644
--- a/arch/sparc64/kernel/sys_sparc.c
+++ b/arch/sparc64/kernel/sys_sparc.c
@@ -707,19 +707,21 @@ asmlinkage long sys_getdomainname(char __user *name, int len)
707{ 707{
708 int nlen, err; 708 int nlen, err;
709 709
710 if (len < 0 || len > __NEW_UTS_LEN) 710 if (len < 0)
711 return -EINVAL; 711 return -EINVAL;
712 712
713 down_read(&uts_sem); 713 down_read(&uts_sem);
714 714
715 nlen = strlen(system_utsname.domainname) + 1; 715 nlen = strlen(system_utsname.domainname) + 1;
716 if (nlen < len) 716 err = -EINVAL;
717 len = nlen; 717 if (nlen > len)
718 goto out;
718 719
719 err = -EFAULT; 720 err = -EFAULT;
720 if (!copy_to_user(name, system_utsname.domainname, len)) 721 if (!copy_to_user(name, system_utsname.domainname, nlen))
721 err = 0; 722 err = 0;
722 723
724out:
723 up_read(&uts_sem); 725 up_read(&uts_sem);
724 return err; 726 return err;
725} 727}
diff --git a/arch/x86_64/kernel/e820.c b/arch/x86_64/kernel/e820.c
index 764bf23c7103..d6d7f731f6f0 100644
--- a/arch/x86_64/kernel/e820.c
+++ b/arch/x86_64/kernel/e820.c
@@ -108,6 +108,35 @@ e820_any_mapped(unsigned long start, unsigned long end, unsigned type)
108 return 0; 108 return 0;
109} 109}
110 110
111/*
112 * This function checks if the entire range <start,end> is mapped with type.
113 *
114 * Note: this function only works correct if the e820 table is sorted and
115 * not-overlapping, which is the case
116 */
117int __init e820_all_mapped(unsigned long start, unsigned long end, unsigned type)
118{
119 int i;
120 for (i = 0; i < e820.nr_map; i++) {
121 struct e820entry *ei = &e820.map[i];
122 if (type && ei->type != type)
123 continue;
124 /* is the region (part) in overlap with the current region ?*/
125 if (ei->addr >= end || ei->addr + ei->size <= start)
126 continue;
127
128 /* if the region is at the beginning of <start,end> we move
129 * start to the end of the region since it's ok until there
130 */
131 if (ei->addr <= start)
132 start = ei->addr + ei->size;
133 /* if start is now at or beyond end, we're done, full coverage */
134 if (start >= end)
135 return 1; /* we're done */
136 }
137 return 0;
138}
139
111/* 140/*
112 * Find a free area in a specific range. 141 * Find a free area in a specific range.
113 */ 142 */
diff --git a/arch/x86_64/pci/mmconfig.c b/arch/x86_64/pci/mmconfig.c
index 2d48a7941d48..3c55c76c6fd5 100644
--- a/arch/x86_64/pci/mmconfig.c
+++ b/arch/x86_64/pci/mmconfig.c
@@ -9,7 +9,6 @@
9#include <linux/init.h> 9#include <linux/init.h>
10#include <linux/acpi.h> 10#include <linux/acpi.h>
11#include <linux/bitmap.h> 11#include <linux/bitmap.h>
12#include <linux/dmi.h>
13#include <asm/e820.h> 12#include <asm/e820.h>
14 13
15#include "pci.h" 14#include "pci.h"
@@ -165,33 +164,11 @@ static __init void unreachable_devices(void)
165 } 164 }
166} 165}
167 166
168static int disable_mcfg(struct dmi_system_id *d)
169{
170 printk("PCI: %s detected. Disabling MCFG.\n", d->ident);
171 pci_probe &= ~PCI_PROBE_MMCONF;
172 return 0;
173}
174
175static struct dmi_system_id __initdata dmi_bad_mcfg[] = {
176 /* Has broken MCFG table that makes the system hang when used */
177 {
178 .callback = disable_mcfg,
179 .ident = "Intel D3C5105 SDV",
180 .matches = {
181 DMI_MATCH(DMI_BIOS_VENDOR, "Intel"),
182 DMI_MATCH(DMI_BOARD_NAME, "D26928"),
183 },
184 },
185 {}
186};
187
188void __init pci_mmcfg_init(void) 167void __init pci_mmcfg_init(void)
189{ 168{
190 int i; 169 int i;
191 170
192 dmi_check_system(dmi_bad_mcfg); 171 if ((pci_probe & PCI_PROBE_MMCONF) == 0)
193
194 if ((pci_probe & (PCI_PROBE_MMCONF|PCI_PROBE_MMCONF_FORCE)) == 0)
195 return; 172 return;
196 173
197 acpi_table_parse(ACPI_MCFG, acpi_parse_mcfg); 174 acpi_table_parse(ACPI_MCFG, acpi_parse_mcfg);
@@ -200,6 +177,15 @@ void __init pci_mmcfg_init(void)
200 (pci_mmcfg_config[0].base_address == 0)) 177 (pci_mmcfg_config[0].base_address == 0))
201 return; 178 return;
202 179
180 if (!e820_all_mapped(pci_mmcfg_config[0].base_address,
181 pci_mmcfg_config[0].base_address + MMCONFIG_APER_MIN,
182 E820_RESERVED)) {
183 printk(KERN_ERR "PCI: BIOS Bug: MCFG area at %x is not E820-reserved\n",
184 pci_mmcfg_config[0].base_address);
185 printk(KERN_ERR "PCI: Not using MMCONFIG.\n");
186 return;
187 }
188
203 /* RED-PEN i386 doesn't do _nocache right now */ 189 /* RED-PEN i386 doesn't do _nocache right now */
204 pci_mmcfg_virt = kmalloc(sizeof(*pci_mmcfg_virt) * pci_mmcfg_config_num, GFP_KERNEL); 190 pci_mmcfg_virt = kmalloc(sizeof(*pci_mmcfg_virt) * pci_mmcfg_config_num, GFP_KERNEL);
205 if (pci_mmcfg_virt == NULL) { 191 if (pci_mmcfg_virt == NULL) {
diff --git a/drivers/atm/he.c b/drivers/atm/he.c
index d369130f4235..ffcb9fd31c38 100644
--- a/drivers/atm/he.c
+++ b/drivers/atm/he.c
@@ -1928,7 +1928,9 @@ he_service_rbrq(struct he_dev *he_dev, int group)
1928#ifdef notdef 1928#ifdef notdef
1929 ATM_SKB(skb)->vcc = vcc; 1929 ATM_SKB(skb)->vcc = vcc;
1930#endif 1930#endif
1931 spin_unlock(&he_dev->global_lock);
1931 vcc->push(vcc, skb); 1932 vcc->push(vcc, skb);
1933 spin_lock(&he_dev->global_lock);
1932 1934
1933 atomic_inc(&vcc->stats->rx); 1935 atomic_inc(&vcc->stats->rx);
1934 1936
@@ -2282,6 +2284,8 @@ __enqueue_tpd(struct he_dev *he_dev, struct he_tpd *tpd, unsigned cid)
2282 TPDRQ_MASK(he_readl(he_dev, TPDRQ_B_H))); 2284 TPDRQ_MASK(he_readl(he_dev, TPDRQ_B_H)));
2283 2285
2284 if (new_tail == he_dev->tpdrq_head) { 2286 if (new_tail == he_dev->tpdrq_head) {
2287 int slot;
2288
2285 hprintk("tpdrq full (cid 0x%x)\n", cid); 2289 hprintk("tpdrq full (cid 0x%x)\n", cid);
2286 /* 2290 /*
2287 * FIXME 2291 * FIXME
@@ -2289,6 +2293,13 @@ __enqueue_tpd(struct he_dev *he_dev, struct he_tpd *tpd, unsigned cid)
2289 * after service_tbrq, service the backlog 2293 * after service_tbrq, service the backlog
2290 * for now, we just drop the pdu 2294 * for now, we just drop the pdu
2291 */ 2295 */
2296 for (slot = 0; slot < TPD_MAXIOV; ++slot) {
2297 if (tpd->iovec[slot].addr)
2298 pci_unmap_single(he_dev->pci_dev,
2299 tpd->iovec[slot].addr,
2300 tpd->iovec[slot].len & TPD_LEN_MASK,
2301 PCI_DMA_TODEVICE);
2302 }
2292 if (tpd->skb) { 2303 if (tpd->skb) {
2293 if (tpd->vcc->pop) 2304 if (tpd->vcc->pop)
2294 tpd->vcc->pop(tpd->vcc, tpd->skb); 2305 tpd->vcc->pop(tpd->vcc, tpd->skb);
diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c
index 1d1bd34b7f12..a76d2c40dd5e 100644
--- a/drivers/char/hvc_console.c
+++ b/drivers/char/hvc_console.c
@@ -667,6 +667,7 @@ int khvcd(void *unused)
667 do { 667 do {
668 poll_mask = 0; 668 poll_mask = 0;
669 hvc_kicked = 0; 669 hvc_kicked = 0;
670 try_to_freeze();
670 wmb(); 671 wmb();
671 if (cpus_empty(cpus_in_xmon)) { 672 if (cpus_empty(cpus_in_xmon)) {
672 spin_lock(&hvc_structs_lock); 673 spin_lock(&hvc_structs_lock);
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index f57eba0bf253..abca98beac14 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -402,10 +402,10 @@ static void handle_flags(struct smi_info *smi_info)
402 smi_info->curr_msg->data, 402 smi_info->curr_msg->data,
403 smi_info->curr_msg->data_size); 403 smi_info->curr_msg->data_size);
404 smi_info->si_state = SI_GETTING_EVENTS; 404 smi_info->si_state = SI_GETTING_EVENTS;
405 } else if (smi_info->msg_flags & OEM_DATA_AVAIL) { 405 } else if (smi_info->msg_flags & OEM_DATA_AVAIL &&
406 if (smi_info->oem_data_avail_handler) 406 smi_info->oem_data_avail_handler) {
407 if (smi_info->oem_data_avail_handler(smi_info)) 407 if (smi_info->oem_data_avail_handler(smi_info))
408 goto retry; 408 goto retry;
409 } else { 409 } else {
410 smi_info->si_state = SI_NORMAL; 410 smi_info->si_state = SI_NORMAL;
411 } 411 }
@@ -2481,6 +2481,7 @@ static __devinit int init_ipmi_si(void)
2481#ifdef CONFIG_PCI 2481#ifdef CONFIG_PCI
2482 pci_unregister_driver(&ipmi_pci_driver); 2482 pci_unregister_driver(&ipmi_pci_driver);
2483#endif 2483#endif
2484 driver_unregister(&ipmi_driver);
2484 printk("ipmi_si: Unable to find any System Interface(s)\n"); 2485 printk("ipmi_si: Unable to find any System Interface(s)\n");
2485 return -ENODEV; 2486 return -ENODEV;
2486 } else { 2487 } else {
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index d6f99d5720fc..5d625a81193f 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -49,7 +49,7 @@ MODULE_DESCRIPTION("Generic RDMA CM Agent");
49MODULE_LICENSE("Dual BSD/GPL"); 49MODULE_LICENSE("Dual BSD/GPL");
50 50
51#define CMA_CM_RESPONSE_TIMEOUT 20 51#define CMA_CM_RESPONSE_TIMEOUT 20
52#define CMA_MAX_CM_RETRIES 3 52#define CMA_MAX_CM_RETRIES 15
53 53
54static void cma_add_one(struct ib_device *device); 54static void cma_add_one(struct ib_device *device);
55static void cma_remove_one(struct ib_device *device); 55static void cma_remove_one(struct ib_device *device);
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
index b5e6a7be603d..ec356ce7cdcd 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
@@ -326,6 +326,7 @@ ipoib_mcast_sendonly_join_complete(int status,
326 326
327 /* Clear the busy flag so we try again */ 327 /* Clear the busy flag so we try again */
328 clear_bit(IPOIB_MCAST_FLAG_BUSY, &mcast->flags); 328 clear_bit(IPOIB_MCAST_FLAG_BUSY, &mcast->flags);
329 mcast->query = NULL;
329 } 330 }
330 331
331 complete(&mcast->done); 332 complete(&mcast->done);
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index 8257d5a2c8f8..fd8344cdc0db 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -799,13 +799,6 @@ static void srp_process_rsp(struct srp_target_port *target, struct srp_rsp *rsp)
799 spin_unlock_irqrestore(target->scsi_host->host_lock, flags); 799 spin_unlock_irqrestore(target->scsi_host->host_lock, flags);
800} 800}
801 801
802static void srp_reconnect_work(void *target_ptr)
803{
804 struct srp_target_port *target = target_ptr;
805
806 srp_reconnect_target(target);
807}
808
809static void srp_handle_recv(struct srp_target_port *target, struct ib_wc *wc) 802static void srp_handle_recv(struct srp_target_port *target, struct ib_wc *wc)
810{ 803{
811 struct srp_iu *iu; 804 struct srp_iu *iu;
@@ -858,7 +851,6 @@ static void srp_completion(struct ib_cq *cq, void *target_ptr)
858{ 851{
859 struct srp_target_port *target = target_ptr; 852 struct srp_target_port *target = target_ptr;
860 struct ib_wc wc; 853 struct ib_wc wc;
861 unsigned long flags;
862 854
863 ib_req_notify_cq(cq, IB_CQ_NEXT_COMP); 855 ib_req_notify_cq(cq, IB_CQ_NEXT_COMP);
864 while (ib_poll_cq(cq, 1, &wc) > 0) { 856 while (ib_poll_cq(cq, 1, &wc) > 0) {
@@ -866,10 +858,6 @@ static void srp_completion(struct ib_cq *cq, void *target_ptr)
866 printk(KERN_ERR PFX "failed %s status %d\n", 858 printk(KERN_ERR PFX "failed %s status %d\n",
867 wc.wr_id & SRP_OP_RECV ? "receive" : "send", 859 wc.wr_id & SRP_OP_RECV ? "receive" : "send",
868 wc.status); 860 wc.status);
869 spin_lock_irqsave(target->scsi_host->host_lock, flags);
870 if (target->state == SRP_TARGET_LIVE)
871 schedule_work(&target->work);
872 spin_unlock_irqrestore(target->scsi_host->host_lock, flags);
873 break; 861 break;
874 } 862 }
875 863
@@ -1705,8 +1693,6 @@ static ssize_t srp_create_target(struct class_device *class_dev,
1705 target->scsi_host = target_host; 1693 target->scsi_host = target_host;
1706 target->srp_host = host; 1694 target->srp_host = host;
1707 1695
1708 INIT_WORK(&target->work, srp_reconnect_work, target);
1709
1710 INIT_LIST_HEAD(&target->free_reqs); 1696 INIT_LIST_HEAD(&target->free_reqs);
1711 INIT_LIST_HEAD(&target->req_queue); 1697 INIT_LIST_HEAD(&target->req_queue);
1712 for (i = 0; i < SRP_SQ_SIZE; ++i) { 1698 for (i = 0; i < SRP_SQ_SIZE; ++i) {
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
index 39edb8250fbc..7ea49a0d5ec3 100644
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -908,7 +908,7 @@ static void __xipram xip_enable(struct map_info *map, struct flchip *chip,
908 908
909static int __xipram xip_wait_for_operation( 909static int __xipram xip_wait_for_operation(
910 struct map_info *map, struct flchip *chip, 910 struct map_info *map, struct flchip *chip,
911 unsigned long adr, int *chip_op_time ) 911 unsigned long adr, unsigned int chip_op_time )
912{ 912{
913 struct cfi_private *cfi = map->fldrv_priv; 913 struct cfi_private *cfi = map->fldrv_priv;
914 struct cfi_pri_intelext *cfip = cfi->cmdset_priv; 914 struct cfi_pri_intelext *cfip = cfi->cmdset_priv;
@@ -917,7 +917,7 @@ static int __xipram xip_wait_for_operation(
917 flstate_t oldstate, newstate; 917 flstate_t oldstate, newstate;
918 918
919 start = xip_currtime(); 919 start = xip_currtime();
920 usec = *chip_op_time * 8; 920 usec = chip_op_time * 8;
921 if (usec == 0) 921 if (usec == 0)
922 usec = 500000; 922 usec = 500000;
923 done = 0; 923 done = 0;
@@ -1027,8 +1027,8 @@ static int __xipram xip_wait_for_operation(
1027#define XIP_INVAL_CACHED_RANGE(map, from, size) \ 1027#define XIP_INVAL_CACHED_RANGE(map, from, size) \
1028 INVALIDATE_CACHED_RANGE(map, from, size) 1028 INVALIDATE_CACHED_RANGE(map, from, size)
1029 1029
1030#define INVAL_CACHE_AND_WAIT(map, chip, cmd_adr, inval_adr, inval_len, p_usec) \ 1030#define INVAL_CACHE_AND_WAIT(map, chip, cmd_adr, inval_adr, inval_len, usec) \
1031 xip_wait_for_operation(map, chip, cmd_adr, p_usec) 1031 xip_wait_for_operation(map, chip, cmd_adr, usec)
1032 1032
1033#else 1033#else
1034 1034
@@ -1040,64 +1040,64 @@ static int __xipram xip_wait_for_operation(
1040static int inval_cache_and_wait_for_operation( 1040static int inval_cache_and_wait_for_operation(
1041 struct map_info *map, struct flchip *chip, 1041 struct map_info *map, struct flchip *chip,
1042 unsigned long cmd_adr, unsigned long inval_adr, int inval_len, 1042 unsigned long cmd_adr, unsigned long inval_adr, int inval_len,
1043 int *chip_op_time ) 1043 unsigned int chip_op_time)
1044{ 1044{
1045 struct cfi_private *cfi = map->fldrv_priv; 1045 struct cfi_private *cfi = map->fldrv_priv;
1046 map_word status, status_OK = CMD(0x80); 1046 map_word status, status_OK = CMD(0x80);
1047 int z, chip_state = chip->state; 1047 int chip_state = chip->state;
1048 unsigned long timeo; 1048 unsigned int timeo, sleep_time;
1049 1049
1050 spin_unlock(chip->mutex); 1050 spin_unlock(chip->mutex);
1051 if (inval_len) 1051 if (inval_len)
1052 INVALIDATE_CACHED_RANGE(map, inval_adr, inval_len); 1052 INVALIDATE_CACHED_RANGE(map, inval_adr, inval_len);
1053 if (*chip_op_time)
1054 cfi_udelay(*chip_op_time);
1055 spin_lock(chip->mutex); 1053 spin_lock(chip->mutex);
1056 1054
1057 timeo = *chip_op_time * 8 * HZ / 1000000; 1055 /* set our timeout to 8 times the expected delay */
1058 if (timeo < HZ/2) 1056 timeo = chip_op_time * 8;
1059 timeo = HZ/2; 1057 if (!timeo)
1060 timeo += jiffies; 1058 timeo = 500000;
1059 sleep_time = chip_op_time / 2;
1061 1060
1062 z = 0;
1063 for (;;) { 1061 for (;;) {
1064 if (chip->state != chip_state) {
1065 /* Someone's suspended the operation: sleep */
1066 DECLARE_WAITQUEUE(wait, current);
1067
1068 set_current_state(TASK_UNINTERRUPTIBLE);
1069 add_wait_queue(&chip->wq, &wait);
1070 spin_unlock(chip->mutex);
1071 schedule();
1072 remove_wait_queue(&chip->wq, &wait);
1073 timeo = jiffies + (HZ / 2); /* FIXME */
1074 spin_lock(chip->mutex);
1075 continue;
1076 }
1077
1078 status = map_read(map, cmd_adr); 1062 status = map_read(map, cmd_adr);
1079 if (map_word_andequal(map, status, status_OK, status_OK)) 1063 if (map_word_andequal(map, status, status_OK, status_OK))
1080 break; 1064 break;
1081 1065
1082 /* OK Still waiting */ 1066 if (!timeo) {
1083 if (time_after(jiffies, timeo)) {
1084 map_write(map, CMD(0x70), cmd_adr); 1067 map_write(map, CMD(0x70), cmd_adr);
1085 chip->state = FL_STATUS; 1068 chip->state = FL_STATUS;
1086 return -ETIME; 1069 return -ETIME;
1087 } 1070 }
1088 1071
1089 /* Latency issues. Drop the lock, wait a while and retry */ 1072 /* OK Still waiting. Drop the lock, wait a while and retry. */
1090 z++;
1091 spin_unlock(chip->mutex); 1073 spin_unlock(chip->mutex);
1092 cfi_udelay(1); 1074 if (sleep_time >= 1000000/HZ) {
1075 /*
1076 * Half of the normal delay still remaining
1077 * can be performed with a sleeping delay instead
1078 * of busy waiting.
1079 */
1080 msleep(sleep_time/1000);
1081 timeo -= sleep_time;
1082 sleep_time = 1000000/HZ;
1083 } else {
1084 udelay(1);
1085 cond_resched();
1086 timeo--;
1087 }
1093 spin_lock(chip->mutex); 1088 spin_lock(chip->mutex);
1094 }
1095 1089
1096 if (!z) { 1090 if (chip->state != chip_state) {
1097 if (!--(*chip_op_time)) 1091 /* Someone's suspended the operation: sleep */
1098 *chip_op_time = 1; 1092 DECLARE_WAITQUEUE(wait, current);
1099 } else if (z > 1) 1093 set_current_state(TASK_UNINTERRUPTIBLE);
1100 ++(*chip_op_time); 1094 add_wait_queue(&chip->wq, &wait);
1095 spin_unlock(chip->mutex);
1096 schedule();
1097 remove_wait_queue(&chip->wq, &wait);
1098 spin_lock(chip->mutex);
1099 }
1100 }
1101 1101
1102 /* Done and happy. */ 1102 /* Done and happy. */
1103 chip->state = FL_STATUS; 1103 chip->state = FL_STATUS;
@@ -1107,8 +1107,7 @@ static int inval_cache_and_wait_for_operation(
1107#endif 1107#endif
1108 1108
1109#define WAIT_TIMEOUT(map, chip, adr, udelay) \ 1109#define WAIT_TIMEOUT(map, chip, adr, udelay) \
1110 ({ int __udelay = (udelay); \ 1110 INVAL_CACHE_AND_WAIT(map, chip, adr, 0, 0, udelay);
1111 INVAL_CACHE_AND_WAIT(map, chip, adr, 0, 0, &__udelay); })
1112 1111
1113 1112
1114static int do_point_onechip (struct map_info *map, struct flchip *chip, loff_t adr, size_t len) 1113static int do_point_onechip (struct map_info *map, struct flchip *chip, loff_t adr, size_t len)
@@ -1332,7 +1331,7 @@ static int __xipram do_write_oneword(struct map_info *map, struct flchip *chip,
1332 1331
1333 ret = INVAL_CACHE_AND_WAIT(map, chip, adr, 1332 ret = INVAL_CACHE_AND_WAIT(map, chip, adr,
1334 adr, map_bankwidth(map), 1333 adr, map_bankwidth(map),
1335 &chip->word_write_time); 1334 chip->word_write_time);
1336 if (ret) { 1335 if (ret) {
1337 xip_enable(map, chip, adr); 1336 xip_enable(map, chip, adr);
1338 printk(KERN_ERR "%s: word write error (status timeout)\n", map->name); 1337 printk(KERN_ERR "%s: word write error (status timeout)\n", map->name);
@@ -1569,7 +1568,7 @@ static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip,
1569 1568
1570 ret = INVAL_CACHE_AND_WAIT(map, chip, cmd_adr, 1569 ret = INVAL_CACHE_AND_WAIT(map, chip, cmd_adr,
1571 adr, len, 1570 adr, len,
1572 &chip->buffer_write_time); 1571 chip->buffer_write_time);
1573 if (ret) { 1572 if (ret) {
1574 map_write(map, CMD(0x70), cmd_adr); 1573 map_write(map, CMD(0x70), cmd_adr);
1575 chip->state = FL_STATUS; 1574 chip->state = FL_STATUS;
@@ -1704,7 +1703,7 @@ static int __xipram do_erase_oneblock(struct map_info *map, struct flchip *chip,
1704 1703
1705 ret = INVAL_CACHE_AND_WAIT(map, chip, adr, 1704 ret = INVAL_CACHE_AND_WAIT(map, chip, adr,
1706 adr, len, 1705 adr, len,
1707 &chip->erase_time); 1706 chip->erase_time);
1708 if (ret) { 1707 if (ret) {
1709 map_write(map, CMD(0x70), adr); 1708 map_write(map, CMD(0x70), adr);
1710 chip->state = FL_STATUS; 1709 chip->state = FL_STATUS;
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
index 9885726a16e4..a482e8922de1 100644
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -45,9 +45,11 @@
45#define MAX_WORD_RETRIES 3 45#define MAX_WORD_RETRIES 3
46 46
47#define MANUFACTURER_AMD 0x0001 47#define MANUFACTURER_AMD 0x0001
48#define MANUFACTURER_ATMEL 0x001F
48#define MANUFACTURER_SST 0x00BF 49#define MANUFACTURER_SST 0x00BF
49#define SST49LF004B 0x0060 50#define SST49LF004B 0x0060
50#define SST49LF008A 0x005a 51#define SST49LF008A 0x005a
52#define AT49BV6416 0x00d6
51 53
52static int cfi_amdstd_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *); 54static int cfi_amdstd_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *);
53static int cfi_amdstd_write_words(struct mtd_info *, loff_t, size_t, size_t *, const u_char *); 55static int cfi_amdstd_write_words(struct mtd_info *, loff_t, size_t, size_t *, const u_char *);
@@ -68,6 +70,9 @@ static int get_chip(struct map_info *map, struct flchip *chip, unsigned long adr
68static void put_chip(struct map_info *map, struct flchip *chip, unsigned long adr); 70static void put_chip(struct map_info *map, struct flchip *chip, unsigned long adr);
69#include "fwh_lock.h" 71#include "fwh_lock.h"
70 72
73static int cfi_atmel_lock(struct mtd_info *mtd, loff_t ofs, size_t len);
74static int cfi_atmel_unlock(struct mtd_info *mtd, loff_t ofs, size_t len);
75
71static struct mtd_chip_driver cfi_amdstd_chipdrv = { 76static struct mtd_chip_driver cfi_amdstd_chipdrv = {
72 .probe = NULL, /* Not usable directly */ 77 .probe = NULL, /* Not usable directly */
73 .destroy = cfi_amdstd_destroy, 78 .destroy = cfi_amdstd_destroy,
@@ -161,6 +166,26 @@ static void fixup_use_write_buffers(struct mtd_info *mtd, void *param)
161 } 166 }
162} 167}
163 168
169/* Atmel chips don't use the same PRI format as AMD chips */
170static void fixup_convert_atmel_pri(struct mtd_info *mtd, void *param)
171{
172 struct map_info *map = mtd->priv;
173 struct cfi_private *cfi = map->fldrv_priv;
174 struct cfi_pri_amdstd *extp = cfi->cmdset_priv;
175 struct cfi_pri_atmel atmel_pri;
176
177 memcpy(&atmel_pri, extp, sizeof(atmel_pri));
178 memset((char *)extp + 5, 0, sizeof(*extp) - 5);
179
180 if (atmel_pri.Features & 0x02)
181 extp->EraseSuspend = 2;
182
183 if (atmel_pri.BottomBoot)
184 extp->TopBottom = 2;
185 else
186 extp->TopBottom = 3;
187}
188
164static void fixup_use_secsi(struct mtd_info *mtd, void *param) 189static void fixup_use_secsi(struct mtd_info *mtd, void *param)
165{ 190{
166 /* Setup for chips with a secsi area */ 191 /* Setup for chips with a secsi area */
@@ -179,6 +204,16 @@ static void fixup_use_erase_chip(struct mtd_info *mtd, void *param)
179 204
180} 205}
181 206
207/*
208 * Some Atmel chips (e.g. the AT49BV6416) power-up with all sectors
209 * locked by default.
210 */
211static void fixup_use_atmel_lock(struct mtd_info *mtd, void *param)
212{
213 mtd->lock = cfi_atmel_lock;
214 mtd->unlock = cfi_atmel_unlock;
215}
216
182static struct cfi_fixup cfi_fixup_table[] = { 217static struct cfi_fixup cfi_fixup_table[] = {
183#ifdef AMD_BOOTLOC_BUG 218#ifdef AMD_BOOTLOC_BUG
184 { CFI_MFR_AMD, CFI_ID_ANY, fixup_amd_bootblock, NULL }, 219 { CFI_MFR_AMD, CFI_ID_ANY, fixup_amd_bootblock, NULL },
@@ -192,6 +227,7 @@ static struct cfi_fixup cfi_fixup_table[] = {
192#if !FORCE_WORD_WRITE 227#if !FORCE_WORD_WRITE
193 { CFI_MFR_ANY, CFI_ID_ANY, fixup_use_write_buffers, NULL, }, 228 { CFI_MFR_ANY, CFI_ID_ANY, fixup_use_write_buffers, NULL, },
194#endif 229#endif
230 { CFI_MFR_ATMEL, CFI_ID_ANY, fixup_convert_atmel_pri, NULL },
195 { 0, 0, NULL, NULL } 231 { 0, 0, NULL, NULL }
196}; 232};
197static struct cfi_fixup jedec_fixup_table[] = { 233static struct cfi_fixup jedec_fixup_table[] = {
@@ -207,6 +243,7 @@ static struct cfi_fixup fixup_table[] = {
207 * we know that is the case. 243 * we know that is the case.
208 */ 244 */
209 { CFI_MFR_ANY, CFI_ID_ANY, fixup_use_erase_chip, NULL }, 245 { CFI_MFR_ANY, CFI_ID_ANY, fixup_use_erase_chip, NULL },
246 { CFI_MFR_ATMEL, AT49BV6416, fixup_use_atmel_lock, NULL },
210 { 0, 0, NULL, NULL } 247 { 0, 0, NULL, NULL }
211}; 248};
212 249
@@ -1607,6 +1644,80 @@ static int cfi_amdstd_erase_chip(struct mtd_info *mtd, struct erase_info *instr)
1607 return 0; 1644 return 0;
1608} 1645}
1609 1646
1647static int do_atmel_lock(struct map_info *map, struct flchip *chip,
1648 unsigned long adr, int len, void *thunk)
1649{
1650 struct cfi_private *cfi = map->fldrv_priv;
1651 int ret;
1652
1653 spin_lock(chip->mutex);
1654 ret = get_chip(map, chip, adr + chip->start, FL_LOCKING);
1655 if (ret)
1656 goto out_unlock;
1657 chip->state = FL_LOCKING;
1658
1659 DEBUG(MTD_DEBUG_LEVEL3, "MTD %s(): LOCK 0x%08lx len %d\n",
1660 __func__, adr, len);
1661
1662 cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi,
1663 cfi->device_type, NULL);
1664 cfi_send_gen_cmd(0x55, cfi->addr_unlock2, chip->start, map, cfi,
1665 cfi->device_type, NULL);
1666 cfi_send_gen_cmd(0x80, cfi->addr_unlock1, chip->start, map, cfi,
1667 cfi->device_type, NULL);
1668 cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi,
1669 cfi->device_type, NULL);
1670 cfi_send_gen_cmd(0x55, cfi->addr_unlock2, chip->start, map, cfi,
1671 cfi->device_type, NULL);
1672 map_write(map, CMD(0x40), chip->start + adr);
1673
1674 chip->state = FL_READY;
1675 put_chip(map, chip, adr + chip->start);
1676 ret = 0;
1677
1678out_unlock:
1679 spin_unlock(chip->mutex);
1680 return ret;
1681}
1682
1683static int do_atmel_unlock(struct map_info *map, struct flchip *chip,
1684 unsigned long adr, int len, void *thunk)
1685{
1686 struct cfi_private *cfi = map->fldrv_priv;
1687 int ret;
1688
1689 spin_lock(chip->mutex);
1690 ret = get_chip(map, chip, adr + chip->start, FL_UNLOCKING);
1691 if (ret)
1692 goto out_unlock;
1693 chip->state = FL_UNLOCKING;
1694
1695 DEBUG(MTD_DEBUG_LEVEL3, "MTD %s(): LOCK 0x%08lx len %d\n",
1696 __func__, adr, len);
1697
1698 cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi,
1699 cfi->device_type, NULL);
1700 map_write(map, CMD(0x70), adr);
1701
1702 chip->state = FL_READY;
1703 put_chip(map, chip, adr + chip->start);
1704 ret = 0;
1705
1706out_unlock:
1707 spin_unlock(chip->mutex);
1708 return ret;
1709}
1710
1711static int cfi_atmel_lock(struct mtd_info *mtd, loff_t ofs, size_t len)
1712{
1713 return cfi_varsize_frob(mtd, do_atmel_lock, ofs, len, NULL);
1714}
1715
1716static int cfi_atmel_unlock(struct mtd_info *mtd, loff_t ofs, size_t len)
1717{
1718 return cfi_varsize_frob(mtd, do_atmel_unlock, ofs, len, NULL);
1719}
1720
1610 1721
1611static void cfi_amdstd_sync (struct mtd_info *mtd) 1722static void cfi_amdstd_sync (struct mtd_info *mtd)
1612{ 1723{
diff --git a/drivers/mtd/chips/jedec_probe.c b/drivers/mtd/chips/jedec_probe.c
index 8f39d0a31438..1154dac715aa 100644
--- a/drivers/mtd/chips/jedec_probe.c
+++ b/drivers/mtd/chips/jedec_probe.c
@@ -111,6 +111,7 @@
111#define MX29LV040C 0x004F 111#define MX29LV040C 0x004F
112#define MX29LV160T 0x22C4 112#define MX29LV160T 0x22C4
113#define MX29LV160B 0x2249 113#define MX29LV160B 0x2249
114#define MX29F040 0x00A4
114#define MX29F016 0x00AD 115#define MX29F016 0x00AD
115#define MX29F002T 0x00B0 116#define MX29F002T 0x00B0
116#define MX29F004T 0x0045 117#define MX29F004T 0x0045
@@ -1172,6 +1173,19 @@ static const struct amd_flash_info jedec_table[] = {
1172 } 1173 }
1173 }, { 1174 }, {
1174 .mfr_id = MANUFACTURER_MACRONIX, 1175 .mfr_id = MANUFACTURER_MACRONIX,
1176 .dev_id = MX29F040,
1177 .name = "Macronix MX29F040",
1178 .uaddr = {
1179 [0] = MTD_UADDR_0x0555_0x02AA /* x8 */
1180 },
1181 .DevSize = SIZE_512KiB,
1182 .CmdSet = P_ID_AMD_STD,
1183 .NumEraseRegions= 1,
1184 .regions = {
1185 ERASEINFO(0x10000,8),
1186 }
1187 }, {
1188 .mfr_id = MANUFACTURER_MACRONIX,
1175 .dev_id = MX29F016, 1189 .dev_id = MX29F016,
1176 .name = "Macronix MX29F016", 1190 .name = "Macronix MX29F016",
1177 .uaddr = { 1191 .uaddr = {
diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c
index ede3561be870..401c6a294baa 100644
--- a/drivers/mtd/devices/block2mtd.c
+++ b/drivers/mtd/devices/block2mtd.c
@@ -18,6 +18,7 @@
18#include <linux/mtd/mtd.h> 18#include <linux/mtd/mtd.h>
19#include <linux/buffer_head.h> 19#include <linux/buffer_head.h>
20#include <linux/mutex.h> 20#include <linux/mutex.h>
21#include <linux/mount.h>
21 22
22#define VERSION "$Revision: 1.30 $" 23#define VERSION "$Revision: 1.30 $"
23 24
@@ -236,6 +237,8 @@ static int _block2mtd_write(struct block2mtd_dev *dev, const u_char *buf,
236 } 237 }
237 return 0; 238 return 0;
238} 239}
240
241
239static int block2mtd_write(struct mtd_info *mtd, loff_t to, size_t len, 242static int block2mtd_write(struct mtd_info *mtd, loff_t to, size_t len,
240 size_t *retlen, const u_char *buf) 243 size_t *retlen, const u_char *buf)
241{ 244{
@@ -299,6 +302,19 @@ static struct block2mtd_dev *add_device(char *devname, int erase_size)
299 302
300 /* Get a handle on the device */ 303 /* Get a handle on the device */
301 bdev = open_bdev_excl(devname, O_RDWR, NULL); 304 bdev = open_bdev_excl(devname, O_RDWR, NULL);
305#ifndef MODULE
306 if (IS_ERR(bdev)) {
307
308 /* We might not have rootfs mounted at this point. Try
309 to resolve the device name by other means. */
310
311 dev_t dev = name_to_dev_t(devname);
312 if (dev != 0) {
313 bdev = open_by_devnum(dev, FMODE_WRITE | FMODE_READ);
314 }
315 }
316#endif
317
302 if (IS_ERR(bdev)) { 318 if (IS_ERR(bdev)) {
303 ERROR("error: cannot open device %s", devname); 319 ERROR("error: cannot open device %s", devname);
304 goto devinit_err; 320 goto devinit_err;
@@ -393,26 +409,6 @@ static int parse_num(size_t *num, const char *token)
393} 409}
394 410
395 411
396static int parse_name(char **pname, const char *token, size_t limit)
397{
398 size_t len;
399 char *name;
400
401 len = strlen(token) + 1;
402 if (len > limit)
403 return -ENOSPC;
404
405 name = kmalloc(len, GFP_KERNEL);
406 if (!name)
407 return -ENOMEM;
408
409 strcpy(name, token);
410
411 *pname = name;
412 return 0;
413}
414
415
416static inline void kill_final_newline(char *str) 412static inline void kill_final_newline(char *str)
417{ 413{
418 char *newline = strrchr(str, '\n'); 414 char *newline = strrchr(str, '\n');
@@ -426,9 +422,15 @@ static inline void kill_final_newline(char *str)
426 return 0; \ 422 return 0; \
427} while (0) 423} while (0)
428 424
429static int block2mtd_setup(const char *val, struct kernel_param *kp) 425#ifndef MODULE
426static int block2mtd_init_called = 0;
427static __initdata char block2mtd_paramline[80 + 12]; /* 80 for device, 12 for erase size */
428#endif
429
430
431static int block2mtd_setup2(const char *val)
430{ 432{
431 char buf[80+12]; /* 80 for device, 12 for erase size */ 433 char buf[80 + 12]; /* 80 for device, 12 for erase size */
432 char *str = buf; 434 char *str = buf;
433 char *token[2]; 435 char *token[2];
434 char *name; 436 char *name;
@@ -450,13 +452,9 @@ static int block2mtd_setup(const char *val, struct kernel_param *kp)
450 if (!token[0]) 452 if (!token[0])
451 parse_err("no argument"); 453 parse_err("no argument");
452 454
453 ret = parse_name(&name, token[0], 80); 455 name = token[0];
454 if (ret == -ENOMEM) 456 if (strlen(name) + 1 > 80)
455 parse_err("out of memory"); 457 parse_err("device name too long");
456 if (ret == -ENOSPC)
457 parse_err("name too long");
458 if (ret)
459 return 0;
460 458
461 if (token[1]) { 459 if (token[1]) {
462 ret = parse_num(&erase_size, token[1]); 460 ret = parse_num(&erase_size, token[1]);
@@ -472,13 +470,48 @@ static int block2mtd_setup(const char *val, struct kernel_param *kp)
472} 470}
473 471
474 472
473static int block2mtd_setup(const char *val, struct kernel_param *kp)
474{
475#ifdef MODULE
476 return block2mtd_setup2(val);
477#else
478 /* If more parameters are later passed in via
479 /sys/module/block2mtd/parameters/block2mtd
480 and block2mtd_init() has already been called,
481 we can parse the argument now. */
482
483 if (block2mtd_init_called)
484 return block2mtd_setup2(val);
485
486 /* During early boot stage, we only save the parameters
487 here. We must parse them later: if the param passed
488 from kernel boot command line, block2mtd_setup() is
489 called so early that it is not possible to resolve
490 the device (even kmalloc() fails). Deter that work to
491 block2mtd_setup2(). */
492
493 strlcpy(block2mtd_paramline, val, sizeof(block2mtd_paramline));
494
495 return 0;
496#endif
497}
498
499
475module_param_call(block2mtd, block2mtd_setup, NULL, NULL, 0200); 500module_param_call(block2mtd, block2mtd_setup, NULL, NULL, 0200);
476MODULE_PARM_DESC(block2mtd, "Device to use. \"block2mtd=<dev>[,<erasesize>]\""); 501MODULE_PARM_DESC(block2mtd, "Device to use. \"block2mtd=<dev>[,<erasesize>]\"");
477 502
478static int __init block2mtd_init(void) 503static int __init block2mtd_init(void)
479{ 504{
505 int ret = 0;
480 INFO("version " VERSION); 506 INFO("version " VERSION);
481 return 0; 507
508#ifndef MODULE
509 if (strlen(block2mtd_paramline))
510 ret = block2mtd_setup2(block2mtd_paramline);
511 block2mtd_init_called = 1;
512#endif
513
514 return ret;
482} 515}
483 516
484 517
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index a8466141e914..ef4a731ca5c2 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -406,13 +406,13 @@ struct flash_info {
406 406
407static struct flash_info __devinitdata m25p_data [] = { 407static struct flash_info __devinitdata m25p_data [] = {
408 /* REVISIT: fill in JEDEC ids, for parts that have them */ 408 /* REVISIT: fill in JEDEC ids, for parts that have them */
409 { "m25p05", 0x05, 0x0000, 32 * 1024, 2 }, 409 { "m25p05", 0x05, 0x2010, 32 * 1024, 2 },
410 { "m25p10", 0x10, 0x0000, 32 * 1024, 4 }, 410 { "m25p10", 0x10, 0x2011, 32 * 1024, 4 },
411 { "m25p20", 0x11, 0x0000, 64 * 1024, 4 }, 411 { "m25p20", 0x11, 0x2012, 64 * 1024, 4 },
412 { "m25p40", 0x12, 0x0000, 64 * 1024, 8 }, 412 { "m25p40", 0x12, 0x2013, 64 * 1024, 8 },
413 { "m25p80", 0x13, 0x0000, 64 * 1024, 16 }, 413 { "m25p80", 0x13, 0x0000, 64 * 1024, 16 },
414 { "m25p16", 0x14, 0x0000, 64 * 1024, 32 }, 414 { "m25p16", 0x14, 0x2015, 64 * 1024, 32 },
415 { "m25p32", 0x15, 0x0000, 64 * 1024, 64 }, 415 { "m25p32", 0x15, 0x2016, 64 * 1024, 64 },
416 { "m25p64", 0x16, 0x2017, 64 * 1024, 128 }, 416 { "m25p64", 0x16, 0x2017, 64 * 1024, 128 },
417}; 417};
418 418
diff --git a/drivers/mtd/devices/pmc551.c b/drivers/mtd/devices/pmc551.c
index 6f9bbf6fee4d..2c0149708739 100644
--- a/drivers/mtd/devices/pmc551.c
+++ b/drivers/mtd/devices/pmc551.c
@@ -99,10 +99,6 @@
99#include <asm/system.h> 99#include <asm/system.h>
100#include <linux/pci.h> 100#include <linux/pci.h>
101 101
102#ifndef CONFIG_PCI
103#error Enable PCI in your kernel config
104#endif
105
106#include <linux/mtd/mtd.h> 102#include <linux/mtd/mtd.h>
107#include <linux/mtd/pmc551.h> 103#include <linux/mtd/pmc551.h>
108#include <linux/mtd/compatmac.h> 104#include <linux/mtd/compatmac.h>
diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig
index 83d0b2a52527..64d1b6a6c920 100644
--- a/drivers/mtd/maps/Kconfig
+++ b/drivers/mtd/maps/Kconfig
@@ -13,13 +13,13 @@ config MTD_COMPLEX_MAPPINGS
13 13
14config MTD_PHYSMAP 14config MTD_PHYSMAP
15 tristate "CFI Flash device in physical memory map" 15 tristate "CFI Flash device in physical memory map"
16 depends on MTD_CFI 16 depends on MTD_CFI || MTD_JEDECPROBE || MTD_ROM
17 help 17 help
18 This provides a 'mapping' driver which allows the CFI probe and 18 This provides a 'mapping' driver which allows the NOR Flash and
19 command set driver code to communicate with flash chips which 19 ROM driver code to communicate with chips which are mapped
20 are mapped physically into the CPU's memory. You will need to 20 physically into the CPU's memory. You will need to configure
21 configure the physical address and size of the flash chips on 21 the physical address and size of the flash chips on your
22 your particular board as well as the bus width, either statically 22 particular board as well as the bus width, either statically
23 with config options or at run-time. 23 with config options or at run-time.
24 24
25config MTD_PHYSMAP_START 25config MTD_PHYSMAP_START
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c
index fb8b4f7e48d3..5b6acfcb2b88 100644
--- a/drivers/mtd/mtdchar.c
+++ b/drivers/mtd/mtdchar.c
@@ -62,15 +62,12 @@ static loff_t mtd_lseek (struct file *file, loff_t offset, int orig)
62 struct mtd_info *mtd = mfi->mtd; 62 struct mtd_info *mtd = mfi->mtd;
63 63
64 switch (orig) { 64 switch (orig) {
65 case 0: 65 case SEEK_SET:
66 /* SEEK_SET */
67 break; 66 break;
68 case 1: 67 case SEEK_CUR:
69 /* SEEK_CUR */
70 offset += file->f_pos; 68 offset += file->f_pos;
71 break; 69 break;
72 case 2: 70 case SEEK_END:
73 /* SEEK_END */
74 offset += mtd->size; 71 offset += mtd->size;
75 break; 72 break;
76 default: 73 default:
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index 3db77eec0ed2..c99302ed3823 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -11,7 +11,7 @@ config MTD_NAND
11 help 11 help
12 This enables support for accessing all type of NAND flash 12 This enables support for accessing all type of NAND flash
13 devices. For further information see 13 devices. For further information see
14 <http://www.linux-mtd.infradead.org/tech/nand.html>. 14 <http://www.linux-mtd.infradead.org/doc/nand.html>.
15 15
16config MTD_NAND_VERIFY_WRITE 16config MTD_NAND_VERIFY_WRITE
17 bool "Verify NAND page writes" 17 bool "Verify NAND page writes"
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index c8cbc00243fe..975b2ef61121 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -1204,7 +1204,7 @@ static int nand_write_oob_syndrome(struct mtd_info *mtd,
1204 pos = steps * (eccsize + chunk); 1204 pos = steps * (eccsize + chunk);
1205 steps = 0; 1205 steps = 0;
1206 } else 1206 } else
1207 pos = eccsize + chunk; 1207 pos = eccsize;
1208 1208
1209 chip->cmdfunc(mtd, NAND_CMD_SEQIN, pos, page); 1209 chip->cmdfunc(mtd, NAND_CMD_SEQIN, pos, page);
1210 for (i = 0; i < steps; i++) { 1210 for (i = 0; i < steps; i++) {
@@ -1567,7 +1567,7 @@ static uint8_t *nand_fill_oob(struct nand_chip *chip, uint8_t *oob,
1567 bytes = min_t(size_t, len, free->length); 1567 bytes = min_t(size_t, len, free->length);
1568 boffs = free->offset; 1568 boffs = free->offset;
1569 } 1569 }
1570 memcpy(chip->oob_poi + woffs, oob, bytes); 1570 memcpy(chip->oob_poi + boffs, oob, bytes);
1571 oob += bytes; 1571 oob += bytes;
1572 } 1572 }
1573 return oob; 1573 return oob;
@@ -2224,7 +2224,7 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd,
2224 } 2224 }
2225 2225
2226 /* Try to identify manufacturer */ 2226 /* Try to identify manufacturer */
2227 for (maf_idx = 0; nand_manuf_ids[maf_idx].id != 0x0; maf_id++) { 2227 for (maf_idx = 0; nand_manuf_ids[maf_idx].id != 0x0; maf_idx++) {
2228 if (nand_manuf_ids[maf_idx].id == *maf_id) 2228 if (nand_manuf_ids[maf_idx].id == *maf_id)
2229 break; 2229 break;
2230 } 2230 }
diff --git a/drivers/mtd/nand/sharpsl.c b/drivers/mtd/nand/sharpsl.c
index fbeedc3184e9..51c7288ab49a 100644
--- a/drivers/mtd/nand/sharpsl.c
+++ b/drivers/mtd/nand/sharpsl.c
@@ -78,7 +78,7 @@ static struct mtd_partition sharpsl_nand_default_partition_info[] = {
78/* 78/*
79 * hardware specific access to control-lines 79 * hardware specific access to control-lines
80 * ctrl: 80 * ctrl:
81 * NAND_CNE: bit 0 -> bit 0 & 4 81 * NAND_CNE: bit 0 -> ! bit 0 & 4
82 * NAND_CLE: bit 1 -> bit 1 82 * NAND_CLE: bit 1 -> bit 1
83 * NAND_ALE: bit 2 -> bit 2 83 * NAND_ALE: bit 2 -> bit 2
84 * 84 *
@@ -92,7 +92,10 @@ static void sharpsl_nand_hwcontrol(struct mtd_info *mtd, int cmd,
92 unsigned char bits = ctrl & 0x07; 92 unsigned char bits = ctrl & 0x07;
93 93
94 bits |= (ctrl & 0x01) << 4; 94 bits |= (ctrl & 0x01) << 4;
95 writeb((readb(FLASHCTL) & 0x17) | bits, FLASHCTL); 95
96 bits ^= 0x11;
97
98 writeb((readb(FLASHCTL) & ~0x17) | bits, FLASHCTL);
96 } 99 }
97 100
98 if (cmd != NAND_CMD_NONE) 101 if (cmd != NAND_CMD_NONE)
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 726f43d55937..98ef9f85482f 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -1433,8 +1433,8 @@ e1000_configure_tx(struct e1000_adapter *adapter)
1433 E1000_WRITE_REG(hw, TDBAL, (tdba & 0x00000000ffffffffULL)); 1433 E1000_WRITE_REG(hw, TDBAL, (tdba & 0x00000000ffffffffULL));
1434 E1000_WRITE_REG(hw, TDT, 0); 1434 E1000_WRITE_REG(hw, TDT, 0);
1435 E1000_WRITE_REG(hw, TDH, 0); 1435 E1000_WRITE_REG(hw, TDH, 0);
1436 adapter->tx_ring[0].tdh = E1000_TDH; 1436 adapter->tx_ring[0].tdh = ((hw->mac_type >= e1000_82543) ? E1000_TDH : E1000_82542_TDH);
1437 adapter->tx_ring[0].tdt = E1000_TDT; 1437 adapter->tx_ring[0].tdt = ((hw->mac_type >= e1000_82543) ? E1000_TDT : E1000_82542_TDT);
1438 break; 1438 break;
1439 } 1439 }
1440 1440
@@ -1840,8 +1840,8 @@ e1000_configure_rx(struct e1000_adapter *adapter)
1840 E1000_WRITE_REG(hw, RDBAL, (rdba & 0x00000000ffffffffULL)); 1840 E1000_WRITE_REG(hw, RDBAL, (rdba & 0x00000000ffffffffULL));
1841 E1000_WRITE_REG(hw, RDT, 0); 1841 E1000_WRITE_REG(hw, RDT, 0);
1842 E1000_WRITE_REG(hw, RDH, 0); 1842 E1000_WRITE_REG(hw, RDH, 0);
1843 adapter->rx_ring[0].rdh = E1000_RDH; 1843 adapter->rx_ring[0].rdh = ((hw->mac_type >= e1000_82543) ? E1000_RDH : E1000_82542_RDH);
1844 adapter->rx_ring[0].rdt = E1000_RDT; 1844 adapter->rx_ring[0].rdt = ((hw->mac_type >= e1000_82543) ? E1000_RDT : E1000_82542_RDT);
1845 break; 1845 break;
1846 } 1846 }
1847 1847
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index 760c61b98867..eeab1df5bef3 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -385,6 +385,8 @@ static int mv643xx_eth_receive_queue(struct net_device *dev, int budget)
385 struct pkt_info pkt_info; 385 struct pkt_info pkt_info;
386 386
387 while (budget-- > 0 && eth_port_receive(mp, &pkt_info) == ETH_OK) { 387 while (budget-- > 0 && eth_port_receive(mp, &pkt_info) == ETH_OK) {
388 dma_unmap_single(NULL, pkt_info.buf_ptr, RX_SKB_SIZE,
389 DMA_FROM_DEVICE);
388 mp->rx_desc_count--; 390 mp->rx_desc_count--;
389 received_packets++; 391 received_packets++;
390 392
diff --git a/drivers/net/wireless/zd1211rw/zd_chip.c b/drivers/net/wireless/zd1211rw/zd_chip.c
index da9d06bdb818..aa792821854e 100644
--- a/drivers/net/wireless/zd1211rw/zd_chip.c
+++ b/drivers/net/wireless/zd1211rw/zd_chip.c
@@ -1430,9 +1430,43 @@ static int ofdm_qual_db(u8 status_quality, u8 rate, unsigned int size)
1430 break; 1430 break;
1431 } 1431 }
1432 1432
1433 switch (rate) {
1434 case ZD_OFDM_RATE_6M:
1435 case ZD_OFDM_RATE_9M:
1436 i += 3;
1437 break;
1438 case ZD_OFDM_RATE_12M:
1439 case ZD_OFDM_RATE_18M:
1440 i += 5;
1441 break;
1442 case ZD_OFDM_RATE_24M:
1443 case ZD_OFDM_RATE_36M:
1444 i += 9;
1445 break;
1446 case ZD_OFDM_RATE_48M:
1447 case ZD_OFDM_RATE_54M:
1448 i += 15;
1449 break;
1450 default:
1451 return -EINVAL;
1452 }
1453
1433 return i; 1454 return i;
1434} 1455}
1435 1456
1457static int ofdm_qual_percent(u8 status_quality, u8 rate, unsigned int size)
1458{
1459 int r;
1460
1461 r = ofdm_qual_db(status_quality, rate, size);
1462 ZD_ASSERT(r >= 0);
1463 if (r < 0)
1464 r = 0;
1465
1466 r = (r * 100)/29;
1467 return r <= 100 ? r : 100;
1468}
1469
1436static unsigned int log10times100(unsigned int x) 1470static unsigned int log10times100(unsigned int x)
1437{ 1471{
1438 static const u8 log10[] = { 1472 static const u8 log10[] = {
@@ -1476,31 +1510,28 @@ static int cck_snr_db(u8 status_quality)
1476 return r; 1510 return r;
1477} 1511}
1478 1512
1479static int rx_qual_db(const void *rx_frame, unsigned int size, 1513static int cck_qual_percent(u8 status_quality)
1480 const struct rx_status *status)
1481{ 1514{
1482 return (status->frame_status&ZD_RX_OFDM) ? 1515 int r;
1483 ofdm_qual_db(status->signal_quality_ofdm, 1516
1484 zd_ofdm_plcp_header_rate(rx_frame), 1517 r = cck_snr_db(status_quality);
1485 size) : 1518 r = (100*r)/17;
1486 cck_snr_db(status->signal_quality_cck); 1519 return r <= 100 ? r : 100;
1487} 1520}
1488 1521
1489u8 zd_rx_qual_percent(const void *rx_frame, unsigned int size, 1522u8 zd_rx_qual_percent(const void *rx_frame, unsigned int size,
1490 const struct rx_status *status) 1523 const struct rx_status *status)
1491{ 1524{
1492 int r = rx_qual_db(rx_frame, size, status); 1525 return (status->frame_status&ZD_RX_OFDM) ?
1493 if (r < 0) 1526 ofdm_qual_percent(status->signal_quality_ofdm,
1494 r = 0; 1527 zd_ofdm_plcp_header_rate(rx_frame),
1495 r = (r * 100) / 14; 1528 size) :
1496 if (r > 100) 1529 cck_qual_percent(status->signal_quality_cck);
1497 r = 100;
1498 return r;
1499} 1530}
1500 1531
1501u8 zd_rx_strength_percent(u8 rssi) 1532u8 zd_rx_strength_percent(u8 rssi)
1502{ 1533{
1503 int r = (rssi*100) / 30; 1534 int r = (rssi*100) / 41;
1504 if (r > 100) 1535 if (r > 100)
1505 r = 100; 1536 r = 100;
1506 return (u8) r; 1537 return (u8) r;
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c
index d6f3e02a0b54..a9bd80a08613 100644
--- a/drivers/net/wireless/zd1211rw/zd_mac.c
+++ b/drivers/net/wireless/zd1211rw/zd_mac.c
@@ -816,13 +816,25 @@ static int filter_rx(struct ieee80211_device *ieee,
816 return -EINVAL; 816 return -EINVAL;
817} 817}
818 818
819static void update_qual_rssi(struct zd_mac *mac, u8 qual_percent, u8 rssi) 819static void update_qual_rssi(struct zd_mac *mac,
820 const u8 *buffer, unsigned int length,
821 u8 qual_percent, u8 rssi_percent)
820{ 822{
821 unsigned long flags; 823 unsigned long flags;
824 struct ieee80211_hdr_3addr *hdr;
825 int i;
826
827 hdr = (struct ieee80211_hdr_3addr *)buffer;
828 if (length < offsetof(struct ieee80211_hdr_3addr, addr3))
829 return;
830 if (memcmp(hdr->addr2, zd_mac_to_ieee80211(mac)->bssid, ETH_ALEN) != 0)
831 return;
822 832
823 spin_lock_irqsave(&mac->lock, flags); 833 spin_lock_irqsave(&mac->lock, flags);
824 mac->qual_average = (7 * mac->qual_average + qual_percent) / 8; 834 i = mac->stats_count % ZD_MAC_STATS_BUFFER_SIZE;
825 mac->rssi_average = (7 * mac->rssi_average + rssi) / 8; 835 mac->qual_buffer[i] = qual_percent;
836 mac->rssi_buffer[i] = rssi_percent;
837 mac->stats_count++;
826 spin_unlock_irqrestore(&mac->lock, flags); 838 spin_unlock_irqrestore(&mac->lock, flags);
827} 839}
828 840
@@ -853,7 +865,6 @@ static int fill_rx_stats(struct ieee80211_rx_stats *stats,
853 if (stats->rate) 865 if (stats->rate)
854 stats->mask |= IEEE80211_STATMASK_RATE; 866 stats->mask |= IEEE80211_STATMASK_RATE;
855 867
856 update_qual_rssi(mac, stats->signal, stats->rssi);
857 return 0; 868 return 0;
858} 869}
859 870
@@ -877,6 +888,8 @@ int zd_mac_rx(struct zd_mac *mac, const u8 *buffer, unsigned int length)
877 sizeof(struct rx_status); 888 sizeof(struct rx_status);
878 buffer += ZD_PLCP_HEADER_SIZE; 889 buffer += ZD_PLCP_HEADER_SIZE;
879 890
891 update_qual_rssi(mac, buffer, length, stats.signal, stats.rssi);
892
880 r = filter_rx(ieee, buffer, length, &stats); 893 r = filter_rx(ieee, buffer, length, &stats);
881 if (r <= 0) 894 if (r <= 0)
882 return r; 895 return r;
@@ -981,17 +994,31 @@ struct iw_statistics *zd_mac_get_wireless_stats(struct net_device *ndev)
981{ 994{
982 struct zd_mac *mac = zd_netdev_mac(ndev); 995 struct zd_mac *mac = zd_netdev_mac(ndev);
983 struct iw_statistics *iw_stats = &mac->iw_stats; 996 struct iw_statistics *iw_stats = &mac->iw_stats;
997 unsigned int i, count, qual_total, rssi_total;
984 998
985 memset(iw_stats, 0, sizeof(struct iw_statistics)); 999 memset(iw_stats, 0, sizeof(struct iw_statistics));
986 /* We are not setting the status, because ieee->state is not updated 1000 /* We are not setting the status, because ieee->state is not updated
987 * at all and this driver doesn't track authentication state. 1001 * at all and this driver doesn't track authentication state.
988 */ 1002 */
989 spin_lock_irq(&mac->lock); 1003 spin_lock_irq(&mac->lock);
990 iw_stats->qual.qual = mac->qual_average; 1004 count = mac->stats_count < ZD_MAC_STATS_BUFFER_SIZE ?
991 iw_stats->qual.level = mac->rssi_average; 1005 mac->stats_count : ZD_MAC_STATS_BUFFER_SIZE;
992 iw_stats->qual.updated = IW_QUAL_QUAL_UPDATED|IW_QUAL_LEVEL_UPDATED| 1006 qual_total = rssi_total = 0;
993 IW_QUAL_NOISE_INVALID; 1007 for (i = 0; i < count; i++) {
1008 qual_total += mac->qual_buffer[i];
1009 rssi_total += mac->rssi_buffer[i];
1010 }
994 spin_unlock_irq(&mac->lock); 1011 spin_unlock_irq(&mac->lock);
1012 iw_stats->qual.updated = IW_QUAL_NOISE_INVALID;
1013 if (count > 0) {
1014 iw_stats->qual.qual = qual_total / count;
1015 iw_stats->qual.level = rssi_total / count;
1016 iw_stats->qual.updated |=
1017 IW_QUAL_QUAL_UPDATED|IW_QUAL_LEVEL_UPDATED;
1018 } else {
1019 iw_stats->qual.updated |=
1020 IW_QUAL_QUAL_INVALID|IW_QUAL_LEVEL_INVALID;
1021 }
995 /* TODO: update counter */ 1022 /* TODO: update counter */
996 return iw_stats; 1023 return iw_stats;
997} 1024}
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.h b/drivers/net/wireless/zd1211rw/zd_mac.h
index 71e382c589ee..b3ba49b84634 100644
--- a/drivers/net/wireless/zd1211rw/zd_mac.h
+++ b/drivers/net/wireless/zd1211rw/zd_mac.h
@@ -1,4 +1,4 @@
1/* zd_mac.c 1/* zd_mac.h
2 * 2 *
3 * This program is free software; you can redistribute it and/or modify 3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by 4 * it under the terms of the GNU General Public License as published by
@@ -87,9 +87,9 @@ struct rx_length_info {
87#define RX_LENGTH_INFO_TAG 0x697e 87#define RX_LENGTH_INFO_TAG 0x697e
88 88
89struct rx_status { 89struct rx_status {
90 u8 signal_quality_cck;
90 /* rssi */ 91 /* rssi */
91 u8 signal_strength; 92 u8 signal_strength;
92 u8 signal_quality_cck;
93 u8 signal_quality_ofdm; 93 u8 signal_quality_ofdm;
94 u8 decryption_type; 94 u8 decryption_type;
95 u8 frame_status; 95 u8 frame_status;
@@ -120,14 +120,17 @@ enum mac_flags {
120 MAC_FIXED_CHANNEL = 0x01, 120 MAC_FIXED_CHANNEL = 0x01,
121}; 121};
122 122
123#define ZD_MAC_STATS_BUFFER_SIZE 16
124
123struct zd_mac { 125struct zd_mac {
124 struct net_device *netdev; 126 struct net_device *netdev;
125 struct zd_chip chip; 127 struct zd_chip chip;
126 spinlock_t lock; 128 spinlock_t lock;
127 /* Unlocked reading possible */ 129 /* Unlocked reading possible */
128 struct iw_statistics iw_stats; 130 struct iw_statistics iw_stats;
129 u8 qual_average; 131 unsigned int stats_count;
130 u8 rssi_average; 132 u8 qual_buffer[ZD_MAC_STATS_BUFFER_SIZE];
133 u8 rssi_buffer[ZD_MAC_STATS_BUFFER_SIZE];
131 u8 regdomain; 134 u8 regdomain;
132 u8 default_regdomain; 135 u8 default_regdomain;
133 u8 requested_channel; 136 u8 requested_channel;
diff --git a/drivers/s390/net/Kconfig b/drivers/s390/net/Kconfig
index 548854754921..1a93fa684e9f 100644
--- a/drivers/s390/net/Kconfig
+++ b/drivers/s390/net/Kconfig
@@ -92,15 +92,6 @@ config QETH_VLAN
92 If CONFIG_QETH is switched on, this option will include IEEE 92 If CONFIG_QETH is switched on, this option will include IEEE
93 802.1q VLAN support in the qeth device driver. 93 802.1q VLAN support in the qeth device driver.
94 94
95config QETH_PERF_STATS
96 bool "Performance statistics in /proc"
97 depends on QETH
98 help
99 When switched on, this option will add a file in the proc-fs
100 (/proc/qeth_perf_stats) containing performance statistics. It
101 may slightly impact performance, so this is only recommended for
102 internal tuning of the device driver.
103
104config CCWGROUP 95config CCWGROUP
105 tristate 96 tristate
106 default (LCS || CTC || QETH) 97 default (LCS || CTC || QETH)
diff --git a/drivers/s390/net/Makefile b/drivers/s390/net/Makefile
index 6775a837d646..4777e36a922f 100644
--- a/drivers/s390/net/Makefile
+++ b/drivers/s390/net/Makefile
@@ -10,7 +10,6 @@ obj-$(CONFIG_SMSGIUCV) += smsgiucv.o
10obj-$(CONFIG_CTC) += ctc.o fsm.o cu3088.o 10obj-$(CONFIG_CTC) += ctc.o fsm.o cu3088.o
11obj-$(CONFIG_LCS) += lcs.o cu3088.o 11obj-$(CONFIG_LCS) += lcs.o cu3088.o
12obj-$(CONFIG_CLAW) += claw.o cu3088.o 12obj-$(CONFIG_CLAW) += claw.o cu3088.o
13obj-$(CONFIG_MPC) += ctcmpc.o fsm.o cu3088.o
14qeth-y := qeth_main.o qeth_mpc.o qeth_sys.o qeth_eddp.o 13qeth-y := qeth_main.o qeth_mpc.o qeth_sys.o qeth_eddp.o
15qeth-$(CONFIG_PROC_FS) += qeth_proc.o 14qeth-$(CONFIG_PROC_FS) += qeth_proc.o
16obj-$(CONFIG_QETH) += qeth.o 15obj-$(CONFIG_QETH) += qeth.o
diff --git a/drivers/s390/net/ctcmain.c b/drivers/s390/net/ctcmain.c
index 8a4b58120146..3257c22dd79c 100644
--- a/drivers/s390/net/ctcmain.c
+++ b/drivers/s390/net/ctcmain.c
@@ -1714,6 +1714,9 @@ add_channel(struct ccw_device *cdev, enum channel_types type)
1714 kfree(ch); 1714 kfree(ch);
1715 return 0; 1715 return 0;
1716 } 1716 }
1717
1718 spin_lock_init(&ch->collect_lock);
1719
1717 fsm_settimer(ch->fsm, &ch->timer); 1720 fsm_settimer(ch->fsm, &ch->timer);
1718 skb_queue_head_init(&ch->io_queue); 1721 skb_queue_head_init(&ch->io_queue);
1719 skb_queue_head_init(&ch->collect_queue); 1722 skb_queue_head_init(&ch->collect_queue);
diff --git a/drivers/s390/net/iucv.c b/drivers/s390/net/iucv.c
index 0e863df4027a..821dde86e240 100644
--- a/drivers/s390/net/iucv.c
+++ b/drivers/s390/net/iucv.c
@@ -335,8 +335,8 @@ do { \
335 335
336#else 336#else
337 337
338#define iucv_debug(lvl, fmt, args...) 338#define iucv_debug(lvl, fmt, args...) do { } while (0)
339#define iucv_dumpit(title, buf, len) 339#define iucv_dumpit(title, buf, len) do { } while (0)
340 340
341#endif 341#endif
342 342
diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c
index 2eded55ae88d..16ac68c27a27 100644
--- a/drivers/s390/net/lcs.c
+++ b/drivers/s390/net/lcs.c
@@ -670,9 +670,8 @@ lcs_ready_buffer(struct lcs_channel *channel, struct lcs_buffer *buffer)
670 int index, rc; 670 int index, rc;
671 671
672 LCS_DBF_TEXT(5, trace, "rdybuff"); 672 LCS_DBF_TEXT(5, trace, "rdybuff");
673 if (buffer->state != BUF_STATE_LOCKED && 673 BUG_ON(buffer->state != BUF_STATE_LOCKED &&
674 buffer->state != BUF_STATE_PROCESSED) 674 buffer->state != BUF_STATE_PROCESSED);
675 BUG();
676 spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags); 675 spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags);
677 buffer->state = BUF_STATE_READY; 676 buffer->state = BUF_STATE_READY;
678 index = buffer - channel->iob; 677 index = buffer - channel->iob;
@@ -696,8 +695,7 @@ __lcs_processed_buffer(struct lcs_channel *channel, struct lcs_buffer *buffer)
696 int index, prev, next; 695 int index, prev, next;
697 696
698 LCS_DBF_TEXT(5, trace, "prcsbuff"); 697 LCS_DBF_TEXT(5, trace, "prcsbuff");
699 if (buffer->state != BUF_STATE_READY) 698 BUG_ON(buffer->state != BUF_STATE_READY);
700 BUG();
701 buffer->state = BUF_STATE_PROCESSED; 699 buffer->state = BUF_STATE_PROCESSED;
702 index = buffer - channel->iob; 700 index = buffer - channel->iob;
703 prev = (index - 1) & (LCS_NUM_BUFFS - 1); 701 prev = (index - 1) & (LCS_NUM_BUFFS - 1);
@@ -729,9 +727,8 @@ lcs_release_buffer(struct lcs_channel *channel, struct lcs_buffer *buffer)
729 unsigned long flags; 727 unsigned long flags;
730 728
731 LCS_DBF_TEXT(5, trace, "relbuff"); 729 LCS_DBF_TEXT(5, trace, "relbuff");
732 if (buffer->state != BUF_STATE_LOCKED && 730 BUG_ON(buffer->state != BUF_STATE_LOCKED &&
733 buffer->state != BUF_STATE_PROCESSED) 731 buffer->state != BUF_STATE_PROCESSED);
734 BUG();
735 spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags); 732 spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags);
736 buffer->state = BUF_STATE_EMPTY; 733 buffer->state = BUF_STATE_EMPTY;
737 spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags); 734 spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags);
diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c
index 5d6e6cbfa360..d7d1cc0a5c8e 100644
--- a/drivers/s390/net/netiucv.c
+++ b/drivers/s390/net/netiucv.c
@@ -112,7 +112,12 @@ struct iucv_connection {
112/** 112/**
113 * Linked list of all connection structs. 113 * Linked list of all connection structs.
114 */ 114 */
115static struct iucv_connection *iucv_connections; 115struct iucv_connection_struct {
116 struct iucv_connection *iucv_connections;
117 rwlock_t iucv_rwlock;
118};
119
120static struct iucv_connection_struct iucv_conns;
116 121
117/** 122/**
118 * Representation of event-data for the 123 * Representation of event-data for the
@@ -1368,8 +1373,10 @@ user_write (struct device *dev, struct device_attribute *attr, const char *buf,
1368 struct net_device *ndev = priv->conn->netdev; 1373 struct net_device *ndev = priv->conn->netdev;
1369 char *p; 1374 char *p;
1370 char *tmp; 1375 char *tmp;
1371 char username[10]; 1376 char username[9];
1372 int i; 1377 int i;
1378 struct iucv_connection **clist = &iucv_conns.iucv_connections;
1379 unsigned long flags;
1373 1380
1374 IUCV_DBF_TEXT(trace, 3, __FUNCTION__); 1381 IUCV_DBF_TEXT(trace, 3, __FUNCTION__);
1375 if (count>9) { 1382 if (count>9) {
@@ -1382,7 +1389,7 @@ user_write (struct device *dev, struct device_attribute *attr, const char *buf,
1382 tmp = strsep((char **) &buf, "\n"); 1389 tmp = strsep((char **) &buf, "\n");
1383 for (i=0, p=tmp; i<8 && *p; i++, p++) { 1390 for (i=0, p=tmp; i<8 && *p; i++, p++) {
1384 if (isalnum(*p) || (*p == '$')) 1391 if (isalnum(*p) || (*p == '$'))
1385 username[i]= *p; 1392 username[i]= toupper(*p);
1386 else if (*p == '\n') { 1393 else if (*p == '\n') {
1387 /* trailing lf, grr */ 1394 /* trailing lf, grr */
1388 break; 1395 break;
@@ -1395,11 +1402,11 @@ user_write (struct device *dev, struct device_attribute *attr, const char *buf,
1395 return -EINVAL; 1402 return -EINVAL;
1396 } 1403 }
1397 } 1404 }
1398 while (i<9) 1405 while (i<8)
1399 username[i++] = ' '; 1406 username[i++] = ' ';
1400 username[9] = '\0'; 1407 username[8] = '\0';
1401 1408
1402 if (memcmp(username, priv->conn->userid, 8)) { 1409 if (memcmp(username, priv->conn->userid, 9)) {
1403 /* username changed */ 1410 /* username changed */
1404 if (ndev->flags & (IFF_UP | IFF_RUNNING)) { 1411 if (ndev->flags & (IFF_UP | IFF_RUNNING)) {
1405 PRINT_WARN( 1412 PRINT_WARN(
@@ -1410,6 +1417,19 @@ user_write (struct device *dev, struct device_attribute *attr, const char *buf,
1410 return -EBUSY; 1417 return -EBUSY;
1411 } 1418 }
1412 } 1419 }
1420 read_lock_irqsave(&iucv_conns.iucv_rwlock, flags);
1421 while (*clist) {
1422 if (!strncmp(username, (*clist)->userid, 9) ||
1423 ((*clist)->netdev != ndev))
1424 break;
1425 clist = &((*clist)->next);
1426 }
1427 read_unlock_irqrestore(&iucv_conns.iucv_rwlock, flags);
1428 if (*clist) {
1429 PRINT_WARN("netiucv: Connection to %s already exists\n",
1430 username);
1431 return -EEXIST;
1432 }
1413 memcpy(priv->conn->userid, username, 9); 1433 memcpy(priv->conn->userid, username, 9);
1414 1434
1415 return count; 1435 return count;
@@ -1781,13 +1801,15 @@ netiucv_unregister_device(struct device *dev)
1781static struct iucv_connection * 1801static struct iucv_connection *
1782netiucv_new_connection(struct net_device *dev, char *username) 1802netiucv_new_connection(struct net_device *dev, char *username)
1783{ 1803{
1784 struct iucv_connection **clist = &iucv_connections; 1804 unsigned long flags;
1805 struct iucv_connection **clist = &iucv_conns.iucv_connections;
1785 struct iucv_connection *conn = 1806 struct iucv_connection *conn =
1786 kzalloc(sizeof(struct iucv_connection), GFP_KERNEL); 1807 kzalloc(sizeof(struct iucv_connection), GFP_KERNEL);
1787 1808
1788 if (conn) { 1809 if (conn) {
1789 skb_queue_head_init(&conn->collect_queue); 1810 skb_queue_head_init(&conn->collect_queue);
1790 skb_queue_head_init(&conn->commit_queue); 1811 skb_queue_head_init(&conn->commit_queue);
1812 spin_lock_init(&conn->collect_lock);
1791 conn->max_buffsize = NETIUCV_BUFSIZE_DEFAULT; 1813 conn->max_buffsize = NETIUCV_BUFSIZE_DEFAULT;
1792 conn->netdev = dev; 1814 conn->netdev = dev;
1793 1815
@@ -1822,8 +1844,10 @@ netiucv_new_connection(struct net_device *dev, char *username)
1822 fsm_newstate(conn->fsm, CONN_STATE_STOPPED); 1844 fsm_newstate(conn->fsm, CONN_STATE_STOPPED);
1823 } 1845 }
1824 1846
1847 write_lock_irqsave(&iucv_conns.iucv_rwlock, flags);
1825 conn->next = *clist; 1848 conn->next = *clist;
1826 *clist = conn; 1849 *clist = conn;
1850 write_unlock_irqrestore(&iucv_conns.iucv_rwlock, flags);
1827 } 1851 }
1828 return conn; 1852 return conn;
1829} 1853}
@@ -1835,14 +1859,17 @@ netiucv_new_connection(struct net_device *dev, char *username)
1835static void 1859static void
1836netiucv_remove_connection(struct iucv_connection *conn) 1860netiucv_remove_connection(struct iucv_connection *conn)
1837{ 1861{
1838 struct iucv_connection **clist = &iucv_connections; 1862 struct iucv_connection **clist = &iucv_conns.iucv_connections;
1863 unsigned long flags;
1839 1864
1840 IUCV_DBF_TEXT(trace, 3, __FUNCTION__); 1865 IUCV_DBF_TEXT(trace, 3, __FUNCTION__);
1841 if (conn == NULL) 1866 if (conn == NULL)
1842 return; 1867 return;
1868 write_lock_irqsave(&iucv_conns.iucv_rwlock, flags);
1843 while (*clist) { 1869 while (*clist) {
1844 if (*clist == conn) { 1870 if (*clist == conn) {
1845 *clist = conn->next; 1871 *clist = conn->next;
1872 write_unlock_irqrestore(&iucv_conns.iucv_rwlock, flags);
1846 if (conn->handle) { 1873 if (conn->handle) {
1847 iucv_unregister_program(conn->handle); 1874 iucv_unregister_program(conn->handle);
1848 conn->handle = NULL; 1875 conn->handle = NULL;
@@ -1855,6 +1882,7 @@ netiucv_remove_connection(struct iucv_connection *conn)
1855 } 1882 }
1856 clist = &((*clist)->next); 1883 clist = &((*clist)->next);
1857 } 1884 }
1885 write_unlock_irqrestore(&iucv_conns.iucv_rwlock, flags);
1858} 1886}
1859 1887
1860/** 1888/**
@@ -1947,9 +1975,11 @@ static ssize_t
1947conn_write(struct device_driver *drv, const char *buf, size_t count) 1975conn_write(struct device_driver *drv, const char *buf, size_t count)
1948{ 1976{
1949 char *p; 1977 char *p;
1950 char username[10]; 1978 char username[9];
1951 int i, ret; 1979 int i, ret;
1952 struct net_device *dev; 1980 struct net_device *dev;
1981 struct iucv_connection **clist = &iucv_conns.iucv_connections;
1982 unsigned long flags;
1953 1983
1954 IUCV_DBF_TEXT(trace, 3, __FUNCTION__); 1984 IUCV_DBF_TEXT(trace, 3, __FUNCTION__);
1955 if (count>9) { 1985 if (count>9) {
@@ -1960,7 +1990,7 @@ conn_write(struct device_driver *drv, const char *buf, size_t count)
1960 1990
1961 for (i=0, p=(char *)buf; i<8 && *p; i++, p++) { 1991 for (i=0, p=(char *)buf; i<8 && *p; i++, p++) {
1962 if (isalnum(*p) || (*p == '$')) 1992 if (isalnum(*p) || (*p == '$'))
1963 username[i]= *p; 1993 username[i]= toupper(*p);
1964 else if (*p == '\n') { 1994 else if (*p == '\n') {
1965 /* trailing lf, grr */ 1995 /* trailing lf, grr */
1966 break; 1996 break;
@@ -1971,9 +2001,22 @@ conn_write(struct device_driver *drv, const char *buf, size_t count)
1971 return -EINVAL; 2001 return -EINVAL;
1972 } 2002 }
1973 } 2003 }
1974 while (i<9) 2004 while (i<8)
1975 username[i++] = ' '; 2005 username[i++] = ' ';
1976 username[9] = '\0'; 2006 username[8] = '\0';
2007
2008 read_lock_irqsave(&iucv_conns.iucv_rwlock, flags);
2009 while (*clist) {
2010 if (!strncmp(username, (*clist)->userid, 9))
2011 break;
2012 clist = &((*clist)->next);
2013 }
2014 read_unlock_irqrestore(&iucv_conns.iucv_rwlock, flags);
2015 if (*clist) {
2016 PRINT_WARN("netiucv: Connection to %s already exists\n",
2017 username);
2018 return -EEXIST;
2019 }
1977 dev = netiucv_init_netdevice(username); 2020 dev = netiucv_init_netdevice(username);
1978 if (!dev) { 2021 if (!dev) {
1979 PRINT_WARN( 2022 PRINT_WARN(
@@ -2015,7 +2058,8 @@ DRIVER_ATTR(connection, 0200, NULL, conn_write);
2015static ssize_t 2058static ssize_t
2016remove_write (struct device_driver *drv, const char *buf, size_t count) 2059remove_write (struct device_driver *drv, const char *buf, size_t count)
2017{ 2060{
2018 struct iucv_connection **clist = &iucv_connections; 2061 struct iucv_connection **clist = &iucv_conns.iucv_connections;
2062 unsigned long flags;
2019 struct net_device *ndev; 2063 struct net_device *ndev;
2020 struct netiucv_priv *priv; 2064 struct netiucv_priv *priv;
2021 struct device *dev; 2065 struct device *dev;
@@ -2026,7 +2070,7 @@ remove_write (struct device_driver *drv, const char *buf, size_t count)
2026 IUCV_DBF_TEXT(trace, 3, __FUNCTION__); 2070 IUCV_DBF_TEXT(trace, 3, __FUNCTION__);
2027 2071
2028 if (count >= IFNAMSIZ) 2072 if (count >= IFNAMSIZ)
2029 count = IFNAMSIZ-1; 2073 count = IFNAMSIZ - 1;;
2030 2074
2031 for (i=0, p=(char *)buf; i<count && *p; i++, p++) { 2075 for (i=0, p=(char *)buf; i<count && *p; i++, p++) {
2032 if ((*p == '\n') || (*p == ' ')) { 2076 if ((*p == '\n') || (*p == ' ')) {
@@ -2038,6 +2082,7 @@ remove_write (struct device_driver *drv, const char *buf, size_t count)
2038 } 2082 }
2039 name[i] = '\0'; 2083 name[i] = '\0';
2040 2084
2085 read_lock_irqsave(&iucv_conns.iucv_rwlock, flags);
2041 while (*clist) { 2086 while (*clist) {
2042 ndev = (*clist)->netdev; 2087 ndev = (*clist)->netdev;
2043 priv = (struct netiucv_priv*)ndev->priv; 2088 priv = (struct netiucv_priv*)ndev->priv;
@@ -2047,6 +2092,7 @@ remove_write (struct device_driver *drv, const char *buf, size_t count)
2047 clist = &((*clist)->next); 2092 clist = &((*clist)->next);
2048 continue; 2093 continue;
2049 } 2094 }
2095 read_unlock_irqrestore(&iucv_conns.iucv_rwlock, flags);
2050 if (ndev->flags & (IFF_UP | IFF_RUNNING)) { 2096 if (ndev->flags & (IFF_UP | IFF_RUNNING)) {
2051 PRINT_WARN( 2097 PRINT_WARN(
2052 "netiucv: net device %s active with peer %s\n", 2098 "netiucv: net device %s active with peer %s\n",
@@ -2060,6 +2106,7 @@ remove_write (struct device_driver *drv, const char *buf, size_t count)
2060 netiucv_unregister_device(dev); 2106 netiucv_unregister_device(dev);
2061 return count; 2107 return count;
2062 } 2108 }
2109 read_unlock_irqrestore(&iucv_conns.iucv_rwlock, flags);
2063 PRINT_WARN("netiucv: net device %s unknown\n", name); 2110 PRINT_WARN("netiucv: net device %s unknown\n", name);
2064 IUCV_DBF_TEXT(data, 2, "remove_write: unknown device\n"); 2111 IUCV_DBF_TEXT(data, 2, "remove_write: unknown device\n");
2065 return -EINVAL; 2112 return -EINVAL;
@@ -2077,8 +2124,8 @@ static void __exit
2077netiucv_exit(void) 2124netiucv_exit(void)
2078{ 2125{
2079 IUCV_DBF_TEXT(trace, 3, __FUNCTION__); 2126 IUCV_DBF_TEXT(trace, 3, __FUNCTION__);
2080 while (iucv_connections) { 2127 while (iucv_conns.iucv_connections) {
2081 struct net_device *ndev = iucv_connections->netdev; 2128 struct net_device *ndev = iucv_conns.iucv_connections->netdev;
2082 struct netiucv_priv *priv = (struct netiucv_priv*)ndev->priv; 2129 struct netiucv_priv *priv = (struct netiucv_priv*)ndev->priv;
2083 struct device *dev = priv->dev; 2130 struct device *dev = priv->dev;
2084 2131
@@ -2120,6 +2167,7 @@ netiucv_init(void)
2120 if (!ret) { 2167 if (!ret) {
2121 ret = driver_create_file(&netiucv_driver, &driver_attr_remove); 2168 ret = driver_create_file(&netiucv_driver, &driver_attr_remove);
2122 netiucv_banner(); 2169 netiucv_banner();
2170 rwlock_init(&iucv_conns.iucv_rwlock);
2123 } else { 2171 } else {
2124 PRINT_ERR("NETIUCV: failed to add driver attribute.\n"); 2172 PRINT_ERR("NETIUCV: failed to add driver attribute.\n");
2125 IUCV_DBF_TEXT_(setup, 2, "ret %d from driver_create_file\n", ret); 2173 IUCV_DBF_TEXT_(setup, 2, "ret %d from driver_create_file\n", ret);
diff --git a/drivers/s390/net/qeth.h b/drivers/s390/net/qeth.h
index 619f4a0c7160..821383d8cbe7 100644
--- a/drivers/s390/net/qeth.h
+++ b/drivers/s390/net/qeth.h
@@ -176,7 +176,6 @@ extern struct ccwgroup_driver qeth_ccwgroup_driver;
176/** 176/**
177 * card stuff 177 * card stuff
178 */ 178 */
179#ifdef CONFIG_QETH_PERF_STATS
180struct qeth_perf_stats { 179struct qeth_perf_stats {
181 unsigned int bufs_rec; 180 unsigned int bufs_rec;
182 unsigned int bufs_sent; 181 unsigned int bufs_sent;
@@ -211,8 +210,10 @@ struct qeth_perf_stats {
211 unsigned int large_send_cnt; 210 unsigned int large_send_cnt;
212 unsigned int sg_skbs_sent; 211 unsigned int sg_skbs_sent;
213 unsigned int sg_frags_sent; 212 unsigned int sg_frags_sent;
213 /* initial values when measuring starts */
214 unsigned long initial_rx_packets;
215 unsigned long initial_tx_packets;
214}; 216};
215#endif /* CONFIG_QETH_PERF_STATS */
216 217
217/* Routing stuff */ 218/* Routing stuff */
218struct qeth_routing_info { 219struct qeth_routing_info {
@@ -462,6 +463,7 @@ enum qeth_qdio_info_states {
462 QETH_QDIO_UNINITIALIZED, 463 QETH_QDIO_UNINITIALIZED,
463 QETH_QDIO_ALLOCATED, 464 QETH_QDIO_ALLOCATED,
464 QETH_QDIO_ESTABLISHED, 465 QETH_QDIO_ESTABLISHED,
466 QETH_QDIO_CLEANING
465}; 467};
466 468
467struct qeth_buffer_pool_entry { 469struct qeth_buffer_pool_entry {
@@ -536,7 +538,7 @@ struct qeth_qdio_out_q {
536} __attribute__ ((aligned(256))); 538} __attribute__ ((aligned(256)));
537 539
538struct qeth_qdio_info { 540struct qeth_qdio_info {
539 volatile enum qeth_qdio_info_states state; 541 atomic_t state;
540 /* input */ 542 /* input */
541 struct qeth_qdio_q *in_q; 543 struct qeth_qdio_q *in_q;
542 struct qeth_qdio_buffer_pool in_buf_pool; 544 struct qeth_qdio_buffer_pool in_buf_pool;
@@ -767,6 +769,7 @@ struct qeth_card_options {
767 int fake_ll; 769 int fake_ll;
768 int layer2; 770 int layer2;
769 enum qeth_large_send_types large_send; 771 enum qeth_large_send_types large_send;
772 int performance_stats;
770}; 773};
771 774
772/* 775/*
@@ -819,9 +822,7 @@ struct qeth_card {
819 struct list_head cmd_waiter_list; 822 struct list_head cmd_waiter_list;
820 /* QDIO buffer handling */ 823 /* QDIO buffer handling */
821 struct qeth_qdio_info qdio; 824 struct qeth_qdio_info qdio;
822#ifdef CONFIG_QETH_PERF_STATS
823 struct qeth_perf_stats perf_stats; 825 struct qeth_perf_stats perf_stats;
824#endif /* CONFIG_QETH_PERF_STATS */
825 int use_hard_stop; 826 int use_hard_stop;
826 int (*orig_hard_header)(struct sk_buff *,struct net_device *, 827 int (*orig_hard_header)(struct sk_buff *,struct net_device *,
827 unsigned short,void *,void *,unsigned); 828 unsigned short,void *,void *,unsigned);
@@ -859,23 +860,18 @@ qeth_get_ipa_adp_type(enum qeth_link_types link_type)
859 } 860 }
860} 861}
861 862
862static inline int 863static inline struct sk_buff *
863qeth_realloc_headroom(struct qeth_card *card, struct sk_buff **skb, int size) 864qeth_realloc_headroom(struct qeth_card *card, struct sk_buff *skb, int size)
864{ 865{
865 struct sk_buff *new_skb = NULL; 866 struct sk_buff *new_skb = skb;
866 867
867 if (skb_headroom(*skb) < size){ 868 if (skb_headroom(skb) >= size)
868 new_skb = skb_realloc_headroom(*skb, size); 869 return skb;
869 if (!new_skb) { 870 new_skb = skb_realloc_headroom(skb, size);
870 PRINT_ERR("qeth_prepare_skb: could " 871 if (!new_skb)
871 "not realloc headroom for qeth_hdr " 872 PRINT_ERR("Could not realloc headroom for qeth_hdr "
872 "on interface %s", QETH_CARD_IFNAME(card)); 873 "on interface %s", QETH_CARD_IFNAME(card));
873 return -ENOMEM; 874 return new_skb;
874 }
875 kfree_skb(*skb);
876 *skb = new_skb;
877 }
878 return 0;
879} 875}
880 876
881static inline struct sk_buff * 877static inline struct sk_buff *
@@ -885,16 +881,15 @@ qeth_pskb_unshare(struct sk_buff *skb, int pri)
885 if (!skb_cloned(skb)) 881 if (!skb_cloned(skb))
886 return skb; 882 return skb;
887 nskb = skb_copy(skb, pri); 883 nskb = skb_copy(skb, pri);
888 kfree_skb(skb); /* free our shared copy */
889 return nskb; 884 return nskb;
890} 885}
891 886
892static inline void * 887static inline void *
893qeth_push_skb(struct qeth_card *card, struct sk_buff **skb, int size) 888qeth_push_skb(struct qeth_card *card, struct sk_buff *skb, int size)
894{ 889{
895 void *hdr; 890 void *hdr;
896 891
897 hdr = (void *) skb_push(*skb, size); 892 hdr = (void *) skb_push(skb, size);
898 /* 893 /*
899 * sanity check, the Linux memory allocation scheme should 894 * sanity check, the Linux memory allocation scheme should
900 * never present us cases like this one (the qdio header size plus 895 * never present us cases like this one (the qdio header size plus
@@ -903,8 +898,7 @@ qeth_push_skb(struct qeth_card *card, struct sk_buff **skb, int size)
903 if ((((unsigned long) hdr) & (~(PAGE_SIZE - 1))) != 898 if ((((unsigned long) hdr) & (~(PAGE_SIZE - 1))) !=
904 (((unsigned long) hdr + size + 899 (((unsigned long) hdr + size +
905 QETH_IP_HEADER_SIZE) & (~(PAGE_SIZE - 1)))) { 900 QETH_IP_HEADER_SIZE) & (~(PAGE_SIZE - 1)))) {
906 PRINT_ERR("qeth_prepare_skb: misaligned " 901 PRINT_ERR("Misaligned packet on interface %s. Discarded.",
907 "packet on interface %s. Discarded.",
908 QETH_CARD_IFNAME(card)); 902 QETH_CARD_IFNAME(card));
909 return NULL; 903 return NULL;
910 } 904 }
@@ -1056,13 +1050,11 @@ qeth_get_arphdr_type(int cardtype, int linktype)
1056 } 1050 }
1057} 1051}
1058 1052
1059#ifdef CONFIG_QETH_PERF_STATS
1060static inline int 1053static inline int
1061qeth_get_micros(void) 1054qeth_get_micros(void)
1062{ 1055{
1063 return (int) (get_clock() >> 12); 1056 return (int) (get_clock() >> 12);
1064} 1057}
1065#endif
1066 1058
1067static inline int 1059static inline int
1068qeth_get_qdio_q_format(struct qeth_card *card) 1060qeth_get_qdio_q_format(struct qeth_card *card)
@@ -1096,10 +1088,11 @@ qeth_string_to_ipaddr4(const char *buf, __u8 *addr)
1096{ 1088{
1097 int count = 0, rc = 0; 1089 int count = 0, rc = 0;
1098 int in[4]; 1090 int in[4];
1091 char c;
1099 1092
1100 rc = sscanf(buf, "%d.%d.%d.%d%n", 1093 rc = sscanf(buf, "%u.%u.%u.%u%c",
1101 &in[0], &in[1], &in[2], &in[3], &count); 1094 &in[0], &in[1], &in[2], &in[3], &c);
1102 if (rc != 4 || count<=0) 1095 if (rc != 4 && (rc != 5 || c != '\n'))
1103 return -EINVAL; 1096 return -EINVAL;
1104 for (count = 0; count < 4; count++) { 1097 for (count = 0; count < 4; count++) {
1105 if (in[count] > 255) 1098 if (in[count] > 255)
@@ -1123,24 +1116,28 @@ qeth_ipaddr6_to_string(const __u8 *addr, char *buf)
1123static inline int 1116static inline int
1124qeth_string_to_ipaddr6(const char *buf, __u8 *addr) 1117qeth_string_to_ipaddr6(const char *buf, __u8 *addr)
1125{ 1118{
1126 char *end, *start; 1119 const char *end, *end_tmp, *start;
1127 __u16 *in; 1120 __u16 *in;
1128 char num[5]; 1121 char num[5];
1129 int num2, cnt, out, found, save_cnt; 1122 int num2, cnt, out, found, save_cnt;
1130 unsigned short in_tmp[8] = {0, }; 1123 unsigned short in_tmp[8] = {0, };
1131 1124
1132 cnt = out = found = save_cnt = num2 = 0; 1125 cnt = out = found = save_cnt = num2 = 0;
1133 end = start = (char *) buf; 1126 end = start = buf;
1134 in = (__u16 *) addr; 1127 in = (__u16 *) addr;
1135 memset(in, 0, 16); 1128 memset(in, 0, 16);
1136 while (end) { 1129 while (*end) {
1137 end = strchr(end,':'); 1130 end = strchr(start,':');
1138 if (end == NULL) { 1131 if (end == NULL) {
1139 end = (char *)buf + (strlen(buf)); 1132 end = buf + strlen(buf);
1140 out = 1; 1133 if ((end_tmp = strchr(start, '\n')) != NULL)
1134 end = end_tmp;
1135 out = 1;
1141 } 1136 }
1142 if ((end - start)) { 1137 if ((end - start)) {
1143 memset(num, 0, 5); 1138 memset(num, 0, 5);
1139 if ((end - start) > 4)
1140 return -EINVAL;
1144 memcpy(num, start, end - start); 1141 memcpy(num, start, end - start);
1145 if (!qeth_isxdigit(num)) 1142 if (!qeth_isxdigit(num))
1146 return -EINVAL; 1143 return -EINVAL;
@@ -1158,6 +1155,8 @@ qeth_string_to_ipaddr6(const char *buf, __u8 *addr)
1158 } 1155 }
1159 start = ++end; 1156 start = ++end;
1160 } 1157 }
1158 if (cnt + save_cnt > 8)
1159 return -EINVAL;
1161 cnt = 7; 1160 cnt = 7;
1162 while (save_cnt) 1161 while (save_cnt)
1163 in[cnt--] = in_tmp[--save_cnt]; 1162 in[cnt--] = in_tmp[--save_cnt];
diff --git a/drivers/s390/net/qeth_eddp.c b/drivers/s390/net/qeth_eddp.c
index 8491598f9149..a363721cf28d 100644
--- a/drivers/s390/net/qeth_eddp.c
+++ b/drivers/s390/net/qeth_eddp.c
@@ -179,9 +179,8 @@ out_check:
179 flush_cnt++; 179 flush_cnt++;
180 } 180 }
181 } else { 181 } else {
182#ifdef CONFIG_QETH_PERF_STATS 182 if (queue->card->options.performance_stats)
183 queue->card->perf_stats.skbs_sent_pack++; 183 queue->card->perf_stats.skbs_sent_pack++;
184#endif
185 QETH_DBF_TEXT(trace, 6, "fillbfpa"); 184 QETH_DBF_TEXT(trace, 6, "fillbfpa");
186 if (buf->next_element_to_fill >= 185 if (buf->next_element_to_fill >=
187 QETH_MAX_BUFFER_ELEMENTS(queue->card)) { 186 QETH_MAX_BUFFER_ELEMENTS(queue->card)) {
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c
index e1327b8fce00..5613b4564fa2 100644
--- a/drivers/s390/net/qeth_main.c
+++ b/drivers/s390/net/qeth_main.c
@@ -1073,6 +1073,7 @@ qeth_set_intial_options(struct qeth_card *card)
1073 card->options.layer2 = 1; 1073 card->options.layer2 = 1;
1074 else 1074 else
1075 card->options.layer2 = 0; 1075 card->options.layer2 = 0;
1076 card->options.performance_stats = 1;
1076} 1077}
1077 1078
1078/** 1079/**
@@ -1708,6 +1709,7 @@ qeth_check_ipa_data(struct qeth_card *card, struct qeth_cmd_buffer *iob)
1708 "IP address reset.\n", 1709 "IP address reset.\n",
1709 QETH_CARD_IFNAME(card), 1710 QETH_CARD_IFNAME(card),
1710 card->info.chpid); 1711 card->info.chpid);
1712 netif_carrier_on(card->dev);
1711 qeth_schedule_recovery(card); 1713 qeth_schedule_recovery(card);
1712 return NULL; 1714 return NULL;
1713 case IPA_CMD_MODCCID: 1715 case IPA_CMD_MODCCID:
@@ -2464,24 +2466,6 @@ qeth_rebuild_skb_fake_ll(struct qeth_card *card, struct sk_buff *skb,
2464 qeth_rebuild_skb_fake_ll_eth(card, skb, hdr); 2466 qeth_rebuild_skb_fake_ll_eth(card, skb, hdr);
2465} 2467}
2466 2468
2467static inline void
2468qeth_rebuild_skb_vlan(struct qeth_card *card, struct sk_buff *skb,
2469 struct qeth_hdr *hdr)
2470{
2471#ifdef CONFIG_QETH_VLAN
2472 u16 *vlan_tag;
2473
2474 if (hdr->hdr.l3.ext_flags &
2475 (QETH_HDR_EXT_VLAN_FRAME | QETH_HDR_EXT_INCLUDE_VLAN_TAG)) {
2476 vlan_tag = (u16 *) skb_push(skb, VLAN_HLEN);
2477 *vlan_tag = (hdr->hdr.l3.ext_flags & QETH_HDR_EXT_VLAN_FRAME)?
2478 hdr->hdr.l3.vlan_id : *((u16 *)&hdr->hdr.l3.dest_addr[12]);
2479 *(vlan_tag + 1) = skb->protocol;
2480 skb->protocol = __constant_htons(ETH_P_8021Q);
2481 }
2482#endif /* CONFIG_QETH_VLAN */
2483}
2484
2485static inline __u16 2469static inline __u16
2486qeth_layer2_rebuild_skb(struct qeth_card *card, struct sk_buff *skb, 2470qeth_layer2_rebuild_skb(struct qeth_card *card, struct sk_buff *skb,
2487 struct qeth_hdr *hdr) 2471 struct qeth_hdr *hdr)
@@ -2510,15 +2494,16 @@ qeth_layer2_rebuild_skb(struct qeth_card *card, struct sk_buff *skb,
2510 return vlan_id; 2494 return vlan_id;
2511} 2495}
2512 2496
2513static inline void 2497static inline __u16
2514qeth_rebuild_skb(struct qeth_card *card, struct sk_buff *skb, 2498qeth_rebuild_skb(struct qeth_card *card, struct sk_buff *skb,
2515 struct qeth_hdr *hdr) 2499 struct qeth_hdr *hdr)
2516{ 2500{
2501 unsigned short vlan_id = 0;
2517#ifdef CONFIG_QETH_IPV6 2502#ifdef CONFIG_QETH_IPV6
2518 if (hdr->hdr.l3.flags & QETH_HDR_PASSTHRU) { 2503 if (hdr->hdr.l3.flags & QETH_HDR_PASSTHRU) {
2519 skb->pkt_type = PACKET_HOST; 2504 skb->pkt_type = PACKET_HOST;
2520 skb->protocol = qeth_type_trans(skb, card->dev); 2505 skb->protocol = qeth_type_trans(skb, card->dev);
2521 return; 2506 return 0;
2522 } 2507 }
2523#endif /* CONFIG_QETH_IPV6 */ 2508#endif /* CONFIG_QETH_IPV6 */
2524 skb->protocol = htons((hdr->hdr.l3.flags & QETH_HDR_IPV6)? ETH_P_IPV6 : 2509 skb->protocol = htons((hdr->hdr.l3.flags & QETH_HDR_IPV6)? ETH_P_IPV6 :
@@ -2540,7 +2525,13 @@ qeth_rebuild_skb(struct qeth_card *card, struct sk_buff *skb,
2540 default: 2525 default:
2541 skb->pkt_type = PACKET_HOST; 2526 skb->pkt_type = PACKET_HOST;
2542 } 2527 }
2543 qeth_rebuild_skb_vlan(card, skb, hdr); 2528
2529 if (hdr->hdr.l3.ext_flags &
2530 (QETH_HDR_EXT_VLAN_FRAME | QETH_HDR_EXT_INCLUDE_VLAN_TAG)) {
2531 vlan_id = (hdr->hdr.l3.ext_flags & QETH_HDR_EXT_VLAN_FRAME)?
2532 hdr->hdr.l3.vlan_id : *((u16 *)&hdr->hdr.l3.dest_addr[12]);
2533 }
2534
2544 if (card->options.fake_ll) 2535 if (card->options.fake_ll)
2545 qeth_rebuild_skb_fake_ll(card, skb, hdr); 2536 qeth_rebuild_skb_fake_ll(card, skb, hdr);
2546 else 2537 else
@@ -2556,6 +2547,7 @@ qeth_rebuild_skb(struct qeth_card *card, struct sk_buff *skb,
2556 else 2547 else
2557 skb->ip_summed = SW_CHECKSUMMING; 2548 skb->ip_summed = SW_CHECKSUMMING;
2558 } 2549 }
2550 return vlan_id;
2559} 2551}
2560 2552
2561static inline void 2553static inline void
@@ -2568,20 +2560,20 @@ qeth_process_inbound_buffer(struct qeth_card *card,
2568 int offset; 2560 int offset;
2569 int rxrc; 2561 int rxrc;
2570 __u16 vlan_tag = 0; 2562 __u16 vlan_tag = 0;
2563 __u16 *vlan_addr;
2571 2564
2572 /* get first element of current buffer */ 2565 /* get first element of current buffer */
2573 element = (struct qdio_buffer_element *)&buf->buffer->element[0]; 2566 element = (struct qdio_buffer_element *)&buf->buffer->element[0];
2574 offset = 0; 2567 offset = 0;
2575#ifdef CONFIG_QETH_PERF_STATS 2568 if (card->options.performance_stats)
2576 card->perf_stats.bufs_rec++; 2569 card->perf_stats.bufs_rec++;
2577#endif
2578 while((skb = qeth_get_next_skb(card, buf->buffer, &element, 2570 while((skb = qeth_get_next_skb(card, buf->buffer, &element,
2579 &offset, &hdr))) { 2571 &offset, &hdr))) {
2580 skb->dev = card->dev; 2572 skb->dev = card->dev;
2581 if (hdr->hdr.l2.id == QETH_HEADER_TYPE_LAYER2) 2573 if (hdr->hdr.l2.id == QETH_HEADER_TYPE_LAYER2)
2582 vlan_tag = qeth_layer2_rebuild_skb(card, skb, hdr); 2574 vlan_tag = qeth_layer2_rebuild_skb(card, skb, hdr);
2583 else if (hdr->hdr.l3.id == QETH_HEADER_TYPE_LAYER3) 2575 else if (hdr->hdr.l3.id == QETH_HEADER_TYPE_LAYER3)
2584 qeth_rebuild_skb(card, skb, hdr); 2576 vlan_tag = qeth_rebuild_skb(card, skb, hdr);
2585 else { /*in case of OSN*/ 2577 else { /*in case of OSN*/
2586 skb_push(skb, sizeof(struct qeth_hdr)); 2578 skb_push(skb, sizeof(struct qeth_hdr));
2587 memcpy(skb->data, hdr, sizeof(struct qeth_hdr)); 2579 memcpy(skb->data, hdr, sizeof(struct qeth_hdr));
@@ -2591,14 +2583,19 @@ qeth_process_inbound_buffer(struct qeth_card *card,
2591 dev_kfree_skb_any(skb); 2583 dev_kfree_skb_any(skb);
2592 continue; 2584 continue;
2593 } 2585 }
2586 if (card->info.type == QETH_CARD_TYPE_OSN)
2587 rxrc = card->osn_info.data_cb(skb);
2588 else
2594#ifdef CONFIG_QETH_VLAN 2589#ifdef CONFIG_QETH_VLAN
2595 if (vlan_tag) 2590 if (vlan_tag)
2596 vlan_hwaccel_rx(skb, card->vlangrp, vlan_tag); 2591 if (card->vlangrp)
2592 vlan_hwaccel_rx(skb, card->vlangrp, vlan_tag);
2593 else {
2594 dev_kfree_skb_any(skb);
2595 continue;
2596 }
2597 else 2597 else
2598#endif 2598#endif
2599 if (card->info.type == QETH_CARD_TYPE_OSN)
2600 rxrc = card->osn_info.data_cb(skb);
2601 else
2602 rxrc = netif_rx(skb); 2599 rxrc = netif_rx(skb);
2603 card->dev->last_rx = jiffies; 2600 card->dev->last_rx = jiffies;
2604 card->stats.rx_packets++; 2601 card->stats.rx_packets++;
@@ -2626,7 +2623,7 @@ qeth_init_input_buffer(struct qeth_card *card, struct qeth_qdio_buffer *buf)
2626{ 2623{
2627 struct qeth_buffer_pool_entry *pool_entry; 2624 struct qeth_buffer_pool_entry *pool_entry;
2628 int i; 2625 int i;
2629 2626
2630 pool_entry = qeth_get_buffer_pool_entry(card); 2627 pool_entry = qeth_get_buffer_pool_entry(card);
2631 /* 2628 /*
2632 * since the buffer is accessed only from the input_tasklet 2629 * since the buffer is accessed only from the input_tasklet
@@ -2700,17 +2697,18 @@ qeth_queue_input_buffer(struct qeth_card *card, int index)
2700 * 'index') un-requeued -> this buffer is the first buffer that 2697 * 'index') un-requeued -> this buffer is the first buffer that
2701 * will be requeued the next time 2698 * will be requeued the next time
2702 */ 2699 */
2703#ifdef CONFIG_QETH_PERF_STATS 2700 if (card->options.performance_stats) {
2704 card->perf_stats.inbound_do_qdio_cnt++; 2701 card->perf_stats.inbound_do_qdio_cnt++;
2705 card->perf_stats.inbound_do_qdio_start_time = qeth_get_micros(); 2702 card->perf_stats.inbound_do_qdio_start_time =
2706#endif 2703 qeth_get_micros();
2704 }
2707 rc = do_QDIO(CARD_DDEV(card), 2705 rc = do_QDIO(CARD_DDEV(card),
2708 QDIO_FLAG_SYNC_INPUT | QDIO_FLAG_UNDER_INTERRUPT, 2706 QDIO_FLAG_SYNC_INPUT | QDIO_FLAG_UNDER_INTERRUPT,
2709 0, queue->next_buf_to_init, count, NULL); 2707 0, queue->next_buf_to_init, count, NULL);
2710#ifdef CONFIG_QETH_PERF_STATS 2708 if (card->options.performance_stats)
2711 card->perf_stats.inbound_do_qdio_time += qeth_get_micros() - 2709 card->perf_stats.inbound_do_qdio_time +=
2712 card->perf_stats.inbound_do_qdio_start_time; 2710 qeth_get_micros() -
2713#endif 2711 card->perf_stats.inbound_do_qdio_start_time;
2714 if (rc){ 2712 if (rc){
2715 PRINT_WARN("qeth_queue_input_buffer's do_QDIO " 2713 PRINT_WARN("qeth_queue_input_buffer's do_QDIO "
2716 "return %i (device %s).\n", 2714 "return %i (device %s).\n",
@@ -2746,10 +2744,10 @@ qeth_qdio_input_handler(struct ccw_device * ccwdev, unsigned int status,
2746 QETH_DBF_TEXT(trace, 6, "qdinput"); 2744 QETH_DBF_TEXT(trace, 6, "qdinput");
2747 card = (struct qeth_card *) card_ptr; 2745 card = (struct qeth_card *) card_ptr;
2748 net_dev = card->dev; 2746 net_dev = card->dev;
2749#ifdef CONFIG_QETH_PERF_STATS 2747 if (card->options.performance_stats) {
2750 card->perf_stats.inbound_cnt++; 2748 card->perf_stats.inbound_cnt++;
2751 card->perf_stats.inbound_start_time = qeth_get_micros(); 2749 card->perf_stats.inbound_start_time = qeth_get_micros();
2752#endif 2750 }
2753 if (status & QDIO_STATUS_LOOK_FOR_ERROR) { 2751 if (status & QDIO_STATUS_LOOK_FOR_ERROR) {
2754 if (status & QDIO_STATUS_ACTIVATE_CHECK_CONDITION){ 2752 if (status & QDIO_STATUS_ACTIVATE_CHECK_CONDITION){
2755 QETH_DBF_TEXT(trace, 1,"qdinchk"); 2753 QETH_DBF_TEXT(trace, 1,"qdinchk");
@@ -2771,10 +2769,9 @@ qeth_qdio_input_handler(struct ccw_device * ccwdev, unsigned int status,
2771 qeth_put_buffer_pool_entry(card, buffer->pool_entry); 2769 qeth_put_buffer_pool_entry(card, buffer->pool_entry);
2772 qeth_queue_input_buffer(card, index); 2770 qeth_queue_input_buffer(card, index);
2773 } 2771 }
2774#ifdef CONFIG_QETH_PERF_STATS 2772 if (card->options.performance_stats)
2775 card->perf_stats.inbound_time += qeth_get_micros() - 2773 card->perf_stats.inbound_time += qeth_get_micros() -
2776 card->perf_stats.inbound_start_time; 2774 card->perf_stats.inbound_start_time;
2777#endif
2778} 2775}
2779 2776
2780static inline int 2777static inline int
@@ -2864,10 +2861,11 @@ qeth_flush_buffers(struct qeth_qdio_out_q *queue, int under_int,
2864 } 2861 }
2865 2862
2866 queue->card->dev->trans_start = jiffies; 2863 queue->card->dev->trans_start = jiffies;
2867#ifdef CONFIG_QETH_PERF_STATS 2864 if (queue->card->options.performance_stats) {
2868 queue->card->perf_stats.outbound_do_qdio_cnt++; 2865 queue->card->perf_stats.outbound_do_qdio_cnt++;
2869 queue->card->perf_stats.outbound_do_qdio_start_time = qeth_get_micros(); 2866 queue->card->perf_stats.outbound_do_qdio_start_time =
2870#endif 2867 qeth_get_micros();
2868 }
2871 if (under_int) 2869 if (under_int)
2872 rc = do_QDIO(CARD_DDEV(queue->card), 2870 rc = do_QDIO(CARD_DDEV(queue->card),
2873 QDIO_FLAG_SYNC_OUTPUT | QDIO_FLAG_UNDER_INTERRUPT, 2871 QDIO_FLAG_SYNC_OUTPUT | QDIO_FLAG_UNDER_INTERRUPT,
@@ -2875,10 +2873,10 @@ qeth_flush_buffers(struct qeth_qdio_out_q *queue, int under_int,
2875 else 2873 else
2876 rc = do_QDIO(CARD_DDEV(queue->card), QDIO_FLAG_SYNC_OUTPUT, 2874 rc = do_QDIO(CARD_DDEV(queue->card), QDIO_FLAG_SYNC_OUTPUT,
2877 queue->queue_no, index, count, NULL); 2875 queue->queue_no, index, count, NULL);
2878#ifdef CONFIG_QETH_PERF_STATS 2876 if (queue->card->options.performance_stats)
2879 queue->card->perf_stats.outbound_do_qdio_time += qeth_get_micros() - 2877 queue->card->perf_stats.outbound_do_qdio_time +=
2880 queue->card->perf_stats.outbound_do_qdio_start_time; 2878 qeth_get_micros() -
2881#endif 2879 queue->card->perf_stats.outbound_do_qdio_start_time;
2882 if (rc){ 2880 if (rc){
2883 QETH_DBF_TEXT(trace, 2, "flushbuf"); 2881 QETH_DBF_TEXT(trace, 2, "flushbuf");
2884 QETH_DBF_TEXT_(trace, 2, " err%d", rc); 2882 QETH_DBF_TEXT_(trace, 2, " err%d", rc);
@@ -2890,9 +2888,8 @@ qeth_flush_buffers(struct qeth_qdio_out_q *queue, int under_int,
2890 return; 2888 return;
2891 } 2889 }
2892 atomic_add(count, &queue->used_buffers); 2890 atomic_add(count, &queue->used_buffers);
2893#ifdef CONFIG_QETH_PERF_STATS 2891 if (queue->card->options.performance_stats)
2894 queue->card->perf_stats.bufs_sent += count; 2892 queue->card->perf_stats.bufs_sent += count;
2895#endif
2896} 2893}
2897 2894
2898/* 2895/*
@@ -2907,9 +2904,8 @@ qeth_switch_to_packing_if_needed(struct qeth_qdio_out_q *queue)
2907 >= QETH_HIGH_WATERMARK_PACK){ 2904 >= QETH_HIGH_WATERMARK_PACK){
2908 /* switch non-PACKING -> PACKING */ 2905 /* switch non-PACKING -> PACKING */
2909 QETH_DBF_TEXT(trace, 6, "np->pack"); 2906 QETH_DBF_TEXT(trace, 6, "np->pack");
2910#ifdef CONFIG_QETH_PERF_STATS 2907 if (queue->card->options.performance_stats)
2911 queue->card->perf_stats.sc_dp_p++; 2908 queue->card->perf_stats.sc_dp_p++;
2912#endif
2913 queue->do_pack = 1; 2909 queue->do_pack = 1;
2914 } 2910 }
2915 } 2911 }
@@ -2932,9 +2928,8 @@ qeth_switch_to_nonpacking_if_needed(struct qeth_qdio_out_q *queue)
2932 <= QETH_LOW_WATERMARK_PACK) { 2928 <= QETH_LOW_WATERMARK_PACK) {
2933 /* switch PACKING -> non-PACKING */ 2929 /* switch PACKING -> non-PACKING */
2934 QETH_DBF_TEXT(trace, 6, "pack->np"); 2930 QETH_DBF_TEXT(trace, 6, "pack->np");
2935#ifdef CONFIG_QETH_PERF_STATS 2931 if (queue->card->options.performance_stats)
2936 queue->card->perf_stats.sc_p_dp++; 2932 queue->card->perf_stats.sc_p_dp++;
2937#endif
2938 queue->do_pack = 0; 2933 queue->do_pack = 0;
2939 /* flush packing buffers */ 2934 /* flush packing buffers */
2940 buffer = &queue->bufs[queue->next_buf_to_fill]; 2935 buffer = &queue->bufs[queue->next_buf_to_fill];
@@ -2946,7 +2941,7 @@ qeth_switch_to_nonpacking_if_needed(struct qeth_qdio_out_q *queue)
2946 queue->next_buf_to_fill = 2941 queue->next_buf_to_fill =
2947 (queue->next_buf_to_fill + 1) % 2942 (queue->next_buf_to_fill + 1) %
2948 QDIO_MAX_BUFFERS_PER_Q; 2943 QDIO_MAX_BUFFERS_PER_Q;
2949 } 2944 }
2950 } 2945 }
2951 } 2946 }
2952 return flush_count; 2947 return flush_count;
@@ -3002,11 +2997,10 @@ qeth_check_outbound_queue(struct qeth_qdio_out_q *queue)
3002 !atomic_read(&queue->set_pci_flags_count)) 2997 !atomic_read(&queue->set_pci_flags_count))
3003 flush_cnt += 2998 flush_cnt +=
3004 qeth_flush_buffers_on_no_pci(queue); 2999 qeth_flush_buffers_on_no_pci(queue);
3005#ifdef CONFIG_QETH_PERF_STATS 3000 if (queue->card->options.performance_stats &&
3006 if (q_was_packing) 3001 q_was_packing)
3007 queue->card->perf_stats.bufs_sent_pack += 3002 queue->card->perf_stats.bufs_sent_pack +=
3008 flush_cnt; 3003 flush_cnt;
3009#endif
3010 if (flush_cnt) 3004 if (flush_cnt)
3011 qeth_flush_buffers(queue, 1, index, flush_cnt); 3005 qeth_flush_buffers(queue, 1, index, flush_cnt);
3012 atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED); 3006 atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED);
@@ -3036,10 +3030,11 @@ qeth_qdio_output_handler(struct ccw_device * ccwdev, unsigned int status,
3036 return; 3030 return;
3037 } 3031 }
3038 } 3032 }
3039#ifdef CONFIG_QETH_PERF_STATS 3033 if (card->options.performance_stats) {
3040 card->perf_stats.outbound_handler_cnt++; 3034 card->perf_stats.outbound_handler_cnt++;
3041 card->perf_stats.outbound_handler_start_time = qeth_get_micros(); 3035 card->perf_stats.outbound_handler_start_time =
3042#endif 3036 qeth_get_micros();
3037 }
3043 for(i = first_element; i < (first_element + count); ++i){ 3038 for(i = first_element; i < (first_element + count); ++i){
3044 buffer = &queue->bufs[i % QDIO_MAX_BUFFERS_PER_Q]; 3039 buffer = &queue->bufs[i % QDIO_MAX_BUFFERS_PER_Q];
3045 /*we only handle the KICK_IT error by doing a recovery */ 3040 /*we only handle the KICK_IT error by doing a recovery */
@@ -3058,10 +3053,9 @@ qeth_qdio_output_handler(struct ccw_device * ccwdev, unsigned int status,
3058 qeth_check_outbound_queue(queue); 3053 qeth_check_outbound_queue(queue);
3059 3054
3060 netif_wake_queue(queue->card->dev); 3055 netif_wake_queue(queue->card->dev);
3061#ifdef CONFIG_QETH_PERF_STATS 3056 if (card->options.performance_stats)
3062 card->perf_stats.outbound_handler_time += qeth_get_micros() - 3057 card->perf_stats.outbound_handler_time += qeth_get_micros() -
3063 card->perf_stats.outbound_handler_start_time; 3058 card->perf_stats.outbound_handler_start_time;
3064#endif
3065} 3059}
3066 3060
3067static void 3061static void
@@ -3185,13 +3179,14 @@ qeth_alloc_qdio_buffers(struct qeth_card *card)
3185 3179
3186 QETH_DBF_TEXT(setup, 2, "allcqdbf"); 3180 QETH_DBF_TEXT(setup, 2, "allcqdbf");
3187 3181
3188 if (card->qdio.state == QETH_QDIO_ALLOCATED) 3182 if (atomic_cmpxchg(&card->qdio.state, QETH_QDIO_UNINITIALIZED,
3183 QETH_QDIO_ALLOCATED) != QETH_QDIO_UNINITIALIZED)
3189 return 0; 3184 return 0;
3190 3185
3191 card->qdio.in_q = kmalloc(sizeof(struct qeth_qdio_q), 3186 card->qdio.in_q = kmalloc(sizeof(struct qeth_qdio_q),
3192 GFP_KERNEL|GFP_DMA); 3187 GFP_KERNEL|GFP_DMA);
3193 if (!card->qdio.in_q) 3188 if (!card->qdio.in_q)
3194 return - ENOMEM; 3189 goto out_nomem;
3195 QETH_DBF_TEXT(setup, 2, "inq"); 3190 QETH_DBF_TEXT(setup, 2, "inq");
3196 QETH_DBF_HEX(setup, 2, &card->qdio.in_q, sizeof(void *)); 3191 QETH_DBF_HEX(setup, 2, &card->qdio.in_q, sizeof(void *));
3197 memset(card->qdio.in_q, 0, sizeof(struct qeth_qdio_q)); 3192 memset(card->qdio.in_q, 0, sizeof(struct qeth_qdio_q));
@@ -3200,27 +3195,19 @@ qeth_alloc_qdio_buffers(struct qeth_card *card)
3200 card->qdio.in_q->bufs[i].buffer = 3195 card->qdio.in_q->bufs[i].buffer =
3201 &card->qdio.in_q->qdio_bufs[i]; 3196 &card->qdio.in_q->qdio_bufs[i];
3202 /* inbound buffer pool */ 3197 /* inbound buffer pool */
3203 if (qeth_alloc_buffer_pool(card)){ 3198 if (qeth_alloc_buffer_pool(card))
3204 kfree(card->qdio.in_q); 3199 goto out_freeinq;
3205 return -ENOMEM;
3206 }
3207 /* outbound */ 3200 /* outbound */
3208 card->qdio.out_qs = 3201 card->qdio.out_qs =
3209 kmalloc(card->qdio.no_out_queues * 3202 kmalloc(card->qdio.no_out_queues *
3210 sizeof(struct qeth_qdio_out_q *), GFP_KERNEL); 3203 sizeof(struct qeth_qdio_out_q *), GFP_KERNEL);
3211 if (!card->qdio.out_qs){ 3204 if (!card->qdio.out_qs)
3212 qeth_free_buffer_pool(card); 3205 goto out_freepool;
3213 return -ENOMEM; 3206 for (i = 0; i < card->qdio.no_out_queues; ++i) {
3214 }
3215 for (i = 0; i < card->qdio.no_out_queues; ++i){
3216 card->qdio.out_qs[i] = kmalloc(sizeof(struct qeth_qdio_out_q), 3207 card->qdio.out_qs[i] = kmalloc(sizeof(struct qeth_qdio_out_q),
3217 GFP_KERNEL|GFP_DMA); 3208 GFP_KERNEL|GFP_DMA);
3218 if (!card->qdio.out_qs[i]){ 3209 if (!card->qdio.out_qs[i])
3219 while (i > 0) 3210 goto out_freeoutq;
3220 kfree(card->qdio.out_qs[--i]);
3221 kfree(card->qdio.out_qs);
3222 return -ENOMEM;
3223 }
3224 QETH_DBF_TEXT_(setup, 2, "outq %i", i); 3211 QETH_DBF_TEXT_(setup, 2, "outq %i", i);
3225 QETH_DBF_HEX(setup, 2, &card->qdio.out_qs[i], sizeof(void *)); 3212 QETH_DBF_HEX(setup, 2, &card->qdio.out_qs[i], sizeof(void *));
3226 memset(card->qdio.out_qs[i], 0, sizeof(struct qeth_qdio_out_q)); 3213 memset(card->qdio.out_qs[i], 0, sizeof(struct qeth_qdio_out_q));
@@ -3237,8 +3224,19 @@ qeth_alloc_qdio_buffers(struct qeth_card *card)
3237 INIT_LIST_HEAD(&card->qdio.out_qs[i]->bufs[j].ctx_list); 3224 INIT_LIST_HEAD(&card->qdio.out_qs[i]->bufs[j].ctx_list);
3238 } 3225 }
3239 } 3226 }
3240 card->qdio.state = QETH_QDIO_ALLOCATED;
3241 return 0; 3227 return 0;
3228
3229out_freeoutq:
3230 while (i > 0)
3231 kfree(card->qdio.out_qs[--i]);
3232 kfree(card->qdio.out_qs);
3233out_freepool:
3234 qeth_free_buffer_pool(card);
3235out_freeinq:
3236 kfree(card->qdio.in_q);
3237out_nomem:
3238 atomic_set(&card->qdio.state, QETH_QDIO_UNINITIALIZED);
3239 return -ENOMEM;
3242} 3240}
3243 3241
3244static void 3242static void
@@ -3247,7 +3245,8 @@ qeth_free_qdio_buffers(struct qeth_card *card)
3247 int i, j; 3245 int i, j;
3248 3246
3249 QETH_DBF_TEXT(trace, 2, "freeqdbf"); 3247 QETH_DBF_TEXT(trace, 2, "freeqdbf");
3250 if (card->qdio.state == QETH_QDIO_UNINITIALIZED) 3248 if (atomic_swap(&card->qdio.state, QETH_QDIO_UNINITIALIZED) ==
3249 QETH_QDIO_UNINITIALIZED)
3251 return; 3250 return;
3252 kfree(card->qdio.in_q); 3251 kfree(card->qdio.in_q);
3253 /* inbound buffer pool */ 3252 /* inbound buffer pool */
@@ -3260,7 +3259,6 @@ qeth_free_qdio_buffers(struct qeth_card *card)
3260 kfree(card->qdio.out_qs[i]); 3259 kfree(card->qdio.out_qs[i]);
3261 } 3260 }
3262 kfree(card->qdio.out_qs); 3261 kfree(card->qdio.out_qs);
3263 card->qdio.state = QETH_QDIO_UNINITIALIZED;
3264} 3262}
3265 3263
3266static void 3264static void
@@ -3282,7 +3280,7 @@ static void
3282qeth_init_qdio_info(struct qeth_card *card) 3280qeth_init_qdio_info(struct qeth_card *card)
3283{ 3281{
3284 QETH_DBF_TEXT(setup, 4, "intqdinf"); 3282 QETH_DBF_TEXT(setup, 4, "intqdinf");
3285 card->qdio.state = QETH_QDIO_UNINITIALIZED; 3283 atomic_set(&card->qdio.state, QETH_QDIO_UNINITIALIZED);
3286 /* inbound */ 3284 /* inbound */
3287 card->qdio.in_buf_size = QETH_IN_BUF_SIZE_DEFAULT; 3285 card->qdio.in_buf_size = QETH_IN_BUF_SIZE_DEFAULT;
3288 card->qdio.init_pool.buf_count = QETH_IN_BUF_COUNT_DEFAULT; 3286 card->qdio.init_pool.buf_count = QETH_IN_BUF_COUNT_DEFAULT;
@@ -3345,7 +3343,7 @@ qeth_qdio_establish(struct qeth_card *card)
3345 struct qdio_buffer **in_sbal_ptrs; 3343 struct qdio_buffer **in_sbal_ptrs;
3346 struct qdio_buffer **out_sbal_ptrs; 3344 struct qdio_buffer **out_sbal_ptrs;
3347 int i, j, k; 3345 int i, j, k;
3348 int rc; 3346 int rc = 0;
3349 3347
3350 QETH_DBF_TEXT(setup, 2, "qdioest"); 3348 QETH_DBF_TEXT(setup, 2, "qdioest");
3351 3349
@@ -3404,8 +3402,10 @@ qeth_qdio_establish(struct qeth_card *card)
3404 init_data.input_sbal_addr_array = (void **) in_sbal_ptrs; 3402 init_data.input_sbal_addr_array = (void **) in_sbal_ptrs;
3405 init_data.output_sbal_addr_array = (void **) out_sbal_ptrs; 3403 init_data.output_sbal_addr_array = (void **) out_sbal_ptrs;
3406 3404
3407 if (!(rc = qdio_initialize(&init_data))) 3405 if (atomic_cmpxchg(&card->qdio.state, QETH_QDIO_ALLOCATED,
3408 card->qdio.state = QETH_QDIO_ESTABLISHED; 3406 QETH_QDIO_ESTABLISHED) == QETH_QDIO_ALLOCATED)
3407 if ((rc = qdio_initialize(&init_data)))
3408 atomic_set(&card->qdio.state, QETH_QDIO_ALLOCATED);
3409 3409
3410 kfree(out_sbal_ptrs); 3410 kfree(out_sbal_ptrs);
3411 kfree(in_sbal_ptrs); 3411 kfree(in_sbal_ptrs);
@@ -3521,13 +3521,20 @@ qeth_qdio_clear_card(struct qeth_card *card, int use_halt)
3521 int rc = 0; 3521 int rc = 0;
3522 3522
3523 QETH_DBF_TEXT(trace,3,"qdioclr"); 3523 QETH_DBF_TEXT(trace,3,"qdioclr");
3524 if (card->qdio.state == QETH_QDIO_ESTABLISHED){ 3524 switch (atomic_cmpxchg(&card->qdio.state, QETH_QDIO_ESTABLISHED,
3525 QETH_QDIO_CLEANING)) {
3526 case QETH_QDIO_ESTABLISHED:
3525 if ((rc = qdio_cleanup(CARD_DDEV(card), 3527 if ((rc = qdio_cleanup(CARD_DDEV(card),
3526 (card->info.type == QETH_CARD_TYPE_IQD) ? 3528 (card->info.type == QETH_CARD_TYPE_IQD) ?
3527 QDIO_FLAG_CLEANUP_USING_HALT : 3529 QDIO_FLAG_CLEANUP_USING_HALT :
3528 QDIO_FLAG_CLEANUP_USING_CLEAR))) 3530 QDIO_FLAG_CLEANUP_USING_CLEAR)))
3529 QETH_DBF_TEXT_(trace, 3, "1err%d", rc); 3531 QETH_DBF_TEXT_(trace, 3, "1err%d", rc);
3530 card->qdio.state = QETH_QDIO_ALLOCATED; 3532 atomic_set(&card->qdio.state, QETH_QDIO_ALLOCATED);
3533 break;
3534 case QETH_QDIO_CLEANING:
3535 return rc;
3536 default:
3537 break;
3531 } 3538 }
3532 if ((rc = qeth_clear_halt_card(card, use_halt))) 3539 if ((rc = qeth_clear_halt_card(card, use_halt)))
3533 QETH_DBF_TEXT_(trace, 3, "2err%d", rc); 3540 QETH_DBF_TEXT_(trace, 3, "2err%d", rc);
@@ -3687,10 +3694,10 @@ qeth_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
3687 /* return OK; otherwise ksoftirqd goes to 100% */ 3694 /* return OK; otherwise ksoftirqd goes to 100% */
3688 return NETDEV_TX_OK; 3695 return NETDEV_TX_OK;
3689 } 3696 }
3690#ifdef CONFIG_QETH_PERF_STATS 3697 if (card->options.performance_stats) {
3691 card->perf_stats.outbound_cnt++; 3698 card->perf_stats.outbound_cnt++;
3692 card->perf_stats.outbound_start_time = qeth_get_micros(); 3699 card->perf_stats.outbound_start_time = qeth_get_micros();
3693#endif 3700 }
3694 netif_stop_queue(dev); 3701 netif_stop_queue(dev);
3695 if ((rc = qeth_send_packet(card, skb))) { 3702 if ((rc = qeth_send_packet(card, skb))) {
3696 if (rc == -EBUSY) { 3703 if (rc == -EBUSY) {
@@ -3704,10 +3711,9 @@ qeth_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
3704 } 3711 }
3705 } 3712 }
3706 netif_wake_queue(dev); 3713 netif_wake_queue(dev);
3707#ifdef CONFIG_QETH_PERF_STATS 3714 if (card->options.performance_stats)
3708 card->perf_stats.outbound_time += qeth_get_micros() - 3715 card->perf_stats.outbound_time += qeth_get_micros() -
3709 card->perf_stats.outbound_start_time; 3716 card->perf_stats.outbound_start_time;
3710#endif
3711 return rc; 3717 return rc;
3712} 3718}
3713 3719
@@ -3922,49 +3928,59 @@ qeth_get_ip_version(struct sk_buff *skb)
3922 } 3928 }
3923} 3929}
3924 3930
3925static inline int 3931static inline struct qeth_hdr *
3926qeth_prepare_skb(struct qeth_card *card, struct sk_buff **skb, 3932__qeth_prepare_skb(struct qeth_card *card, struct sk_buff *skb, int ipv)
3927 struct qeth_hdr **hdr, int ipv)
3928{ 3933{
3929 int rc = 0;
3930#ifdef CONFIG_QETH_VLAN 3934#ifdef CONFIG_QETH_VLAN
3931 u16 *tag; 3935 u16 *tag;
3932#endif 3936 if (card->vlangrp && vlan_tx_tag_present(skb) &&
3933
3934 QETH_DBF_TEXT(trace, 6, "prepskb");
3935 if (card->info.type == QETH_CARD_TYPE_OSN) {
3936 *hdr = (struct qeth_hdr *)(*skb)->data;
3937 return rc;
3938 }
3939 rc = qeth_realloc_headroom(card, skb, sizeof(struct qeth_hdr));
3940 if (rc)
3941 return rc;
3942#ifdef CONFIG_QETH_VLAN
3943 if (card->vlangrp && vlan_tx_tag_present(*skb) &&
3944 ((ipv == 6) || card->options.layer2) ) { 3937 ((ipv == 6) || card->options.layer2) ) {
3945 /* 3938 /*
3946 * Move the mac addresses (6 bytes src, 6 bytes dest) 3939 * Move the mac addresses (6 bytes src, 6 bytes dest)
3947 * to the beginning of the new header. We are using three 3940 * to the beginning of the new header. We are using three
3948 * memcpys instead of one memmove to save cycles. 3941 * memcpys instead of one memmove to save cycles.
3949 */ 3942 */
3950 skb_push(*skb, VLAN_HLEN); 3943 skb_push(skb, VLAN_HLEN);
3951 memcpy((*skb)->data, (*skb)->data + 4, 4); 3944 memcpy(skb->data, skb->data + 4, 4);
3952 memcpy((*skb)->data + 4, (*skb)->data + 8, 4); 3945 memcpy(skb->data + 4, skb->data + 8, 4);
3953 memcpy((*skb)->data + 8, (*skb)->data + 12, 4); 3946 memcpy(skb->data + 8, skb->data + 12, 4);
3954 tag = (u16 *)((*skb)->data + 12); 3947 tag = (u16 *)(skb->data + 12);
3955 /* 3948 /*
3956 * first two bytes = ETH_P_8021Q (0x8100) 3949 * first two bytes = ETH_P_8021Q (0x8100)
3957 * second two bytes = VLANID 3950 * second two bytes = VLANID
3958 */ 3951 */
3959 *tag = __constant_htons(ETH_P_8021Q); 3952 *tag = __constant_htons(ETH_P_8021Q);
3960 *(tag + 1) = htons(vlan_tx_tag_get(*skb)); 3953 *(tag + 1) = htons(vlan_tx_tag_get(skb));
3961 } 3954 }
3962#endif 3955#endif
3963 *hdr = (struct qeth_hdr *) 3956 return ((struct qeth_hdr *)
3964 qeth_push_skb(card, skb, sizeof(struct qeth_hdr)); 3957 qeth_push_skb(card, skb, sizeof(struct qeth_hdr)));
3965 if (*hdr == NULL) 3958}
3966 return -EINVAL; 3959
3967 return 0; 3960static inline void
3961__qeth_free_new_skb(struct sk_buff *orig_skb, struct sk_buff *new_skb)
3962{
3963 if (orig_skb != new_skb)
3964 dev_kfree_skb_any(new_skb);
3965}
3966
3967static inline struct sk_buff *
3968qeth_prepare_skb(struct qeth_card *card, struct sk_buff *skb,
3969 struct qeth_hdr **hdr, int ipv)
3970{
3971 struct sk_buff *new_skb;
3972
3973 QETH_DBF_TEXT(trace, 6, "prepskb");
3974
3975 new_skb = qeth_realloc_headroom(card, skb, sizeof(struct qeth_hdr));
3976 if (new_skb == NULL)
3977 return NULL;
3978 *hdr = __qeth_prepare_skb(card, new_skb, ipv);
3979 if (*hdr == NULL) {
3980 __qeth_free_new_skb(skb, new_skb);
3981 return NULL;
3982 }
3983 return new_skb;
3968} 3984}
3969 3985
3970static inline u8 3986static inline u8
@@ -4206,9 +4222,8 @@ qeth_fill_buffer(struct qeth_qdio_out_q *queue,
4206 flush_cnt = 1; 4222 flush_cnt = 1;
4207 } else { 4223 } else {
4208 QETH_DBF_TEXT(trace, 6, "fillbfpa"); 4224 QETH_DBF_TEXT(trace, 6, "fillbfpa");
4209#ifdef CONFIG_QETH_PERF_STATS 4225 if (queue->card->options.performance_stats)
4210 queue->card->perf_stats.skbs_sent_pack++; 4226 queue->card->perf_stats.skbs_sent_pack++;
4211#endif
4212 if (buf->next_element_to_fill >= 4227 if (buf->next_element_to_fill >=
4213 QETH_MAX_BUFFER_ELEMENTS(queue->card)) { 4228 QETH_MAX_BUFFER_ELEMENTS(queue->card)) {
4214 /* 4229 /*
@@ -4245,21 +4260,15 @@ qeth_do_send_packet_fast(struct qeth_card *card, struct qeth_qdio_out_q *queue,
4245 * check if buffer is empty to make sure that we do not 'overtake' 4260 * check if buffer is empty to make sure that we do not 'overtake'
4246 * ourselves and try to fill a buffer that is already primed 4261 * ourselves and try to fill a buffer that is already primed
4247 */ 4262 */
4248 if (atomic_read(&buffer->state) != QETH_QDIO_BUF_EMPTY) { 4263 if (atomic_read(&buffer->state) != QETH_QDIO_BUF_EMPTY)
4249 card->stats.tx_dropped++; 4264 goto out;
4250 atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED);
4251 return -EBUSY;
4252 }
4253 if (ctx == NULL) 4265 if (ctx == NULL)
4254 queue->next_buf_to_fill = (queue->next_buf_to_fill + 1) % 4266 queue->next_buf_to_fill = (queue->next_buf_to_fill + 1) %
4255 QDIO_MAX_BUFFERS_PER_Q; 4267 QDIO_MAX_BUFFERS_PER_Q;
4256 else { 4268 else {
4257 buffers_needed = qeth_eddp_check_buffers_for_context(queue,ctx); 4269 buffers_needed = qeth_eddp_check_buffers_for_context(queue,ctx);
4258 if (buffers_needed < 0) { 4270 if (buffers_needed < 0)
4259 card->stats.tx_dropped++; 4271 goto out;
4260 atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED);
4261 return -EBUSY;
4262 }
4263 queue->next_buf_to_fill = 4272 queue->next_buf_to_fill =
4264 (queue->next_buf_to_fill + buffers_needed) % 4273 (queue->next_buf_to_fill + buffers_needed) %
4265 QDIO_MAX_BUFFERS_PER_Q; 4274 QDIO_MAX_BUFFERS_PER_Q;
@@ -4274,6 +4283,9 @@ qeth_do_send_packet_fast(struct qeth_card *card, struct qeth_qdio_out_q *queue,
4274 qeth_flush_buffers(queue, 0, index, flush_cnt); 4283 qeth_flush_buffers(queue, 0, index, flush_cnt);
4275 } 4284 }
4276 return 0; 4285 return 0;
4286out:
4287 atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED);
4288 return -EBUSY;
4277} 4289}
4278 4290
4279static inline int 4291static inline int
@@ -4299,8 +4311,7 @@ qeth_do_send_packet(struct qeth_card *card, struct qeth_qdio_out_q *queue,
4299 * check if buffer is empty to make sure that we do not 'overtake' 4311 * check if buffer is empty to make sure that we do not 'overtake'
4300 * ourselves and try to fill a buffer that is already primed 4312 * ourselves and try to fill a buffer that is already primed
4301 */ 4313 */
4302 if (atomic_read(&buffer->state) != QETH_QDIO_BUF_EMPTY){ 4314 if (atomic_read(&buffer->state) != QETH_QDIO_BUF_EMPTY) {
4303 card->stats.tx_dropped++;
4304 atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED); 4315 atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED);
4305 return -EBUSY; 4316 return -EBUSY;
4306 } 4317 }
@@ -4323,7 +4334,6 @@ qeth_do_send_packet(struct qeth_card *card, struct qeth_qdio_out_q *queue,
4323 * again */ 4334 * again */
4324 if (atomic_read(&buffer->state) != 4335 if (atomic_read(&buffer->state) !=
4325 QETH_QDIO_BUF_EMPTY){ 4336 QETH_QDIO_BUF_EMPTY){
4326 card->stats.tx_dropped++;
4327 qeth_flush_buffers(queue, 0, start_index, flush_count); 4337 qeth_flush_buffers(queue, 0, start_index, flush_count);
4328 atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED); 4338 atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED);
4329 return -EBUSY; 4339 return -EBUSY;
@@ -4334,7 +4344,6 @@ qeth_do_send_packet(struct qeth_card *card, struct qeth_qdio_out_q *queue,
4334 * free buffers) to handle eddp context */ 4344 * free buffers) to handle eddp context */
4335 if (qeth_eddp_check_buffers_for_context(queue,ctx) < 0){ 4345 if (qeth_eddp_check_buffers_for_context(queue,ctx) < 0){
4336 printk("eddp tx_dropped 1\n"); 4346 printk("eddp tx_dropped 1\n");
4337 card->stats.tx_dropped++;
4338 rc = -EBUSY; 4347 rc = -EBUSY;
4339 goto out; 4348 goto out;
4340 } 4349 }
@@ -4346,7 +4355,6 @@ qeth_do_send_packet(struct qeth_card *card, struct qeth_qdio_out_q *queue,
4346 tmp = qeth_eddp_fill_buffer(queue,ctx,queue->next_buf_to_fill); 4355 tmp = qeth_eddp_fill_buffer(queue,ctx,queue->next_buf_to_fill);
4347 if (tmp < 0) { 4356 if (tmp < 0) {
4348 printk("eddp tx_dropped 2\n"); 4357 printk("eddp tx_dropped 2\n");
4349 card->stats.tx_dropped++;
4350 rc = - EBUSY; 4358 rc = - EBUSY;
4351 goto out; 4359 goto out;
4352 } 4360 }
@@ -4380,10 +4388,8 @@ out:
4380 qeth_flush_buffers(queue, 0, start_index, flush_count); 4388 qeth_flush_buffers(queue, 0, start_index, flush_count);
4381 } 4389 }
4382 /* at this point the queue is UNLOCKED again */ 4390 /* at this point the queue is UNLOCKED again */
4383#ifdef CONFIG_QETH_PERF_STATS 4391 if (queue->card->options.performance_stats && do_pack)
4384 if (do_pack)
4385 queue->card->perf_stats.bufs_sent_pack += flush_count; 4392 queue->card->perf_stats.bufs_sent_pack += flush_count;
4386#endif /* CONFIG_QETH_PERF_STATS */
4387 4393
4388 return rc; 4394 return rc;
4389} 4395}
@@ -4394,21 +4400,21 @@ qeth_get_elements_no(struct qeth_card *card, void *hdr,
4394{ 4400{
4395 int elements_needed = 0; 4401 int elements_needed = 0;
4396 4402
4397 if (skb_shinfo(skb)->nr_frags > 0) { 4403 if (skb_shinfo(skb)->nr_frags > 0)
4398 elements_needed = (skb_shinfo(skb)->nr_frags + 1); 4404 elements_needed = (skb_shinfo(skb)->nr_frags + 1);
4399 } 4405 if (elements_needed == 0)
4400 if (elements_needed == 0 )
4401 elements_needed = 1 + (((((unsigned long) hdr) % PAGE_SIZE) 4406 elements_needed = 1 + (((((unsigned long) hdr) % PAGE_SIZE)
4402 + skb->len) >> PAGE_SHIFT); 4407 + skb->len) >> PAGE_SHIFT);
4403 if ((elements_needed + elems) > QETH_MAX_BUFFER_ELEMENTS(card)){ 4408 if ((elements_needed + elems) > QETH_MAX_BUFFER_ELEMENTS(card)){
4404 PRINT_ERR("qeth_do_send_packet: invalid size of " 4409 PRINT_ERR("Invalid size of IP packet "
4405 "IP packet (Number=%d / Length=%d). Discarded.\n", 4410 "(Number=%d / Length=%d). Discarded.\n",
4406 (elements_needed+elems), skb->len); 4411 (elements_needed+elems), skb->len);
4407 return 0; 4412 return 0;
4408 } 4413 }
4409 return elements_needed; 4414 return elements_needed;
4410} 4415}
4411 4416
4417
4412static inline int 4418static inline int
4413qeth_send_packet(struct qeth_card *card, struct sk_buff *skb) 4419qeth_send_packet(struct qeth_card *card, struct sk_buff *skb)
4414{ 4420{
@@ -4420,112 +4426,112 @@ qeth_send_packet(struct qeth_card *card, struct sk_buff *skb)
4420 enum qeth_large_send_types large_send = QETH_LARGE_SEND_NO; 4426 enum qeth_large_send_types large_send = QETH_LARGE_SEND_NO;
4421 struct qeth_eddp_context *ctx = NULL; 4427 struct qeth_eddp_context *ctx = NULL;
4422 int tx_bytes = skb->len; 4428 int tx_bytes = skb->len;
4423#ifdef CONFIG_QETH_PERF_STATS
4424 unsigned short nr_frags = skb_shinfo(skb)->nr_frags; 4429 unsigned short nr_frags = skb_shinfo(skb)->nr_frags;
4425 unsigned short tso_size = skb_shinfo(skb)->gso_size; 4430 unsigned short tso_size = skb_shinfo(skb)->gso_size;
4426#endif 4431 struct sk_buff *new_skb, *new_skb2;
4427 int rc; 4432 int rc;
4428 4433
4429 QETH_DBF_TEXT(trace, 6, "sendpkt"); 4434 QETH_DBF_TEXT(trace, 6, "sendpkt");
4430 4435
4436 new_skb = skb;
4437 if ((card->info.type == QETH_CARD_TYPE_OSN) &&
4438 (skb->protocol == htons(ETH_P_IPV6)))
4439 return -EPERM;
4440 cast_type = qeth_get_cast_type(card, skb);
4441 if ((cast_type == RTN_BROADCAST) &&
4442 (card->info.broadcast_capable == 0))
4443 return -EPERM;
4444 queue = card->qdio.out_qs
4445 [qeth_get_priority_queue(card, skb, ipv, cast_type)];
4431 if (!card->options.layer2) { 4446 if (!card->options.layer2) {
4432 ipv = qeth_get_ip_version(skb); 4447 ipv = qeth_get_ip_version(skb);
4433 if ((card->dev->hard_header == qeth_fake_header) && ipv) { 4448 if ((card->dev->hard_header == qeth_fake_header) && ipv) {
4434 if ((skb = qeth_pskb_unshare(skb,GFP_ATOMIC)) == NULL) { 4449 new_skb = qeth_pskb_unshare(skb, GFP_ATOMIC);
4435 card->stats.tx_dropped++; 4450 if (!new_skb)
4436 dev_kfree_skb_irq(skb); 4451 return -ENOMEM;
4437 return 0;
4438 }
4439 if(card->dev->type == ARPHRD_IEEE802_TR){ 4452 if(card->dev->type == ARPHRD_IEEE802_TR){
4440 skb_pull(skb, QETH_FAKE_LL_LEN_TR); 4453 skb_pull(new_skb, QETH_FAKE_LL_LEN_TR);
4441 } else { 4454 } else {
4442 skb_pull(skb, QETH_FAKE_LL_LEN_ETH); 4455 skb_pull(new_skb, QETH_FAKE_LL_LEN_ETH);
4443 } 4456 }
4444 } 4457 }
4445 } 4458 }
4446 if ((card->info.type == QETH_CARD_TYPE_OSN) &&
4447 (skb->protocol == htons(ETH_P_IPV6))) {
4448 dev_kfree_skb_any(skb);
4449 return 0;
4450 }
4451 cast_type = qeth_get_cast_type(card, skb);
4452 if ((cast_type == RTN_BROADCAST) &&
4453 (card->info.broadcast_capable == 0)){
4454 card->stats.tx_dropped++;
4455 card->stats.tx_errors++;
4456 dev_kfree_skb_any(skb);
4457 return NETDEV_TX_OK;
4458 }
4459 queue = card->qdio.out_qs
4460 [qeth_get_priority_queue(card, skb, ipv, cast_type)];
4461
4462 if (skb_is_gso(skb)) 4459 if (skb_is_gso(skb))
4463 large_send = card->options.large_send; 4460 large_send = card->options.large_send;
4464 4461 /* check on OSN device*/
4465 /*are we able to do TSO ? If so ,prepare and send it from here */ 4462 if (card->info.type == QETH_CARD_TYPE_OSN)
4463 hdr = (struct qeth_hdr *)new_skb->data;
4464 /*are we able to do TSO ? */
4466 if ((large_send == QETH_LARGE_SEND_TSO) && 4465 if ((large_send == QETH_LARGE_SEND_TSO) &&
4467 (cast_type == RTN_UNSPEC)) { 4466 (cast_type == RTN_UNSPEC)) {
4468 rc = qeth_tso_prepare_packet(card, skb, ipv, cast_type); 4467 rc = qeth_tso_prepare_packet(card, new_skb, ipv, cast_type);
4469 if (rc) { 4468 if (rc) {
4470 card->stats.tx_dropped++; 4469 __qeth_free_new_skb(skb, new_skb);
4471 card->stats.tx_errors++; 4470 return rc;
4472 dev_kfree_skb_any(skb);
4473 return NETDEV_TX_OK;
4474 } 4471 }
4475 elements_needed++; 4472 elements_needed++;
4476 } else { 4473 } else if (card->info.type != QETH_CARD_TYPE_OSN) {
4477 if ((rc = qeth_prepare_skb(card, &skb, &hdr, ipv))) { 4474 new_skb2 = qeth_prepare_skb(card, new_skb, &hdr, ipv);
4478 QETH_DBF_TEXT_(trace, 4, "pskbe%d", rc); 4475 if (!new_skb2) {
4479 return rc; 4476 __qeth_free_new_skb(skb, new_skb);
4477 return -EINVAL;
4480 } 4478 }
4481 if (card->info.type != QETH_CARD_TYPE_OSN) 4479 if (new_skb != skb)
4482 qeth_fill_header(card, hdr, skb, ipv, cast_type); 4480 __qeth_free_new_skb(new_skb2, new_skb);
4481 new_skb = new_skb2;
4482 qeth_fill_header(card, hdr, new_skb, ipv, cast_type);
4483 } 4483 }
4484
4485 if (large_send == QETH_LARGE_SEND_EDDP) { 4484 if (large_send == QETH_LARGE_SEND_EDDP) {
4486 ctx = qeth_eddp_create_context(card, skb, hdr); 4485 ctx = qeth_eddp_create_context(card, new_skb, hdr);
4487 if (ctx == NULL) { 4486 if (ctx == NULL) {
4487 __qeth_free_new_skb(skb, new_skb);
4488 PRINT_WARN("could not create eddp context\n"); 4488 PRINT_WARN("could not create eddp context\n");
4489 return -EINVAL; 4489 return -EINVAL;
4490 } 4490 }
4491 } else { 4491 } else {
4492 int elems = qeth_get_elements_no(card,(void*) hdr, skb, 4492 int elems = qeth_get_elements_no(card,(void*) hdr, new_skb,
4493 elements_needed); 4493 elements_needed);
4494 if (!elems) 4494 if (!elems) {
4495 __qeth_free_new_skb(skb, new_skb);
4495 return -EINVAL; 4496 return -EINVAL;
4497 }
4496 elements_needed += elems; 4498 elements_needed += elems;
4497 } 4499 }
4498 4500
4499 if (card->info.type != QETH_CARD_TYPE_IQD) 4501 if (card->info.type != QETH_CARD_TYPE_IQD)
4500 rc = qeth_do_send_packet(card, queue, skb, hdr, 4502 rc = qeth_do_send_packet(card, queue, new_skb, hdr,
4501 elements_needed, ctx); 4503 elements_needed, ctx);
4502 else 4504 else
4503 rc = qeth_do_send_packet_fast(card, queue, skb, hdr, 4505 rc = qeth_do_send_packet_fast(card, queue, new_skb, hdr,
4504 elements_needed, ctx); 4506 elements_needed, ctx);
4505 if (!rc){ 4507 if (!rc) {
4506 card->stats.tx_packets++; 4508 card->stats.tx_packets++;
4507 card->stats.tx_bytes += tx_bytes; 4509 card->stats.tx_bytes += tx_bytes;
4508#ifdef CONFIG_QETH_PERF_STATS 4510 if (new_skb != skb)
4509 if (tso_size && 4511 dev_kfree_skb_any(skb);
4510 !(large_send == QETH_LARGE_SEND_NO)) { 4512 if (card->options.performance_stats) {
4511 card->perf_stats.large_send_bytes += tx_bytes; 4513 if (tso_size &&
4512 card->perf_stats.large_send_cnt++; 4514 !(large_send == QETH_LARGE_SEND_NO)) {
4513 } 4515 card->perf_stats.large_send_bytes += tx_bytes;
4514 if (nr_frags > 0){ 4516 card->perf_stats.large_send_cnt++;
4515 card->perf_stats.sg_skbs_sent++; 4517 }
4516 /* nr_frags + skb->data */ 4518 if (nr_frags > 0) {
4517 card->perf_stats.sg_frags_sent += 4519 card->perf_stats.sg_skbs_sent++;
4518 nr_frags + 1; 4520 /* nr_frags + skb->data */
4521 card->perf_stats.sg_frags_sent +=
4522 nr_frags + 1;
4523 }
4519 } 4524 }
4520#endif /* CONFIG_QETH_PERF_STATS */ 4525 } else {
4526 card->stats.tx_dropped++;
4527 __qeth_free_new_skb(skb, new_skb);
4521 } 4528 }
4522 if (ctx != NULL) { 4529 if (ctx != NULL) {
4523 /* drop creator's reference */ 4530 /* drop creator's reference */
4524 qeth_eddp_put_context(ctx); 4531 qeth_eddp_put_context(ctx);
4525 /* free skb; it's not referenced by a buffer */ 4532 /* free skb; it's not referenced by a buffer */
4526 if (rc == 0) 4533 if (!rc)
4527 dev_kfree_skb_any(skb); 4534 dev_kfree_skb_any(new_skb);
4528
4529 } 4535 }
4530 return rc; 4536 return rc;
4531} 4537}
@@ -7338,6 +7344,8 @@ qeth_setrouting_v6(struct qeth_card *card)
7338 QETH_DBF_TEXT(trace,3,"setrtg6"); 7344 QETH_DBF_TEXT(trace,3,"setrtg6");
7339#ifdef CONFIG_QETH_IPV6 7345#ifdef CONFIG_QETH_IPV6
7340 7346
7347 if (!qeth_is_supported(card, IPA_IPV6))
7348 return 0;
7341 qeth_correct_routing_type(card, &card->options.route6.type, 7349 qeth_correct_routing_type(card, &card->options.route6.type,
7342 QETH_PROT_IPV6); 7350 QETH_PROT_IPV6);
7343 7351
@@ -7876,12 +7884,12 @@ __qeth_set_online(struct ccwgroup_device *gdev, int recovery_mode)
7876 QETH_DBF_TEXT_(setup, 2, "5err%d", rc); 7884 QETH_DBF_TEXT_(setup, 2, "5err%d", rc);
7877 goto out_remove; 7885 goto out_remove;
7878 } 7886 }
7879 card->state = CARD_STATE_SOFTSETUP;
7880 7887
7881 if ((rc = qeth_init_qdio_queues(card))){ 7888 if ((rc = qeth_init_qdio_queues(card))){
7882 QETH_DBF_TEXT_(setup, 2, "6err%d", rc); 7889 QETH_DBF_TEXT_(setup, 2, "6err%d", rc);
7883 goto out_remove; 7890 goto out_remove;
7884 } 7891 }
7892 card->state = CARD_STATE_SOFTSETUP;
7885 netif_carrier_on(card->dev); 7893 netif_carrier_on(card->dev);
7886 7894
7887 qeth_set_allowed_threads(card, 0xffffffff, 0); 7895 qeth_set_allowed_threads(card, 0xffffffff, 0);
@@ -8538,34 +8546,44 @@ qeth_ipv6_uninit(void)
8538static void 8546static void
8539qeth_sysfs_unregister(void) 8547qeth_sysfs_unregister(void)
8540{ 8548{
8549 s390_root_dev_unregister(qeth_root_dev);
8541 qeth_remove_driver_attributes(); 8550 qeth_remove_driver_attributes();
8542 ccw_driver_unregister(&qeth_ccw_driver); 8551 ccw_driver_unregister(&qeth_ccw_driver);
8543 ccwgroup_driver_unregister(&qeth_ccwgroup_driver); 8552 ccwgroup_driver_unregister(&qeth_ccwgroup_driver);
8544 s390_root_dev_unregister(qeth_root_dev);
8545} 8553}
8554
8546/** 8555/**
8547 * register qeth at sysfs 8556 * register qeth at sysfs
8548 */ 8557 */
8549static int 8558static int
8550qeth_sysfs_register(void) 8559qeth_sysfs_register(void)
8551{ 8560{
8552 int rc=0; 8561 int rc;
8553 8562
8554 rc = ccwgroup_driver_register(&qeth_ccwgroup_driver); 8563 rc = ccwgroup_driver_register(&qeth_ccwgroup_driver);
8555 if (rc) 8564 if (rc)
8556 return rc; 8565 goto out;
8566
8557 rc = ccw_driver_register(&qeth_ccw_driver); 8567 rc = ccw_driver_register(&qeth_ccw_driver);
8558 if (rc) 8568 if (rc)
8559 return rc; 8569 goto out_ccw_driver;
8570
8560 rc = qeth_create_driver_attributes(); 8571 rc = qeth_create_driver_attributes();
8561 if (rc) 8572 if (rc)
8562 return rc; 8573 goto out_qeth_attr;
8574
8563 qeth_root_dev = s390_root_dev_register("qeth"); 8575 qeth_root_dev = s390_root_dev_register("qeth");
8564 if (IS_ERR(qeth_root_dev)) { 8576 rc = IS_ERR(qeth_root_dev) ? PTR_ERR(qeth_root_dev) : 0;
8565 rc = PTR_ERR(qeth_root_dev); 8577 if (!rc)
8566 return rc; 8578 goto out;
8567 } 8579
8568 return 0; 8580 qeth_remove_driver_attributes();
8581out_qeth_attr:
8582 ccw_driver_unregister(&qeth_ccw_driver);
8583out_ccw_driver:
8584 ccwgroup_driver_unregister(&qeth_ccwgroup_driver);
8585out:
8586 return rc;
8569} 8587}
8570 8588
8571/*** 8589/***
@@ -8574,7 +8592,7 @@ qeth_sysfs_register(void)
8574static int __init 8592static int __init
8575qeth_init(void) 8593qeth_init(void)
8576{ 8594{
8577 int rc=0; 8595 int rc;
8578 8596
8579 PRINT_INFO("loading %s\n", version); 8597 PRINT_INFO("loading %s\n", version);
8580 8598
@@ -8583,20 +8601,26 @@ qeth_init(void)
8583 spin_lock_init(&qeth_notify_lock); 8601 spin_lock_init(&qeth_notify_lock);
8584 rwlock_init(&qeth_card_list.rwlock); 8602 rwlock_init(&qeth_card_list.rwlock);
8585 8603
8586 if (qeth_register_dbf_views()) 8604 rc = qeth_register_dbf_views();
8605 if (rc)
8587 goto out_err; 8606 goto out_err;
8588 if (qeth_sysfs_register()) 8607
8589 goto out_sysfs; 8608 rc = qeth_sysfs_register();
8609 if (rc)
8610 goto out_dbf;
8590 8611
8591#ifdef CONFIG_QETH_IPV6 8612#ifdef CONFIG_QETH_IPV6
8592 if (qeth_ipv6_init()) { 8613 rc = qeth_ipv6_init();
8593 PRINT_ERR("Out of memory during ipv6 init.\n"); 8614 if (rc) {
8615 PRINT_ERR("Out of memory during ipv6 init code = %d\n", rc);
8594 goto out_sysfs; 8616 goto out_sysfs;
8595 } 8617 }
8596#endif /* QETH_IPV6 */ 8618#endif /* QETH_IPV6 */
8597 if (qeth_register_notifiers()) 8619 rc = qeth_register_notifiers();
8620 if (rc)
8598 goto out_ipv6; 8621 goto out_ipv6;
8599 if (qeth_create_procfs_entries()) 8622 rc = qeth_create_procfs_entries();
8623 if (rc)
8600 goto out_notifiers; 8624 goto out_notifiers;
8601 8625
8602 return rc; 8626 return rc;
@@ -8606,12 +8630,13 @@ out_notifiers:
8606out_ipv6: 8630out_ipv6:
8607#ifdef CONFIG_QETH_IPV6 8631#ifdef CONFIG_QETH_IPV6
8608 qeth_ipv6_uninit(); 8632 qeth_ipv6_uninit();
8609#endif /* QETH_IPV6 */
8610out_sysfs: 8633out_sysfs:
8634#endif /* QETH_IPV6 */
8611 qeth_sysfs_unregister(); 8635 qeth_sysfs_unregister();
8636out_dbf:
8612 qeth_unregister_dbf_views(); 8637 qeth_unregister_dbf_views();
8613out_err: 8638out_err:
8614 PRINT_ERR("Initialization failed"); 8639 PRINT_ERR("Initialization failed with code %d\n", rc);
8615 return rc; 8640 return rc;
8616} 8641}
8617 8642
diff --git a/drivers/s390/net/qeth_proc.c b/drivers/s390/net/qeth_proc.c
index 66f2da14e6e3..faa768e59257 100644
--- a/drivers/s390/net/qeth_proc.c
+++ b/drivers/s390/net/qeth_proc.c
@@ -173,7 +173,6 @@ static struct file_operations qeth_procfile_fops = {
173#define QETH_PERF_PROCFILE_NAME "qeth_perf" 173#define QETH_PERF_PROCFILE_NAME "qeth_perf"
174static struct proc_dir_entry *qeth_perf_procfile; 174static struct proc_dir_entry *qeth_perf_procfile;
175 175
176#ifdef CONFIG_QETH_PERF_STATS
177static int 176static int
178qeth_perf_procfile_seq_show(struct seq_file *s, void *it) 177qeth_perf_procfile_seq_show(struct seq_file *s, void *it)
179{ 178{
@@ -192,14 +191,21 @@ qeth_perf_procfile_seq_show(struct seq_file *s, void *it)
192 CARD_DDEV_ID(card), 191 CARD_DDEV_ID(card),
193 QETH_CARD_IFNAME(card) 192 QETH_CARD_IFNAME(card)
194 ); 193 );
194 if (!card->options.performance_stats)
195 seq_printf(s, "Performance statistics are deactivated.\n");
195 seq_printf(s, " Skb's/buffers received : %lu/%u\n" 196 seq_printf(s, " Skb's/buffers received : %lu/%u\n"
196 " Skb's/buffers sent : %lu/%u\n\n", 197 " Skb's/buffers sent : %lu/%u\n\n",
197 card->stats.rx_packets, card->perf_stats.bufs_rec, 198 card->stats.rx_packets -
198 card->stats.tx_packets, card->perf_stats.bufs_sent 199 card->perf_stats.initial_rx_packets,
200 card->perf_stats.bufs_rec,
201 card->stats.tx_packets -
202 card->perf_stats.initial_tx_packets,
203 card->perf_stats.bufs_sent
199 ); 204 );
200 seq_printf(s, " Skb's/buffers sent without packing : %lu/%u\n" 205 seq_printf(s, " Skb's/buffers sent without packing : %lu/%u\n"
201 " Skb's/buffers sent with packing : %u/%u\n\n", 206 " Skb's/buffers sent with packing : %u/%u\n\n",
202 card->stats.tx_packets - card->perf_stats.skbs_sent_pack, 207 card->stats.tx_packets - card->perf_stats.initial_tx_packets
208 - card->perf_stats.skbs_sent_pack,
203 card->perf_stats.bufs_sent - card->perf_stats.bufs_sent_pack, 209 card->perf_stats.bufs_sent - card->perf_stats.bufs_sent_pack,
204 card->perf_stats.skbs_sent_pack, 210 card->perf_stats.skbs_sent_pack,
205 card->perf_stats.bufs_sent_pack 211 card->perf_stats.bufs_sent_pack
@@ -275,11 +281,6 @@ static struct file_operations qeth_perf_procfile_fops = {
275 .release = seq_release, 281 .release = seq_release,
276}; 282};
277 283
278#define qeth_perf_procfile_created qeth_perf_procfile
279#else
280#define qeth_perf_procfile_created 1
281#endif /* CONFIG_QETH_PERF_STATS */
282
283int __init 284int __init
284qeth_create_procfs_entries(void) 285qeth_create_procfs_entries(void)
285{ 286{
@@ -288,15 +289,13 @@ qeth_create_procfs_entries(void)
288 if (qeth_procfile) 289 if (qeth_procfile)
289 qeth_procfile->proc_fops = &qeth_procfile_fops; 290 qeth_procfile->proc_fops = &qeth_procfile_fops;
290 291
291#ifdef CONFIG_QETH_PERF_STATS
292 qeth_perf_procfile = create_proc_entry(QETH_PERF_PROCFILE_NAME, 292 qeth_perf_procfile = create_proc_entry(QETH_PERF_PROCFILE_NAME,
293 S_IFREG | 0444, NULL); 293 S_IFREG | 0444, NULL);
294 if (qeth_perf_procfile) 294 if (qeth_perf_procfile)
295 qeth_perf_procfile->proc_fops = &qeth_perf_procfile_fops; 295 qeth_perf_procfile->proc_fops = &qeth_perf_procfile_fops;
296#endif /* CONFIG_QETH_PERF_STATS */
297 296
298 if (qeth_procfile && 297 if (qeth_procfile &&
299 qeth_perf_procfile_created) 298 qeth_perf_procfile)
300 return 0; 299 return 0;
301 else 300 else
302 return -ENOMEM; 301 return -ENOMEM;
diff --git a/drivers/s390/net/qeth_sys.c b/drivers/s390/net/qeth_sys.c
index 001497bbea16..5836737ac58f 100644
--- a/drivers/s390/net/qeth_sys.c
+++ b/drivers/s390/net/qeth_sys.c
@@ -743,6 +743,47 @@ static DEVICE_ATTR(layer2, 0644, qeth_dev_layer2_show,
743 qeth_dev_layer2_store); 743 qeth_dev_layer2_store);
744 744
745static ssize_t 745static ssize_t
746qeth_dev_performance_stats_show(struct device *dev, struct device_attribute *attr, char *buf)
747{
748 struct qeth_card *card = dev->driver_data;
749
750 if (!card)
751 return -EINVAL;
752
753 return sprintf(buf, "%i\n", card->options.performance_stats ? 1:0);
754}
755
756static ssize_t
757qeth_dev_performance_stats_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
758{
759 struct qeth_card *card = dev->driver_data;
760 char *tmp;
761 int i;
762
763 if (!card)
764 return -EINVAL;
765
766 i = simple_strtoul(buf, &tmp, 16);
767 if ((i == 0) || (i == 1)) {
768 if (i == card->options.performance_stats)
769 return count;
770 card->options.performance_stats = i;
771 if (i == 0)
772 memset(&card->perf_stats, 0,
773 sizeof(struct qeth_perf_stats));
774 card->perf_stats.initial_rx_packets = card->stats.rx_packets;
775 card->perf_stats.initial_tx_packets = card->stats.tx_packets;
776 } else {
777 PRINT_WARN("performance_stats: write 0 or 1 to this file!\n");
778 return -EINVAL;
779 }
780 return count;
781}
782
783static DEVICE_ATTR(performance_stats, 0644, qeth_dev_performance_stats_show,
784 qeth_dev_performance_stats_store);
785
786static ssize_t
746qeth_dev_large_send_show(struct device *dev, struct device_attribute *attr, char *buf) 787qeth_dev_large_send_show(struct device *dev, struct device_attribute *attr, char *buf)
747{ 788{
748 struct qeth_card *card = dev->driver_data; 789 struct qeth_card *card = dev->driver_data;
@@ -928,6 +969,7 @@ static struct device_attribute * qeth_device_attrs[] = {
928 &dev_attr_canonical_macaddr, 969 &dev_attr_canonical_macaddr,
929 &dev_attr_layer2, 970 &dev_attr_layer2,
930 &dev_attr_large_send, 971 &dev_attr_large_send,
972 &dev_attr_performance_stats,
931 NULL, 973 NULL,
932}; 974};
933 975
@@ -1110,12 +1152,12 @@ qeth_parse_ipatoe(const char* buf, enum qeth_prot_versions proto,
1110{ 1152{
1111 const char *start, *end; 1153 const char *start, *end;
1112 char *tmp; 1154 char *tmp;
1113 char buffer[49] = {0, }; 1155 char buffer[40] = {0, };
1114 1156
1115 start = buf; 1157 start = buf;
1116 /* get address string */ 1158 /* get address string */
1117 end = strchr(start, '/'); 1159 end = strchr(start, '/');
1118 if (!end || (end-start >= 49)){ 1160 if (!end || (end - start >= 40)){
1119 PRINT_WARN("Invalid format for ipato_addx/delx. " 1161 PRINT_WARN("Invalid format for ipato_addx/delx. "
1120 "Use <ip addr>/<mask bits>\n"); 1162 "Use <ip addr>/<mask bits>\n");
1121 return -EINVAL; 1163 return -EINVAL;
@@ -1127,7 +1169,12 @@ qeth_parse_ipatoe(const char* buf, enum qeth_prot_versions proto,
1127 } 1169 }
1128 start = end + 1; 1170 start = end + 1;
1129 *mask_bits = simple_strtoul(start, &tmp, 10); 1171 *mask_bits = simple_strtoul(start, &tmp, 10);
1130 1172 if (!strlen(start) ||
1173 (tmp == start) ||
1174 (*mask_bits > ((proto == QETH_PROT_IPV4) ? 32 : 128))) {
1175 PRINT_WARN("Invalid mask bits for ipato_addx/delx !\n");
1176 return -EINVAL;
1177 }
1131 return 0; 1178 return 0;
1132} 1179}
1133 1180
@@ -1698,11 +1745,16 @@ qeth_create_device_attributes(struct device *dev)
1698 sysfs_remove_group(&dev->kobj, &qeth_device_attr_group); 1745 sysfs_remove_group(&dev->kobj, &qeth_device_attr_group);
1699 sysfs_remove_group(&dev->kobj, &qeth_device_ipato_group); 1746 sysfs_remove_group(&dev->kobj, &qeth_device_ipato_group);
1700 sysfs_remove_group(&dev->kobj, &qeth_device_vipa_group); 1747 sysfs_remove_group(&dev->kobj, &qeth_device_vipa_group);
1748 return ret;
1701 } 1749 }
1702 if ((ret = sysfs_create_group(&dev->kobj, &qeth_device_blkt_group))) 1750 if ((ret = sysfs_create_group(&dev->kobj, &qeth_device_blkt_group))){
1751 sysfs_remove_group(&dev->kobj, &qeth_device_attr_group);
1752 sysfs_remove_group(&dev->kobj, &qeth_device_ipato_group);
1753 sysfs_remove_group(&dev->kobj, &qeth_device_vipa_group);
1754 sysfs_remove_group(&dev->kobj, &qeth_device_rxip_group);
1703 return ret; 1755 return ret;
1704 1756 }
1705 return ret; 1757 return 0;
1706} 1758}
1707 1759
1708void 1760void
diff --git a/drivers/s390/net/qeth_tso.h b/drivers/s390/net/qeth_tso.h
index 593f298142c1..14504afb044e 100644
--- a/drivers/s390/net/qeth_tso.h
+++ b/drivers/s390/net/qeth_tso.h
@@ -24,7 +24,7 @@ static inline struct qeth_hdr_tso *
24qeth_tso_prepare_skb(struct qeth_card *card, struct sk_buff **skb) 24qeth_tso_prepare_skb(struct qeth_card *card, struct sk_buff **skb)
25{ 25{
26 QETH_DBF_TEXT(trace, 5, "tsoprsk"); 26 QETH_DBF_TEXT(trace, 5, "tsoprsk");
27 return qeth_push_skb(card, skb, sizeof(struct qeth_hdr_tso)); 27 return qeth_push_skb(card, *skb, sizeof(struct qeth_hdr_tso));
28} 28}
29 29
30/** 30/**
diff --git a/drivers/sbus/char/openprom.c b/drivers/sbus/char/openprom.c
index 293bb2fdb1d5..2f698763ba5d 100644
--- a/drivers/sbus/char/openprom.c
+++ b/drivers/sbus/char/openprom.c
@@ -145,8 +145,9 @@ static int opromgetprop(void __user *argp, struct device_node *dp, struct openpr
145 void *pval; 145 void *pval;
146 int len; 146 int len;
147 147
148 pval = of_get_property(dp, op->oprom_array, &len); 148 if (!dp ||
149 if (!pval || len <= 0 || len > bufsize) 149 !(pval = of_get_property(dp, op->oprom_array, &len)) ||
150 len <= 0 || len > bufsize)
150 return copyout(argp, op, sizeof(int)); 151 return copyout(argp, op, sizeof(int));
151 152
152 memcpy(op->oprom_array, pval, len); 153 memcpy(op->oprom_array, pval, len);
@@ -161,6 +162,8 @@ static int opromnxtprop(void __user *argp, struct device_node *dp, struct openpr
161 struct property *prop; 162 struct property *prop;
162 int len; 163 int len;
163 164
165 if (!dp)
166 return copyout(argp, op, sizeof(int));
164 if (op->oprom_array[0] == '\0') { 167 if (op->oprom_array[0] == '\0') {
165 prop = dp->properties; 168 prop = dp->properties;
166 if (!prop) 169 if (!prop)
@@ -266,9 +269,13 @@ static int oprompci2node(void __user *argp, struct device_node *dp, struct openp
266 269
267static int oprompath2node(void __user *argp, struct device_node *dp, struct openpromio *op, int bufsize, DATA *data) 270static int oprompath2node(void __user *argp, struct device_node *dp, struct openpromio *op, int bufsize, DATA *data)
268{ 271{
272 phandle ph = 0;
273
269 dp = of_find_node_by_path(op->oprom_array); 274 dp = of_find_node_by_path(op->oprom_array);
275 if (dp)
276 ph = dp->node;
270 data->current_node = dp; 277 data->current_node = dp;
271 *((int *)op->oprom_array) = dp->node; 278 *((int *)op->oprom_array) = ph;
272 op->oprom_size = sizeof(int); 279 op->oprom_size = sizeof(int);
273 280
274 return copyout(argp, op, bufsize + sizeof(int)); 281 return copyout(argp, op, bufsize + sizeof(int));
diff --git a/drivers/serial/s3c2410.c b/drivers/serial/s3c2410.c
index 392bffcf96e8..95738a19cde7 100644
--- a/drivers/serial/s3c2410.c
+++ b/drivers/serial/s3c2410.c
@@ -1621,7 +1621,7 @@ static struct s3c24xx_uart_info s3c2412_uart_inf = {
1621static int s3c2412_serial_probe(struct platform_device *dev) 1621static int s3c2412_serial_probe(struct platform_device *dev)
1622{ 1622{
1623 dbg("s3c2440_serial_probe: dev=%p\n", dev); 1623 dbg("s3c2440_serial_probe: dev=%p\n", dev);
1624 return s3c24xx_serial_probe(dev, &s3c2440_uart_inf); 1624 return s3c24xx_serial_probe(dev, &s3c2412_uart_inf);
1625} 1625}
1626 1626
1627static struct platform_driver s3c2412_serial_drv = { 1627static struct platform_driver s3c2412_serial_drv = {
diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c
index d4870432ecfc..b1981d0e95ad 100644
--- a/fs/ext2/balloc.c
+++ b/fs/ext2/balloc.c
@@ -539,7 +539,6 @@ unsigned long ext2_count_free (struct buffer_head * map, unsigned int numchars)
539 539
540#endif /* EXT2FS_DEBUG */ 540#endif /* EXT2FS_DEBUG */
541 541
542/* Superblock must be locked */
543unsigned long ext2_count_free_blocks (struct super_block * sb) 542unsigned long ext2_count_free_blocks (struct super_block * sb)
544{ 543{
545 struct ext2_group_desc * desc; 544 struct ext2_group_desc * desc;
diff --git a/fs/ext2/ialloc.c b/fs/ext2/ialloc.c
index de85c61c58c5..695f69ccf908 100644
--- a/fs/ext2/ialloc.c
+++ b/fs/ext2/ialloc.c
@@ -637,7 +637,6 @@ fail:
637 return ERR_PTR(err); 637 return ERR_PTR(err);
638} 638}
639 639
640/* Superblock must be locked */
641unsigned long ext2_count_free_inodes (struct super_block * sb) 640unsigned long ext2_count_free_inodes (struct super_block * sb)
642{ 641{
643 struct ext2_group_desc *desc; 642 struct ext2_group_desc *desc;
diff --git a/fs/ext2/super.c b/fs/ext2/super.c
index 681dea8f9532..4286ff6330b6 100644
--- a/fs/ext2/super.c
+++ b/fs/ext2/super.c
@@ -251,6 +251,44 @@ static struct super_operations ext2_sops = {
251#endif 251#endif
252}; 252};
253 253
254static struct dentry *ext2_get_dentry(struct super_block *sb, void *vobjp)
255{
256 __u32 *objp = vobjp;
257 unsigned long ino = objp[0];
258 __u32 generation = objp[1];
259 struct inode *inode;
260 struct dentry *result;
261
262 if (ino < EXT2_FIRST_INO(sb) && ino != EXT2_ROOT_INO)
263 return ERR_PTR(-ESTALE);
264 if (ino > le32_to_cpu(EXT2_SB(sb)->s_es->s_inodes_count))
265 return ERR_PTR(-ESTALE);
266
267 /* iget isn't really right if the inode is currently unallocated!!
268 * ext2_read_inode currently does appropriate checks, but
269 * it might be "neater" to call ext2_get_inode first and check
270 * if the inode is valid.....
271 */
272 inode = iget(sb, ino);
273 if (inode == NULL)
274 return ERR_PTR(-ENOMEM);
275 if (is_bad_inode(inode) ||
276 (generation && inode->i_generation != generation)) {
277 /* we didn't find the right inode.. */
278 iput(inode);
279 return ERR_PTR(-ESTALE);
280 }
281 /* now to find a dentry.
282 * If possible, get a well-connected one
283 */
284 result = d_alloc_anon(inode);
285 if (!result) {
286 iput(inode);
287 return ERR_PTR(-ENOMEM);
288 }
289 return result;
290}
291
254/* Yes, most of these are left as NULL!! 292/* Yes, most of these are left as NULL!!
255 * A NULL value implies the default, which works with ext2-like file 293 * A NULL value implies the default, which works with ext2-like file
256 * systems, but can be improved upon. 294 * systems, but can be improved upon.
@@ -258,6 +296,7 @@ static struct super_operations ext2_sops = {
258 */ 296 */
259static struct export_operations ext2_export_ops = { 297static struct export_operations ext2_export_ops = {
260 .get_parent = ext2_get_parent, 298 .get_parent = ext2_get_parent,
299 .get_dentry = ext2_get_dentry,
261}; 300};
262 301
263static unsigned long get_sb_block(void **data) 302static unsigned long get_sb_block(void **data)
@@ -1044,7 +1083,6 @@ static int ext2_statfs (struct dentry * dentry, struct kstatfs * buf)
1044 unsigned long overhead; 1083 unsigned long overhead;
1045 int i; 1084 int i;
1046 1085
1047 lock_super(sb);
1048 if (test_opt (sb, MINIX_DF)) 1086 if (test_opt (sb, MINIX_DF))
1049 overhead = 0; 1087 overhead = 0;
1050 else { 1088 else {
@@ -1085,7 +1123,6 @@ static int ext2_statfs (struct dentry * dentry, struct kstatfs * buf)
1085 buf->f_files = le32_to_cpu(sbi->s_es->s_inodes_count); 1123 buf->f_files = le32_to_cpu(sbi->s_es->s_inodes_count);
1086 buf->f_ffree = ext2_count_free_inodes (sb); 1124 buf->f_ffree = ext2_count_free_inodes (sb);
1087 buf->f_namelen = EXT2_NAME_LEN; 1125 buf->f_namelen = EXT2_NAME_LEN;
1088 unlock_super(sb);
1089 return 0; 1126 return 0;
1090} 1127}
1091 1128
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c
index 0f0b1eadb98d..84be02e93652 100644
--- a/fs/ext3/inode.c
+++ b/fs/ext3/inode.c
@@ -925,7 +925,7 @@ int ext3_get_blocks_handle(handle_t *handle, struct inode *inode,
925 set_buffer_new(bh_result); 925 set_buffer_new(bh_result);
926got_it: 926got_it:
927 map_bh(bh_result, inode->i_sb, le32_to_cpu(chain[depth-1].key)); 927 map_bh(bh_result, inode->i_sb, le32_to_cpu(chain[depth-1].key));
928 if (blocks_to_boundary == 0) 928 if (count > blocks_to_boundary)
929 set_buffer_boundary(bh_result); 929 set_buffer_boundary(bh_result);
930 err = count; 930 err = count;
931 /* Clean up and exit */ 931 /* Clean up and exit */
diff --git a/fs/ext3/super.c b/fs/ext3/super.c
index 813d589cc6c0..3559086eee5f 100644
--- a/fs/ext3/super.c
+++ b/fs/ext3/super.c
@@ -554,6 +554,47 @@ static int ext3_show_options(struct seq_file *seq, struct vfsmount *vfs)
554 return 0; 554 return 0;
555} 555}
556 556
557
558static struct dentry *ext3_get_dentry(struct super_block *sb, void *vobjp)
559{
560 __u32 *objp = vobjp;
561 unsigned long ino = objp[0];
562 __u32 generation = objp[1];
563 struct inode *inode;
564 struct dentry *result;
565
566 if (ino < EXT3_FIRST_INO(sb) && ino != EXT3_ROOT_INO)
567 return ERR_PTR(-ESTALE);
568 if (ino > le32_to_cpu(EXT3_SB(sb)->s_es->s_inodes_count))
569 return ERR_PTR(-ESTALE);
570
571 /* iget isn't really right if the inode is currently unallocated!!
572 *
573 * ext3_read_inode will return a bad_inode if the inode had been
574 * deleted, so we should be safe.
575 *
576 * Currently we don't know the generation for parent directory, so
577 * a generation of 0 means "accept any"
578 */
579 inode = iget(sb, ino);
580 if (inode == NULL)
581 return ERR_PTR(-ENOMEM);
582 if (is_bad_inode(inode) ||
583 (generation && inode->i_generation != generation)) {
584 iput(inode);
585 return ERR_PTR(-ESTALE);
586 }
587 /* now to find a dentry.
588 * If possible, get a well-connected one
589 */
590 result = d_alloc_anon(inode);
591 if (!result) {
592 iput(inode);
593 return ERR_PTR(-ENOMEM);
594 }
595 return result;
596}
597
557#ifdef CONFIG_QUOTA 598#ifdef CONFIG_QUOTA
558#define QTYPE2NAME(t) ((t)==USRQUOTA?"user":"group") 599#define QTYPE2NAME(t) ((t)==USRQUOTA?"user":"group")
559#define QTYPE2MOPT(on, t) ((t)==USRQUOTA?((on)##USRJQUOTA):((on)##GRPJQUOTA)) 600#define QTYPE2MOPT(on, t) ((t)==USRQUOTA?((on)##USRJQUOTA):((on)##GRPJQUOTA))
@@ -622,6 +663,7 @@ static struct super_operations ext3_sops = {
622 663
623static struct export_operations ext3_export_ops = { 664static struct export_operations ext3_export_ops = {
624 .get_parent = ext3_get_parent, 665 .get_parent = ext3_get_parent,
666 .get_dentry = ext3_get_dentry,
625}; 667};
626 668
627enum { 669enum {
diff --git a/fs/jffs2/nodelist.c b/fs/jffs2/nodelist.c
index 7675b33396c7..5a6b4d64206c 100644
--- a/fs/jffs2/nodelist.c
+++ b/fs/jffs2/nodelist.c
@@ -21,6 +21,9 @@
21#include <linux/pagemap.h> 21#include <linux/pagemap.h>
22#include "nodelist.h" 22#include "nodelist.h"
23 23
24static void jffs2_obsolete_node_frag(struct jffs2_sb_info *c,
25 struct jffs2_node_frag *this);
26
24void jffs2_add_fd_to_list(struct jffs2_sb_info *c, struct jffs2_full_dirent *new, struct jffs2_full_dirent **list) 27void jffs2_add_fd_to_list(struct jffs2_sb_info *c, struct jffs2_full_dirent *new, struct jffs2_full_dirent **list)
25{ 28{
26 struct jffs2_full_dirent **prev = list; 29 struct jffs2_full_dirent **prev = list;
@@ -87,7 +90,8 @@ void jffs2_truncate_fragtree(struct jffs2_sb_info *c, struct rb_root *list, uint
87 } 90 }
88} 91}
89 92
90void jffs2_obsolete_node_frag(struct jffs2_sb_info *c, struct jffs2_node_frag *this) 93static void jffs2_obsolete_node_frag(struct jffs2_sb_info *c,
94 struct jffs2_node_frag *this)
91{ 95{
92 if (this->node) { 96 if (this->node) {
93 this->node->frags--; 97 this->node->frags--;
diff --git a/fs/jffs2/nodelist.h b/fs/jffs2/nodelist.h
index cae92c14116d..0ddfd70307fb 100644
--- a/fs/jffs2/nodelist.h
+++ b/fs/jffs2/nodelist.h
@@ -334,7 +334,6 @@ void jffs2_kill_fragtree(struct rb_root *root, struct jffs2_sb_info *c_delete);
334struct rb_node *rb_next(struct rb_node *); 334struct rb_node *rb_next(struct rb_node *);
335struct rb_node *rb_prev(struct rb_node *); 335struct rb_node *rb_prev(struct rb_node *);
336void rb_replace_node(struct rb_node *victim, struct rb_node *new, struct rb_root *root); 336void rb_replace_node(struct rb_node *victim, struct rb_node *new, struct rb_root *root);
337void jffs2_obsolete_node_frag(struct jffs2_sb_info *c, struct jffs2_node_frag *this);
338int jffs2_add_full_dnode_to_inode(struct jffs2_sb_info *c, struct jffs2_inode_info *f, struct jffs2_full_dnode *fn); 337int jffs2_add_full_dnode_to_inode(struct jffs2_sb_info *c, struct jffs2_inode_info *f, struct jffs2_full_dnode *fn);
339void jffs2_truncate_fragtree (struct jffs2_sb_info *c, struct rb_root *list, uint32_t size); 338void jffs2_truncate_fragtree (struct jffs2_sb_info *c, struct rb_root *list, uint32_t size);
340int jffs2_add_older_frag_to_fragtree(struct jffs2_sb_info *c, struct jffs2_inode_info *f, struct jffs2_tmp_dnode_info *tn); 339int jffs2_add_older_frag_to_fragtree(struct jffs2_sb_info *c, struct jffs2_inode_info *f, struct jffs2_tmp_dnode_info *tn);
diff --git a/fs/jffs2/summary.c b/fs/jffs2/summary.c
index c19bd476e8ec..e52cef526d90 100644
--- a/fs/jffs2/summary.c
+++ b/fs/jffs2/summary.c
@@ -252,6 +252,11 @@ int jffs2_sum_add_kvec(struct jffs2_sb_info *c, const struct kvec *invecs,
252 union jffs2_node_union *node; 252 union jffs2_node_union *node;
253 struct jffs2_eraseblock *jeb; 253 struct jffs2_eraseblock *jeb;
254 254
255 if (c->summary->sum_size == JFFS2_SUMMARY_NOSUM_SIZE) {
256 dbg_summary("Summary is disabled for this jeb! Skipping summary info!\n");
257 return 0;
258 }
259
255 node = invecs[0].iov_base; 260 node = invecs[0].iov_base;
256 jeb = &c->blocks[ofs / c->sector_size]; 261 jeb = &c->blocks[ofs / c->sector_size];
257 ofs -= jeb->offset; 262 ofs -= jeb->offset;
diff --git a/fs/jffs2/xattr.c b/fs/jffs2/xattr.c
index 25bc1ae08648..4da09ce1d1f5 100644
--- a/fs/jffs2/xattr.c
+++ b/fs/jffs2/xattr.c
@@ -1215,7 +1215,6 @@ int jffs2_garbage_collect_xattr_datum(struct jffs2_sb_info *c, struct jffs2_xatt
1215 rc = jffs2_reserve_space_gc(c, totlen, &length, JFFS2_SUMMARY_XATTR_SIZE); 1215 rc = jffs2_reserve_space_gc(c, totlen, &length, JFFS2_SUMMARY_XATTR_SIZE);
1216 if (rc) { 1216 if (rc) {
1217 JFFS2_WARNING("jffs2_reserve_space_gc()=%d, request=%u\n", rc, totlen); 1217 JFFS2_WARNING("jffs2_reserve_space_gc()=%d, request=%u\n", rc, totlen);
1218 rc = rc ? rc : -EBADFD;
1219 goto out; 1218 goto out;
1220 } 1219 }
1221 rc = save_xattr_datum(c, xd); 1220 rc = save_xattr_datum(c, xd);
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 153898e1331f..b14145b7b87f 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -970,7 +970,7 @@ static int _nfs4_do_open(struct inode *dir, struct dentry *dentry, int flags, st
970 status = -ENOMEM; 970 status = -ENOMEM;
971 opendata = nfs4_opendata_alloc(dentry, sp, flags, sattr); 971 opendata = nfs4_opendata_alloc(dentry, sp, flags, sattr);
972 if (opendata == NULL) 972 if (opendata == NULL)
973 goto err_put_state_owner; 973 goto err_release_rwsem;
974 974
975 status = _nfs4_proc_open(opendata); 975 status = _nfs4_proc_open(opendata);
976 if (status != 0) 976 if (status != 0)
@@ -989,11 +989,11 @@ static int _nfs4_do_open(struct inode *dir, struct dentry *dentry, int flags, st
989 return 0; 989 return 0;
990err_opendata_free: 990err_opendata_free:
991 nfs4_opendata_free(opendata); 991 nfs4_opendata_free(opendata);
992err_release_rwsem:
993 up_read(&clp->cl_sem);
992err_put_state_owner: 994err_put_state_owner:
993 nfs4_put_state_owner(sp); 995 nfs4_put_state_owner(sp);
994out_err: 996out_err:
995 /* Note: clp->cl_sem must be released before nfs4_put_open_state()! */
996 up_read(&clp->cl_sem);
997 *res = NULL; 997 *res = NULL;
998 return status; 998 return status;
999} 999}
diff --git a/fs/nfs/read.c b/fs/nfs/read.c
index 7a9ee00e0c61..f0aff824a291 100644
--- a/fs/nfs/read.c
+++ b/fs/nfs/read.c
@@ -204,9 +204,11 @@ static int nfs_readpage_sync(struct nfs_open_context *ctx, struct inode *inode,
204 NFS_I(inode)->cache_validity |= NFS_INO_INVALID_ATIME; 204 NFS_I(inode)->cache_validity |= NFS_INO_INVALID_ATIME;
205 spin_unlock(&inode->i_lock); 205 spin_unlock(&inode->i_lock);
206 206
207 nfs_readpage_truncate_uninitialised_page(rdata); 207 if (rdata->res.eof || rdata->res.count == rdata->args.count) {
208 if (rdata->res.eof || rdata->res.count == rdata->args.count)
209 SetPageUptodate(page); 208 SetPageUptodate(page);
209 if (rdata->res.eof && count != 0)
210 memclear_highpage_flush(page, rdata->args.pgbase, count);
211 }
210 result = 0; 212 result = 0;
211 213
212io_error: 214io_error:
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 8ab3cf10d792..7084ac9a6455 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -590,8 +590,8 @@ static void nfs_cancel_commit_list(struct list_head *head)
590 req = nfs_list_entry(head->next); 590 req = nfs_list_entry(head->next);
591 nfs_list_remove_request(req); 591 nfs_list_remove_request(req);
592 nfs_inode_remove_request(req); 592 nfs_inode_remove_request(req);
593 nfs_clear_page_writeback(req);
594 dec_zone_page_state(req->wb_page, NR_UNSTABLE_NFS); 593 dec_zone_page_state(req->wb_page, NR_UNSTABLE_NFS);
594 nfs_clear_page_writeback(req);
595 } 595 }
596} 596}
597 597
@@ -1386,8 +1386,8 @@ nfs_commit_list(struct inode *inode, struct list_head *head, int how)
1386 req = nfs_list_entry(head->next); 1386 req = nfs_list_entry(head->next);
1387 nfs_list_remove_request(req); 1387 nfs_list_remove_request(req);
1388 nfs_mark_request_commit(req); 1388 nfs_mark_request_commit(req);
1389 nfs_clear_page_writeback(req);
1390 dec_zone_page_state(req->wb_page, NR_UNSTABLE_NFS); 1389 dec_zone_page_state(req->wb_page, NR_UNSTABLE_NFS);
1390 nfs_clear_page_writeback(req);
1391 } 1391 }
1392 return -ENOMEM; 1392 return -ENOMEM;
1393} 1393}
diff --git a/include/asm-alpha/Kbuild b/include/asm-alpha/Kbuild
index e57fd57538b8..2b06b3bad5ff 100644
--- a/include/asm-alpha/Kbuild
+++ b/include/asm-alpha/Kbuild
@@ -1,5 +1,5 @@
1include include/asm-generic/Kbuild.asm 1include include/asm-generic/Kbuild.asm
2 2
3unifdef-y += console.h fpu.h sysinfo.h 3unifdef-y += console.h fpu.h sysinfo.h compiler.h
4 4
5header-y += gentrap.h regdef.h pal.h reg.h 5header-y += gentrap.h regdef.h pal.h reg.h
diff --git a/include/asm-alpha/compiler.h b/include/asm-alpha/compiler.h
index 00c6f57ad9a7..d2768cc3d7a4 100644
--- a/include/asm-alpha/compiler.h
+++ b/include/asm-alpha/compiler.h
@@ -90,6 +90,7 @@
90 __asm__("stw %1,%0" : "=m"(mem) : "r"(val)) 90 __asm__("stw %1,%0" : "=m"(mem) : "r"(val))
91#endif 91#endif
92 92
93#ifdef __KERNEL__
93/* Some idiots over in <linux/compiler.h> thought inline should imply 94/* Some idiots over in <linux/compiler.h> thought inline should imply
94 always_inline. This breaks stuff. We'll include this file whenever 95 always_inline. This breaks stuff. We'll include this file whenever
95 we run into such problems. */ 96 we run into such problems. */
@@ -101,4 +102,6 @@
101#undef __always_inline 102#undef __always_inline
102#define __always_inline inline __attribute__((always_inline)) 103#define __always_inline inline __attribute__((always_inline))
103 104
105#endif /* __KERNEL__ */
106
104#endif /* __ALPHA_COMPILER_H */ 107#endif /* __ALPHA_COMPILER_H */
diff --git a/include/asm-alpha/page.h b/include/asm-alpha/page.h
index 8c7cd50d4eae..d2bed3cb33ff 100644
--- a/include/asm-alpha/page.h
+++ b/include/asm-alpha/page.h
@@ -1,6 +1,8 @@
1#ifndef _ALPHA_PAGE_H 1#ifndef _ALPHA_PAGE_H
2#define _ALPHA_PAGE_H 2#define _ALPHA_PAGE_H
3 3
4#ifdef __KERNEL__
5
4#include <asm/pal.h> 6#include <asm/pal.h>
5 7
6/* PAGE_SHIFT determines the page size */ 8/* PAGE_SHIFT determines the page size */
@@ -8,8 +10,6 @@
8#define PAGE_SIZE (1UL << PAGE_SHIFT) 10#define PAGE_SIZE (1UL << PAGE_SHIFT)
9#define PAGE_MASK (~(PAGE_SIZE-1)) 11#define PAGE_MASK (~(PAGE_SIZE-1))
10 12
11#ifdef __KERNEL__
12
13#ifndef __ASSEMBLY__ 13#ifndef __ASSEMBLY__
14 14
15#define STRICT_MM_TYPECHECKS 15#define STRICT_MM_TYPECHECKS
@@ -92,9 +92,9 @@ typedef unsigned long pgprot_t;
92 92
93#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ 93#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
94 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) 94 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
95#endif /* __KERNEL__ */
96 95
97#include <asm-generic/memory_model.h> 96#include <asm-generic/memory_model.h>
98#include <asm-generic/page.h> 97#include <asm-generic/page.h>
99 98
99#endif /* __KERNEL__ */
100#endif /* _ALPHA_PAGE_H */ 100#endif /* _ALPHA_PAGE_H */
diff --git a/include/asm-arm/arch-s3c2410/regs-power.h b/include/asm-arm/arch-s3c2410/regs-power.h
new file mode 100644
index 000000000000..6c319ea2afac
--- /dev/null
+++ b/include/asm-arm/arch-s3c2410/regs-power.h
@@ -0,0 +1,34 @@
1/* linux/include/asm/arch-s3c2410/regs-power.h
2 *
3 * Copyright (c) 2003,2004,2005,2006 Simtec Electronics <linux@simtec.co.uk>
4 * http://armlinux.simtec.co.uk/
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * S3C24XX power control register definitions
11*/
12
13#ifndef __ASM_ARM_REGS_PWR
14#define __ASM_ARM_REGS_PWR __FILE__
15
16#define S3C24XX_PWRREG(x) ((x) + S3C24XX_VA_CLKPWR)
17
18#define S3C2412_PWRMODECON S3C24XX_PWRREG(0x20)
19#define S3C2412_PWRCFG S3C24XX_PWRREG(0x24)
20
21#define S3C2412_PWRCFG_BATF_IGNORE (0<<0)
22#define S3C2412_PWRCFG_BATF_SLEEP (3<<0)
23#define S3C2412_PWRCFG_BATF_MASK (3<<0)
24
25#define S3C2412_PWRCFG_STANDBYWFI_IGNORE (0<<6)
26#define S3C2412_PWRCFG_STANDBYWFI_IDLE (1<<6)
27#define S3C2412_PWRCFG_STANDBYWFI_STOP (2<<6)
28#define S3C2412_PWRCFG_STANDBYWFI_SLEEP (3<<6)
29#define S3C2412_PWRCFG_STANDBYWFI_MASK (3<<6)
30
31#define S3C2412_PWRCFG_RTC_MASKIRQ (1<<8)
32#define S3C2412_PWRCFG_NAND_NORST (1<<9)
33
34#endif /* __ASM_ARM_REGS_PWR */
diff --git a/include/asm-arm/elf.h b/include/asm-arm/elf.h
index 71061ca5c5d0..ae7baa6c73f7 100644
--- a/include/asm-arm/elf.h
+++ b/include/asm-arm/elf.h
@@ -8,7 +8,9 @@
8 8
9#include <asm/ptrace.h> 9#include <asm/ptrace.h>
10#include <asm/user.h> 10#include <asm/user.h>
11#ifdef __KERNEL
11#include <asm/procinfo.h> 12#include <asm/procinfo.h>
13#endif
12 14
13typedef unsigned long elf_greg_t; 15typedef unsigned long elf_greg_t;
14typedef unsigned long elf_freg_t[3]; 16typedef unsigned long elf_freg_t[3];
diff --git a/include/asm-arm/page.h b/include/asm-arm/page.h
index 63d12f0244c5..b721270b9986 100644
--- a/include/asm-arm/page.h
+++ b/include/asm-arm/page.h
@@ -193,8 +193,8 @@ extern pmd_t *top_pmd;
193#define ARCH_SLAB_MINALIGN 8 193#define ARCH_SLAB_MINALIGN 8
194#endif 194#endif
195 195
196#endif /* __KERNEL__ */
197
198#include <asm-generic/page.h> 196#include <asm-generic/page.h>
199 197
198#endif /* __KERNEL__ */
199
200#endif 200#endif
diff --git a/include/asm-i386/system.h b/include/asm-i386/system.h
index 49928eb33f8b..098bcee94e38 100644
--- a/include/asm-i386/system.h
+++ b/include/asm-i386/system.h
@@ -11,9 +11,14 @@
11struct task_struct; /* one of the stranger aspects of C forward declarations.. */ 11struct task_struct; /* one of the stranger aspects of C forward declarations.. */
12extern struct task_struct * FASTCALL(__switch_to(struct task_struct *prev, struct task_struct *next)); 12extern struct task_struct * FASTCALL(__switch_to(struct task_struct *prev, struct task_struct *next));
13 13
14/*
15 * Saving eflags is important. It switches not only IOPL between tasks,
16 * it also protects other tasks from NT leaking through sysenter etc.
17 */
14#define switch_to(prev,next,last) do { \ 18#define switch_to(prev,next,last) do { \
15 unsigned long esi,edi; \ 19 unsigned long esi,edi; \
16 asm volatile("pushl %%ebp\n\t" \ 20 asm volatile("pushfl\n\t" /* Save flags */ \
21 "pushl %%ebp\n\t" \
17 "movl %%esp,%0\n\t" /* save ESP */ \ 22 "movl %%esp,%0\n\t" /* save ESP */ \
18 "movl %5,%%esp\n\t" /* restore ESP */ \ 23 "movl %5,%%esp\n\t" /* restore ESP */ \
19 "movl $1f,%1\n\t" /* save EIP */ \ 24 "movl $1f,%1\n\t" /* save EIP */ \
@@ -21,6 +26,7 @@ extern struct task_struct * FASTCALL(__switch_to(struct task_struct *prev, struc
21 "jmp __switch_to\n" \ 26 "jmp __switch_to\n" \
22 "1:\t" \ 27 "1:\t" \
23 "popl %%ebp\n\t" \ 28 "popl %%ebp\n\t" \
29 "popfl" \
24 :"=m" (prev->thread.esp),"=m" (prev->thread.eip), \ 30 :"=m" (prev->thread.esp),"=m" (prev->thread.eip), \
25 "=a" (last),"=S" (esi),"=D" (edi) \ 31 "=a" (last),"=S" (esi),"=D" (edi) \
26 :"m" (next->thread.esp),"m" (next->thread.eip), \ 32 :"m" (next->thread.esp),"m" (next->thread.eip), \
diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h
index d983b74e4d9f..fc1c8ddae149 100644
--- a/include/asm-i386/unistd.h
+++ b/include/asm-i386/unistd.h
@@ -324,6 +324,8 @@
324#define __NR_vmsplice 316 324#define __NR_vmsplice 316
325#define __NR_move_pages 317 325#define __NR_move_pages 317
326 326
327#ifdef __KERNEL__
328
327#define NR_syscalls 318 329#define NR_syscalls 318
328 330
329/* 331/*
@@ -423,8 +425,6 @@ __asm__ volatile ("push %%ebp ; push %%ebx ; movl 4(%2),%%ebp ; " \
423__syscall_return(type,__res); \ 425__syscall_return(type,__res); \
424} 426}
425 427
426#ifdef __KERNEL__
427
428#define __ARCH_WANT_IPC_PARSE_VERSION 428#define __ARCH_WANT_IPC_PARSE_VERSION
429#define __ARCH_WANT_OLD_READDIR 429#define __ARCH_WANT_OLD_READDIR
430#define __ARCH_WANT_OLD_STAT 430#define __ARCH_WANT_OLD_STAT
diff --git a/include/asm-ia64/Kbuild b/include/asm-ia64/Kbuild
index 85d6f8005eb4..f1cb00f39c22 100644
--- a/include/asm-ia64/Kbuild
+++ b/include/asm-ia64/Kbuild
@@ -4,4 +4,4 @@ header-y += break.h fpu.h fpswa.h gcc_intrin.h ia64regs.h \
4 intel_intrin.h intrinsics.h perfmon_default_smpl.h \ 4 intel_intrin.h intrinsics.h perfmon_default_smpl.h \
5 ptrace_offsets.h rse.h setup.h ucontext.h 5 ptrace_offsets.h rse.h setup.h ucontext.h
6 6
7unifdef-y += perfmon.h 7unifdef-y += perfmon.h ustack.h
diff --git a/include/asm-ia64/page.h b/include/asm-ia64/page.h
index f5a949ec6e1e..947cb72b520e 100644
--- a/include/asm-ia64/page.h
+++ b/include/asm-ia64/page.h
@@ -7,6 +7,7 @@
7 * David Mosberger-Tang <davidm@hpl.hp.com> 7 * David Mosberger-Tang <davidm@hpl.hp.com>
8 */ 8 */
9 9
10# ifdef __KERNEL__
10 11
11#include <asm/intrinsics.h> 12#include <asm/intrinsics.h>
12#include <asm/types.h> 13#include <asm/types.h>
@@ -64,7 +65,6 @@
64# define __pa(x) ((x) - PAGE_OFFSET) 65# define __pa(x) ((x) - PAGE_OFFSET)
65# define __va(x) ((x) + PAGE_OFFSET) 66# define __va(x) ((x) + PAGE_OFFSET)
66#else /* !__ASSEMBLY */ 67#else /* !__ASSEMBLY */
67# ifdef __KERNEL__
68# define STRICT_MM_TYPECHECKS 68# define STRICT_MM_TYPECHECKS
69 69
70extern void clear_page (void *page); 70extern void clear_page (void *page);
@@ -174,7 +174,6 @@ get_order (unsigned long size)
174 return order; 174 return order;
175} 175}
176 176
177# endif /* __KERNEL__ */
178#endif /* !__ASSEMBLY__ */ 177#endif /* !__ASSEMBLY__ */
179 178
180#ifdef STRICT_MM_TYPECHECKS 179#ifdef STRICT_MM_TYPECHECKS
@@ -228,4 +227,5 @@ get_order (unsigned long size)
228 (((current->personality & READ_IMPLIES_EXEC) != 0) \ 227 (((current->personality & READ_IMPLIES_EXEC) != 0) \
229 ? VM_EXEC : 0)) 228 ? VM_EXEC : 0))
230 229
230# endif /* __KERNEL__ */
231#endif /* _ASM_IA64_PAGE_H */ 231#endif /* _ASM_IA64_PAGE_H */
diff --git a/include/asm-ia64/ptrace.h b/include/asm-ia64/ptrace.h
index 415abb23b210..1414316efd40 100644
--- a/include/asm-ia64/ptrace.h
+++ b/include/asm-ia64/ptrace.h
@@ -56,6 +56,8 @@
56 56
57 57
58#include <asm/fpu.h> 58#include <asm/fpu.h>
59
60#ifdef __KERNEL__
59#ifndef ASM_OFFSETS_C 61#ifndef ASM_OFFSETS_C
60#include <asm/asm-offsets.h> 62#include <asm/asm-offsets.h>
61#endif 63#endif
@@ -79,10 +81,9 @@
79 81
80#define KERNEL_STACK_SIZE IA64_STK_OFFSET 82#define KERNEL_STACK_SIZE IA64_STK_OFFSET
81 83
82#ifndef __ASSEMBLY__ 84#endif /* __KERNEL__ */
83 85
84#include <asm/current.h> 86#ifndef __ASSEMBLY__
85#include <asm/page.h>
86 87
87/* 88/*
88 * This struct defines the way the registers are saved on system 89 * This struct defines the way the registers are saved on system
@@ -229,6 +230,9 @@ struct switch_stack {
229 230
230#ifdef __KERNEL__ 231#ifdef __KERNEL__
231 232
233#include <asm/current.h>
234#include <asm/page.h>
235
232#define __ARCH_SYS_PTRACE 1 236#define __ARCH_SYS_PTRACE 1
233 237
234/* 238/*
diff --git a/include/asm-ia64/ustack.h b/include/asm-ia64/ustack.h
index da55c91246e3..a349467913ea 100644
--- a/include/asm-ia64/ustack.h
+++ b/include/asm-ia64/ustack.h
@@ -5,12 +5,15 @@
5 * Constants for the user stack size 5 * Constants for the user stack size
6 */ 6 */
7 7
8#ifdef __KERNEL__
8#include <asm/page.h> 9#include <asm/page.h>
9 10
10/* The absolute hard limit for stack size is 1/2 of the mappable space in the region */ 11/* The absolute hard limit for stack size is 1/2 of the mappable space in the region */
11#define MAX_USER_STACK_SIZE (RGN_MAP_LIMIT/2) 12#define MAX_USER_STACK_SIZE (RGN_MAP_LIMIT/2)
12/* Make a default stack size of 2GB */
13#define DEFAULT_USER_STACK_SIZE (1UL << 31)
14#define STACK_TOP (0x6000000000000000UL + RGN_MAP_LIMIT) 13#define STACK_TOP (0x6000000000000000UL + RGN_MAP_LIMIT)
14#endif
15
16/* Make a default stack size of 2GiB */
17#define DEFAULT_USER_STACK_SIZE (1UL << 31)
15 18
16#endif /* _ASM_IA64_USTACK_H */ 19#endif /* _ASM_IA64_USTACK_H */
diff --git a/include/asm-m68k/page.h b/include/asm-m68k/page.h
index db017f838c29..fcc165ddd09e 100644
--- a/include/asm-m68k/page.h
+++ b/include/asm-m68k/page.h
@@ -2,6 +2,8 @@
2#define _M68K_PAGE_H 2#define _M68K_PAGE_H
3 3
4 4
5#ifdef __KERNEL__
6
5/* PAGE_SHIFT determines the page size */ 7/* PAGE_SHIFT determines the page size */
6#ifndef CONFIG_SUN3 8#ifndef CONFIG_SUN3
7#define PAGE_SHIFT (12) 9#define PAGE_SHIFT (12)
@@ -15,8 +17,6 @@
15#endif 17#endif
16#define PAGE_MASK (~(PAGE_SIZE-1)) 18#define PAGE_MASK (~(PAGE_SIZE-1))
17 19
18#ifdef __KERNEL__
19
20#include <asm/setup.h> 20#include <asm/setup.h>
21 21
22#if PAGE_SHIFT < 13 22#if PAGE_SHIFT < 13
@@ -175,8 +175,8 @@ static inline void *__va(unsigned long x)
175#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ 175#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
176 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) 176 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
177 177
178#endif /* __KERNEL__ */
179
180#include <asm-generic/page.h> 178#include <asm-generic/page.h>
181 179
180#endif /* __KERNEL__ */
181
182#endif /* _M68K_PAGE_H */ 182#endif /* _M68K_PAGE_H */
diff --git a/include/asm-parisc/page.h b/include/asm-parisc/page.h
index 0695bc958d56..57d6d82756dd 100644
--- a/include/asm-parisc/page.h
+++ b/include/asm-parisc/page.h
@@ -1,22 +1,14 @@
1#ifndef _PARISC_PAGE_H 1#ifndef _PARISC_PAGE_H
2#define _PARISC_PAGE_H 2#define _PARISC_PAGE_H
3 3
4#if !defined(__KERNEL__)
5/* this is for userspace applications (4k page size) */
6# define PAGE_SHIFT 12 /* 4k */
7# define PAGE_SIZE (1UL << PAGE_SHIFT)
8# define PAGE_MASK (~(PAGE_SIZE-1))
9#endif
10
11
12#ifdef __KERNEL__ 4#ifdef __KERNEL__
13 5
14#if defined(CONFIG_PARISC_PAGE_SIZE_4KB) 6#if defined(CONFIG_PARISC_PAGE_SIZE_4KB)
15# define PAGE_SHIFT 12 /* 4k */ 7# define PAGE_SHIFT 12
16#elif defined(CONFIG_PARISC_PAGE_SIZE_16KB) 8#elif defined(CONFIG_PARISC_PAGE_SIZE_16KB)
17# define PAGE_SHIFT 14 /* 16k */ 9# define PAGE_SHIFT 14
18#elif defined(CONFIG_PARISC_PAGE_SIZE_64KB) 10#elif defined(CONFIG_PARISC_PAGE_SIZE_64KB)
19# define PAGE_SHIFT 16 /* 64k */ 11# define PAGE_SHIFT 16
20#else 12#else
21# error "unknown default kernel page size" 13# error "unknown default kernel page size"
22#endif 14#endif
@@ -188,9 +180,9 @@ extern int npmem_ranges;
188#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ 180#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
189 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) 181 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
190 182
191#endif /* __KERNEL__ */
192
193#include <asm-generic/memory_model.h> 183#include <asm-generic/memory_model.h>
194#include <asm-generic/page.h> 184#include <asm-generic/page.h>
195 185
186#endif /* __KERNEL__ */
187
196#endif /* _PARISC_PAGE_H */ 188#endif /* _PARISC_PAGE_H */
diff --git a/include/asm-s390/debug.h b/include/asm-s390/debug.h
index 7f1ef99fd1e1..c00dd2b3dc50 100644
--- a/include/asm-s390/debug.h
+++ b/include/asm-s390/debug.h
@@ -10,7 +10,6 @@
10#define DEBUG_H 10#define DEBUG_H
11 11
12#include <linux/fs.h> 12#include <linux/fs.h>
13#include <linux/string.h>
14 13
15/* Note: 14/* Note:
16 * struct __debug_entry must be defined outside of #ifdef __KERNEL__ 15 * struct __debug_entry must be defined outside of #ifdef __KERNEL__
@@ -35,6 +34,7 @@ struct __debug_entry{
35#define __DEBUG_FEATURE_VERSION 2 /* version of debug feature */ 34#define __DEBUG_FEATURE_VERSION 2 /* version of debug feature */
36 35
37#ifdef __KERNEL__ 36#ifdef __KERNEL__
37#include <linux/string.h>
38#include <linux/spinlock.h> 38#include <linux/spinlock.h>
39#include <linux/kernel.h> 39#include <linux/kernel.h>
40#include <linux/time.h> 40#include <linux/time.h>
diff --git a/include/asm-s390/elf.h b/include/asm-s390/elf.h
index 710646e64f7d..c0d629d61d3e 100644
--- a/include/asm-s390/elf.h
+++ b/include/asm-s390/elf.h
@@ -93,19 +93,6 @@
93#define R_390_NUM 61 93#define R_390_NUM 61
94 94
95/* 95/*
96 * ELF register definitions..
97 */
98
99#include <linux/sched.h> /* for task_struct */
100#include <asm/ptrace.h>
101#include <asm/user.h>
102#include <asm/system.h> /* for save_access_regs */
103
104
105typedef s390_fp_regs elf_fpregset_t;
106typedef s390_regs elf_gregset_t;
107
108/*
109 * These are used to set parameters in the core dumps. 96 * These are used to set parameters in the core dumps.
110 */ 97 */
111#ifndef __s390x__ 98#ifndef __s390x__
@@ -117,6 +104,20 @@ typedef s390_regs elf_gregset_t;
117#define ELF_ARCH EM_S390 104#define ELF_ARCH EM_S390
118 105
119/* 106/*
107 * ELF register definitions..
108 */
109
110#include <asm/ptrace.h>
111#include <asm/user.h>
112
113typedef s390_fp_regs elf_fpregset_t;
114typedef s390_regs elf_gregset_t;
115
116#ifdef __KERNEL__
117#include <linux/sched.h> /* for task_struct */
118#include <asm/system.h> /* for save_access_regs */
119
120/*
120 * This is used to ensure we don't load something for the wrong architecture. 121 * This is used to ensure we don't load something for the wrong architecture.
121 */ 122 */
122#define elf_check_arch(x) \ 123#define elf_check_arch(x) \
@@ -198,7 +199,6 @@ static inline int dump_task_fpu(struct task_struct *tsk, elf_fpregset_t *fpregs)
198 199
199#define ELF_PLATFORM (NULL) 200#define ELF_PLATFORM (NULL)
200 201
201#ifdef __KERNEL__
202#ifndef __s390x__ 202#ifndef __s390x__
203#define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX) 203#define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX)
204#else /* __s390x__ */ 204#else /* __s390x__ */
diff --git a/include/asm-x86_64/elf.h b/include/asm-x86_64/elf.h
index b4f8f4a41a6e..a406fcb1e924 100644
--- a/include/asm-x86_64/elf.h
+++ b/include/asm-x86_64/elf.h
@@ -7,8 +7,6 @@
7 7
8#include <asm/ptrace.h> 8#include <asm/ptrace.h>
9#include <asm/user.h> 9#include <asm/user.h>
10#include <asm/processor.h>
11#include <asm/compat.h>
12 10
13/* x86-64 relocation types */ 11/* x86-64 relocation types */
14#define R_X86_64_NONE 0 /* No reloc */ 12#define R_X86_64_NONE 0 /* No reloc */
@@ -39,18 +37,23 @@ typedef elf_greg_t elf_gregset_t[ELF_NGREG];
39typedef struct user_i387_struct elf_fpregset_t; 37typedef struct user_i387_struct elf_fpregset_t;
40 38
41/* 39/*
42 * This is used to ensure we don't load something for the wrong architecture.
43 */
44#define elf_check_arch(x) \
45 ((x)->e_machine == EM_X86_64)
46
47/*
48 * These are used to set parameters in the core dumps. 40 * These are used to set parameters in the core dumps.
49 */ 41 */
50#define ELF_CLASS ELFCLASS64 42#define ELF_CLASS ELFCLASS64
51#define ELF_DATA ELFDATA2LSB 43#define ELF_DATA ELFDATA2LSB
52#define ELF_ARCH EM_X86_64 44#define ELF_ARCH EM_X86_64
53 45
46#ifdef __KERNEL__
47#include <asm/processor.h>
48#include <asm/compat.h>
49
50/*
51 * This is used to ensure we don't load something for the wrong architecture.
52 */
53#define elf_check_arch(x) \
54 ((x)->e_machine == EM_X86_64)
55
56
54/* SVR4/i386 ABI (pages 3-31, 3-32) says that when the program starts %edx 57/* SVR4/i386 ABI (pages 3-31, 3-32) says that when the program starts %edx
55 contains a pointer to a function which might be registered using `atexit'. 58 contains a pointer to a function which might be registered using `atexit'.
56 This provides a mean for the dynamic linker to call DT_FINI functions for 59 This provides a mean for the dynamic linker to call DT_FINI functions for
@@ -141,7 +144,6 @@ typedef struct user_i387_struct elf_fpregset_t;
141/* I'm not sure if we can use '-' here */ 144/* I'm not sure if we can use '-' here */
142#define ELF_PLATFORM ("x86_64") 145#define ELF_PLATFORM ("x86_64")
143 146
144#ifdef __KERNEL__
145extern void set_personality_64bit(void); 147extern void set_personality_64bit(void);
146#define SET_PERSONALITY(ex, ibcs2) set_personality_64bit() 148#define SET_PERSONALITY(ex, ibcs2) set_personality_64bit()
147/* 149/*
diff --git a/include/asm-x86_64/signal.h b/include/asm-x86_64/signal.h
index cef7a7d51b7e..3ede2a61973a 100644
--- a/include/asm-x86_64/signal.h
+++ b/include/asm-x86_64/signal.h
@@ -3,13 +3,13 @@
3 3
4#ifndef __ASSEMBLY__ 4#ifndef __ASSEMBLY__
5#include <linux/types.h> 5#include <linux/types.h>
6#include <linux/linkage.h>
7#include <linux/time.h> 6#include <linux/time.h>
8 7
9/* Avoid too many header ordering problems. */ 8/* Avoid too many header ordering problems. */
10struct siginfo; 9struct siginfo;
11 10
12#ifdef __KERNEL__ 11#ifdef __KERNEL__
12#include <linux/linkage.h>
13/* Most things should be clean enough to redefine this at will, if care 13/* Most things should be clean enough to redefine this at will, if care
14 is taken to make libc match. */ 14 is taken to make libc match. */
15 15
diff --git a/include/asm-x86_64/unistd.h b/include/asm-x86_64/unistd.h
index 2d89d309a2a8..80fd48e84bbb 100644
--- a/include/asm-x86_64/unistd.h
+++ b/include/asm-x86_64/unistd.h
@@ -620,6 +620,8 @@ __SYSCALL(__NR_vmsplice, sys_vmsplice)
620#define __NR_move_pages 279 620#define __NR_move_pages 279
621__SYSCALL(__NR_move_pages, sys_move_pages) 621__SYSCALL(__NR_move_pages, sys_move_pages)
622 622
623#ifdef __KERNEL__
624
623#define __NR_syscall_max __NR_move_pages 625#define __NR_syscall_max __NR_move_pages
624 626
625#ifndef __NO_STUBS 627#ifndef __NO_STUBS
@@ -744,8 +746,6 @@ __syscall_return(type,__res); \
744 746
745#else /* __KERNEL_SYSCALLS__ */ 747#else /* __KERNEL_SYSCALLS__ */
746 748
747#ifdef __KERNEL__
748
749#include <linux/syscalls.h> 749#include <linux/syscalls.h>
750#include <asm/ptrace.h> 750#include <asm/ptrace.h>
751 751
@@ -821,8 +821,6 @@ asmlinkage long sys_fork(struct pt_regs regs);
821asmlinkage long sys_vfork(struct pt_regs regs); 821asmlinkage long sys_vfork(struct pt_regs regs);
822asmlinkage long sys_pipe(int *fildes); 822asmlinkage long sys_pipe(int *fildes);
823 823
824#endif /* __KERNEL_SYSCALLS__ */
825
826#ifndef __ASSEMBLY__ 824#ifndef __ASSEMBLY__
827 825
828#include <linux/linkage.h> 826#include <linux/linkage.h>
@@ -838,9 +836,9 @@ asmlinkage long sys_rt_sigaction(int sig,
838 struct sigaction __user *oact, 836 struct sigaction __user *oact,
839 size_t sigsetsize); 837 size_t sigsetsize);
840 838
841#endif 839#endif /* __ASSEMBLY__ */
842 840
843#endif 841#endif /* __KERNEL_SYSCALLS__ */
844 842
845/* 843/*
846 * "Conditional" syscalls 844 * "Conditional" syscalls
@@ -850,6 +848,8 @@ asmlinkage long sys_rt_sigaction(int sig,
850 */ 848 */
851#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 849#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
852 850
853#endif 851#endif /* __NO_STUBS */
854 852
855#endif 853#endif /* __KERNEL__ */
854
855#endif /* _ASM_X86_64_UNISTD_H_ */
diff --git a/include/asm-x86_64/vsyscall.h b/include/asm-x86_64/vsyscall.h
index a85e16f56d73..146b24402a5f 100644
--- a/include/asm-x86_64/vsyscall.h
+++ b/include/asm-x86_64/vsyscall.h
@@ -1,8 +1,6 @@
1#ifndef _ASM_X86_64_VSYSCALL_H_ 1#ifndef _ASM_X86_64_VSYSCALL_H_
2#define _ASM_X86_64_VSYSCALL_H_ 2#define _ASM_X86_64_VSYSCALL_H_
3 3
4#include <linux/seqlock.h>
5
6enum vsyscall_num { 4enum vsyscall_num {
7 __NR_vgettimeofday, 5 __NR_vgettimeofday,
8 __NR_vtime, 6 __NR_vtime,
@@ -14,6 +12,7 @@ enum vsyscall_num {
14#define VSYSCALL_ADDR(vsyscall_nr) (VSYSCALL_START+VSYSCALL_SIZE*(vsyscall_nr)) 12#define VSYSCALL_ADDR(vsyscall_nr) (VSYSCALL_START+VSYSCALL_SIZE*(vsyscall_nr))
15 13
16#ifdef __KERNEL__ 14#ifdef __KERNEL__
15#include <linux/seqlock.h>
17 16
18#define __section_vxtime __attribute__ ((unused, __section__ (".vxtime"), aligned(16))) 17#define __section_vxtime __attribute__ ((unused, __section__ (".vxtime"), aligned(16)))
19#define __section_wall_jiffies __attribute__ ((unused, __section__ (".wall_jiffies"), aligned(16))) 18#define __section_wall_jiffies __attribute__ ((unused, __section__ (".wall_jiffies"), aligned(16)))
diff --git a/include/linux/mtd/cfi.h b/include/linux/mtd/cfi.h
index 09bfae6938b3..123948b14547 100644
--- a/include/linux/mtd/cfi.h
+++ b/include/linux/mtd/cfi.h
@@ -199,6 +199,18 @@ struct cfi_pri_amdstd {
199 uint8_t TopBottom; 199 uint8_t TopBottom;
200} __attribute__((packed)); 200} __attribute__((packed));
201 201
202/* Vendor-Specific PRI for Atmel chips (command set 0x0002) */
203
204struct cfi_pri_atmel {
205 uint8_t pri[3];
206 uint8_t MajorVersion;
207 uint8_t MinorVersion;
208 uint8_t Features;
209 uint8_t BottomBoot;
210 uint8_t BurstMode;
211 uint8_t PageMode;
212} __attribute__((packed));
213
202struct cfi_pri_query { 214struct cfi_pri_query {
203 uint8_t NumFields; 215 uint8_t NumFields;
204 uint32_t ProtField[1]; /* Not host ordered */ 216 uint32_t ProtField[1]; /* Not host ordered */
@@ -464,6 +476,7 @@ struct cfi_fixup {
464#define CFI_ID_ANY 0xffff 476#define CFI_ID_ANY 0xffff
465 477
466#define CFI_MFR_AMD 0x0001 478#define CFI_MFR_AMD 0x0001
479#define CFI_MFR_ATMEL 0x001F
467#define CFI_MFR_ST 0x0020 /* STMicroelectronics */ 480#define CFI_MFR_ST 0x0020 /* STMicroelectronics */
468 481
469void cfi_fixup(struct mtd_info *mtd, struct cfi_fixup* fixups); 482void cfi_fixup(struct mtd_info *mtd, struct cfi_fixup* fixups);
diff --git a/include/linux/netfilter/Kbuild b/include/linux/netfilter/Kbuild
index d06311acd448..1d3a14e2da6e 100644
--- a/include/linux/netfilter/Kbuild
+++ b/include/linux/netfilter/Kbuild
@@ -5,7 +5,7 @@ header-y := nf_conntrack_sctp.h nf_conntrack_tuple_common.h \
5 xt_helper.h xt_length.h xt_limit.h xt_mac.h xt_mark.h \ 5 xt_helper.h xt_length.h xt_limit.h xt_mac.h xt_mark.h \
6 xt_MARK.h xt_multiport.h xt_NFQUEUE.h xt_pkttype.h \ 6 xt_MARK.h xt_multiport.h xt_NFQUEUE.h xt_pkttype.h \
7 xt_policy.h xt_realm.h xt_sctp.h xt_state.h xt_string.h \ 7 xt_policy.h xt_realm.h xt_sctp.h xt_state.h xt_string.h \
8 xt_tcpmss.h xt_tcpudp.h 8 xt_tcpmss.h xt_tcpudp.h xt_SECMARK.h xt_CONNSECMARK.h
9 9
10unifdef-y := nf_conntrack_common.h nf_conntrack_ftp.h \ 10unifdef-y := nf_conntrack_common.h nf_conntrack_ftp.h \
11 nf_conntrack_tcp.h nfnetlink.h x_tables.h xt_physdev.h 11 nf_conntrack_tcp.h nfnetlink.h x_tables.h xt_physdev.h
diff --git a/init/Kconfig b/init/Kconfig
index a099fc6526d9..9a7656f0b5ec 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -182,23 +182,6 @@ config TASK_DELAY_ACCT
182 182
183 Say N if unsure. 183 Say N if unsure.
184 184
185config SYSCTL
186 bool "Sysctl support" if EMBEDDED
187 default y
188 ---help---
189 The sysctl interface provides a means of dynamically changing
190 certain kernel parameters and variables on the fly without requiring
191 a recompile of the kernel or reboot of the system. The primary
192 interface consists of a system call, but if you say Y to "/proc
193 file system support", a tree of modifiable sysctl entries will be
194 generated beneath the /proc/sys directory. They are explained in the
195 files in <file:Documentation/sysctl/>. Note that enabling this
196 option will enlarge the kernel by at least 8 KB.
197
198 As it is generally a good thing, you should say Y here unless
199 building a kernel for install/rescue disks or your system is very
200 limited in memory.
201
202config AUDIT 185config AUDIT
203 bool "Auditing support" 186 bool "Auditing support"
204 depends on NET 187 depends on NET
@@ -261,13 +244,6 @@ config RELAY
261 244
262source "usr/Kconfig" 245source "usr/Kconfig"
263 246
264config UID16
265 bool "Enable 16-bit UID system calls" if EMBEDDED
266 depends on ARM || CRIS || FRV || H8300 || X86_32 || M68K || (S390 && !64BIT) || SUPERH || SPARC32 || (SPARC64 && SPARC32_COMPAT) || UML || (X86_64 && IA32_EMULATION)
267 default y
268 help
269 This enables the legacy 16-bit UID syscall wrappers.
270
271config CC_OPTIMIZE_FOR_SIZE 247config CC_OPTIMIZE_FOR_SIZE
272 bool "Optimize for size (Look out for broken compilers!)" 248 bool "Optimize for size (Look out for broken compilers!)"
273 default y 249 default y
@@ -289,6 +265,30 @@ menuconfig EMBEDDED
289 environments which can tolerate a "non-standard" kernel. 265 environments which can tolerate a "non-standard" kernel.
290 Only use this if you really know what you are doing. 266 Only use this if you really know what you are doing.
291 267
268config UID16
269 bool "Enable 16-bit UID system calls" if EMBEDDED
270 depends on ARM || CRIS || FRV || H8300 || X86_32 || M68K || (S390 && !64BIT) || SUPERH || SPARC32 || (SPARC64 && SPARC32_COMPAT) || UML || (X86_64 && IA32_EMULATION)
271 default y
272 help
273 This enables the legacy 16-bit UID syscall wrappers.
274
275config SYSCTL
276 bool "Sysctl support" if EMBEDDED
277 default y
278 ---help---
279 The sysctl interface provides a means of dynamically changing
280 certain kernel parameters and variables on the fly without requiring
281 a recompile of the kernel or reboot of the system. The primary
282 interface consists of a system call, but if you say Y to "/proc
283 file system support", a tree of modifiable sysctl entries will be
284 generated beneath the /proc/sys directory. They are explained in the
285 files in <file:Documentation/sysctl/>. Note that enabling this
286 option will enlarge the kernel by at least 8 KB.
287
288 As it is generally a good thing, you should say Y here unless
289 building a kernel for install/rescue disks or your system is very
290 limited in memory.
291
292config KALLSYMS 292config KALLSYMS
293 bool "Load all symbols for debugging/kksymoops" if EMBEDDED 293 bool "Load all symbols for debugging/kksymoops" if EMBEDDED
294 default y 294 default y
@@ -363,10 +363,6 @@ config BASE_FULL
363 kernel data structures. This saves memory on small machines, 363 kernel data structures. This saves memory on small machines,
364 but may reduce performance. 364 but may reduce performance.
365 365
366config RT_MUTEXES
367 boolean
368 select PLIST
369
370config FUTEX 366config FUTEX
371 bool "Enable futex support" if EMBEDDED 367 bool "Enable futex support" if EMBEDDED
372 default y 368 default y
@@ -414,6 +410,10 @@ config VM_EVENT_COUNTERS
414 410
415endmenu # General setup 411endmenu # General setup
416 412
413config RT_MUTEXES
414 boolean
415 select PLIST
416
417config TINY_SHMEM 417config TINY_SHMEM
418 default !SHMEM 418 default !SHMEM
419 bool 419 bool
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index 9336f2e89e40..ac1f850d4937 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -252,7 +252,7 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs)
252 mask_ack_irq(desc, irq); 252 mask_ack_irq(desc, irq);
253 253
254 if (unlikely(desc->status & IRQ_INPROGRESS)) 254 if (unlikely(desc->status & IRQ_INPROGRESS))
255 goto out; 255 goto out_unlock;
256 desc->status &= ~(IRQ_REPLAY | IRQ_WAITING); 256 desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
257 kstat_cpu(cpu).irqs[irq]++; 257 kstat_cpu(cpu).irqs[irq]++;
258 258
@@ -263,7 +263,7 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs)
263 action = desc->action; 263 action = desc->action;
264 if (unlikely(!action || (desc->status & IRQ_DISABLED))) { 264 if (unlikely(!action || (desc->status & IRQ_DISABLED))) {
265 desc->status |= IRQ_PENDING; 265 desc->status |= IRQ_PENDING;
266 goto out; 266 goto out_unlock;
267 } 267 }
268 268
269 desc->status |= IRQ_INPROGRESS; 269 desc->status |= IRQ_INPROGRESS;
@@ -276,9 +276,9 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs)
276 276
277 spin_lock(&desc->lock); 277 spin_lock(&desc->lock);
278 desc->status &= ~IRQ_INPROGRESS; 278 desc->status &= ~IRQ_INPROGRESS;
279out:
280 if (!(desc->status & IRQ_DISABLED) && desc->chip->unmask) 279 if (!(desc->status & IRQ_DISABLED) && desc->chip->unmask)
281 desc->chip->unmask(irq); 280 desc->chip->unmask(irq);
281out_unlock:
282 spin_unlock(&desc->lock); 282 spin_unlock(&desc->lock);
283} 283}
284 284
diff --git a/kernel/irq/resend.c b/kernel/irq/resend.c
index 872f91ba2ce8..35f10f7ff94a 100644
--- a/kernel/irq/resend.c
+++ b/kernel/irq/resend.c
@@ -63,8 +63,7 @@ void check_irq_resend(struct irq_desc *desc, unsigned int irq)
63 desc->chip->enable(irq); 63 desc->chip->enable(irq);
64 64
65 if ((status & (IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) { 65 if ((status & (IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) {
66 desc->status &= ~IRQ_PENDING; 66 desc->status = (status & ~IRQ_PENDING) | IRQ_REPLAY;
67 desc->status = status | IRQ_REPLAY;
68 67
69 if (!desc->chip || !desc->chip->retrigger || 68 if (!desc->chip || !desc->chip->retrigger ||
70 !desc->chip->retrigger(irq)) { 69 !desc->chip->retrigger(irq)) {
diff --git a/kernel/kmod.c b/kernel/kmod.c
index 1d32defa38ab..5c470c57fb57 100644
--- a/kernel/kmod.c
+++ b/kernel/kmod.c
@@ -197,11 +197,12 @@ static void __call_usermodehelper(void *data)
197{ 197{
198 struct subprocess_info *sub_info = data; 198 struct subprocess_info *sub_info = data;
199 pid_t pid; 199 pid_t pid;
200 int wait = sub_info->wait;
200 201
201 /* CLONE_VFORK: wait until the usermode helper has execve'd 202 /* CLONE_VFORK: wait until the usermode helper has execve'd
202 * successfully We need the data structures to stay around 203 * successfully We need the data structures to stay around
203 * until that is done. */ 204 * until that is done. */
204 if (sub_info->wait) 205 if (wait)
205 pid = kernel_thread(wait_for_helper, sub_info, 206 pid = kernel_thread(wait_for_helper, sub_info,
206 CLONE_FS | CLONE_FILES | SIGCHLD); 207 CLONE_FS | CLONE_FILES | SIGCHLD);
207 else 208 else
@@ -211,7 +212,7 @@ static void __call_usermodehelper(void *data)
211 if (pid < 0) { 212 if (pid < 0) {
212 sub_info->retval = pid; 213 sub_info->retval = pid;
213 complete(sub_info->complete); 214 complete(sub_info->complete);
214 } else if (!sub_info->wait) 215 } else if (!wait)
215 complete(sub_info->complete); 216 complete(sub_info->complete);
216} 217}
217 218
diff --git a/net/Kconfig b/net/Kconfig
index c6cec5aa5486..4959a4e1e0fe 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -177,7 +177,7 @@ source "net/lapb/Kconfig"
177 177
178config NET_DIVERT 178config NET_DIVERT
179 bool "Frame Diverter (EXPERIMENTAL)" 179 bool "Frame Diverter (EXPERIMENTAL)"
180 depends on EXPERIMENTAL 180 depends on EXPERIMENTAL && BROKEN
181 ---help--- 181 ---help---
182 The Frame Diverter allows you to divert packets from the 182 The Frame Diverter allows you to divert packets from the
183 network, that are not aimed at the interface receiving it (in 183 network, that are not aimed at the interface receiving it (in
diff --git a/net/atm/clip.c b/net/atm/clip.c
index 7ce7bfe3fbad..7af2c411da82 100644
--- a/net/atm/clip.c
+++ b/net/atm/clip.c
@@ -500,9 +500,11 @@ static int clip_mkip(struct atm_vcc *vcc, int timeout)
500 } else { 500 } else {
501 unsigned int len = skb->len; 501 unsigned int len = skb->len;
502 502
503 skb_get(skb);
503 clip_push(vcc, skb); 504 clip_push(vcc, skb);
504 PRIV(skb->dev)->stats.rx_packets--; 505 PRIV(skb->dev)->stats.rx_packets--;
505 PRIV(skb->dev)->stats.rx_bytes -= len; 506 PRIV(skb->dev)->stats.rx_bytes -= len;
507 kfree_skb(skb);
506 } 508 }
507 return 0; 509 return 0;
508} 510}
diff --git a/net/bridge/br_stp_bpdu.c b/net/bridge/br_stp_bpdu.c
index a7ba0cce0b46..068d8afbf0a7 100644
--- a/net/bridge/br_stp_bpdu.c
+++ b/net/bridge/br_stp_bpdu.c
@@ -121,7 +121,7 @@ void br_send_tcn_bpdu(struct net_bridge_port *p)
121 buf[1] = 0; 121 buf[1] = 0;
122 buf[2] = 0; 122 buf[2] = 0;
123 buf[3] = BPDU_TYPE_TCN; 123 buf[3] = BPDU_TYPE_TCN;
124 br_send_bpdu(p, buf, 7); 124 br_send_bpdu(p, buf, 4);
125} 125}
126 126
127/* 127/*
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 5130d2efdbbe..fe2113f54e2b 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -1432,6 +1432,9 @@ int neigh_table_clear(struct neigh_table *tbl)
1432 kfree(tbl->phash_buckets); 1432 kfree(tbl->phash_buckets);
1433 tbl->phash_buckets = NULL; 1433 tbl->phash_buckets = NULL;
1434 1434
1435 free_percpu(tbl->stats);
1436 tbl->stats = NULL;
1437
1435 return 0; 1438 return 0;
1436} 1439}
1437 1440
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index 23fb9d9768e3..01801c0f885d 100644
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -1281,18 +1281,18 @@ static inline int check_leaf(struct trie *t, struct leaf *l,
1281 struct fib_result *res) 1281 struct fib_result *res)
1282{ 1282{
1283 int err, i; 1283 int err, i;
1284 t_key mask; 1284 __be32 mask;
1285 struct leaf_info *li; 1285 struct leaf_info *li;
1286 struct hlist_head *hhead = &l->list; 1286 struct hlist_head *hhead = &l->list;
1287 struct hlist_node *node; 1287 struct hlist_node *node;
1288 1288
1289 hlist_for_each_entry_rcu(li, node, hhead, hlist) { 1289 hlist_for_each_entry_rcu(li, node, hhead, hlist) {
1290 i = li->plen; 1290 i = li->plen;
1291 mask = ntohl(inet_make_mask(i)); 1291 mask = inet_make_mask(i);
1292 if (l->key != (key & mask)) 1292 if (l->key != (key & ntohl(mask)))
1293 continue; 1293 continue;
1294 1294
1295 if ((err = fib_semantic_match(&li->falh, flp, res, l->key, mask, i)) <= 0) { 1295 if ((err = fib_semantic_match(&li->falh, flp, res, htonl(l->key), mask, i)) <= 0) {
1296 *plen = i; 1296 *plen = i;
1297#ifdef CONFIG_IP_FIB_TRIE_STATS 1297#ifdef CONFIG_IP_FIB_TRIE_STATS
1298 t->stats.semantic_match_passed++; 1298 t->stats.semantic_match_passed++;
diff --git a/net/ipv4/ipvs/ip_vs_ftp.c b/net/ipv4/ipvs/ip_vs_ftp.c
index a19a33ceb811..37fafb1fbcff 100644
--- a/net/ipv4/ipvs/ip_vs_ftp.c
+++ b/net/ipv4/ipvs/ip_vs_ftp.c
@@ -46,14 +46,7 @@
46 */ 46 */
47static int ports[IP_VS_APP_MAX_PORTS] = {21, 0}; 47static int ports[IP_VS_APP_MAX_PORTS] = {21, 0};
48module_param_array(ports, int, NULL, 0); 48module_param_array(ports, int, NULL, 0);
49 49MODULE_PARM_DESC(ports, "Ports to monitor for FTP control commands");
50/*
51 * Debug level
52 */
53#ifdef CONFIG_IP_VS_DEBUG
54static int debug=0;
55module_param(debug, int, 0);
56#endif
57 50
58 51
59/* Dummy variable */ 52/* Dummy variable */
@@ -177,7 +170,7 @@ static int ip_vs_ftp_out(struct ip_vs_app *app, struct ip_vs_conn *cp,
177 &start, &end) != 1) 170 &start, &end) != 1)
178 return 1; 171 return 1;
179 172
180 IP_VS_DBG(1-debug, "PASV response (%u.%u.%u.%u:%d) -> " 173 IP_VS_DBG(7, "PASV response (%u.%u.%u.%u:%d) -> "
181 "%u.%u.%u.%u:%d detected\n", 174 "%u.%u.%u.%u:%d detected\n",
182 NIPQUAD(from), ntohs(port), NIPQUAD(cp->caddr), 0); 175 NIPQUAD(from), ntohs(port), NIPQUAD(cp->caddr), 0);
183 176
@@ -280,7 +273,7 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp,
280 while (data <= data_limit - 6) { 273 while (data <= data_limit - 6) {
281 if (strnicmp(data, "PASV\r\n", 6) == 0) { 274 if (strnicmp(data, "PASV\r\n", 6) == 0) {
282 /* Passive mode on */ 275 /* Passive mode on */
283 IP_VS_DBG(1-debug, "got PASV at %zd of %zd\n", 276 IP_VS_DBG(7, "got PASV at %zd of %zd\n",
284 data - data_start, 277 data - data_start,
285 data_limit - data_start); 278 data_limit - data_start);
286 cp->app_data = &ip_vs_ftp_pasv; 279 cp->app_data = &ip_vs_ftp_pasv;
@@ -302,7 +295,7 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp,
302 &start, &end) != 1) 295 &start, &end) != 1)
303 return 1; 296 return 1;
304 297
305 IP_VS_DBG(1-debug, "PORT %u.%u.%u.%u:%d detected\n", 298 IP_VS_DBG(7, "PORT %u.%u.%u.%u:%d detected\n",
306 NIPQUAD(to), ntohs(port)); 299 NIPQUAD(to), ntohs(port));
307 300
308 /* Passive mode off */ 301 /* Passive mode off */
@@ -311,7 +304,7 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp,
311 /* 304 /*
312 * Now update or create a connection entry for it 305 * Now update or create a connection entry for it
313 */ 306 */
314 IP_VS_DBG(1-debug, "protocol %s %u.%u.%u.%u:%d %u.%u.%u.%u:%d\n", 307 IP_VS_DBG(7, "protocol %s %u.%u.%u.%u:%d %u.%u.%u.%u:%d\n",
315 ip_vs_proto_name(iph->protocol), 308 ip_vs_proto_name(iph->protocol),
316 NIPQUAD(to), ntohs(port), NIPQUAD(cp->vaddr), 0); 309 NIPQUAD(to), ntohs(port), NIPQUAD(cp->vaddr), 0);
317 310
@@ -372,11 +365,17 @@ static int __init ip_vs_ftp_init(void)
372 for (i=0; i<IP_VS_APP_MAX_PORTS; i++) { 365 for (i=0; i<IP_VS_APP_MAX_PORTS; i++) {
373 if (!ports[i]) 366 if (!ports[i])
374 continue; 367 continue;
368 if (ports[i] < 0 || ports[i] > 0xffff) {
369 IP_VS_WARNING("ip_vs_ftp: Ignoring invalid "
370 "configuration port[%d] = %d\n",
371 i, ports[i]);
372 continue;
373 }
375 ret = register_ip_vs_app_inc(app, app->protocol, ports[i]); 374 ret = register_ip_vs_app_inc(app, app->protocol, ports[i]);
376 if (ret) 375 if (ret)
377 break; 376 break;
378 IP_VS_DBG(1-debug, "%s: loaded support on port[%d] = %d\n", 377 IP_VS_INFO("%s: loaded support on port[%d] = %d\n",
379 app->name, i, ports[i]); 378 app->name, i, ports[i]);
380 } 379 }
381 380
382 if (ret) 381 if (ret)
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 111ff39a08c5..159fa3f1ba67 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -89,7 +89,7 @@ int sysctl_tcp_frto;
89int sysctl_tcp_nometrics_save; 89int sysctl_tcp_nometrics_save;
90 90
91int sysctl_tcp_moderate_rcvbuf = 1; 91int sysctl_tcp_moderate_rcvbuf = 1;
92int sysctl_tcp_abc = 1; 92int sysctl_tcp_abc;
93 93
94#define FLAG_DATA 0x01 /* Incoming frame contained data. */ 94#define FLAG_DATA 0x01 /* Incoming frame contained data. */
95#define FLAG_WIN_UPDATE 0x02 /* Incoming ACK was a window update. */ 95#define FLAG_WIN_UPDATE 0x02 /* Incoming ACK was a window update. */
diff --git a/net/ipv4/tcp_lp.c b/net/ipv4/tcp_lp.c
index 1f977b6ee9a1..48f28d617ce6 100644
--- a/net/ipv4/tcp_lp.c
+++ b/net/ipv4/tcp_lp.c
@@ -3,13 +3,8 @@
3 * 3 *
4 * TCP Low Priority is a distributed algorithm whose goal is to utilize only 4 * TCP Low Priority is a distributed algorithm whose goal is to utilize only
5 * the excess network bandwidth as compared to the ``fair share`` of 5 * the excess network bandwidth as compared to the ``fair share`` of
6 * bandwidth as targeted by TCP. Available from: 6 * bandwidth as targeted by TCP.
7 * http://www.ece.rice.edu/~akuzma/Doc/akuzma/TCP-LP.pdf
8 * 7 *
9 * Original Author:
10 * Aleksandar Kuzmanovic <akuzma@northwestern.edu>
11 *
12 * See http://www-ece.rice.edu/networks/TCP-LP/ for their implementation.
13 * As of 2.6.13, Linux supports pluggable congestion control algorithms. 8 * As of 2.6.13, Linux supports pluggable congestion control algorithms.
14 * Due to the limitation of the API, we take the following changes from 9 * Due to the limitation of the API, we take the following changes from
15 * the original TCP-LP implementation: 10 * the original TCP-LP implementation:
@@ -24,11 +19,20 @@
24 * o OWD is handled in relative format, where local time stamp will in 19 * o OWD is handled in relative format, where local time stamp will in
25 * tcp_time_stamp format. 20 * tcp_time_stamp format.
26 * 21 *
27 * Port from 2.4.19 to 2.6.16 as module by: 22 * Original Author:
28 * Wong Hoi Sing Edison <hswong3i@gmail.com> 23 * Aleksandar Kuzmanovic <akuzma@northwestern.edu>
29 * Hung Hing Lun <hlhung3i@gmail.com> 24 * Available from:
25 * http://www.ece.rice.edu/~akuzma/Doc/akuzma/TCP-LP.pdf
26 * Original implementation for 2.4.19:
27 * http://www-ece.rice.edu/networks/TCP-LP/
30 * 28 *
31 * Version: $Id: tcp_lp.c,v 1.22 2006-05-02 18:18:19 hswong3i Exp $ 29 * 2.6.x module Authors:
30 * Wong Hoi Sing, Edison <hswong3i@gmail.com>
31 * Hung Hing Lun, Mike <hlhung3i@gmail.com>
32 * SourceForge project page:
33 * http://tcp-lp-mod.sourceforge.net/
34 *
35 * Version: $Id: tcp_lp.c,v 1.24 2006/09/05 20:22:53 hswong3i Exp $
32 */ 36 */
33 37
34#include <linux/config.h> 38#include <linux/config.h>
@@ -153,16 +157,19 @@ static u32 tcp_lp_remote_hz_estimator(struct sock *sk)
153 if (m < 0) 157 if (m < 0)
154 m = -m; 158 m = -m;
155 159
156 if (rhz != 0) { 160 if (rhz > 0) {
157 m -= rhz >> 6; /* m is now error in remote HZ est */ 161 m -= rhz >> 6; /* m is now error in remote HZ est */
158 rhz += m; /* 63/64 old + 1/64 new */ 162 rhz += m; /* 63/64 old + 1/64 new */
159 } else 163 } else
160 rhz = m << 6; 164 rhz = m << 6;
161 165
166 out:
162 /* record time for successful remote HZ calc */ 167 /* record time for successful remote HZ calc */
163 lp->flag |= LP_VALID_RHZ; 168 if (rhz > 0)
169 lp->flag |= LP_VALID_RHZ;
170 else
171 lp->flag &= ~LP_VALID_RHZ;
164 172
165 out:
166 /* record reference time stamp */ 173 /* record reference time stamp */
167 lp->remote_ref_time = tp->rx_opt.rcv_tsval; 174 lp->remote_ref_time = tp->rx_opt.rcv_tsval;
168 lp->local_ref_time = tp->rx_opt.rcv_tsecr; 175 lp->local_ref_time = tp->rx_opt.rcv_tsecr;
@@ -333,6 +340,6 @@ static void __exit tcp_lp_unregister(void)
333module_init(tcp_lp_register); 340module_init(tcp_lp_register);
334module_exit(tcp_lp_unregister); 341module_exit(tcp_lp_unregister);
335 342
336MODULE_AUTHOR("Wong Hoi Sing Edison, Hung Hing Lun"); 343MODULE_AUTHOR("Wong Hoi Sing Edison, Hung Hing Lun Mike");
337MODULE_LICENSE("GPL"); 344MODULE_LICENSE("GPL");
338MODULE_DESCRIPTION("TCP Low Priority"); 345MODULE_DESCRIPTION("TCP Low Priority");
diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c
index 99a6eb23378b..3b55b4c8e2d1 100644
--- a/net/ipv6/datagram.c
+++ b/net/ipv6/datagram.c
@@ -696,7 +696,7 @@ int datagram_send_ctl(struct msghdr *msg, struct flowi *fl,
696 } 696 }
697 697
698 tc = *(int *)CMSG_DATA(cmsg); 698 tc = *(int *)CMSG_DATA(cmsg);
699 if (tc < 0 || tc > 0xff) 699 if (tc < -1 || tc > 0xff)
700 goto exit_f; 700 goto exit_f;
701 701
702 err = 0; 702 err = 0;
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index 3d6e9a351150..356a8a7ef22a 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -401,7 +401,7 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info,
401 if (hlimit < 0) 401 if (hlimit < 0)
402 hlimit = ipv6_get_hoplimit(dst->dev); 402 hlimit = ipv6_get_hoplimit(dst->dev);
403 403
404 tclass = np->cork.tclass; 404 tclass = np->tclass;
405 if (tclass < 0) 405 if (tclass < 0)
406 tclass = 0; 406 tclass = 0;
407 407
@@ -497,7 +497,7 @@ static void icmpv6_echo_reply(struct sk_buff *skb)
497 if (hlimit < 0) 497 if (hlimit < 0)
498 hlimit = ipv6_get_hoplimit(dst->dev); 498 hlimit = ipv6_get_hoplimit(dst->dev);
499 499
500 tclass = np->cork.tclass; 500 tclass = np->tclass;
501 if (tclass < 0) 501 if (tclass < 0)
502 tclass = 0; 502 tclass = 0;
503 503
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
index 43327264e69c..a5eaaf693abf 100644
--- a/net/ipv6/ipv6_sockglue.c
+++ b/net/ipv6/ipv6_sockglue.c
@@ -362,7 +362,7 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname,
362 break; 362 break;
363 363
364 case IPV6_TCLASS: 364 case IPV6_TCLASS:
365 if (val < 0 || val > 0xff) 365 if (val < -1 || val > 0xff)
366 goto e_inval; 366 goto e_inval;
367 np->tclass = val; 367 np->tclass = val;
368 retv = 0; 368 retv = 0;
@@ -947,6 +947,8 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname,
947 947
948 case IPV6_TCLASS: 948 case IPV6_TCLASS:
949 val = np->tclass; 949 val = np->tclass;
950 if (val < 0)
951 val = 0;
950 break; 952 break;
951 953
952 case IPV6_RECVTCLASS: 954 case IPV6_RECVTCLASS:
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index d57e61ce4a7d..15b862d8acab 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -781,7 +781,7 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk,
781 } 781 }
782 782
783 if (tclass < 0) { 783 if (tclass < 0) {
784 tclass = np->cork.tclass; 784 tclass = np->tclass;
785 if (tclass < 0) 785 if (tclass < 0)
786 tclass = 0; 786 tclass = 0;
787 } 787 }
diff --git a/net/netfilter/xt_quota.c b/net/netfilter/xt_quota.c
index 4cdba7469dc4..be8d3c26b568 100644
--- a/net/netfilter/xt_quota.c
+++ b/net/netfilter/xt_quota.c
@@ -11,6 +11,8 @@
11 11
12MODULE_LICENSE("GPL"); 12MODULE_LICENSE("GPL");
13MODULE_AUTHOR("Sam Johnston <samj@samj.net>"); 13MODULE_AUTHOR("Sam Johnston <samj@samj.net>");
14MODULE_ALIAS("ipt_quota");
15MODULE_ALIAS("ip6t_quota");
14 16
15static DEFINE_SPINLOCK(quota_lock); 17static DEFINE_SPINLOCK(quota_lock);
16 18
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index f9cef3671593..4172a5235916 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -626,8 +626,6 @@ static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, struct packe
626 if ((int)snaplen < 0) 626 if ((int)snaplen < 0)
627 snaplen = 0; 627 snaplen = 0;
628 } 628 }
629 if (snaplen > skb->len-skb->data_len)
630 snaplen = skb->len-skb->data_len;
631 629
632 spin_lock(&sk->sk_receive_queue.lock); 630 spin_lock(&sk->sk_receive_queue.lock);
633 h = (struct tpacket_hdr *)packet_lookup_frame(po, po->head); 631 h = (struct tpacket_hdr *)packet_lookup_frame(po, po->head);
@@ -644,7 +642,7 @@ static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, struct packe
644 status &= ~TP_STATUS_LOSING; 642 status &= ~TP_STATUS_LOSING;
645 spin_unlock(&sk->sk_receive_queue.lock); 643 spin_unlock(&sk->sk_receive_queue.lock);
646 644
647 memcpy((u8*)h + macoff, skb->data, snaplen); 645 skb_copy_bits(skb, 0, (u8*)h + macoff, snaplen);
648 646
649 h->tp_len = skb->len; 647 h->tp_len = skb->len;
650 h->tp_snaplen = snaplen; 648 h->tp_snaplen = snaplen;
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index 0834c2ee9174..6f9151899795 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -238,9 +238,7 @@ void __netdev_watchdog_up(struct net_device *dev)
238 238
239static void dev_watchdog_up(struct net_device *dev) 239static void dev_watchdog_up(struct net_device *dev)
240{ 240{
241 netif_tx_lock_bh(dev);
242 __netdev_watchdog_up(dev); 241 __netdev_watchdog_up(dev);
243 netif_tx_unlock_bh(dev);
244} 242}
245 243
246static void dev_watchdog_down(struct net_device *dev) 244static void dev_watchdog_down(struct net_device *dev)
diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
index aa9990a3ccd6..12e1daf875c8 100644
--- a/scripts/Makefile.headersinst
+++ b/scripts/Makefile.headersinst
@@ -93,14 +93,14 @@ STUBDEF=__ASM_STUB_`echo $@ | tr a-z. A-Z_`; \
93echo "\#ifndef $$STUBDEF" ; \ 93echo "\#ifndef $$STUBDEF" ; \
94echo "\#define $$STUBDEF" ; \ 94echo "\#define $$STUBDEF" ; \
95echo "\# if $(ARCHDEF)" ; \ 95echo "\# if $(ARCHDEF)" ; \
96if [ -r $(srctree)/include/$(archasm)/$@ ]; then \ 96if [ -r $(INSTALL_HDR_PATH)/include/$(archasm)/$@ ]; then \
97 echo "\# include <$(archasm)/$@>" ; \ 97 echo "\# include <$(archasm)/$@>" ; \
98else \ 98else \
99 echo "\# error $(archasm)/$@ does not exist in" \ 99 echo "\# error $(archasm)/$@ does not exist in" \
100 "the $(ARCH) architecture" ; \ 100 "the $(ARCH) architecture" ; \
101fi ; \ 101fi ; \
102echo "\# elif $(ALTARCHDEF)" ; \ 102echo "\# elif $(ALTARCHDEF)" ; \
103if [ -r $(srctree)/include/$(altarchasm)/$@ ]; then \ 103if [ -r $(INSTALL_HDR_PATH)/include/$(altarchasm)/$@ ]; then \
104 echo "\# include <$(altarchasm)/$@>" ; \ 104 echo "\# include <$(altarchasm)/$@>" ; \
105else \ 105else \
106 echo "\# error $(altarchasm)/$@ does not exist in" \ 106 echo "\# error $(altarchasm)/$@ does not exist in" \
@@ -149,7 +149,9 @@ endif
149hdrinst := -rR -f $(srctree)/scripts/Makefile.headersinst obj 149hdrinst := -rR -f $(srctree)/scripts/Makefile.headersinst obj
150 150
151.PHONY: altarch-dir 151.PHONY: altarch-dir
152altarch-dir: 152# All the files in the normal arch dir must be created first, since we test
153# for their existence.
154altarch-dir: $(subdir-y) $(header-y) $(unifdef-y) $(objhdr-y)
153 $(Q)$(MAKE) $(hdrinst)=include/asm-$(ALTARCH) dst=include/asm-$(ALTARCH) 155 $(Q)$(MAKE) $(hdrinst)=include/asm-$(ALTARCH) dst=include/asm-$(ALTARCH)
154 $(Q)$(MAKE) $(hdrinst)=include/asm dst=include/asm 156 $(Q)$(MAKE) $(hdrinst)=include/asm dst=include/asm
155 157
diff --git a/scripts/Makefile.host b/scripts/Makefile.host
index 18ecd4d5df7f..060f4c563a5c 100644
--- a/scripts/Makefile.host
+++ b/scripts/Makefile.host
@@ -30,7 +30,7 @@
30# libkconfig.so as the executable conf. 30# libkconfig.so as the executable conf.
31# Note: Shared libraries consisting of C++ files are not supported 31# Note: Shared libraries consisting of C++ files are not supported
32 32
33__hostprogs := $(sort $(hostprogs-y)$(hostprogs-m)) 33__hostprogs := $(sort $(hostprogs-y) $(hostprogs-m))
34 34
35# hostprogs-y := tools/build may have been specified. Retreive directory 35# hostprogs-y := tools/build may have been specified. Retreive directory
36host-objdirs := $(foreach f,$(__hostprogs), $(if $(dir $(f)),$(dir $(f)))) 36host-objdirs := $(foreach f,$(__hostprogs), $(if $(dir $(f)),$(dir $(f))))