From 312bd8dcaf88243e6eeec68ae2c010bf2a0158c2 Mon Sep 17 00:00:00 2001 From: Tony Battersby Date: Wed, 21 Dec 2005 16:35:44 -0500 Subject: [PATCH] --- yaml --- r: 15330 b: refs/heads/master c: fd71da468dd8897fe3f565dfd3743a87d8678e3a h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/MAINTAINERS | 6 +- trunk/arch/arm/kernel/calls.S | 8 +- trunk/arch/arm/kernel/entry-armv.S | 49 ---- trunk/arch/arm/kernel/entry-common.S | 20 +- trunk/arch/i386/pci/Makefile | 2 +- trunk/arch/powerpc/configs/cell_defconfig | 7 +- trunk/arch/powerpc/configs/g5_defconfig | 9 +- trunk/arch/powerpc/configs/iseries_defconfig | 7 +- trunk/arch/powerpc/configs/maple_defconfig | 10 +- trunk/arch/powerpc/configs/ppc64_defconfig | 7 +- trunk/arch/powerpc/configs/pseries_defconfig | 7 +- trunk/arch/powerpc/kernel/entry_64.S | 4 +- trunk/arch/powerpc/platforms/pseries/xics.c | 21 +- .../ppc/platforms/85xx/mpc85xx_cds_common.c | 3 +- trunk/arch/sparc/Kconfig | 4 - trunk/arch/sparc/kernel/sys_sunos.c | 2 +- trunk/arch/sparc64/Kconfig | 4 - trunk/arch/sparc64/Makefile | 5 + trunk/arch/sparc64/kernel/sys_sunos32.c | 2 +- trunk/arch/sparc64/solaris/misc.c | 2 +- trunk/arch/x86_64/pci/Makefile | 2 +- trunk/block/scsi_ioctl.c | 45 +--- trunk/drivers/acpi/processor_idle.c | 20 +- trunk/drivers/acpi/processor_thermal.c | 4 +- trunk/drivers/acpi/utilities/utmisc.c | 18 +- trunk/drivers/char/Kconfig | 4 +- trunk/drivers/char/keyboard.c | 10 +- trunk/drivers/fc4/Kconfig | 8 +- trunk/drivers/input/misc/Kconfig | 2 +- trunk/drivers/input/serio/i8042.h | 2 +- trunk/drivers/macintosh/therm_pm72.c | 2 +- trunk/drivers/md/md.c | 2 +- trunk/drivers/media/dvb/ttpci/av7110.c | 3 - trunk/drivers/media/dvb/ttpci/av7110_hw.h | 3 +- .../media/video/cx25840/cx25840-core.c | 42 ++- .../drivers/media/video/em28xx/em28xx-core.c | 6 +- trunk/drivers/media/video/em28xx/em28xx-i2c.c | 2 +- .../drivers/media/video/em28xx/em28xx-video.c | 2 +- trunk/drivers/media/video/em28xx/em28xx.h | 8 +- trunk/drivers/media/video/saa7127.c | 6 +- trunk/drivers/media/video/saa7134/Kconfig | 26 +- trunk/drivers/media/video/saa7134/Makefile | 7 +- .../media/video/saa7134/saa7134-alsa.c | 18 +- .../drivers/media/video/saa7134/saa7134-oss.c | 18 +- trunk/drivers/media/video/tveeprom.c | 2 +- trunk/drivers/mtd/maps/Kconfig | 2 +- trunk/drivers/net/forcedeth.c | 15 +- trunk/drivers/net/phy/phy_device.c | 4 - trunk/drivers/net/sungem.c | 4 +- trunk/drivers/net/tg3.c | 186 ++++++------- trunk/drivers/net/wireless/orinoco_nortel.c | 6 +- trunk/drivers/s390/net/qeth_eddp.c | 3 +- trunk/drivers/s390/net/qeth_main.c | 61 +++-- trunk/drivers/s390/net/qeth_mpc.c | 2 +- trunk/drivers/s390/net/qeth_mpc.h | 4 +- trunk/drivers/s390/net/qeth_proc.c | 250 ++++++++++++++++-- trunk/drivers/s390/net/qeth_sys.c | 6 +- trunk/drivers/s390/net/qeth_tso.h | 4 +- trunk/drivers/scsi/libata-scsi.c | 5 +- trunk/drivers/scsi/scsi_scan.c | 48 +--- trunk/drivers/scsi/scsi_transport_fc.c | 59 +---- trunk/drivers/serial/Kconfig | 10 +- trunk/drivers/usb/core/usb.c | 9 +- trunk/drivers/usb/storage/scsiglue.c | 4 +- trunk/drivers/video/Kconfig | 10 +- trunk/drivers/video/console/Kconfig | 20 +- trunk/drivers/video/console/fbcon_ud.c | 8 +- trunk/drivers/video/intelfb/intelfb.h | 5 - trunk/drivers/video/intelfb/intelfbdrv.c | 51 ++-- trunk/drivers/video/logo/Kconfig | 2 +- trunk/drivers/video/sbuslib.c | 3 - trunk/fs/lockd/clntlock.c | 4 - trunk/fs/nfs/direct.c | 24 +- trunk/fs/nfs/file.c | 26 +- trunk/fs/nfs/inode.c | 28 +- trunk/fs/nfsd/nfs2acl.c | 2 +- trunk/fs/nfsd/nfs3acl.c | 2 +- trunk/fs/partitions/Kconfig | 2 +- trunk/fs/relayfs/relay.c | 8 +- trunk/include/acpi/acglobal.h | 2 +- trunk/include/asm-ia64/topology.h | 2 +- trunk/include/asm-x86_64/rwlock.h | 2 +- trunk/include/asm-x86_64/topology.h | 2 +- trunk/include/linux/ipv6_route.h | 1 - trunk/include/linux/irq.h | 2 +- trunk/include/linux/nfs_fs.h | 1 - trunk/include/linux/preempt.h | 1 - trunk/include/linux/relayfs_fs.h | 5 +- trunk/include/linux/rtnetlink.h | 4 - trunk/include/net/if_inet6.h | 1 - trunk/include/net/xfrm.h | 1 - trunk/include/scsi/scsi_transport_fc.h | 11 - trunk/init/Kconfig | 1 + trunk/ipc/sem.c | 2 - trunk/kernel/futex.c | 6 - trunk/kernel/params.c | 2 +- trunk/lib/spinlock_debug.c | 18 +- trunk/lib/swiotlb.c | 5 +- trunk/net/8021q/vlan.c | 6 +- trunk/net/bridge/br_netfilter.c | 17 +- trunk/net/dccp/ipv4.c | 2 +- trunk/net/ipv4/netfilter/Makefile | 3 +- trunk/net/ipv4/xfrm4_policy.c | 1 - trunk/net/ipv6/addrconf.c | 134 ++-------- trunk/net/ipv6/icmp.c | 16 +- trunk/net/ipv6/netfilter/Kconfig | 2 +- trunk/net/ipv6/route.c | 15 +- trunk/net/ipv6/xfrm6_policy.c | 1 - trunk/net/netrom/nr_in.c | 6 +- trunk/net/sctp/socket.c | 14 +- trunk/net/sunrpc/auth_gss/auth_gss.c | 6 +- trunk/net/sunrpc/rpc_pipe.c | 4 +- trunk/net/sunrpc/xprtsock.c | 2 - trunk/net/xfrm/xfrm_policy.c | 49 +--- trunk/net/xfrm/xfrm_state.c | 5 - trunk/sound/sparc/Kconfig | 2 +- 117 files changed, 733 insertions(+), 941 deletions(-) diff --git a/[refs] b/[refs] index e38f000d77bb..13f2cf1e7acf 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 10bb10dcb685cbe078e611f2dca3bd3e42fba0a8 +refs/heads/master: fd71da468dd8897fe3f565dfd3743a87d8678e3a diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS index 6af683025ae0..da6973adacda 100644 --- a/trunk/MAINTAINERS +++ b/trunk/MAINTAINERS @@ -536,7 +536,7 @@ P: Mauro Carvalho Chehab M: mchehab@brturbo.com.br L: video4linux-list@redhat.com W: http://linuxtv.org -T: git kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb.git +T: quilt http://www.linuxtv.org/download/quilt/ S: Maintained BUSLOGIC SCSI DRIVER @@ -834,7 +834,7 @@ P: LinuxTV.org Project M: linux-dvb-maintainer@linuxtv.org L: linux-dvb@linuxtv.org (subscription required) W: http://linuxtv.org/ -T: git kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb.git +T: quilt http://www.linuxtv.org/download/quilt/ S: Supported EATA-DMA SCSI DRIVER @@ -2896,7 +2896,7 @@ P: Mauro Carvalho Chehab M: mchehab@brturbo.com.br L: video4linux-list@redhat.com W: http://linuxtv.org -T: git kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb.git +T: quilt http://www.linuxtv.org/download/quilt/ S: Maintained W1 DALLAS'S 1-WIRE BUS diff --git a/trunk/arch/arm/kernel/calls.S b/trunk/arch/arm/kernel/calls.S index 55076a75e5bf..2ad4aa2a1536 100644 --- a/trunk/arch/arm/kernel/calls.S +++ b/trunk/arch/arm/kernel/calls.S @@ -131,7 +131,7 @@ __syscall_start: .long sys_wait4 /* 115 */ .long sys_swapoff .long sys_sysinfo - .long sys_ipc + .long sys_ipc_wrapper .long sys_fsync .long sys_sigreturn_wrapper /* 120 */ .long sys_clone_wrapper @@ -254,7 +254,7 @@ __syscall_start: .long sys_fremovexattr .long sys_tkill .long sys_sendfile64 -/* 240 */ .long sys_futex +/* 240 */ .long sys_futex_wrapper .long sys_sched_setaffinity .long sys_sched_getaffinity .long sys_io_setup @@ -284,7 +284,7 @@ __syscall_start: .long sys_fstatfs64 .long sys_tgkill .long sys_utimes -/* 270 */ .long sys_arm_fadvise64_64 +/* 270 */ .long sys_arm_fadvise64_64_wrapper .long sys_pciconfig_iobase .long sys_pciconfig_read .long sys_pciconfig_write @@ -333,7 +333,7 @@ __syscall_start: .long sys_inotify_init .long sys_inotify_add_watch .long sys_inotify_rm_watch - .long sys_mbind + .long sys_mbind_wrapper /* 320 */ .long sys_get_mempolicy .long sys_set_mempolicy __syscall_end: diff --git a/trunk/arch/arm/kernel/entry-armv.S b/trunk/arch/arm/kernel/entry-armv.S index 2a8d27e18fa7..d9fb819bf7cc 100644 --- a/trunk/arch/arm/kernel/entry-armv.S +++ b/trunk/arch/arm/kernel/entry-armv.S @@ -611,47 +611,6 @@ ENTRY(__switch_to) .globl __kuser_helper_start __kuser_helper_start: -/* - * Reference prototype: - * - * void __kernel_memory_barrier(void) - * - * Input: - * - * lr = return address - * - * Output: - * - * none - * - * Clobbered: - * - * the Z flag might be lost - * - * Definition and user space usage example: - * - * typedef void (__kernel_dmb_t)(void); - * #define __kernel_dmb (*(__kernel_dmb_t *)0xffff0fa0) - * - * Apply any needed memory barrier to preserve consistency with data modified - * manually and __kuser_cmpxchg usage. - * - * This could be used as follows: - * - * #define __kernel_dmb() \ - * asm volatile ( "mov r0, #0xffff0fff; mov lr, pc; sub pc, r0, #95" \ - * : : : "lr","cc" ) - */ - -__kuser_memory_barrier: @ 0xffff0fa0 - -#if __LINUX_ARM_ARCH__ >= 6 && defined(CONFIG_SMP) - mcr p15, 0, r0, c7, c10, 5 @ dmb -#endif - mov pc, lr - - .align 5 - /* * Reference prototype: * @@ -683,8 +642,6 @@ __kuser_memory_barrier: @ 0xffff0fa0 * The C flag is also set if *ptr was changed to allow for assembly * optimization in the calling code. * - * Note: this routine already includes memory barriers as needed. - * * For example, a user space atomic_add implementation could look like this: * * #define atomic_add(ptr, val) \ @@ -741,16 +698,10 @@ __kuser_cmpxchg: @ 0xffff0fc0 #else -#ifdef CONFIG_SMP - mcr p15, 0, r0, c7, c10, 5 @ dmb -#endif ldrex r3, [r2] subs r3, r3, r0 strexeq r3, r1, [r2] rsbs r0, r3, #0 -#ifdef CONFIG_SMP - mcr p15, 0, r0, c7, c10, 5 @ dmb -#endif mov pc, lr #endif diff --git a/trunk/arch/arm/kernel/entry-common.S b/trunk/arch/arm/kernel/entry-common.S index e2b42997ad33..f7f183075237 100644 --- a/trunk/arch/arm/kernel/entry-common.S +++ b/trunk/arch/arm/kernel/entry-common.S @@ -145,7 +145,7 @@ ENTRY(vector_swi) #endif enable_irq - stmdb sp!, {r4, r5} @ push fifth and sixth args + str r4, [sp, #-S_OFF]! @ push fifth arg get_thread_info tsk ldr ip, [tsk, #TI_FLAGS] @ check for syscall tracing @@ -204,7 +204,7 @@ ENTRY(sys_call_table) * Special system call wrappers */ @ r0 = syscall number -@ r8 = syscall table +@ r5 = syscall table .type sys_syscall, #function sys_syscall: eor scno, r0, #__NR_SYSCALL_BASE @@ -255,6 +255,22 @@ sys_sigaltstack_wrapper: ldr r2, [sp, #S_OFF + S_SP] b do_sigaltstack +sys_futex_wrapper: + str r5, [sp, #4] @ push sixth arg + b sys_futex + +sys_arm_fadvise64_64_wrapper: + str r5, [sp, #4] @ push r5 to stack + b sys_arm_fadvise64_64 + +sys_mbind_wrapper: + str r5, [sp, #4] + b sys_mbind + +sys_ipc_wrapper: + str r5, [sp, #4] @ push sixth arg + b sys_ipc + /* * Note: off_4k (r5) is always units of 4K. If we can't do the requested * offset, we return EINVAL. diff --git a/trunk/arch/i386/pci/Makefile b/trunk/arch/i386/pci/Makefile index 5461d4d5ea1e..ead6122dd06d 100644 --- a/trunk/arch/i386/pci/Makefile +++ b/trunk/arch/i386/pci/Makefile @@ -1,7 +1,7 @@ obj-y := i386.o obj-$(CONFIG_PCI_BIOS) += pcbios.o -obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o direct.o +obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o obj-$(CONFIG_PCI_DIRECT) += direct.o pci-y := fixup.o diff --git a/trunk/arch/powerpc/configs/cell_defconfig b/trunk/arch/powerpc/configs/cell_defconfig index b657f7e44762..4b433411b9e3 100644 --- a/trunk/arch/powerpc/configs/cell_defconfig +++ b/trunk/arch/powerpc/configs/cell_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.15-rc5 -# Tue Dec 20 15:59:26 2005 +# Linux kernel version: 2.6.15-rc1 +# Tue Nov 15 14:36:20 2005 # CONFIG_PPC64=y CONFIG_64BIT=y @@ -53,7 +53,6 @@ CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set # CONFIG_CPUSETS is not set CONFIG_INITRAMFS_SOURCE="" -CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set @@ -152,7 +151,7 @@ CONFIG_FLATMEM_MANUAL=y CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_SPLIT_PTLOCK_CPUS=4096 # CONFIG_PPC_64K_PAGES is not set CONFIG_SCHED_SMT=y CONFIG_PROC_DEVICETREE=y diff --git a/trunk/arch/powerpc/configs/g5_defconfig b/trunk/arch/powerpc/configs/g5_defconfig index 3c22ccb18519..e7c23e3902b8 100644 --- a/trunk/arch/powerpc/configs/g5_defconfig +++ b/trunk/arch/powerpc/configs/g5_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.15-rc5 -# Tue Dec 20 15:59:30 2005 +# Linux kernel version: 2.6.15-rc1 +# Tue Nov 15 14:39:20 2005 # CONFIG_PPC64=y CONFIG_64BIT=y @@ -53,7 +53,6 @@ CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y # CONFIG_CPUSETS is not set CONFIG_INITRAMFS_SOURCE="" -CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set @@ -163,7 +162,7 @@ CONFIG_FLATMEM_MANUAL=y CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_SPLIT_PTLOCK_CPUS=4096 # CONFIG_PPC_64K_PAGES is not set # CONFIG_SCHED_SMT is not set CONFIG_PROC_DEVICETREE=y @@ -1204,7 +1203,6 @@ CONFIG_USB_MON=y CONFIG_USB_SERIAL=m CONFIG_USB_SERIAL_GENERIC=y # CONFIG_USB_SERIAL_AIRPRIME is not set -# CONFIG_USB_SERIAL_ANYDATA is not set CONFIG_USB_SERIAL_BELKIN=m CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m # CONFIG_USB_SERIAL_CP2101 is not set @@ -1235,6 +1233,7 @@ CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y CONFIG_USB_SERIAL_KLSI=m CONFIG_USB_SERIAL_KOBIL_SCT=m CONFIG_USB_SERIAL_MCT_U232=m +# CONFIG_USB_SERIAL_NOKIA_DKU2 is not set CONFIG_USB_SERIAL_PL2303=m # CONFIG_USB_SERIAL_HP4X is not set CONFIG_USB_SERIAL_SAFE=m diff --git a/trunk/arch/powerpc/configs/iseries_defconfig b/trunk/arch/powerpc/configs/iseries_defconfig index 751a622fb7a7..5d0866707a75 100644 --- a/trunk/arch/powerpc/configs/iseries_defconfig +++ b/trunk/arch/powerpc/configs/iseries_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.15-rc5 -# Tue Dec 20 15:59:32 2005 +# Linux kernel version: 2.6.15-rc1 +# Tue Nov 15 14:38:09 2005 # CONFIG_PPC64=y CONFIG_64BIT=y @@ -55,7 +55,6 @@ CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y # CONFIG_CPUSETS is not set CONFIG_INITRAMFS_SOURCE="" -CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set @@ -145,7 +144,7 @@ CONFIG_FLATMEM_MANUAL=y CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_SPLIT_PTLOCK_CPUS=4096 # CONFIG_PPC_64K_PAGES is not set # CONFIG_SCHED_SMT is not set CONFIG_PROC_DEVICETREE=y diff --git a/trunk/arch/powerpc/configs/maple_defconfig b/trunk/arch/powerpc/configs/maple_defconfig index 07b6d3d23360..92e42613ef06 100644 --- a/trunk/arch/powerpc/configs/maple_defconfig +++ b/trunk/arch/powerpc/configs/maple_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.15-rc5 -# Tue Dec 20 15:59:36 2005 +# Linux kernel version: 2.6.15-rc1 +# Tue Nov 15 14:38:58 2005 # CONFIG_PPC64=y CONFIG_64BIT=y @@ -53,7 +53,6 @@ CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y # CONFIG_CPUSETS is not set CONFIG_INITRAMFS_SOURCE="" -CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y CONFIG_KALLSYMS_ALL=y @@ -150,7 +149,7 @@ CONFIG_FLATMEM_MANUAL=y CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_SPLIT_PTLOCK_CPUS=4096 # CONFIG_PPC_64K_PAGES is not set # CONFIG_SCHED_SMT is not set CONFIG_PROC_DEVICETREE=y @@ -243,6 +242,7 @@ CONFIG_TCP_CONG_BIC=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -794,7 +794,6 @@ CONFIG_USB_SERIAL=y # CONFIG_USB_SERIAL_CONSOLE is not set CONFIG_USB_SERIAL_GENERIC=y # CONFIG_USB_SERIAL_AIRPRIME is not set -# CONFIG_USB_SERIAL_ANYDATA is not set # CONFIG_USB_SERIAL_BELKIN is not set # CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set # CONFIG_USB_SERIAL_CP2101 is not set @@ -825,6 +824,7 @@ CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y # CONFIG_USB_SERIAL_KLSI is not set # CONFIG_USB_SERIAL_KOBIL_SCT is not set # CONFIG_USB_SERIAL_MCT_U232 is not set +# CONFIG_USB_SERIAL_NOKIA_DKU2 is not set # CONFIG_USB_SERIAL_PL2303 is not set # CONFIG_USB_SERIAL_HP4X is not set # CONFIG_USB_SERIAL_SAFE is not set diff --git a/trunk/arch/powerpc/configs/ppc64_defconfig b/trunk/arch/powerpc/configs/ppc64_defconfig index 509399eab6f5..b5ba3bbd96fb 100644 --- a/trunk/arch/powerpc/configs/ppc64_defconfig +++ b/trunk/arch/powerpc/configs/ppc64_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.15-rc5 -# Tue Dec 20 15:59:38 2005 +# Linux kernel version: 2.6.15-rc1 +# Fri Nov 18 16:23:24 2005 # CONFIG_PPC64=y CONFIG_64BIT=y @@ -54,7 +54,6 @@ CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_CPUSETS=y CONFIG_INITRAMFS_SOURCE="" -CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y CONFIG_KALLSYMS_ALL=y @@ -177,7 +176,7 @@ CONFIG_HAVE_MEMORY_PRESENT=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPARSEMEM_EXTREME=y # CONFIG_MEMORY_HOTPLUG is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_SPLIT_PTLOCK_CPUS=4096 # CONFIG_PPC_64K_PAGES is not set # CONFIG_SCHED_SMT is not set CONFIG_PROC_DEVICETREE=y diff --git a/trunk/arch/powerpc/configs/pseries_defconfig b/trunk/arch/powerpc/configs/pseries_defconfig index a50ce0fa9243..b589b196eb3f 100644 --- a/trunk/arch/powerpc/configs/pseries_defconfig +++ b/trunk/arch/powerpc/configs/pseries_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.15-rc5 -# Tue Dec 20 15:59:40 2005 +# Linux kernel version: 2.6.15-rc1 +# Tue Nov 15 14:36:55 2005 # CONFIG_PPC64=y CONFIG_64BIT=y @@ -55,7 +55,6 @@ CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_CPUSETS=y CONFIG_INITRAMFS_SOURCE="" -CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y CONFIG_KALLSYMS_ALL=y @@ -164,7 +163,7 @@ CONFIG_HAVE_MEMORY_PRESENT=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPARSEMEM_EXTREME=y # CONFIG_MEMORY_HOTPLUG is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_SPLIT_PTLOCK_CPUS=4096 CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y # CONFIG_PPC_64K_PAGES is not set CONFIG_SCHED_SMT=y diff --git a/trunk/arch/powerpc/kernel/entry_64.S b/trunk/arch/powerpc/kernel/entry_64.S index bce33a38399f..2d22bf03484e 100644 --- a/trunk/arch/powerpc/kernel/entry_64.S +++ b/trunk/arch/powerpc/kernel/entry_64.S @@ -183,8 +183,8 @@ syscall_exit_trace_cont: ld r13,GPR13(r1) /* returning to usermode */ 1: ld r2,GPR2(r1) li r12,MSR_RI - andc r11,r10,r12 - mtmsrd r11,1 /* clear MSR.RI */ + andc r10,r10,r12 + mtmsrd r10,1 /* clear MSR.RI */ ld r1,GPR1(r1) mtlr r4 mtcr r5 diff --git a/trunk/arch/powerpc/platforms/pseries/xics.c b/trunk/arch/powerpc/platforms/pseries/xics.c index 0377decc0719..72ac18067ece 100644 --- a/trunk/arch/powerpc/platforms/pseries/xics.c +++ b/trunk/arch/powerpc/platforms/pseries/xics.c @@ -48,6 +48,11 @@ static struct hw_interrupt_type xics_pic = { .set_affinity = xics_set_affinity }; +static struct hw_interrupt_type xics_8259_pic = { + .typename = " XICS/8259", + .ack = xics_mask_and_ack_irq, +}; + /* This is used to map real irq numbers to virtual */ static struct radix_tree_root irq_map = RADIX_TREE_INIT(GFP_ATOMIC); @@ -362,7 +367,12 @@ int xics_get_irq(struct pt_regs *regs) /* for sanity, this had better be < NR_IRQS - 16 */ if (vec == xics_irq_8259_cascade_real) { irq = i8259_irq(regs); - xics_end_irq(irq_offset_up(xics_irq_8259_cascade)); + if (irq == -1) { + /* Spurious cascaded interrupt. Still must ack xics */ + xics_end_irq(irq_offset_up(xics_irq_8259_cascade)); + + irq = -1; + } } else if (vec == XICS_IRQ_SPURIOUS) { irq = -1; } else { @@ -532,7 +542,6 @@ void xics_init_IRQ(void) xics_irq_8259_cascade_real = *ireg; xics_irq_8259_cascade = virt_irq_create_mapping(xics_irq_8259_cascade_real); - i8259_init(0, 0); of_node_put(np); } @@ -556,7 +565,12 @@ void xics_init_IRQ(void) #endif /* CONFIG_SMP */ } - for (i = irq_offset_value(); i < NR_IRQS; ++i) + xics_8259_pic.enable = i8259_pic.enable; + xics_8259_pic.disable = i8259_pic.disable; + xics_8259_pic.end = i8259_pic.end; + for (i = 0; i < 16; ++i) + get_irq_desc(i)->handler = &xics_8259_pic; + for (; i < NR_IRQS; ++i) get_irq_desc(i)->handler = &xics_pic; xics_setup_cpu(); @@ -576,6 +590,7 @@ static int __init xics_setup_i8259(void) no_action, 0, "8259 cascade", NULL)) printk(KERN_ERR "xics_setup_i8259: couldn't get 8259 " "cascade\n"); + i8259_init(0, 0); } return 0; } diff --git a/trunk/arch/ppc/platforms/85xx/mpc85xx_cds_common.c b/trunk/arch/ppc/platforms/85xx/mpc85xx_cds_common.c index 5e8cc5ec6ab5..d8991b88dc9c 100644 --- a/trunk/arch/ppc/platforms/85xx/mpc85xx_cds_common.c +++ b/trunk/arch/ppc/platforms/85xx/mpc85xx_cds_common.c @@ -130,11 +130,10 @@ mpc85xx_cds_show_cpuinfo(struct seq_file *m) } #ifdef CONFIG_CPM2 -static irqreturn_t cpm2_cascade(int irq, void *dev_id, struct pt_regs *regs) +static void cpm2_cascade(int irq, void *dev_id, struct pt_regs *regs) { while((irq = cpm2_get_irq(regs)) >= 0) __do_IRQ(irq, regs); - return IRQ_HANDLED; } static struct irqaction cpm2_irqaction = { diff --git a/trunk/arch/sparc/Kconfig b/trunk/arch/sparc/Kconfig index 56c34e7fd4ee..3cfb8be3ff6d 100644 --- a/trunk/arch/sparc/Kconfig +++ b/trunk/arch/sparc/Kconfig @@ -55,10 +55,6 @@ config NR_CPUS depends on SMP default "32" -config SPARC - bool - default y - # Identify this as a Sparc32 build config SPARC32 bool diff --git a/trunk/arch/sparc/kernel/sys_sunos.c b/trunk/arch/sparc/kernel/sys_sunos.c index d07ae02101ad..81c894acd0db 100644 --- a/trunk/arch/sparc/kernel/sys_sunos.c +++ b/trunk/arch/sparc/kernel/sys_sunos.c @@ -894,7 +894,7 @@ asmlinkage long sunos_sysconf (int name) ret = ARG_MAX; break; case _SC_CHILD_MAX: - ret = -1; /* no limit */ + ret = CHILD_MAX; break; case _SC_CLK_TCK: ret = HZ; diff --git a/trunk/arch/sparc64/Kconfig b/trunk/arch/sparc64/Kconfig index c4b7ad70cd7c..3fded69b1922 100644 --- a/trunk/arch/sparc64/Kconfig +++ b/trunk/arch/sparc64/Kconfig @@ -5,10 +5,6 @@ mainmenu "Linux/UltraSPARC Kernel Configuration" -config SPARC - bool - default y - config SPARC64 bool default y diff --git a/trunk/arch/sparc64/Makefile b/trunk/arch/sparc64/Makefile index cad10c5b83d3..43fe382da078 100644 --- a/trunk/arch/sparc64/Makefile +++ b/trunk/arch/sparc64/Makefile @@ -17,6 +17,7 @@ CC := $(shell if $(CC) -m64 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then NEW_GCC := $(call cc-option-yn, -m64 -mcmodel=medlow) NEW_GAS := $(shell if $(LD) -V 2>&1 | grep 'elf64_sparc' > /dev/null; then echo y; else echo n; fi) UNDECLARED_REGS := $(shell if $(CC) -c -x assembler /dev/null -Wa,--help | grep undeclared-regs > /dev/null; then echo y; else echo n; fi; ) +INLINE_LIMIT := $(call cc-option-yn, -m64 -finline-limit=100000) export NEW_GCC @@ -48,6 +49,10 @@ else AFLAGS += -m64 -mcpu=ultrasparc $(CC_UNDECL) endif +ifeq ($(INLINE_LIMIT),y) + CFLAGS := $(CFLAGS) -finline-limit=100000 +endif + ifeq ($(CONFIG_MCOUNT),y) CFLAGS := $(CFLAGS) -pg endif diff --git a/trunk/arch/sparc64/kernel/sys_sunos32.c b/trunk/arch/sparc64/kernel/sys_sunos32.c index bfa4aa68312d..d0592ed54ea5 100644 --- a/trunk/arch/sparc64/kernel/sys_sunos32.c +++ b/trunk/arch/sparc64/kernel/sys_sunos32.c @@ -854,7 +854,7 @@ asmlinkage s32 sunos_sysconf (int name) ret = ARG_MAX; break; case _SC_CHILD_MAX: - ret = -1; /* no limit */ + ret = CHILD_MAX; break; case _SC_CLK_TCK: ret = HZ; diff --git a/trunk/arch/sparc64/solaris/misc.c b/trunk/arch/sparc64/solaris/misc.c index 3ab4677395f2..302efbcba70e 100644 --- a/trunk/arch/sparc64/solaris/misc.c +++ b/trunk/arch/sparc64/solaris/misc.c @@ -353,7 +353,7 @@ asmlinkage int solaris_sysconf(int id) { switch (id) { case SOLARIS_CONFIG_NGROUPS: return NGROUPS_MAX; - case SOLARIS_CONFIG_CHILD_MAX: return -1; /* no limit */ + case SOLARIS_CONFIG_CHILD_MAX: return CHILD_MAX; case SOLARIS_CONFIG_OPEN_FILES: return OPEN_MAX; case SOLARIS_CONFIG_POSIX_VER: return 199309; case SOLARIS_CONFIG_PAGESIZE: return PAGE_SIZE; diff --git a/trunk/arch/x86_64/pci/Makefile b/trunk/arch/x86_64/pci/Makefile index a8f75a2a0f6f..bb34e5ef916c 100644 --- a/trunk/arch/x86_64/pci/Makefile +++ b/trunk/arch/x86_64/pci/Makefile @@ -11,7 +11,7 @@ obj-y += fixup.o obj-$(CONFIG_ACPI) += acpi.o obj-y += legacy.o irq.o common.o # mmconfig has a 64bit special -obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o direct.o +obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o obj-$(CONFIG_NUMA) += k8-bus.o diff --git a/trunk/block/scsi_ioctl.c b/trunk/block/scsi_ioctl.c index 6e7db2e79f42..382dea7b224c 100644 --- a/trunk/block/scsi_ioctl.c +++ b/trunk/block/scsi_ioctl.c @@ -442,37 +442,11 @@ static int sg_scsi_ioctl(struct file *file, request_queue_t *q, return err; } - -/* Send basic block requests */ -static int __blk_send_generic(request_queue_t *q, struct gendisk *bd_disk, int cmd, int data) -{ - struct request *rq; - int err; - - rq = blk_get_request(q, WRITE, __GFP_WAIT); - rq->flags |= REQ_BLOCK_PC; - rq->data = NULL; - rq->data_len = 0; - rq->timeout = BLK_DEFAULT_TIMEOUT; - memset(rq->cmd, 0, sizeof(rq->cmd)); - rq->cmd[0] = cmd; - rq->cmd[4] = data; - rq->cmd_len = 6; - err = blk_execute_rq(q, bd_disk, rq, 0); - blk_put_request(rq); - - return err; -} - -static inline int blk_send_start_stop(request_queue_t *q, struct gendisk *bd_disk, int data) -{ - return __blk_send_generic(q, bd_disk, GPCMD_START_STOP_UNIT, data); -} - int scsi_cmd_ioctl(struct file *file, struct gendisk *bd_disk, unsigned int cmd, void __user *arg) { request_queue_t *q; - int err; + struct request *rq; + int close = 0, err; q = bd_disk->queue; if (!q) @@ -590,10 +564,19 @@ int scsi_cmd_ioctl(struct file *file, struct gendisk *bd_disk, unsigned int cmd, err = sg_scsi_ioctl(file, q, bd_disk, arg); break; case CDROMCLOSETRAY: - err = blk_send_start_stop(q, bd_disk, 0x03); - break; + close = 1; case CDROMEJECT: - err = blk_send_start_stop(q, bd_disk, 0x02); + rq = blk_get_request(q, WRITE, __GFP_WAIT); + rq->flags |= REQ_BLOCK_PC; + rq->data = NULL; + rq->data_len = 0; + rq->timeout = BLK_DEFAULT_TIMEOUT; + memset(rq->cmd, 0, sizeof(rq->cmd)); + rq->cmd[0] = GPCMD_START_STOP_UNIT; + rq->cmd[4] = 0x02 + (close != 0); + rq->cmd_len = 6; + err = blk_execute_rq(q, bd_disk, rq, 0); + blk_put_request(rq); break; default: err = -ENOTTY; diff --git a/trunk/drivers/acpi/processor_idle.c b/trunk/drivers/acpi/processor_idle.c index 807b0df308f1..5f51057518b0 100644 --- a/trunk/drivers/acpi/processor_idle.c +++ b/trunk/drivers/acpi/processor_idle.c @@ -274,6 +274,8 @@ static void acpi_processor_idle(void) } } + cx->usage++; + #ifdef CONFIG_HOTPLUG_CPU /* * Check for P_LVL2_UP flag before entering C2 and above on @@ -281,12 +283,9 @@ static void acpi_processor_idle(void) * detection phase, to work cleanly with logical CPU hotplug. */ if ((cx->type != ACPI_STATE_C1) && (num_online_cpus() > 1) && - !pr->flags.has_cst && !acpi_fadt.plvl2_up) - cx = &pr->power.states[ACPI_STATE_C1]; + !pr->flags.has_cst && acpi_fadt.plvl2_up) + cx->type = ACPI_STATE_C1; #endif - - cx->usage++; - /* * Sleep: * ------ @@ -387,15 +386,6 @@ static void acpi_processor_idle(void) next_state = pr->power.state; -#ifdef CONFIG_HOTPLUG_CPU - /* Don't do promotion/demotion */ - if ((cx->type == ACPI_STATE_C1) && (num_online_cpus() > 1) && - !pr->flags.has_cst && !acpi_fadt.plvl2_up) { - next_state = cx; - goto end; - } -#endif - /* * Promotion? * ---------- @@ -567,7 +557,7 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr) * Check for P_LVL2_UP flag before entering C2 and above on * an SMP system. */ - if ((num_online_cpus() > 1) && !acpi_fadt.plvl2_up) + if ((num_online_cpus() > 1) && acpi_fadt.plvl2_up) return_VALUE(-ENODEV); #endif diff --git a/trunk/drivers/acpi/processor_thermal.c b/trunk/drivers/acpi/processor_thermal.c index dc9817cfb882..f37584015324 100644 --- a/trunk/drivers/acpi/processor_thermal.c +++ b/trunk/drivers/acpi/processor_thermal.c @@ -102,8 +102,8 @@ static int cpu_has_cpufreq(unsigned int cpu) { struct cpufreq_policy policy; if (!acpi_thermal_cpufreq_is_init || cpufreq_get_policy(&policy, cpu)) - return 0; - return 1; + return -ENODEV; + return 0; } static int acpi_thermal_cpufreq_increase(unsigned int cpu) diff --git a/trunk/drivers/acpi/utilities/utmisc.c b/trunk/drivers/acpi/utilities/utmisc.c index 2ce872d75890..0c5abc536c7a 100644 --- a/trunk/drivers/acpi/utilities/utmisc.c +++ b/trunk/drivers/acpi/utilities/utmisc.c @@ -84,14 +84,14 @@ acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id) /* Find a free owner ID */ - for (i = 0; i < 64; i++) { - if (!(acpi_gbl_owner_id_mask & (1ULL << i))) { + for (i = 0; i < 32; i++) { + if (!(acpi_gbl_owner_id_mask & (1 << i))) { ACPI_DEBUG_PRINT((ACPI_DB_VALUES, - "Current owner_id mask: %16.16LX New ID: %2.2X\n", + "Current owner_id mask: %8.8X New ID: %2.2X\n", acpi_gbl_owner_id_mask, (unsigned int)(i + 1))); - acpi_gbl_owner_id_mask |= (1ULL << i); + acpi_gbl_owner_id_mask |= (1 << i); *owner_id = (acpi_owner_id) (i + 1); goto exit; } @@ -106,7 +106,7 @@ acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id) */ *owner_id = 0; status = AE_OWNER_ID_LIMIT; - ACPI_REPORT_ERROR(("Could not allocate new owner_id (64 max), AE_OWNER_ID_LIMIT\n")); + ACPI_REPORT_ERROR(("Could not allocate new owner_id (32 max), AE_OWNER_ID_LIMIT\n")); exit: (void)acpi_ut_release_mutex(ACPI_MTX_CACHES); @@ -123,7 +123,7 @@ acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id) * control method or unloading a table. Either way, we would * ignore any error anyway. * - * DESCRIPTION: Release a table or method owner ID. Valid IDs are 1 - 64 + * DESCRIPTION: Release a table or method owner ID. Valid IDs are 1 - 32 * ******************************************************************************/ @@ -140,7 +140,7 @@ void acpi_ut_release_owner_id(acpi_owner_id * owner_id_ptr) /* Zero is not a valid owner_iD */ - if ((owner_id == 0) || (owner_id > 64)) { + if ((owner_id == 0) || (owner_id > 32)) { ACPI_REPORT_ERROR(("Invalid owner_id: %2.2X\n", owner_id)); return_VOID; } @@ -158,8 +158,8 @@ void acpi_ut_release_owner_id(acpi_owner_id * owner_id_ptr) /* Free the owner ID only if it is valid */ - if (acpi_gbl_owner_id_mask & (1ULL << owner_id)) { - acpi_gbl_owner_id_mask ^= (1ULL << owner_id); + if (acpi_gbl_owner_id_mask & (1 << owner_id)) { + acpi_gbl_owner_id_mask ^= (1 << owner_id); } (void)acpi_ut_release_mutex(ACPI_MTX_CACHES); diff --git a/trunk/drivers/char/Kconfig b/trunk/drivers/char/Kconfig index 84e68cdd451b..b46a72d782d6 100644 --- a/trunk/drivers/char/Kconfig +++ b/trunk/drivers/char/Kconfig @@ -687,7 +687,7 @@ config NVRAM config RTC tristate "Enhanced Real Time Clock Support" - depends on !PPC32 && !PARISC && !IA64 && !M68K && (!SPARC || PCI) + depends on !PPC32 && !PARISC && !IA64 && !M68K ---help--- If you say Y here and create a character special file /dev/rtc with major number 10 and minor number 135 using mknod ("man mknod"), you @@ -735,7 +735,7 @@ config SGI_IP27_RTC config GEN_RTC tristate "Generic /dev/rtc emulation" - depends on RTC!=y && !IA64 && !ARM && !M32R && !SPARC + depends on RTC!=y && !IA64 && !ARM && !M32R && !SPARC32 && !SPARC64 ---help--- If you say Y here and create a character special file /dev/rtc with major number 10 and minor number 135 using mknod ("man mknod"), you diff --git a/trunk/drivers/char/keyboard.c b/trunk/drivers/char/keyboard.c index 8b603b2d1c42..449d029ad4f4 100644 --- a/trunk/drivers/char/keyboard.c +++ b/trunk/drivers/char/keyboard.c @@ -930,8 +930,8 @@ static void kbd_refresh_leds(struct input_handle *handle) } #if defined(CONFIG_X86) || defined(CONFIG_IA64) || defined(CONFIG_ALPHA) ||\ - defined(CONFIG_MIPS) || defined(CONFIG_PPC) || defined(CONFIG_SPARC) ||\ - defined(CONFIG_PARISC) || defined(CONFIG_SUPERH) ||\ + defined(CONFIG_MIPS) || defined(CONFIG_PPC) || defined(CONFIG_SPARC32) ||\ + defined(CONFIG_SPARC64) || defined(CONFIG_PARISC) || defined(CONFIG_SUPERH) ||\ (defined(CONFIG_ARM) && defined(CONFIG_KEYBOARD_ATKBD) && !defined(CONFIG_ARCH_RPC)) #define HW_RAW(dev) (test_bit(EV_MSC, dev->evbit) && test_bit(MSC_RAW, dev->mscbit) &&\ @@ -958,7 +958,7 @@ static unsigned short x86_keycodes[256] = extern int mac_hid_mouse_emulate_buttons(int, int, int); #endif /* CONFIG_MAC_EMUMOUSEBTN */ -#ifdef CONFIG_SPARC +#if defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64) static int sparc_l1_a_state = 0; extern void sun_do_break(void); #endif @@ -1045,7 +1045,7 @@ static void kbd_keycode(unsigned int keycode, int down, if (keycode == KEY_LEFTALT || keycode == KEY_RIGHTALT) sysrq_alt = down; -#ifdef CONFIG_SPARC +#if defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64) if (keycode == KEY_STOP) sparc_l1_a_state = down; #endif @@ -1072,7 +1072,7 @@ static void kbd_keycode(unsigned int keycode, int down, return; } #endif -#ifdef CONFIG_SPARC +#if defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64) if (keycode == KEY_A && sparc_l1_a_state) { sparc_l1_a_state = 0; sun_do_break(); diff --git a/trunk/drivers/fc4/Kconfig b/trunk/drivers/fc4/Kconfig index 345dbe6f10df..f00c02a13ed6 100644 --- a/trunk/drivers/fc4/Kconfig +++ b/trunk/drivers/fc4/Kconfig @@ -26,7 +26,7 @@ comment "FC4 drivers" config FC4_SOC tristate "Sun SOC/Sbus" - depends on FC4!=n && SPARC + depends on FC4!=n && (SPARC32 || SPARC64) help Serial Optical Channel is an interface card with one or two Fibre Optic ports, each of which can be connected to a disk array. Note @@ -38,7 +38,7 @@ config FC4_SOC config FC4_SOCAL tristate "Sun SOC+ (aka SOCAL)" - depends on FC4!=n && SPARC + depends on FC4!=n && (SPARC32 || SPARC64) ---help--- Serial Optical Channel Plus is an interface card with up to two Fibre Optic ports. This card supports FC Arbitrated Loop (usually @@ -62,7 +62,7 @@ config SCSI_PLUTO be called pluto. config SCSI_FCAL - tristate "Sun Enterprise Network Array (A5000 and EX500)" if SPARC + tristate "Sun Enterprise Network Array (A5000 and EX500)" if SPARC32 || SPARC64 depends on FC4!=n && SCSI help This driver drives FC-AL disks connected through a Fibre Channel @@ -75,7 +75,7 @@ config SCSI_FCAL config SCSI_FCAL prompt "Generic FC-AL disk driver" - depends on FC4!=n && SCSI && !SPARC + depends on FC4!=n && SCSI && !SPARC32 && !SPARC64 endmenu diff --git a/trunk/drivers/input/misc/Kconfig b/trunk/drivers/input/misc/Kconfig index e08dbe08f46d..07813fc0523f 100644 --- a/trunk/drivers/input/misc/Kconfig +++ b/trunk/drivers/input/misc/Kconfig @@ -26,7 +26,7 @@ config INPUT_PCSPKR config INPUT_SPARCSPKR tristate "SPARC Speaker support" - depends on PCI && SPARC + depends on PCI && (SPARC32 || SPARC64) help Say Y here if you want the standard Speaker on Sparc PCI systems to be used for bells and whistles. diff --git a/trunk/drivers/input/serio/i8042.h b/trunk/drivers/input/serio/i8042.h index cbbf3842da5b..13835039a2a7 100644 --- a/trunk/drivers/input/serio/i8042.h +++ b/trunk/drivers/input/serio/i8042.h @@ -21,7 +21,7 @@ #include "i8042-ip22io.h" #elif defined(CONFIG_PPC) #include "i8042-ppcio.h" -#elif defined(CONFIG_SPARC) +#elif defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64) #include "i8042-sparcio.h" #elif defined(CONFIG_X86) || defined(CONFIG_IA64) #include "i8042-x86ia64io.h" diff --git a/trunk/drivers/macintosh/therm_pm72.c b/trunk/drivers/macintosh/therm_pm72.c index 5bb36274a5c6..3fc8cdd94c3d 100644 --- a/trunk/drivers/macintosh/therm_pm72.c +++ b/trunk/drivers/macintosh/therm_pm72.c @@ -933,7 +933,7 @@ static void do_monitor_cpu_combined(void) if (state0->overtemp > 0) { state0->rpm = state0->mpu.rmaxn_exhaust_fan; state0->intake_rpm = intake = state0->mpu.rmaxn_intake_fan; - pump = state0->pump_max; + pump = state0->pump_min; goto do_set_fans; } diff --git a/trunk/drivers/md/md.c b/trunk/drivers/md/md.c index 8175a2a222da..cd12fca73b0d 100644 --- a/trunk/drivers/md/md.c +++ b/trunk/drivers/md/md.c @@ -1729,7 +1729,7 @@ level_show(mddev_t *mddev, char *page) if (p == NULL && mddev->raid_disks == 0) return 0; if (mddev->level >= 0) - return sprintf(page, "raid%d\n", mddev->level); + return sprintf(page, "RAID-%d\n", mddev->level); else return sprintf(page, "%s\n", p->name); } diff --git a/trunk/drivers/media/dvb/ttpci/av7110.c b/trunk/drivers/media/dvb/ttpci/av7110.c index 7dae91e5863c..992be0be6b1e 100644 --- a/trunk/drivers/media/dvb/ttpci/av7110.c +++ b/trunk/drivers/media/dvb/ttpci/av7110.c @@ -176,9 +176,6 @@ static void init_av7110_av(struct av7110 *av7110) } } - if (dev->pci->subsystem_vendor == 0x13c2 && dev->pci->subsystem_device == 0x000e) - av7110_fw_cmd(av7110, COMTYPE_AUDIODAC, SpdifSwitch, 1, 0); // SPDIF on - ret = av7110_set_volume(av7110, av7110->mixer.volume_left, av7110->mixer.volume_right); if (ret < 0) printk("dvb-ttpci:cannot set volume :%d\n",ret); diff --git a/trunk/drivers/media/dvb/ttpci/av7110_hw.h b/trunk/drivers/media/dvb/ttpci/av7110_hw.h index 2a5e87ba1052..fedd20f9815d 100644 --- a/trunk/drivers/media/dvb/ttpci/av7110_hw.h +++ b/trunk/drivers/media/dvb/ttpci/av7110_hw.h @@ -143,8 +143,7 @@ enum av7110_audio_command { MainSwitch, ADSwitch, SendDiSEqC, - SetRegister, - SpdifSwitch + SetRegister }; enum av7110_request_command { diff --git a/trunk/drivers/media/video/cx25840/cx25840-core.c b/trunk/drivers/media/video/cx25840/cx25840-core.c index 5b93723a1768..aea3f038cff6 100644 --- a/trunk/drivers/media/video/cx25840/cx25840-core.c +++ b/trunk/drivers/media/video/cx25840/cx25840-core.c @@ -333,30 +333,24 @@ static int set_input(struct i2c_client *client, enum cx25840_input input) static int set_v4lstd(struct i2c_client *client, v4l2_std_id std) { - u8 fmt=0; /* zero is autodetect */ - - /* First tests should be against specific std */ - if (std & V4L2_STD_NTSC_M_JP) { - fmt=0x2; - } else if (std & V4L2_STD_NTSC_443) { - fmt=0x3; - } else if (std & V4L2_STD_PAL_M) { - fmt=0x5; - } else if (std & V4L2_STD_PAL_N) { - fmt=0x6; - } else if (std & V4L2_STD_PAL_Nc) { - fmt=0x7; - } else if (std & V4L2_STD_PAL_60) { - fmt=0x8; - } else { - /* Then, test against generic ones */ - if (std & V4L2_STD_NTSC) { - fmt=0x1; - } else if (std & V4L2_STD_PAL) { - fmt=0x4; - } else if (std & V4L2_STD_SECAM) { - fmt=0xc; - } + u8 fmt; + + switch (std) { + /* zero is autodetect */ + case 0: fmt = 0x0; break; + /* default ntsc to ntsc-m */ + case V4L2_STD_NTSC: + case V4L2_STD_NTSC_M: fmt = 0x1; break; + case V4L2_STD_NTSC_M_JP: fmt = 0x2; break; + case V4L2_STD_NTSC_443: fmt = 0x3; break; + case V4L2_STD_PAL: fmt = 0x4; break; + case V4L2_STD_PAL_M: fmt = 0x5; break; + case V4L2_STD_PAL_N: fmt = 0x6; break; + case V4L2_STD_PAL_Nc: fmt = 0x7; break; + case V4L2_STD_PAL_60: fmt = 0x8; break; + case V4L2_STD_SECAM: fmt = 0xc; break; + default: + return -ERANGE; } cx25840_and_or(client, 0x400, ~0xf, fmt); diff --git a/trunk/drivers/media/video/em28xx/em28xx-core.c b/trunk/drivers/media/video/em28xx/em28xx-core.c index 0cfe75416ec6..ec11619f8ea9 100644 --- a/trunk/drivers/media/video/em28xx/em28xx-core.c +++ b/trunk/drivers/media/video/em28xx/em28xx-core.c @@ -39,7 +39,7 @@ MODULE_PARM_DESC(core_debug,"enable debug messages [core]"); #define em28xx_coredbg(fmt, arg...) do {\ if (core_debug) \ printk(KERN_INFO "%s %s :"fmt, \ - dev->name, __FUNCTION__ , ##arg); } while (0) + dev->name, __FUNCTION__, ##arg); } while (0) static unsigned int reg_debug; module_param(reg_debug,int,0644); @@ -48,7 +48,7 @@ MODULE_PARM_DESC(reg_debug,"enable debug messages [URB reg]"); #define em28xx_regdbg(fmt, arg...) do {\ if (reg_debug) \ printk(KERN_INFO "%s %s :"fmt, \ - dev->name, __FUNCTION__ , ##arg); } while (0) + dev->name, __FUNCTION__, ##arg); } while (0) static unsigned int isoc_debug; module_param(isoc_debug,int,0644); @@ -57,7 +57,7 @@ MODULE_PARM_DESC(isoc_debug,"enable debug messages [isoc transfers]"); #define em28xx_isocdbg(fmt, arg...) do {\ if (isoc_debug) \ printk(KERN_INFO "%s %s :"fmt, \ - dev->name, __FUNCTION__ , ##arg); } while (0) + dev->name, __FUNCTION__, ##arg); } while (0) static int alt = EM28XX_PINOUT; module_param(alt, int, 0644); diff --git a/trunk/drivers/media/video/em28xx/em28xx-i2c.c b/trunk/drivers/media/video/em28xx/em28xx-i2c.c index 7f5603054f02..29e21ad187cc 100644 --- a/trunk/drivers/media/video/em28xx/em28xx-i2c.c +++ b/trunk/drivers/media/video/em28xx/em28xx-i2c.c @@ -44,7 +44,7 @@ MODULE_PARM_DESC(i2c_debug, "enable debug messages [i2c]"); printk(fmt, ##args); } while (0) #define dprintk2(lvl,fmt, args...) if (i2c_debug>=lvl) do{ \ printk(KERN_DEBUG "%s at %s: " fmt, \ - dev->name, __FUNCTION__ , ##args); } while (0) + dev->name, __FUNCTION__, ##args); } while (0) /* * em2800_i2c_send_max4() diff --git a/trunk/drivers/media/video/em28xx/em28xx-video.c b/trunk/drivers/media/video/em28xx/em28xx-video.c index 06d76879bde2..8ecaa0803e08 100644 --- a/trunk/drivers/media/video/em28xx/em28xx-video.c +++ b/trunk/drivers/media/video/em28xx/em28xx-video.c @@ -45,7 +45,7 @@ #define em28xx_videodbg(fmt, arg...) do {\ if (video_debug) \ printk(KERN_INFO "%s %s :"fmt, \ - dev->name, __FUNCTION__ , ##arg); } while (0) + dev->name, __FUNCTION__, ##arg); } while (0) MODULE_AUTHOR(DRIVER_AUTHOR); MODULE_DESCRIPTION(DRIVER_DESC); diff --git a/trunk/drivers/media/video/em28xx/em28xx.h b/trunk/drivers/media/video/em28xx/em28xx.h index 5c7a41ce69f3..1e2ee43db394 100644 --- a/trunk/drivers/media/video/em28xx/em28xx.h +++ b/trunk/drivers/media/video/em28xx/em28xx.h @@ -392,18 +392,18 @@ extern const unsigned int em28xx_bcount; /* printk macros */ #define em28xx_err(fmt, arg...) do {\ - printk(KERN_ERR fmt , ##arg); } while (0) + printk(KERN_ERR fmt, ##arg); } while (0) #define em28xx_errdev(fmt, arg...) do {\ printk(KERN_ERR "%s: "fmt,\ - dev->name , ##arg); } while (0) + dev->name, ##arg); } while (0) #define em28xx_info(fmt, arg...) do {\ printk(KERN_INFO "%s: "fmt,\ - dev->name , ##arg); } while (0) + dev->name, ##arg); } while (0) #define em28xx_warn(fmt, arg...) do {\ printk(KERN_WARNING "%s: "fmt,\ - dev->name , ##arg); } while (0) + dev->name, ##arg); } while (0) inline static int em28xx_audio_source(struct em28xx *dev, int input) { diff --git a/trunk/drivers/media/video/saa7127.c b/trunk/drivers/media/video/saa7127.c index c36f014f1fdf..3428e1ed0032 100644 --- a/trunk/drivers/media/video/saa7127.c +++ b/trunk/drivers/media/video/saa7127.c @@ -389,7 +389,7 @@ static int saa7127_set_vps(struct i2c_client *client, struct v4l2_sliced_vbi_dat static int saa7127_set_cc(struct i2c_client *client, struct v4l2_sliced_vbi_data *data) { struct saa7127_state *state = i2c_get_clientdata(client); - u16 cc = data->data[1] << 8 | data->data[0]; + u16 cc = data->data[0] << 8 | data->data[1]; int enable = (data->line != 0); if (enable && (data->field != 0 || data->line != 21)) @@ -397,7 +397,7 @@ static int saa7127_set_cc(struct i2c_client *client, struct v4l2_sliced_vbi_data if (state->cc_enable != enable) { saa7127_dbg("Turn CC %s\n", enable ? "on" : "off"); saa7127_write(client, SAA7127_REG_CLOSED_CAPTION, - (state->xds_enable << 7) | (enable << 6) | 0x11); + (enable << 6) | 0x11); state->cc_enable = enable; } if (!enable) @@ -423,7 +423,7 @@ static int saa7127_set_xds(struct i2c_client *client, struct v4l2_sliced_vbi_dat if (state->xds_enable != enable) { saa7127_dbg("Turn XDS %s\n", enable ? "on" : "off"); saa7127_write(client, SAA7127_REG_CLOSED_CAPTION, - (enable << 7) | (state->cc_enable << 6) | 0x11); + (enable << 7) | 0x11); state->xds_enable = enable; } if (!enable) diff --git a/trunk/drivers/media/video/saa7134/Kconfig b/trunk/drivers/media/video/saa7134/Kconfig index c0f604a6fe42..c512c4411b38 100644 --- a/trunk/drivers/media/video/saa7134/Kconfig +++ b/trunk/drivers/media/video/saa7134/Kconfig @@ -1,10 +1,11 @@ config VIDEO_SAA7134 tristate "Philips SAA7134 support" - depends on VIDEO_DEV && PCI && I2C + depends on VIDEO_DEV && PCI && I2C && SOUND && SND select VIDEO_BUF select VIDEO_IR select VIDEO_TUNER select CRC32 + select SND_PCM_OSS ---help--- This is a video4linux driver for Philips SAA713x based TV cards. @@ -12,29 +13,6 @@ config VIDEO_SAA7134 To compile this driver as a module, choose M here: the module will be called saa7134. -config VIDEO_SAA7134_ALSA - tristate "Philips SAA7134 DMA audio support" - depends on VIDEO_SAA7134 && SOUND && SND && (!VIDEO_SAA7134_OSS || VIDEO_SAA7134_OSS = m) - select SND_PCM_OSS - ---help--- - This is a video4linux driver for direct (DMA) audio in - Philips SAA713x based TV cards using ALSA - - To compile this driver as a module, choose M here: the - module will be called saa7134-alsa. - -config VIDEO_SAA7134_OSS - tristate "Philips SAA7134 DMA audio support (OSS, DEPRECATED)" - depends on VIDEO_SAA7134 && SOUND_PRIME && (!VIDEO_SAA7134_ALSA || VIDEO_SAA7134_ALSA = m) - ---help--- - This is a video4linux driver for direct (DMA) audio in - Philips SAA713x based TV cards using OSS - - This is deprecated in favor of the ALSA module - - To compile this driver as a module, choose M here: the - module will be called saa7134-oss. - config VIDEO_SAA7134_DVB tristate "DVB/ATSC Support for saa7134 based TV cards" depends on VIDEO_SAA7134 && DVB_CORE diff --git a/trunk/drivers/media/video/saa7134/Makefile b/trunk/drivers/media/video/saa7134/Makefile index 1ba998424bbd..134f83a96218 100644 --- a/trunk/drivers/media/video/saa7134/Makefile +++ b/trunk/drivers/media/video/saa7134/Makefile @@ -4,11 +4,8 @@ saa7134-objs := saa7134-cards.o saa7134-core.o saa7134-i2c.o \ saa7134-video.o saa7134-input.o obj-$(CONFIG_VIDEO_SAA7134) += saa7134.o saa7134-empress.o \ - saa6752hs.o - -obj-$(CONFIG_VIDEO_SAA7134_ALSA) += saa7134-alsa.o -obj-$(CONFIG_VIDEO_SAA7134_OSS) += saa7134-oss.o - + saa6752hs.o saa7134-alsa.o \ + saa7134-oss.o obj-$(CONFIG_VIDEO_SAA7134_DVB) += saa7134-dvb.o EXTRA_CFLAGS += -I$(src)/.. diff --git a/trunk/drivers/media/video/saa7134/saa7134-alsa.c b/trunk/drivers/media/video/saa7134/saa7134-alsa.c index ade05f75fdb0..b24a26b065c2 100644 --- a/trunk/drivers/media/video/saa7134/saa7134-alsa.c +++ b/trunk/drivers/media/video/saa7134/saa7134-alsa.c @@ -60,7 +60,7 @@ module_param_array(index, int, NULL, 0444); MODULE_PARM_DESC(index, "Index value for SAA7134 capture interface(s)."); #define dprintk(fmt, arg...) if (debug) \ - printk(KERN_DEBUG "%s/alsa: " fmt, dev->name , ##arg) + printk(KERN_DEBUG "%s/alsa: " fmt, dev->name, ## arg) @@ -989,14 +989,6 @@ static int saa7134_alsa_init(void) struct saa7134_dev *dev = NULL; struct list_head *list; - if (!dmasound_init && !dmasound_exit) { - dmasound_init = alsa_device_init; - dmasound_exit = alsa_device_exit; - } else { - printk(KERN_WARNING "saa7134 ALSA: can't load, DMA sound handler already assigned (probably to OSS)\n"); - return -EBUSY; - } - printk(KERN_INFO "saa7134 ALSA driver for DMA sound loaded\n"); list_for_each(list,&saa7134_devlist) { @@ -1009,6 +1001,9 @@ static int saa7134_alsa_init(void) } } + dmasound_init = alsa_device_init; + dmasound_exit = alsa_device_exit; + if (dev == NULL) printk(KERN_INFO "saa7134 ALSA: no saa7134 cards found\n"); @@ -1028,15 +1023,12 @@ static void saa7134_alsa_exit(void) snd_card_free(snd_saa7134_cards[idx]); } - dmasound_init = NULL; - dmasound_exit = NULL; printk(KERN_INFO "saa7134 ALSA driver for DMA sound unloaded\n"); return; } -/* We initialize this late, to make sure the sound system is up and running */ -late_initcall(saa7134_alsa_init); +module_init(saa7134_alsa_init); module_exit(saa7134_alsa_exit); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Ricardo Cerqueira"); diff --git a/trunk/drivers/media/video/saa7134/saa7134-oss.c b/trunk/drivers/media/video/saa7134/saa7134-oss.c index 8badd2a9cb2f..513a699a6df2 100644 --- a/trunk/drivers/media/video/saa7134/saa7134-oss.c +++ b/trunk/drivers/media/video/saa7134/saa7134-oss.c @@ -959,17 +959,8 @@ static int saa7134_oss_init(void) struct saa7134_dev *dev = NULL; struct list_head *list; - if (!dmasound_init && !dmasound_exit) { - dmasound_init = oss_device_init; - dmasound_exit = oss_device_exit; - } else { - printk(KERN_WARNING "saa7134 OSS: can't load, DMA sound handler already assigned (probably to ALSA)\n"); - return -EBUSY; - } - printk(KERN_INFO "saa7134 OSS driver for DMA sound loaded\n"); - list_for_each(list,&saa7134_devlist) { dev = list_entry(list, struct saa7134_dev, devlist); if (dev->dmasound.priv_data == NULL) { @@ -983,6 +974,9 @@ static int saa7134_oss_init(void) if (dev == NULL) printk(KERN_INFO "saa7134 OSS: no saa7134 cards found\n"); + dmasound_init = oss_device_init; + dmasound_exit = oss_device_exit; + return 0; } @@ -1003,16 +997,12 @@ static void saa7134_oss_exit(void) } - dmasound_init = NULL; - dmasound_exit = NULL; - printk(KERN_INFO "saa7134 OSS driver for DMA sound unloaded\n"); return; } -/* We initialize this late, to make sure the sound system is up and running */ -late_initcall(saa7134_oss_init); +module_init(saa7134_oss_init); module_exit(saa7134_oss_exit); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Gerd Knorr [SuSE Labs]"); diff --git a/trunk/drivers/media/video/tveeprom.c b/trunk/drivers/media/video/tveeprom.c index 5ac235365dd8..cd7cf1bd12b4 100644 --- a/trunk/drivers/media/video/tveeprom.c +++ b/trunk/drivers/media/video/tveeprom.c @@ -206,7 +206,7 @@ hauppauge_tuner[] = { TUNER_ABSENT, "TCL 2002MI_3H"}, { TUNER_TCL_2002N, "TCL 2002N 5H"}, /* 100-109 */ - { TUNER_PHILIPS_FMD1216ME_MK3, "Philips FMD1216ME"}, + { TUNER_ABSENT, "Philips FMD1216ME"}, { TUNER_TEA5767, "Philips TEA5768HL FM Radio"}, { TUNER_ABSENT, "Panasonic ENV57H12D5"}, { TUNER_PHILIPS_FM1236_MK3, "TCL MFNM05-4"}, diff --git a/trunk/drivers/mtd/maps/Kconfig b/trunk/drivers/mtd/maps/Kconfig index b9b77cf39a18..452ccd5037c3 100644 --- a/trunk/drivers/mtd/maps/Kconfig +++ b/trunk/drivers/mtd/maps/Kconfig @@ -62,7 +62,7 @@ config MTD_PHYSMAP_BANKWIDTH config MTD_SUN_UFLASH tristate "Sun Microsystems userflash support" - depends on SPARC && MTD_CFI + depends on (SPARC32 || SPARC64) && MTD_CFI help This provides a 'mapping' driver which supports the way in which user-programmable flash chips are connected on various diff --git a/trunk/drivers/net/forcedeth.c b/trunk/drivers/net/forcedeth.c index c39344adecce..525624fc03b4 100644 --- a/trunk/drivers/net/forcedeth.c +++ b/trunk/drivers/net/forcedeth.c @@ -10,7 +10,7 @@ * trademarks of NVIDIA Corporation in the United States and other * countries. * - * Copyright (C) 2003,4,5 Manfred Spraul + * Copyright (C) 2003,4 Manfred Spraul * Copyright (C) 2004 Andrew de Quincey (wol support) * Copyright (C) 2004 Carl-Daniel Hailfinger (invalid MAC handling, insane * IRQ rate fixes, bigendian fixes, cleanups, verification) @@ -100,7 +100,6 @@ * 0.45: 18 Sep 2005: Remove nv_stop/start_rx from every link check * 0.46: 20 Oct 2005: Add irq optimization modes. * 0.47: 26 Oct 2005: Add phyaddr 0 in phy scan. - * 0.48: 24 Dec 2005: Disable TSO, bugfix for pci_map_single * * Known bugs: * We suspect that on some hardware no TX done interrupts are generated. @@ -112,7 +111,7 @@ * DEV_NEED_TIMERIRQ will not harm you on sane hardware, only generating a few * superfluous timer interrupts from the nic. */ -#define FORCEDETH_VERSION "0.48" +#define FORCEDETH_VERSION "0.47" #define DRV_NAME "forcedeth" #include @@ -872,8 +871,8 @@ static int nv_alloc_rx(struct net_device *dev) } else { skb = np->rx_skbuff[nr]; } - np->rx_dma[nr] = pci_map_single(np->pci_dev, skb->data, - skb->end-skb->data, PCI_DMA_FROMDEVICE); + np->rx_dma[nr] = pci_map_single(np->pci_dev, skb->data, skb->len, + PCI_DMA_FROMDEVICE); if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) { np->rx_ring.orig[nr].PacketBuffer = cpu_to_le32(np->rx_dma[nr]); wmb(); @@ -1000,7 +999,7 @@ static void nv_drain_rx(struct net_device *dev) wmb(); if (np->rx_skbuff[i]) { pci_unmap_single(np->pci_dev, np->rx_dma[i], - np->rx_skbuff[i]->end-np->rx_skbuff[i]->data, + np->rx_skbuff[i]->len, PCI_DMA_FROMDEVICE); dev_kfree_skb(np->rx_skbuff[i]); np->rx_skbuff[i] = NULL; @@ -1335,7 +1334,7 @@ static void nv_rx_process(struct net_device *dev) * the performance. */ pci_unmap_single(np->pci_dev, np->rx_dma[i], - np->rx_skbuff[i]->end-np->rx_skbuff[i]->data, + np->rx_skbuff[i]->len, PCI_DMA_FROMDEVICE); { @@ -2456,7 +2455,7 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i np->txrxctl_bits |= NVREG_TXRXCTL_RXCHECK; dev->features |= NETIF_F_HW_CSUM | NETIF_F_SG; #ifdef NETIF_F_TSO - /* disabled dev->features |= NETIF_F_TSO; */ + dev->features |= NETIF_F_TSO; #endif } diff --git a/trunk/drivers/net/phy/phy_device.c b/trunk/drivers/net/phy/phy_device.c index 7da0e3dd5fe3..16bebe7a7ce1 100644 --- a/trunk/drivers/net/phy/phy_device.c +++ b/trunk/drivers/net/phy/phy_device.c @@ -38,10 +38,6 @@ #include #include -MODULE_DESCRIPTION("PHY library"); -MODULE_AUTHOR("Andy Fleming"); -MODULE_LICENSE("GPL"); - static struct phy_driver genphy_driver; extern int mdio_bus_init(void); extern void mdio_bus_exit(void); diff --git a/trunk/drivers/net/sungem.c b/trunk/drivers/net/sungem.c index 28ce47a02408..081717d01374 100644 --- a/trunk/drivers/net/sungem.c +++ b/trunk/drivers/net/sungem.c @@ -2907,7 +2907,7 @@ static int __devinit gem_get_device_address(struct gem *gp) return 0; } -static void gem_remove_one(struct pci_dev *pdev) +static void __devexit gem_remove_one(struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata(pdev); @@ -3181,7 +3181,7 @@ static struct pci_driver gem_driver = { .name = GEM_MODULE_NAME, .id_table = gem_pci_tbl, .probe = gem_init_one, - .remove = gem_remove_one, + .remove = __devexit_p(gem_remove_one), #ifdef CONFIG_PM .suspend = gem_suspend, .resume = gem_resume, diff --git a/trunk/drivers/net/tg3.c b/trunk/drivers/net/tg3.c index cefb0c08a68d..a23ed28a72b8 100644 --- a/trunk/drivers/net/tg3.c +++ b/trunk/drivers/net/tg3.c @@ -68,8 +68,8 @@ #define DRV_MODULE_NAME "tg3" #define PFX DRV_MODULE_NAME ": " -#define DRV_MODULE_VERSION "3.46" -#define DRV_MODULE_RELDATE "Dec 19, 2005" +#define DRV_MODULE_VERSION "3.45" +#define DRV_MODULE_RELDATE "Dec 13, 2005" #define TG3_DEF_MAC_MODE 0 #define TG3_DEF_RX_MODE 0 @@ -341,16 +341,6 @@ static struct { { "interrupt test (offline)" }, }; -static void tg3_write32(struct tg3 *tp, u32 off, u32 val) -{ - writel(val, tp->regs + off); -} - -static u32 tg3_read32(struct tg3 *tp, u32 off) -{ - return (readl(tp->regs + off)); -} - static void tg3_write_indirect_reg32(struct tg3 *tp, u32 off, u32 val) { unsigned long flags; @@ -421,29 +411,13 @@ static u32 tg3_read_indirect_mbox(struct tg3 *tp, u32 off) return val; } -/* usec_wait specifies the wait time in usec when writing to certain registers - * where it is unsafe to read back the register without some delay. - * GRC_LOCAL_CTRL is one example if the GPIOs are toggled to switch power. - * TG3PCI_CLOCK_CTRL is another example if the clock frequencies are changed. - */ -static void _tw32_flush(struct tg3 *tp, u32 off, u32 val, u32 usec_wait) +static void _tw32_flush(struct tg3 *tp, u32 off, u32 val) { - if ((tp->tg3_flags & TG3_FLAG_PCIX_TARGET_HWBUG) || - (tp->tg3_flags2 & TG3_FLG2_ICH_WORKAROUND)) - /* Non-posted methods */ - tp->write32(tp, off, val); - else { - /* Posted method */ - tg3_write32(tp, off, val); - if (usec_wait) - udelay(usec_wait); - tp->read32(tp, off); - } - /* Wait again after the read for the posted method to guarantee that - * the wait time is met. - */ - if (usec_wait) - udelay(usec_wait); + tp->write32(tp, off, val); + if (!(tp->tg3_flags & TG3_FLAG_PCIX_TARGET_HWBUG) && + !(tp->tg3_flags & TG3_FLAG_5701_REG_WRITE_BUG) && + !(tp->tg3_flags2 & TG3_FLG2_ICH_WORKAROUND)) + tp->read32(tp, off); /* flush */ } static inline void tw32_mailbox_flush(struct tg3 *tp, u32 off, u32 val) @@ -464,6 +438,16 @@ static void tg3_write32_tx_mbox(struct tg3 *tp, u32 off, u32 val) readl(mbox); } +static void tg3_write32(struct tg3 *tp, u32 off, u32 val) +{ + writel(val, tp->regs + off); +} + +static u32 tg3_read32(struct tg3 *tp, u32 off) +{ + return (readl(tp->regs + off)); +} + #define tw32_mailbox(reg, val) tp->write32_mbox(tp, reg, val) #define tw32_mailbox_f(reg, val) tw32_mailbox_flush(tp, (reg), (val)) #define tw32_rx_mbox(reg, val) tp->write32_rx_mbox(tp, reg, val) @@ -471,8 +455,7 @@ static void tg3_write32_tx_mbox(struct tg3 *tp, u32 off, u32 val) #define tr32_mailbox(reg) tp->read32_mbox(tp, reg) #define tw32(reg,val) tp->write32(tp, reg, val) -#define tw32_f(reg,val) _tw32_flush(tp,(reg),(val), 0) -#define tw32_wait_f(reg,val,us) _tw32_flush(tp,(reg),(val), (us)) +#define tw32_f(reg,val) _tw32_flush(tp,(reg),(val)) #define tr32(reg) tp->read32(tp, reg) static void tg3_write_mem(struct tg3 *tp, u32 off, u32 val) @@ -612,19 +595,21 @@ static void tg3_switch_clocks(struct tg3 *tp) if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS) { if (orig_clock_ctrl & CLOCK_CTRL_625_CORE) { - tw32_wait_f(TG3PCI_CLOCK_CTRL, - clock_ctrl | CLOCK_CTRL_625_CORE, 40); + tw32_f(TG3PCI_CLOCK_CTRL, + clock_ctrl | CLOCK_CTRL_625_CORE); + udelay(40); } } else if ((orig_clock_ctrl & CLOCK_CTRL_44MHZ_CORE) != 0) { - tw32_wait_f(TG3PCI_CLOCK_CTRL, - clock_ctrl | - (CLOCK_CTRL_44MHZ_CORE | CLOCK_CTRL_ALTCLK), - 40); - tw32_wait_f(TG3PCI_CLOCK_CTRL, - clock_ctrl | (CLOCK_CTRL_ALTCLK), - 40); + tw32_f(TG3PCI_CLOCK_CTRL, + clock_ctrl | + (CLOCK_CTRL_44MHZ_CORE | CLOCK_CTRL_ALTCLK)); + udelay(40); + tw32_f(TG3PCI_CLOCK_CTRL, + clock_ctrl | (CLOCK_CTRL_ALTCLK)); + udelay(40); } - tw32_wait_f(TG3PCI_CLOCK_CTRL, clock_ctrl, 40); + tw32_f(TG3PCI_CLOCK_CTRL, clock_ctrl); + udelay(40); } #define PHY_BUSY_LOOPS 5000 @@ -1032,50 +1017,39 @@ static void tg3_frob_aux_power(struct tg3 *tp) if ((tp->tg3_flags & TG3_FLAG_EEPROM_WRITE_PROT) != 0) return; - if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) || - (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5714)) { - struct net_device *dev_peer; - - dev_peer = pci_get_drvdata(tp->pdev_peer); - if (!dev_peer) + if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) { + tp_peer = pci_get_drvdata(tp->pdev_peer); + if (!tp_peer) BUG(); - tp_peer = netdev_priv(dev_peer); } + if ((tp->tg3_flags & TG3_FLAG_WOL_ENABLE) != 0 || (tp->tg3_flags & TG3_FLAG_ENABLE_ASF) != 0 || (tp_peer->tg3_flags & TG3_FLAG_WOL_ENABLE) != 0 || (tp_peer->tg3_flags & TG3_FLAG_ENABLE_ASF) != 0) { if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700 || GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701) { - tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | - (GRC_LCLCTRL_GPIO_OE0 | - GRC_LCLCTRL_GPIO_OE1 | - GRC_LCLCTRL_GPIO_OE2 | - GRC_LCLCTRL_GPIO_OUTPUT0 | - GRC_LCLCTRL_GPIO_OUTPUT1), - 100); + tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | + (GRC_LCLCTRL_GPIO_OE0 | + GRC_LCLCTRL_GPIO_OE1 | + GRC_LCLCTRL_GPIO_OE2 | + GRC_LCLCTRL_GPIO_OUTPUT0 | + GRC_LCLCTRL_GPIO_OUTPUT1)); + udelay(100); } else { u32 no_gpio2; - u32 grc_local_ctrl = 0; + u32 grc_local_ctrl; if (tp_peer != tp && (tp_peer->tg3_flags & TG3_FLAG_INIT_COMPLETE) != 0) return; - /* Workaround to prevent overdrawing Amps. */ - if (GET_ASIC_REV(tp->pci_chip_rev_id) == - ASIC_REV_5714) { - grc_local_ctrl |= GRC_LCLCTRL_GPIO_OE3; - tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | - grc_local_ctrl, 100); - } - /* On 5753 and variants, GPIO2 cannot be used. */ no_gpio2 = tp->nic_sram_data_cfg & NIC_SRAM_DATA_CFG_NO_GPIO2; - grc_local_ctrl |= GRC_LCLCTRL_GPIO_OE0 | + grc_local_ctrl = GRC_LCLCTRL_GPIO_OE0 | GRC_LCLCTRL_GPIO_OE1 | GRC_LCLCTRL_GPIO_OE2 | GRC_LCLCTRL_GPIO_OUTPUT1 | @@ -1084,18 +1058,21 @@ static void tg3_frob_aux_power(struct tg3 *tp) grc_local_ctrl &= ~(GRC_LCLCTRL_GPIO_OE2 | GRC_LCLCTRL_GPIO_OUTPUT2); } - tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | - grc_local_ctrl, 100); + tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | + grc_local_ctrl); + udelay(100); grc_local_ctrl |= GRC_LCLCTRL_GPIO_OUTPUT0; - tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | - grc_local_ctrl, 100); + tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | + grc_local_ctrl); + udelay(100); if (!no_gpio2) { grc_local_ctrl &= ~GRC_LCLCTRL_GPIO_OUTPUT2; - tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | - grc_local_ctrl, 100); + tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | + grc_local_ctrl); + udelay(100); } } } else { @@ -1105,16 +1082,19 @@ static void tg3_frob_aux_power(struct tg3 *tp) (tp_peer->tg3_flags & TG3_FLAG_INIT_COMPLETE) != 0) return; - tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | - (GRC_LCLCTRL_GPIO_OE1 | - GRC_LCLCTRL_GPIO_OUTPUT1), 100); + tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | + (GRC_LCLCTRL_GPIO_OE1 | + GRC_LCLCTRL_GPIO_OUTPUT1)); + udelay(100); - tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | - GRC_LCLCTRL_GPIO_OE1, 100); + tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | + (GRC_LCLCTRL_GPIO_OE1)); + udelay(100); - tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | - (GRC_LCLCTRL_GPIO_OE1 | - GRC_LCLCTRL_GPIO_OUTPUT1), 100); + tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | + (GRC_LCLCTRL_GPIO_OE1 | + GRC_LCLCTRL_GPIO_OUTPUT1)); + udelay(100); } } } @@ -1157,8 +1137,10 @@ static int tg3_set_power_state(struct tg3 *tp, int state) udelay(100); /* Delay after power state change */ /* Switch out of Vaux if it is not a LOM */ - if (!(tp->tg3_flags & TG3_FLAG_EEPROM_WRITE_PROT)) - tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl, 100); + if (!(tp->tg3_flags & TG3_FLAG_EEPROM_WRITE_PROT)) { + tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl); + udelay(100); + } return 0; @@ -1257,8 +1239,10 @@ static int tg3_set_power_state(struct tg3 *tp, int state) base_val |= (CLOCK_CTRL_RXCLK_DISABLE | CLOCK_CTRL_TXCLK_DISABLE); - tw32_wait_f(TG3PCI_CLOCK_CTRL, base_val | CLOCK_CTRL_ALTCLK | - CLOCK_CTRL_PWRDOWN_PLL133, 40); + tw32_f(TG3PCI_CLOCK_CTRL, base_val | + CLOCK_CTRL_ALTCLK | + CLOCK_CTRL_PWRDOWN_PLL133); + udelay(40); } else if (tp->tg3_flags2 & TG3_FLG2_5780_CLASS) { /* do nothing */ } else if (!((tp->tg3_flags2 & TG3_FLG2_5750_PLUS) && @@ -1279,11 +1263,11 @@ static int tg3_set_power_state(struct tg3 *tp, int state) newbits2 = newbits1 | CLOCK_CTRL_44MHZ_CORE; } - tw32_wait_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl | newbits1, - 40); + tw32_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl | newbits1); + udelay(40); - tw32_wait_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl | newbits2, - 40); + tw32_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl | newbits2); + udelay(40); if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) { u32 newbits3; @@ -1297,8 +1281,9 @@ static int tg3_set_power_state(struct tg3 *tp, int state) newbits3 = CLOCK_CTRL_44MHZ_CORE; } - tw32_wait_f(TG3PCI_CLOCK_CTRL, - tp->pci_clock_ctrl | newbits3, 40); + tw32_f(TG3PCI_CLOCK_CTRL, + tp->pci_clock_ctrl | newbits3); + udelay(40); } } @@ -1309,8 +1294,7 @@ static int tg3_set_power_state(struct tg3 *tp, int state) tg3_writephy(tp, MII_TG3_EXT_CTRL, MII_TG3_EXT_CTRL_FORCE_LED_OFF); tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x01b2); - if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5700) - tg3_writephy(tp, MII_BMCR, BMCR_PDOWN); + tg3_writephy(tp, MII_BMCR, BMCR_PDOWN); } } @@ -7975,12 +7959,13 @@ static int tg3_test_memory(struct tg3 *tp) u32 offset; u32 len; } mem_tbl_570x[] = { - { 0x00000000, 0x00b50}, + { 0x00000000, 0x01000}, { 0x00002000, 0x1c000}, { 0xffffffff, 0x00000} }, mem_tbl_5705[] = { { 0x00000100, 0x0000c}, { 0x00000200, 0x00008}, + { 0x00000b50, 0x00400}, { 0x00004000, 0x00800}, { 0x00006000, 0x01000}, { 0x00008000, 0x02000}, @@ -10481,7 +10466,7 @@ static char * __devinit tg3_bus_string(struct tg3 *tp, char *str) return str; } -static struct pci_dev * __devinit tg3_find_peer(struct tg3 *tp) +static struct pci_dev * __devinit tg3_find_5704_peer(struct tg3 *tp) { struct pci_dev *peer; unsigned int func, devnr = tp->pdev->devfn & ~7; @@ -10734,9 +10719,8 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, tp->rx_pending = 63; } - if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) || - (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5714)) - tp->pdev_peer = tg3_find_peer(tp); + if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) + tp->pdev_peer = tg3_find_5704_peer(tp); err = tg3_get_device_address(tp); if (err) { diff --git a/trunk/drivers/net/wireless/orinoco_nortel.c b/trunk/drivers/net/wireless/orinoco_nortel.c index d1a670b35338..d8afd51ff8a5 100644 --- a/trunk/drivers/net/wireless/orinoco_nortel.c +++ b/trunk/drivers/net/wireless/orinoco_nortel.c @@ -1,8 +1,6 @@ /* orinoco_nortel.c * * Driver for Prism II devices which would usually be driven by orinoco_cs, - * but are connected to the PCI bus by a PCI-to-PCMCIA adapter used in - * Nortel emobility, Symbol LA-4113 and Symbol LA-4123. * but are connected to the PCI bus by a Nortel PCI-PCMCIA-Adapter. * * Copyright (C) 2002 Tobias Hoffmann @@ -167,7 +165,7 @@ static int nortel_pci_init_one(struct pci_dev *pdev, goto fail_resources; } - iomem = pci_iomap(pdev, 2, 0); + iomem = pci_iomap(pdev, 3, 0); if (!iomem) { err = -ENOMEM; goto fail_map_io; @@ -267,8 +265,6 @@ static void __devexit nortel_pci_remove_one(struct pci_dev *pdev) static struct pci_device_id nortel_pci_id_table[] = { /* Nortel emobility PCI */ {0x126c, 0x8030, PCI_ANY_ID, PCI_ANY_ID,}, - /* Symbol LA-4123 PCI */ - {0x1562, 0x0001, PCI_ANY_ID, PCI_ANY_ID,}, {0,}, }; diff --git a/trunk/drivers/s390/net/qeth_eddp.c b/trunk/drivers/s390/net/qeth_eddp.c index f94f1f25eec6..011915d5e243 100644 --- a/trunk/drivers/s390/net/qeth_eddp.c +++ b/trunk/drivers/s390/net/qeth_eddp.c @@ -62,8 +62,7 @@ qeth_eddp_free_context(struct qeth_eddp_context *ctx) for (i = 0; i < ctx->num_pages; ++i) free_page((unsigned long)ctx->pages[i]); kfree(ctx->pages); - if (ctx->elements != NULL) - kfree(ctx->elements); + kfree(ctx->elements); kfree(ctx); } diff --git a/trunk/drivers/s390/net/qeth_main.c b/trunk/drivers/s390/net/qeth_main.c index f8f55cc468ba..99cceb242ec4 100644 --- a/trunk/drivers/s390/net/qeth_main.c +++ b/trunk/drivers/s390/net/qeth_main.c @@ -1,6 +1,6 @@ /* * - * linux/drivers/s390/net/qeth_main.c ($Revision: 1.251 $) + * linux/drivers/s390/net/qeth_main.c ($Revision: 1.242 $) * * Linux on zSeries OSA Express and HiperSockets support * @@ -12,7 +12,7 @@ * Frank Pavlic (fpavlic@de.ibm.com) and * Thomas Spatzier * - * $Revision: 1.251 $ $Date: 2005/05/04 20:19:18 $ + * $Revision: 1.242 $ $Date: 2005/05/04 20:19:18 $ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -72,7 +72,7 @@ #include "qeth_eddp.h" #include "qeth_tso.h" -#define VERSION_QETH_C "$Revision: 1.251 $" +#define VERSION_QETH_C "$Revision: 1.242 $" static const char *version = "qeth S/390 OSA-Express driver"; /** @@ -518,8 +518,7 @@ __qeth_set_offline(struct ccwgroup_device *cgdev, int recovery_mode) QETH_DBF_TEXT(setup, 3, "setoffl"); QETH_DBF_HEX(setup, 3, &card, sizeof(void *)); - - netif_carrier_off(card->dev); + recover_flag = card->state; if (qeth_stop_card(card, recovery_mode) == -ERESTARTSYS){ PRINT_WARN("Stopping card %s interrupted by user!\n", @@ -1021,6 +1020,7 @@ void qeth_schedule_recovery(struct qeth_card *card) { QETH_DBF_TEXT(trace,2,"startrec"); + if (qeth_set_thread_start_bit(card, QETH_RECOVER_THREAD) == 0) schedule_work(&card->kernel_thread_starter); } @@ -1710,6 +1710,7 @@ qeth_check_ipa_data(struct qeth_card *card, struct qeth_cmd_buffer *iob) "IP address reset.\n", QETH_CARD_IFNAME(card), card->info.chpid); + netif_carrier_on(card->dev); qeth_schedule_recovery(card); return NULL; case IPA_CMD_MODCCID: @@ -1958,7 +1959,7 @@ qeth_osn_send_ipa_cmd(struct qeth_card *card, struct qeth_cmd_buffer *iob, { u16 s1, s2; - QETH_DBF_TEXT(trace,4,"osndipa"); +QETH_DBF_TEXT(trace,4,"osndipa"); qeth_prepare_ipa_cmd(card, iob, QETH_PROT_OSN2); s1 = (u16)(IPA_PDU_HEADER_SIZE + data_len); @@ -2202,21 +2203,24 @@ qeth_ulp_setup(struct qeth_card *card) } static inline int -qeth_check_qdio_errors(struct qdio_buffer *buf, unsigned int qdio_error, - unsigned int siga_error, const char *dbftext) +qeth_check_for_inbound_error(struct qeth_qdio_buffer *buf, + unsigned int qdio_error, + unsigned int siga_error) { + int rc = 0; + if (qdio_error || siga_error) { - QETH_DBF_TEXT(trace, 2, dbftext); - QETH_DBF_TEXT(qerr, 2, dbftext); + QETH_DBF_TEXT(trace, 2, "qdinerr"); + QETH_DBF_TEXT(qerr, 2, "qdinerr"); QETH_DBF_TEXT_(qerr, 2, " F15=%02X", - buf->element[15].flags & 0xff); + buf->buffer->element[15].flags & 0xff); QETH_DBF_TEXT_(qerr, 2, " F14=%02X", - buf->element[14].flags & 0xff); + buf->buffer->element[14].flags & 0xff); QETH_DBF_TEXT_(qerr, 2, " qerr=%X", qdio_error); QETH_DBF_TEXT_(qerr, 2, " serr=%X", siga_error); - return 1; + rc = 1; } - return 0; + return rc; } static inline struct sk_buff * @@ -2765,9 +2769,8 @@ qeth_qdio_input_handler(struct ccw_device * ccwdev, unsigned int status, for (i = first_element; i < (first_element + count); ++i) { index = i % QDIO_MAX_BUFFERS_PER_Q; buffer = &card->qdio.in_q->bufs[index]; - if (!((status & QDIO_STATUS_LOOK_FOR_ERROR) && - qeth_check_qdio_errors(buffer->buffer, - qdio_err, siga_err,"qinerr"))) + if (!((status == QDIO_STATUS_LOOK_FOR_ERROR) && + qeth_check_for_inbound_error(buffer, qdio_err, siga_err))) qeth_process_inbound_buffer(card, buffer, index); /* clear buffer and give back to hardware */ qeth_put_buffer_pool_entry(card, buffer->pool_entry); @@ -2782,13 +2785,12 @@ qeth_qdio_input_handler(struct ccw_device * ccwdev, unsigned int status, static inline int qeth_handle_send_error(struct qeth_card *card, struct qeth_qdio_out_buffer *buffer, - unsigned int qdio_err, unsigned int siga_err) + int qdio_err, int siga_err) { int sbalf15 = buffer->buffer->element[15].flags & 0xff; int cc = siga_err & 3; QETH_DBF_TEXT(trace, 6, "hdsnderr"); - qeth_check_qdio_errors(buffer->buffer, qdio_err, siga_err, "qouterr"); switch (cc) { case 0: if (qdio_err){ @@ -3045,8 +3047,7 @@ qeth_qdio_output_handler(struct ccw_device * ccwdev, unsigned int status, for(i = first_element; i < (first_element + count); ++i){ buffer = &queue->bufs[i % QDIO_MAX_BUFFERS_PER_Q]; /*we only handle the KICK_IT error by doing a recovery */ - if (qeth_handle_send_error(card, buffer, - qdio_error, siga_error) + if (qeth_handle_send_error(card, buffer, qdio_error, siga_error) == QETH_SEND_ERROR_KICK_IT){ netif_stop_queue(card->dev); qeth_schedule_recovery(card); @@ -3288,6 +3289,7 @@ qeth_init_qdio_info(struct qeth_card *card) card->qdio.in_buf_pool.buf_count = card->qdio.init_pool.buf_count; INIT_LIST_HEAD(&card->qdio.in_buf_pool.entry_list); INIT_LIST_HEAD(&card->qdio.init_pool.entry_list); + /* outbound */ } static int @@ -3729,9 +3731,6 @@ qeth_verify_vlan_dev(struct net_device *dev, struct qeth_card *card) break; } } - if (rc && !(VLAN_DEV_INFO(dev)->real_dev->priv == (void *)card)) - return 0; - #endif return rc; } @@ -3808,8 +3807,10 @@ qeth_open(struct net_device *dev) card->data.state = CH_STATE_UP; card->state = CARD_STATE_UP; - if (!card->lan_online && netif_carrier_ok(dev)) - netif_carrier_off(dev); + if (!card->lan_online){ + if (netif_carrier_ok(dev)) + netif_carrier_off(dev); + } return 0; } @@ -5869,8 +5870,10 @@ qeth_add_multicast_ipv6(struct qeth_card *card) struct inet6_dev *in6_dev; QETH_DBF_TEXT(trace,4,"chkmcv6"); - if (!qeth_is_supported(card, IPA_IPV6)) + if ((card->options.layer2 == 0) && + (!qeth_is_supported(card, IPA_IPV6)) ) return ; + in6_dev = in6_dev_get(card->dev); if (in6_dev == NULL) return; @@ -7933,8 +7936,8 @@ __qeth_set_online(struct ccwgroup_device *gdev, int recovery_mode) QETH_DBF_TEXT_(setup, 2, "6err%d", rc); goto out_remove; } - netif_carrier_on(card->dev); - +/*maybe it was set offline without ifconfig down + * we can also use this state for recovery purposes*/ qeth_set_allowed_threads(card, 0xffffffff, 0); if (recover_flag == CARD_STATE_RECOVER) qeth_start_again(card, recovery_mode); diff --git a/trunk/drivers/s390/net/qeth_mpc.c b/trunk/drivers/s390/net/qeth_mpc.c index 5f8754addc14..f0a080a9e515 100644 --- a/trunk/drivers/s390/net/qeth_mpc.c +++ b/trunk/drivers/s390/net/qeth_mpc.c @@ -11,7 +11,7 @@ #include #include "qeth_mpc.h" -const char *VERSION_QETH_MPC_C = "$Revision: 1.13 $"; +const char *VERSION_QETH_MPC_C = "$Revision: 1.12 $"; unsigned char IDX_ACTIVATE_READ[]={ 0x00,0x00,0x80,0x00, 0x00,0x00,0x00,0x00, diff --git a/trunk/drivers/s390/net/qeth_mpc.h b/trunk/drivers/s390/net/qeth_mpc.h index 864cec5f6c62..5f71486e708c 100644 --- a/trunk/drivers/s390/net/qeth_mpc.h +++ b/trunk/drivers/s390/net/qeth_mpc.h @@ -14,14 +14,14 @@ #include -#define VERSION_QETH_MPC_H "$Revision: 1.46 $" +#define VERSION_QETH_MPC_H "$Revision: 1.44 $" extern const char *VERSION_QETH_MPC_C; #define IPA_PDU_HEADER_SIZE 0x40 #define QETH_IPA_PDU_LEN_TOTAL(buffer) (buffer+0x0e) #define QETH_IPA_PDU_LEN_PDU1(buffer) (buffer+0x26) -#define QETH_IPA_PDU_LEN_PDU2(buffer) (buffer+0x29) +#define QETH_IPA_PDU_LEN_PDU2(buffer) (buffer+0x2a) #define QETH_IPA_PDU_LEN_PDU3(buffer) (buffer+0x3a) extern unsigned char IPA_PDU_HEADER[]; diff --git a/trunk/drivers/s390/net/qeth_proc.c b/trunk/drivers/s390/net/qeth_proc.c index 7bf35098831e..f2ccfea8fdb8 100644 --- a/trunk/drivers/s390/net/qeth_proc.c +++ b/trunk/drivers/s390/net/qeth_proc.c @@ -1,6 +1,6 @@ /* * - * linux/drivers/s390/net/qeth_fs.c ($Revision: 1.16 $) + * linux/drivers/s390/net/qeth_fs.c ($Revision: 1.13 $) * * Linux on zSeries OSA Express and HiperSockets support * This file contains code related to procfs. @@ -21,7 +21,7 @@ #include "qeth_mpc.h" #include "qeth_fs.h" -const char *VERSION_QETH_PROC_C = "$Revision: 1.16 $"; +const char *VERSION_QETH_PROC_C = "$Revision: 1.13 $"; /***** /proc/qeth *****/ #define QETH_PROCFILE_NAME "qeth" @@ -30,26 +30,30 @@ static struct proc_dir_entry *qeth_procfile; static int qeth_procfile_seq_match(struct device *dev, void *data) { - return(dev ? 1 : 0); + return 1; } static void * qeth_procfile_seq_start(struct seq_file *s, loff_t *offset) { - struct device *dev = NULL; - loff_t nr = 0; - + struct device *dev; + loff_t nr; + down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); - if (*offset == 0) + + nr = *offset; + if (nr == 0) return SEQ_START_TOKEN; - while (1) { + + dev = driver_find_device(&qeth_ccwgroup_driver.driver, NULL, + NULL, qeth_procfile_seq_match); + + /* get card at pos *offset */ + nr = *offset; + while (nr-- > 1 && dev) dev = driver_find_device(&qeth_ccwgroup_driver.driver, dev, NULL, qeth_procfile_seq_match); - if (++nr == *offset) - break; - put_device(dev); - } - return dev; + return (void *) dev; } static void @@ -62,14 +66,19 @@ static void * qeth_procfile_seq_next(struct seq_file *s, void *it, loff_t *offset) { struct device *prev, *next; - - if (it == SEQ_START_TOKEN) - prev = NULL; - else - prev = (struct device *) it; + + if (it == SEQ_START_TOKEN) { + next = driver_find_device(&qeth_ccwgroup_driver.driver, + NULL, NULL, qeth_procfile_seq_match); + if (next) + (*offset)++; + return (void *) next; + } + prev = (struct device *) it; next = driver_find_device(&qeth_ccwgroup_driver.driver, prev, NULL, qeth_procfile_seq_match); - (*offset)++; + if (next) + (*offset)++; return (void *) next; } @@ -78,7 +87,7 @@ qeth_get_router_str(struct qeth_card *card, int ipv) { int routing_type = 0; - if (ipv == 4) { + if (ipv == 4){ routing_type = card->options.route4.type; } else { #ifdef CONFIG_QETH_IPV6 @@ -145,7 +154,6 @@ qeth_procfile_seq_show(struct seq_file *s, void *it) card->qdio.in_buf_pool.buf_count); else seq_printf(s, " +++ LAN OFFLINE +++\n"); - put_device(device); } return 0; } @@ -176,16 +184,51 @@ static struct file_operations qeth_procfile_fops = { static struct proc_dir_entry *qeth_perf_procfile; #ifdef CONFIG_QETH_PERF_STATS + +static void * +qeth_perf_procfile_seq_start(struct seq_file *s, loff_t *offset) +{ + struct device *dev = NULL; + int nr; + + down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); + /* get card at pos *offset */ + dev = driver_find_device(&qeth_ccwgroup_driver.driver, NULL, NULL, + qeth_procfile_seq_match); + + /* get card at pos *offset */ + nr = *offset; + while (nr-- > 1 && dev) + dev = driver_find_device(&qeth_ccwgroup_driver.driver, dev, + NULL, qeth_procfile_seq_match); + return (void *) dev; +} + +static void +qeth_perf_procfile_seq_stop(struct seq_file *s, void* it) +{ + up_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); +} + +static void * +qeth_perf_procfile_seq_next(struct seq_file *s, void *it, loff_t *offset) +{ + struct device *prev, *next; + + prev = (struct device *) it; + next = driver_find_device(&qeth_ccwgroup_driver.driver, prev, + NULL, qeth_procfile_seq_match); + if (next) + (*offset)++; + return (void *) next; +} + static int qeth_perf_procfile_seq_show(struct seq_file *s, void *it) { struct device *device; struct qeth_card *card; - - if (it == SEQ_START_TOKEN) - return 0; - device = (struct device *) it; card = device->driver_data; seq_printf(s, "For card with devnos %s/%s/%s (%s):\n", @@ -252,14 +295,13 @@ qeth_perf_procfile_seq_show(struct seq_file *s, void *it) card->perf_stats.outbound_do_qdio_time, card->perf_stats.outbound_do_qdio_cnt ); - put_device(device); return 0; } static struct seq_operations qeth_perf_procfile_seq_ops = { - .start = qeth_procfile_seq_start, - .stop = qeth_procfile_seq_stop, - .next = qeth_procfile_seq_next, + .start = qeth_perf_procfile_seq_start, + .stop = qeth_perf_procfile_seq_stop, + .next = qeth_perf_procfile_seq_next, .show = qeth_perf_procfile_seq_show, }; @@ -282,6 +324,93 @@ static struct file_operations qeth_perf_procfile_fops = { #define qeth_perf_procfile_created 1 #endif /* CONFIG_QETH_PERF_STATS */ +/***** /proc/qeth_ipa_takeover *****/ +#define QETH_IPATO_PROCFILE_NAME "qeth_ipa_takeover" +static struct proc_dir_entry *qeth_ipato_procfile; + +static void * +qeth_ipato_procfile_seq_start(struct seq_file *s, loff_t *offset) +{ + struct device *dev; + loff_t nr; + + down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); + /* TODO: finish this */ + /* + * maybe SEQ_SATRT_TOKEN can be returned for offset 0 + * output driver settings then; + * else output setting for respective card + */ + + dev = driver_find_device(&qeth_ccwgroup_driver.driver, NULL, NULL, + qeth_procfile_seq_match); + + /* get card at pos *offset */ + nr = *offset; + while (nr-- > 1 && dev) + dev = driver_find_device(&qeth_ccwgroup_driver.driver, dev, + NULL, qeth_procfile_seq_match); + return (void *) dev; +} + +static void +qeth_ipato_procfile_seq_stop(struct seq_file *s, void* it) +{ + up_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); +} + +static void * +qeth_ipato_procfile_seq_next(struct seq_file *s, void *it, loff_t *offset) +{ + struct device *prev, *next; + + prev = (struct device *) it; + next = driver_find_device(&qeth_ccwgroup_driver.driver, prev, + NULL, qeth_procfile_seq_match); + if (next) + (*offset)++; + return (void *) next; +} + +static int +qeth_ipato_procfile_seq_show(struct seq_file *s, void *it) +{ + struct device *device; + struct qeth_card *card; + + /* TODO: finish this */ + /* + * maybe SEQ_SATRT_TOKEN can be returned for offset 0 + * output driver settings then; + * else output setting for respective card + */ + device = (struct device *) it; + card = device->driver_data; + + return 0; +} + +static struct seq_operations qeth_ipato_procfile_seq_ops = { + .start = qeth_ipato_procfile_seq_start, + .stop = qeth_ipato_procfile_seq_stop, + .next = qeth_ipato_procfile_seq_next, + .show = qeth_ipato_procfile_seq_show, +}; + +static int +qeth_ipato_procfile_open(struct inode *inode, struct file *file) +{ + return seq_open(file, &qeth_ipato_procfile_seq_ops); +} + +static struct file_operations qeth_ipato_procfile_fops = { + .owner = THIS_MODULE, + .open = qeth_ipato_procfile_open, + .read = seq_read, + .llseek = seq_lseek, + .release = seq_release, +}; + int __init qeth_create_procfs_entries(void) { @@ -297,7 +426,13 @@ qeth_create_procfs_entries(void) qeth_perf_procfile->proc_fops = &qeth_perf_procfile_fops; #endif /* CONFIG_QETH_PERF_STATS */ + qeth_ipato_procfile = create_proc_entry(QETH_IPATO_PROCFILE_NAME, + S_IFREG | 0444, NULL); + if (qeth_ipato_procfile) + qeth_ipato_procfile->proc_fops = &qeth_ipato_procfile_fops; + if (qeth_procfile && + qeth_ipato_procfile && qeth_perf_procfile_created) return 0; else @@ -311,5 +446,62 @@ qeth_remove_procfs_entries(void) remove_proc_entry(QETH_PROCFILE_NAME, NULL); if (qeth_perf_procfile) remove_proc_entry(QETH_PERF_PROCFILE_NAME, NULL); + if (qeth_ipato_procfile) + remove_proc_entry(QETH_IPATO_PROCFILE_NAME, NULL); } + +/* ONLY FOR DEVELOPMENT! -> make it as module */ +/* +static void +qeth_create_sysfs_entries(void) +{ + struct device *dev; + + down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); + + list_for_each_entry(dev, &qeth_ccwgroup_driver.driver.devices, + driver_list) + qeth_create_device_attributes(dev); + + up_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); +} + +static void +qeth_remove_sysfs_entries(void) +{ + struct device *dev; + + down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); + + list_for_each_entry(dev, &qeth_ccwgroup_driver.driver.devices, + driver_list) + qeth_remove_device_attributes(dev); + + up_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); +} + +static int __init +qeth_fs_init(void) +{ + printk(KERN_INFO "qeth_fs_init\n"); + qeth_create_procfs_entries(); + qeth_create_sysfs_entries(); + + return 0; +} + +static void __exit +qeth_fs_exit(void) +{ + printk(KERN_INFO "qeth_fs_exit\n"); + qeth_remove_procfs_entries(); + qeth_remove_sysfs_entries(); +} + + +module_init(qeth_fs_init); +module_exit(qeth_fs_exit); + +MODULE_LICENSE("GPL"); +*/ diff --git a/trunk/drivers/s390/net/qeth_sys.c b/trunk/drivers/s390/net/qeth_sys.c index 0ea185f70f75..ddd6019ba092 100644 --- a/trunk/drivers/s390/net/qeth_sys.c +++ b/trunk/drivers/s390/net/qeth_sys.c @@ -1,6 +1,6 @@ /* * - * linux/drivers/s390/net/qeth_sys.c ($Revision: 1.60 $) + * linux/drivers/s390/net/qeth_sys.c ($Revision: 1.58 $) * * Linux on zSeries OSA Express and HiperSockets support * This file contains code related to sysfs. @@ -20,7 +20,7 @@ #include "qeth_mpc.h" #include "qeth_fs.h" -const char *VERSION_QETH_SYS_C = "$Revision: 1.60 $"; +const char *VERSION_QETH_SYS_C = "$Revision: 1.58 $"; /*****************************************************************************/ /* */ @@ -160,7 +160,7 @@ qeth_dev_portname_store(struct device *dev, struct device_attribute *attr, const return -EPERM; tmp = strsep((char **) &buf, "\n"); - if ((strlen(tmp) > 8) || (strlen(tmp) == 0)) + if ((strlen(tmp) > 8) || (strlen(tmp) < 2)) return -EINVAL; card->info.portname[0] = strlen(tmp); diff --git a/trunk/drivers/s390/net/qeth_tso.h b/trunk/drivers/s390/net/qeth_tso.h index 3c50b6f24f51..e245af3c4cbd 100644 --- a/trunk/drivers/s390/net/qeth_tso.h +++ b/trunk/drivers/s390/net/qeth_tso.h @@ -1,5 +1,5 @@ /* - * linux/drivers/s390/net/qeth_tso.h ($Revision: 1.8 $) + * linux/drivers/s390/net/qeth_tso.h ($Revision: 1.7 $) * * Header file for qeth TCP Segmentation Offload support. * @@ -7,7 +7,7 @@ * * Author(s): Frank Pavlic * - * $Revision: 1.8 $ $Date: 2005/05/04 20:19:18 $ + * $Revision: 1.7 $ $Date: 2005/05/04 20:19:18 $ * */ #ifndef __QETH_TSO_H__ diff --git a/trunk/drivers/scsi/libata-scsi.c b/trunk/drivers/scsi/libata-scsi.c index 72ddba98f8fb..2282c04fee46 100644 --- a/trunk/drivers/scsi/libata-scsi.c +++ b/trunk/drivers/scsi/libata-scsi.c @@ -2044,7 +2044,7 @@ static int atapi_qc_complete(struct ata_queued_cmd *qc, unsigned int err_mask) else { u8 *scsicmd = cmd->cmnd; - if (scsicmd[0] == INQUIRY) { + if ((scsicmd[0] == INQUIRY) && ((scsicmd[1] & 0x03) == 0)) { u8 *buf = NULL; unsigned int buflen; @@ -2057,9 +2057,6 @@ static int atapi_qc_complete(struct ata_queued_cmd *qc, unsigned int err_mask) * to indicate to the Linux scsi midlayer this is a modern * device. 2) Ensure response data format / ATAPI information * are always correct. - */ - /* FIXME: do we ever override EVPD pages and the like, with - * this code? */ if (buf[2] == 0) { buf[2] = 0x5; diff --git a/trunk/drivers/scsi/scsi_scan.c b/trunk/drivers/scsi/scsi_scan.c index e36c21e06d31..94e5167f260d 100644 --- a/trunk/drivers/scsi/scsi_scan.c +++ b/trunk/drivers/scsi/scsi_scan.c @@ -400,35 +400,6 @@ static struct scsi_target *scsi_alloc_target(struct device *parent, return found_target; } -struct work_queue_wrapper { - struct work_struct work; - struct scsi_target *starget; -}; - -static void scsi_target_reap_work(void *data) { - struct work_queue_wrapper *wqw = (struct work_queue_wrapper *)data; - struct scsi_target *starget = wqw->starget; - struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); - unsigned long flags; - - kfree(wqw); - - spin_lock_irqsave(shost->host_lock, flags); - - if (--starget->reap_ref == 0 && list_empty(&starget->devices)) { - list_del_init(&starget->siblings); - spin_unlock_irqrestore(shost->host_lock, flags); - device_del(&starget->dev); - transport_unregister_device(&starget->dev); - put_device(&starget->dev); - return; - - } - spin_unlock_irqrestore(shost->host_lock, flags); - - return; -} - /** * scsi_target_reap - check to see if target is in use and destroy if not * @@ -440,18 +411,19 @@ static void scsi_target_reap_work(void *data) { */ void scsi_target_reap(struct scsi_target *starget) { - struct work_queue_wrapper *wqw = - kzalloc(sizeof(struct work_queue_wrapper), GFP_ATOMIC); + struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); + unsigned long flags; + spin_lock_irqsave(shost->host_lock, flags); - if (!wqw) { - starget_printk(KERN_ERR, starget, - "Failed to allocate memory in scsi_reap_target()\n"); + if (--starget->reap_ref == 0 && list_empty(&starget->devices)) { + list_del_init(&starget->siblings); + spin_unlock_irqrestore(shost->host_lock, flags); + device_del(&starget->dev); + transport_unregister_device(&starget->dev); + put_device(&starget->dev); return; } - - INIT_WORK(&wqw->work, scsi_target_reap_work, wqw); - wqw->starget = starget; - schedule_work(&wqw->work); + spin_unlock_irqrestore(shost->host_lock, flags); } /** diff --git a/trunk/drivers/scsi/scsi_transport_fc.c b/trunk/drivers/scsi/scsi_transport_fc.c index 2a1a99a2ef56..6cd5931d9a54 100644 --- a/trunk/drivers/scsi/scsi_transport_fc.c +++ b/trunk/drivers/scsi/scsi_transport_fc.c @@ -105,7 +105,6 @@ static struct { { FC_PORTSTATE_LINKDOWN, "Linkdown" }, { FC_PORTSTATE_ERROR, "Error" }, { FC_PORTSTATE_LOOPBACK, "Loopback" }, - { FC_PORTSTATE_DELETED, "Deleted" }, }; fc_enum_name_search(port_state, fc_port_state, fc_port_state_names) #define FC_PORTSTATE_MAX_NAMELEN 20 @@ -212,7 +211,6 @@ fc_bitfield_name_search(remote_port_roles, fc_remote_port_role_names) #define FC_MGMTSRVR_PORTID 0x00000a -static void fc_shost_remove_rports(void *data); static void fc_timeout_deleted_rport(void *data); static void fc_scsi_scan_rport(void *data); static void fc_rport_terminate(struct fc_rport *rport); @@ -320,8 +318,6 @@ static int fc_host_setup(struct transport_container *tc, struct device *dev, fc_host_next_rport_number(shost) = 0; fc_host_next_target_id(shost) = 0; - fc_host_flags(shost) = 0; - INIT_WORK(&fc_host_rport_del_work(shost), fc_shost_remove_rports, shost); return 0; } @@ -391,7 +387,6 @@ show_fc_rport_##field (struct class_device *cdev, char *buf) \ struct fc_internal *i = to_fc_internal(shost->transportt); \ if ((i->f->get_rport_##field) && \ !((rport->port_state == FC_PORTSTATE_BLOCKED) || \ - (rport->port_state == FC_PORTSTATE_DELETED) || \ (rport->port_state == FC_PORTSTATE_NOTPRESENT))) \ i->f->get_rport_##field(rport); \ return snprintf(buf, sz, format_string, cast rport->field); \ @@ -407,7 +402,6 @@ store_fc_rport_##field(struct class_device *cdev, const char *buf, \ struct Scsi_Host *shost = rport_to_shost(rport); \ struct fc_internal *i = to_fc_internal(shost->transportt); \ if ((rport->port_state == FC_PORTSTATE_BLOCKED) || \ - (rport->port_state == FC_PORTSTATE_DELETED) || \ (rport->port_state == FC_PORTSTATE_NOTPRESENT)) \ return -EBUSY; \ val = simple_strtoul(buf, NULL, 0); \ @@ -525,7 +519,6 @@ store_fc_rport_dev_loss_tmo(struct class_device *cdev, const char *buf, struct Scsi_Host *shost = rport_to_shost(rport); struct fc_internal *i = to_fc_internal(shost->transportt); if ((rport->port_state == FC_PORTSTATE_BLOCKED) || - (rport->port_state == FC_PORTSTATE_DELETED) || (rport->port_state == FC_PORTSTATE_NOTPRESENT)) return -EBUSY; val = simple_strtoul(buf, NULL, 0); @@ -1776,7 +1769,7 @@ fc_timeout_deleted_rport(void *data) rport->maxframe_size = -1; rport->supported_classes = FC_COS_UNSPECIFIED; rport->roles = FC_RPORT_ROLE_UNKNOWN; - rport->port_state = FC_PORTSTATE_DELETED; + rport->port_state = FC_PORTSTATE_NOTPRESENT; /* remove the identifiers that aren't used in the consisting binding */ switch (fc_host_tgtid_bind_type(shost)) { @@ -1796,23 +1789,14 @@ fc_timeout_deleted_rport(void *data) break; } + spin_unlock_irqrestore(shost->host_lock, flags); + /* * As this only occurs if the remote port (scsi target) * went away and didn't come back - we'll remove * all attached scsi devices. - * - * We'll schedule the shost work item to perform the actual removal - * to avoid recursion in the different flush calls if we perform - * the removal in each target - and there are lots of targets - * whose timeouts fire at the same time. */ - - if ( !(fc_host_flags(shost) & FC_SHOST_RPORT_DEL_SCHEDULED)) { - fc_host_flags(shost) |= FC_SHOST_RPORT_DEL_SCHEDULED; - scsi_queue_work(shost, &fc_host_rport_del_work(shost)); - } - - spin_unlock_irqrestore(shost->host_lock, flags); + fc_rport_tgt_remove(rport); } /** @@ -1834,41 +1818,6 @@ fc_scsi_scan_rport(void *data) } -/** - * fc_shost_remove_rports - called to remove all rports that are marked - * as in a deleted (not connected) state. - * - * @data: shost whose rports are to be looked at - **/ -static void -fc_shost_remove_rports(void *data) -{ - struct Scsi_Host *shost = (struct Scsi_Host *)data; - struct fc_rport *rport, *next_rport; - unsigned long flags; - - spin_lock_irqsave(shost->host_lock, flags); - while (fc_host_flags(shost) & FC_SHOST_RPORT_DEL_SCHEDULED) { - - fc_host_flags(shost) &= ~FC_SHOST_RPORT_DEL_SCHEDULED; - -restart_search: - list_for_each_entry_safe(rport, next_rport, - &fc_host_rport_bindings(shost), peers) { - if (rport->port_state == FC_PORTSTATE_DELETED) { - rport->port_state = FC_PORTSTATE_NOTPRESENT; - spin_unlock_irqrestore(shost->host_lock, flags); - fc_rport_tgt_remove(rport); - spin_lock_irqsave(shost->host_lock, flags); - goto restart_search; - } - } - - } - spin_unlock_irqrestore(shost->host_lock, flags); -} - - MODULE_AUTHOR("Martin Hicks"); MODULE_DESCRIPTION("FC Transport Attributes"); MODULE_LICENSE("GPL"); diff --git a/trunk/drivers/serial/Kconfig b/trunk/drivers/serial/Kconfig index 812bae62c8ec..ad47c1b84c3f 100644 --- a/trunk/drivers/serial/Kconfig +++ b/trunk/drivers/serial/Kconfig @@ -10,7 +10,7 @@ menu "Serial drivers" # The new 8250/16550 serial drivers config SERIAL_8250 tristate "8250/16550 and compatible serial support" - depends on (BROKEN || !SPARC) + depends on (BROKEN || !(SPARC64 || SPARC32)) select SERIAL_CORE ---help--- This selects whether you want to include the driver for the standard @@ -469,14 +469,14 @@ config SERIAL_IMX_CONSOLE config SERIAL_SUNCORE bool - depends on SPARC + depends on SPARC32 || SPARC64 select SERIAL_CORE select SERIAL_CORE_CONSOLE default y config SERIAL_SUNZILOG tristate "Sun Zilog8530 serial support" - depends on SPARC + depends on SPARC32 || SPARC64 help This driver supports the Zilog8530 serial ports found on many Sparc systems. Say Y or M if you want to be able to these serial ports. @@ -491,7 +491,7 @@ config SERIAL_SUNZILOG_CONSOLE config SERIAL_SUNSU tristate "Sun SU serial support" - depends on SPARC && PCI + depends on (SPARC32 || SPARC64) && PCI help This driver supports the 8250 serial ports that run the keyboard and mouse on (PCI) UltraSPARC systems. Say Y or M if you want to be able @@ -547,7 +547,7 @@ config PDC_CONSOLE config SERIAL_SUNSAB tristate "Sun Siemens SAB82532 serial support" - depends on SPARC && PCI + depends on (SPARC32 || SPARC64) && PCI help This driver supports the Siemens SAB82532 DUSCC serial ports on newer (PCI) UltraSPARC systems. Say Y or M if you want to be able to these diff --git a/trunk/drivers/usb/core/usb.c b/trunk/drivers/usb/core/usb.c index e80ef9467825..e197ce9353de 100644 --- a/trunk/drivers/usb/core/usb.c +++ b/trunk/drivers/usb/core/usb.c @@ -1432,8 +1432,7 @@ static int usb_generic_suspend(struct device *dev, pm_message_t message) mark_quiesced(intf); } else { // FIXME else if there's no suspend method, disconnect... - dev_warn(dev, "no suspend for driver %s?\n", driver->name); - mark_quiesced(intf); + dev_warn(dev, "no %s?\n", "suspend"); status = 0; } return status; @@ -1461,10 +1460,8 @@ static int usb_generic_resume(struct device *dev) } if ((dev->driver == NULL) || - (dev->driver_data == &usb_generic_driver_data)) { - dev->power.power_state.event = PM_EVENT_FREEZE; + (dev->driver_data == &usb_generic_driver_data)) return 0; - } intf = to_usb_interface(dev); driver = to_usb_driver(dev->driver); @@ -1484,7 +1481,7 @@ static int usb_generic_resume(struct device *dev) mark_quiesced(intf); } } else - dev_warn(dev, "no resume for driver %s?\n", driver->name); + dev_warn(dev, "no %s?\n", "resume"); return 0; } diff --git a/trunk/drivers/usb/storage/scsiglue.c b/trunk/drivers/usb/storage/scsiglue.c index 4ef5527028c5..4837524eada7 100644 --- a/trunk/drivers/usb/storage/scsiglue.c +++ b/trunk/drivers/usb/storage/scsiglue.c @@ -109,7 +109,7 @@ static int slave_configure(struct scsi_device *sdev) * data comes from. */ if (sdev->scsi_level < SCSI_2) - sdev->scsi_level = sdev->sdev_target->scsi_level = SCSI_2; + sdev->scsi_level = SCSI_2; /* According to the technical support people at Genesys Logic, * devices using their chips have problems transferring more than @@ -162,7 +162,7 @@ static int slave_configure(struct scsi_device *sdev) * a Get-Max-LUN request, we won't lose much by setting the * revision level down to 2. The only devices that would be * affected are those with sparse LUNs. */ - sdev->scsi_level = sdev->sdev_target->scsi_level = SCSI_2; + sdev->scsi_level = SCSI_2; /* USB-IDE bridges tend to report SK = 0x04 (Non-recoverable * Hardware Error) when any low-level error occurs, diff --git a/trunk/drivers/video/Kconfig b/trunk/drivers/video/Kconfig index cc8e3bf5001b..3e470c8b4193 100644 --- a/trunk/drivers/video/Kconfig +++ b/trunk/drivers/video/Kconfig @@ -536,13 +536,13 @@ config FB_SUN3 config FB_SBUS bool "SBUS and UPA framebuffers" - depends on (FB = y) && SPARC + depends on (FB = y) && (SPARC32 || SPARC64) help Say Y if you want support for SBUS or UPA based frame buffer device. config FB_BW2 bool "BWtwo support" - depends on (FB = y) && (SPARC && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) + depends on (FB = y) && ((SPARC32 || SPARC64) && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT @@ -551,7 +551,7 @@ config FB_BW2 config FB_CG3 bool "CGthree support" - depends on (FB = y) && (SPARC && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) + depends on (FB = y) && ((SPARC32 || SPARC64) && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT @@ -560,7 +560,7 @@ config FB_CG3 config FB_CG6 bool "CGsix (GX,TurboGX) support" - depends on (FB = y) && (SPARC && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) + depends on (FB = y) && ((SPARC32 || SPARC64) && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT help @@ -1268,7 +1268,7 @@ config FB_LEO config FB_PCI bool "PCI framebuffers" - depends on (FB = y) && PCI && SPARC + depends on (FB = y) && PCI && (SPARC64 || SPARC32) config FB_IGA bool "IGA 168x display support" diff --git a/trunk/drivers/video/console/Kconfig b/trunk/drivers/video/console/Kconfig index a5d09e159cd1..5f74df993406 100644 --- a/trunk/drivers/video/console/Kconfig +++ b/trunk/drivers/video/console/Kconfig @@ -6,7 +6,7 @@ menu "Console display driver support" config VGA_CONSOLE bool "VGA text console" if EMBEDDED || !X86 - depends on !ARCH_ACORN && !ARCH_EBSA110 && !4xx && !8xx && !SPARC && !M68K && !PARISC && !ARCH_VERSATILE + depends on !ARCH_ACORN && !ARCH_EBSA110 && !4xx && !8xx && !SPARC32 && !SPARC64 && !M68K && !PARISC && !ARCH_VERSATILE default y help Saying Y here will allow you to use Linux in text mode through a @@ -68,7 +68,7 @@ config SGI_NEWPORT_CONSOLE config PROM_CONSOLE bool "PROM console" - depends on SPARC + depends on SPARC32 || SPARC64 help Say Y to build a console driver for Sun machines that uses the terminal emulation built into their console PROMS. @@ -136,7 +136,7 @@ config FONTS config FONT_8x8 bool "VGA 8x8 font" if FONTS depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE - default y if !SPARC && !FONTS + default y if !SPARC32 && !SPARC64 && !FONTS help This is the "high resolution" font for the VGA frame buffer (the one provided by the text console 80x50 (and higher) modes). @@ -150,7 +150,7 @@ config FONT_8x8 config FONT_8x16 bool "VGA 8x16 font" if FONTS depends on FRAMEBUFFER_CONSOLE || SGI_NEWPORT_CONSOLE=y || STI_CONSOLE || USB_SISUSBVGA_CON - default y if !SPARC && !FONTS + default y if !SPARC32 && !SPARC64 && !FONTS help This is the "high resolution" font for the VGA frame buffer (the one provided by the VGA text console 80x25 mode. @@ -160,7 +160,7 @@ config FONT_8x16 config FONT_6x11 bool "Mac console 6x11 font (not supported by all drivers)" if FONTS depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE - default y if !SPARC && !FONTS && MAC + default y if !SPARC32 && !SPARC64 && !FONTS && MAC help Small console font with Macintosh-style high-half glyphs. Some Mac framebuffer drivers don't support this one at all. @@ -176,7 +176,7 @@ config FONT_7x14 config FONT_PEARL_8x8 bool "Pearl (old m68k) console 8x8 font" if FONTS depends on FRAMEBUFFER_CONSOLE - default y if !SPARC && !FONTS && AMIGA + default y if !SPARC32 && !SPARC64 && !FONTS && AMIGA help Small console font with PC-style control-character and high-half glyphs. @@ -184,24 +184,24 @@ config FONT_PEARL_8x8 config FONT_ACORN_8x8 bool "Acorn console 8x8 font" if FONTS depends on FRAMEBUFFER_CONSOLE - default y if !SPARC && !FONTS && ARM && ARCH_ACORN + default y if !SPARC32 && !SPARC64 && !FONTS && ARM && ARCH_ACORN help Small console font with PC-style control characters and high-half glyphs. config FONT_MINI_4x6 bool "Mini 4x6 font" - depends on !SPARC && FONTS + depends on !SPARC32 && !SPARC64 && FONTS config FONT_SUN8x16 bool "Sparc console 8x16 font" - depends on FRAMEBUFFER_CONSOLE && (!SPARC && FONTS || SPARC) + depends on FRAMEBUFFER_CONSOLE && (!SPARC32 && !SPARC64 && FONTS || SPARC32 || SPARC64) help This is the high resolution console font for Sun machines. Say Y. config FONT_SUN12x22 bool "Sparc console 12x22 font (not supported by all drivers)" - depends on FRAMEBUFFER_CONSOLE && (!SPARC && FONTS || SPARC) + depends on FRAMEBUFFER_CONSOLE && (!SPARC32 && !SPARC64 && FONTS || SPARC32 || SPARC64) help This is the high resolution console font for Sun machines with very big letters (like the letters used in the SPARC PROM). If the diff --git a/trunk/drivers/video/console/fbcon_ud.c b/trunk/drivers/video/console/fbcon_ud.c index 9dd059e8b645..c4d7c89212b4 100644 --- a/trunk/drivers/video/console/fbcon_ud.c +++ b/trunk/drivers/video/console/fbcon_ud.c @@ -420,15 +420,13 @@ static void ud_cursor(struct vc_data *vc, struct fb_info *info, int ud_update_start(struct fb_info *info) { struct fbcon_ops *ops = info->fbcon_par; - int xoffset, yoffset; + u32 xoffset, yoffset; u32 vyres = GETVYRES(ops->p->scrollmode, info); u32 vxres = GETVXRES(ops->p->scrollmode, info); int err; - xoffset = vxres - info->var.xres - ops->var.xoffset; - yoffset = vyres - info->var.yres - ops->var.yoffset; - if (yoffset < 0) - yoffset += vyres; + xoffset = (vxres - info->var.xres) - ops->var.xoffset; + yoffset = (vyres - info->var.yres) - ops->var.yoffset; ops->var.xoffset = xoffset; ops->var.yoffset = yoffset; err = fb_pan_display(info, &ops->var); diff --git a/trunk/drivers/video/intelfb/intelfb.h b/trunk/drivers/video/intelfb/intelfb.h index da29d007f215..f077ca34faba 100644 --- a/trunk/drivers/video/intelfb/intelfb.h +++ b/trunk/drivers/video/intelfb/intelfb.h @@ -41,10 +41,6 @@ /*** hw-related values ***/ -/* Resource Allocation */ -#define INTELFB_FB_ACQUIRED 1 -#define INTELFB_MMIO_ACQUIRED 2 - /* PCI ids for supported devices */ #define PCI_DEVICE_ID_INTEL_830M 0x3577 #define PCI_DEVICE_ID_INTEL_845G 0x2562 @@ -261,7 +257,6 @@ struct intelfb_info { int hwcursor; int fixed_mode; int ring_active; - int flag; /* hw cursor */ int cursor_on; diff --git a/trunk/drivers/video/intelfb/intelfbdrv.c b/trunk/drivers/video/intelfb/intelfbdrv.c index 0090544842f5..427689e584da 100644 --- a/trunk/drivers/video/intelfb/intelfbdrv.c +++ b/trunk/drivers/video/intelfb/intelfbdrv.c @@ -135,6 +135,9 @@ static void __devinit get_initial_mode(struct intelfb_info *dinfo); static void update_dinfo(struct intelfb_info *dinfo, struct fb_var_screeninfo *var); +static int intelfb_get_fix(struct fb_fix_screeninfo *fix, + struct fb_info *info); + static int intelfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info); static int intelfb_set_par(struct fb_info *info); @@ -470,9 +473,9 @@ cleanup(struct intelfb_info *dinfo) if (dinfo->aperture.virtual) iounmap((void __iomem *)dinfo->aperture.virtual); - if (dinfo->flag & INTELFB_MMIO_ACQUIRED) + if (dinfo->mmio_base_phys) release_mem_region(dinfo->mmio_base_phys, INTEL_REG_SIZE); - if (dinfo->flag & INTELFB_FB_ACQUIRED) + if (dinfo->aperture.physical) release_mem_region(dinfo->aperture.physical, dinfo->aperture.size); framebuffer_release(dinfo->info); @@ -569,9 +572,6 @@ intelfb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent) cleanup(dinfo); return -ENODEV; } - - dinfo->flag |= INTELFB_FB_ACQUIRED; - if (!request_mem_region(dinfo->mmio_base_phys, INTEL_REG_SIZE, INTELFB_MODULE_NAME)) { @@ -580,8 +580,6 @@ intelfb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent) return -ENODEV; } - dinfo->flag |= INTELFB_MMIO_ACQUIRED; - /* Get the chipset info. */ dinfo->pci_chipset = pdev->device; @@ -1093,17 +1091,7 @@ intelfb_set_fbinfo(struct intelfb_info *dinfo) return 1; info->pixmap.scan_align = 1; - strcpy(info->fix.id, dinfo->name); - info->fix.smem_start = dinfo->fb.physical; - info->fix.smem_len = dinfo->fb.size; - info->fix.type = FB_TYPE_PACKED_PIXELS; - info->fix.type_aux = 0; - info->fix.xpanstep = 8; - info->fix.ypanstep = 1; - info->fix.ywrapstep = 0; - info->fix.mmio_start = dinfo->mmio_base_phys; - info->fix.mmio_len = INTEL_REG_SIZE; - info->fix.accel = FB_ACCEL_I830; + update_dinfo(dinfo, &info->var); return 0; @@ -1121,8 +1109,7 @@ update_dinfo(struct intelfb_info *dinfo, struct fb_var_screeninfo *var) dinfo->yres = var->xres; dinfo->pixclock = var->pixclock; - dinfo->info->fix.visual = dinfo->visual; - dinfo->info->fix.line_length = dinfo->pitch; + intelfb_get_fix(&dinfo->info->fix, dinfo->info); switch (dinfo->bpp) { case 8: @@ -1152,6 +1139,30 @@ update_dinfo(struct intelfb_info *dinfo, struct fb_var_screeninfo *var) /* fbops functions */ +static int +intelfb_get_fix(struct fb_fix_screeninfo *fix, struct fb_info *info) +{ + struct intelfb_info *dinfo = GET_DINFO(info); + + DBG_MSG("intelfb_get_fix\n"); + + memset(fix, 0, sizeof(*fix)); + strcpy(fix->id, dinfo->name); + fix->smem_start = dinfo->fb.physical; + fix->smem_len = dinfo->fb.size; + fix->type = FB_TYPE_PACKED_PIXELS; + fix->type_aux = 0; + fix->visual = dinfo->visual; + fix->xpanstep = 8; + fix->ypanstep = 1; + fix->ywrapstep = 0; + fix->line_length = dinfo->pitch; + fix->mmio_start = dinfo->mmio_base_phys; + fix->mmio_len = INTEL_REG_SIZE; + fix->accel = FB_ACCEL_I830; + return 0; +} + /*************************************************************** * fbdev interface * ***************************************************************/ diff --git a/trunk/drivers/video/logo/Kconfig b/trunk/drivers/video/logo/Kconfig index f0e6512c87ff..8cb7fb4db441 100644 --- a/trunk/drivers/video/logo/Kconfig +++ b/trunk/drivers/video/logo/Kconfig @@ -47,7 +47,7 @@ config LOGO_SGI_CLUT224 config LOGO_SUN_CLUT224 bool "224-color Sun Linux logo" - depends on LOGO && SPARC + depends on LOGO && (SPARC32 || SPARC64) default y config LOGO_SUPERH_MONO diff --git a/trunk/drivers/video/sbuslib.c b/trunk/drivers/video/sbuslib.c index 3a74a63dd4f2..646c43f921c5 100644 --- a/trunk/drivers/video/sbuslib.c +++ b/trunk/drivers/video/sbuslib.c @@ -46,9 +46,6 @@ int sbusfb_mmap_helper(struct sbus_mmap_map *map, unsigned long off; int i; - if (!(vma->vm_flags & (VM_SHARED | VM_MAYSHARE))) - return -EINVAL; - size = vma->vm_end - vma->vm_start; if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) return -EINVAL; diff --git a/trunk/fs/lockd/clntlock.c b/trunk/fs/lockd/clntlock.c index 3eaf6e701087..006bb9e14579 100644 --- a/trunk/fs/lockd/clntlock.c +++ b/trunk/fs/lockd/clntlock.c @@ -157,8 +157,6 @@ void nlmclnt_mark_reclaim(struct nlm_host *host) inode = fl->fl_file->f_dentry->d_inode; if (inode->i_sb->s_magic != NFS_SUPER_MAGIC) continue; - if (fl->fl_u.nfs_fl.owner == NULL) - continue; if (fl->fl_u.nfs_fl.owner->host != host) continue; if (!(fl->fl_u.nfs_fl.flags & NFS_LCK_GRANTED)) @@ -228,8 +226,6 @@ reclaimer(void *ptr) inode = fl->fl_file->f_dentry->d_inode; if (inode->i_sb->s_magic != NFS_SUPER_MAGIC) continue; - if (fl->fl_u.nfs_fl.owner == NULL) - continue; if (fl->fl_u.nfs_fl.owner->host != host) continue; if (!(fl->fl_u.nfs_fl.flags & NFS_LCK_RECLAIM)) diff --git a/trunk/fs/nfs/direct.c b/trunk/fs/nfs/direct.c index 079228817603..b497c71384e8 100644 --- a/trunk/fs/nfs/direct.c +++ b/trunk/fs/nfs/direct.c @@ -678,9 +678,15 @@ nfs_file_direct_read(struct kiocb *iocb, char __user *buf, size_t count, loff_t if (!count) goto out; - retval = nfs_sync_mapping(mapping); - if (retval) - goto out; + if (mapping->nrpages) { + retval = filemap_fdatawrite(mapping); + if (retval == 0) + retval = nfs_wb_all(inode); + if (retval == 0) + retval = filemap_fdatawait(mapping); + if (retval) + goto out; + } retval = nfs_direct_read(inode, ctx, &iov, pos, 1); if (retval > 0) @@ -758,9 +764,15 @@ nfs_file_direct_write(struct kiocb *iocb, const char __user *buf, size_t count, if (!count) goto out; - retval = nfs_sync_mapping(mapping); - if (retval) - goto out; + if (mapping->nrpages) { + retval = filemap_fdatawrite(mapping); + if (retval == 0) + retval = nfs_wb_all(inode); + if (retval == 0) + retval = filemap_fdatawait(mapping); + if (retval) + goto out; + } retval = nfs_direct_write(inode, ctx, &iov, pos, 1); if (mapping->nrpages) diff --git a/trunk/fs/nfs/file.c b/trunk/fs/nfs/file.c index 7a79fbe9f539..57d3e77d97ee 100644 --- a/trunk/fs/nfs/file.c +++ b/trunk/fs/nfs/file.c @@ -433,7 +433,11 @@ static int do_unlk(struct file *filp, int cmd, struct file_lock *fl) * Flush all pending writes before doing anything * with locks.. */ - nfs_sync_mapping(filp->f_mapping); + filemap_fdatawrite(filp->f_mapping); + down(&inode->i_sem); + nfs_wb_all(inode); + up(&inode->i_sem); + filemap_fdatawait(filp->f_mapping); /* NOTE: special case * If we're signalled while cleaning up locks on process exit, we @@ -461,8 +465,15 @@ static int do_setlk(struct file *filp, int cmd, struct file_lock *fl) * Flush all pending writes before doing anything * with locks.. */ - status = nfs_sync_mapping(filp->f_mapping); - if (status != 0) + status = filemap_fdatawrite(filp->f_mapping); + if (status == 0) { + down(&inode->i_sem); + status = nfs_wb_all(inode); + up(&inode->i_sem); + if (status == 0) + status = filemap_fdatawait(filp->f_mapping); + } + if (status < 0) goto out; lock_kernel(); @@ -486,7 +497,11 @@ static int do_setlk(struct file *filp, int cmd, struct file_lock *fl) * Make sure we clear the cache whenever we try to get the lock. * This makes locking act as a cache coherency point. */ - nfs_sync_mapping(filp->f_mapping); + filemap_fdatawrite(filp->f_mapping); + down(&inode->i_sem); + nfs_wb_all(inode); /* we may have slept */ + up(&inode->i_sem); + filemap_fdatawait(filp->f_mapping); nfs_zap_caches(inode); out: rpc_clnt_sigunmask(NFS_CLIENT(inode), &oldset); @@ -509,8 +524,7 @@ static int nfs_lock(struct file *filp, int cmd, struct file_lock *fl) return -EINVAL; /* No mandatory locks over NFS */ - if ((inode->i_mode & (S_ISGID | S_IXGRP)) == S_ISGID && - fl->fl_type != F_UNLCK) + if ((inode->i_mode & (S_ISGID | S_IXGRP)) == S_ISGID) return -ENOLCK; if (IS_GETLK(cmd)) diff --git a/trunk/fs/nfs/inode.c b/trunk/fs/nfs/inode.c index 432f41cd75e6..afd75d0463fd 100644 --- a/trunk/fs/nfs/inode.c +++ b/trunk/fs/nfs/inode.c @@ -640,27 +640,6 @@ static int nfs_show_options(struct seq_file *m, struct vfsmount *mnt) return 0; } -/** - * nfs_sync_mapping - helper to flush all mmapped dirty data to disk - */ -int nfs_sync_mapping(struct address_space *mapping) -{ - int ret; - - if (mapping->nrpages == 0) - return 0; - unmap_mapping_range(mapping, 0, 0, 0); - ret = filemap_fdatawrite(mapping); - if (ret != 0) - goto out; - ret = filemap_fdatawait(mapping); - if (ret != 0) - goto out; - ret = nfs_wb_all(mapping->host); -out: - return ret; -} - /* * Invalidate the local caches */ @@ -1200,8 +1179,11 @@ void nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping) struct nfs_inode *nfsi = NFS_I(inode); if (nfsi->cache_validity & NFS_INO_INVALID_DATA) { - if (S_ISREG(inode->i_mode)) - nfs_sync_mapping(mapping); + if (S_ISREG(inode->i_mode)) { + if (filemap_fdatawrite(mapping) == 0) + filemap_fdatawait(mapping); + nfs_wb_all(inode); + } invalidate_inode_pages2(mapping); spin_lock(&inode->i_lock); diff --git a/trunk/fs/nfsd/nfs2acl.c b/trunk/fs/nfsd/nfs2acl.c index fc95c4df6693..7cbf0682b2f0 100644 --- a/trunk/fs/nfsd/nfs2acl.c +++ b/trunk/fs/nfsd/nfs2acl.c @@ -107,7 +107,7 @@ static int nfsacld_proc_setacl(struct svc_rqst * rqstp, dprintk("nfsd: SETACL(2acl) %s\n", SVCFH_fmt(&argp->fh)); fh = fh_copy(&resp->fh, &argp->fh); - nfserr = fh_verify(rqstp, &resp->fh, 0, MAY_SATTR); + nfserr = fh_verify(rqstp, &resp->fh, 0, MAY_NOP); if (!nfserr) { nfserr = nfserrno( nfsd_set_posix_acl( diff --git a/trunk/fs/nfsd/nfs3acl.c b/trunk/fs/nfsd/nfs3acl.c index 16e10c170aed..64ba40572fea 100644 --- a/trunk/fs/nfsd/nfs3acl.c +++ b/trunk/fs/nfsd/nfs3acl.c @@ -101,7 +101,7 @@ static int nfsd3_proc_setacl(struct svc_rqst * rqstp, int nfserr = 0; fh = fh_copy(&resp->fh, &argp->fh); - nfserr = fh_verify(rqstp, &resp->fh, 0, MAY_SATTR); + nfserr = fh_verify(rqstp, &resp->fh, 0, MAY_NOP); if (!nfserr) { nfserr = nfserrno( nfsd_set_posix_acl( diff --git a/trunk/fs/partitions/Kconfig b/trunk/fs/partitions/Kconfig index 656bc43431b9..deb25b661f04 100644 --- a/trunk/fs/partitions/Kconfig +++ b/trunk/fs/partitions/Kconfig @@ -203,7 +203,7 @@ config ULTRIX_PARTITION config SUN_PARTITION bool "Sun partition tables support" if PARTITION_ADVANCED - default y if (SPARC || SUN3 || SUN3X) + default y if (SPARC32 || SPARC64 || SUN3 || SUN3X) ---help--- Like most systems, SunOS uses its own hard disk partition table format, incompatible with all others. Saying Y here allows you to diff --git a/trunk/fs/relayfs/relay.c b/trunk/fs/relayfs/relay.c index 2a6f7f12b7f9..16446a15c96d 100644 --- a/trunk/fs/relayfs/relay.c +++ b/trunk/fs/relayfs/relay.c @@ -333,7 +333,8 @@ size_t relay_switch_subbuf(struct rchan_buf *buf, size_t length) return length; toobig: - buf->chan->last_toobig = length; + printk(KERN_WARNING "relayfs: event too large (%Zd)\n", length); + WARN_ON(1); return 0; } @@ -398,11 +399,6 @@ void relay_close(struct rchan *chan) relay_close_buf(chan->buf[i]); } - if (chan->last_toobig) - printk(KERN_WARNING "relayfs: one or more items not logged " - "[item size (%Zd) > sub-buffer size (%Zd)]\n", - chan->last_toobig, chan->subbuf_size); - kref_put(&chan->kref, relay_destroy_channel); } diff --git a/trunk/include/acpi/acglobal.h b/trunk/include/acpi/acglobal.h index 4ab2ca18b8df..e9c2790139ec 100644 --- a/trunk/include/acpi/acglobal.h +++ b/trunk/include/acpi/acglobal.h @@ -211,7 +211,7 @@ ACPI_EXTERN u32 acpi_gbl_original_mode; ACPI_EXTERN u32 acpi_gbl_rsdp_original_location; ACPI_EXTERN u32 acpi_gbl_ns_lookup_count; ACPI_EXTERN u32 acpi_gbl_ps_find_count; -ACPI_EXTERN u64 acpi_gbl_owner_id_mask; +ACPI_EXTERN u32 acpi_gbl_owner_id_mask; ACPI_EXTERN u16 acpi_gbl_pm1_enable_register_save; ACPI_EXTERN u16 acpi_gbl_global_lock_handle; ACPI_EXTERN u8 acpi_gbl_debugger_configuration; diff --git a/trunk/include/asm-ia64/topology.h b/trunk/include/asm-ia64/topology.h index f7c330467e7e..a9f738bf18a7 100644 --- a/trunk/include/asm-ia64/topology.h +++ b/trunk/include/asm-ia64/topology.h @@ -38,7 +38,7 @@ /* * Returns the number of the first CPU on Node 'node'. */ -#define node_to_first_cpu(node) (first_cpu(node_to_cpumask(node))) +#define node_to_first_cpu(node) (__ffs(node_to_cpumask(node))) /* * Determines the node for a given pci bus diff --git a/trunk/include/asm-x86_64/rwlock.h b/trunk/include/asm-x86_64/rwlock.h index 9942cc393064..8a78a4ace53c 100644 --- a/trunk/include/asm-x86_64/rwlock.h +++ b/trunk/include/asm-x86_64/rwlock.h @@ -64,7 +64,7 @@ ::"a" (rw) : "memory") #define __build_write_lock_const(rw, helper) \ - asm volatile(LOCK "subl $" RW_LOCK_BIAS_STR ",%0\n\t" \ + asm volatile(LOCK "subl $" RW_LOCK_BIAS_STR ",(%0)\n\t" \ "jnz 2f\n" \ "1:\n" \ LOCK_SECTION_START("") \ diff --git a/trunk/include/asm-x86_64/topology.h b/trunk/include/asm-x86_64/topology.h index 7d82bc56b9fa..d39ebd5263ed 100644 --- a/trunk/include/asm-x86_64/topology.h +++ b/trunk/include/asm-x86_64/topology.h @@ -23,7 +23,7 @@ extern int __node_distance(int, int); #define cpu_to_node(cpu) (cpu_to_node[cpu]) #define parent_node(node) (node) -#define node_to_first_cpu(node) (first_cpu(node_to_cpumask[node])) +#define node_to_first_cpu(node) (__ffs(node_to_cpumask[node])) #define node_to_cpumask(node) (node_to_cpumask[node]) #define pcibus_to_node(bus) ((long)(bus->sysdata)) #define pcibus_to_cpumask(bus) node_to_cpumask(pcibus_to_node(bus)); diff --git a/trunk/include/linux/ipv6_route.h b/trunk/include/linux/ipv6_route.h index d7c41d1d706a..e2f935038013 100644 --- a/trunk/include/linux/ipv6_route.h +++ b/trunk/include/linux/ipv6_route.h @@ -18,7 +18,6 @@ fallback, no routers on link */ #define RTF_ADDRCONF 0x00040000 /* addrconf route - RA */ #define RTF_PREFIX_RT 0x00080000 /* A prefix only route - RA */ -#define RTF_ANYCAST 0x00100000 /* Anycast */ #define RTF_NONEXTHOP 0x00200000 /* route with no nexthop */ #define RTF_EXPIRES 0x00400000 diff --git a/trunk/include/linux/irq.h b/trunk/include/linux/irq.h index f04ba20712a2..c516382fbec2 100644 --- a/trunk/include/linux/irq.h +++ b/trunk/include/linux/irq.h @@ -10,7 +10,7 @@ */ #include -#include +#include /* cpu_online_map */ #if !defined(CONFIG_ARCH_S390) diff --git a/trunk/include/linux/nfs_fs.h b/trunk/include/linux/nfs_fs.h index 2516adeccecf..12787a9b0259 100644 --- a/trunk/include/linux/nfs_fs.h +++ b/trunk/include/linux/nfs_fs.h @@ -291,7 +291,6 @@ static inline int nfs_verify_change_attribute(struct inode *inode, unsigned long /* * linux/fs/nfs/inode.c */ -extern int nfs_sync_mapping(struct address_space *mapping); extern void nfs_zap_caches(struct inode *); extern struct inode *nfs_fhget(struct super_block *, struct nfs_fh *, struct nfs_fattr *); diff --git a/trunk/include/linux/preempt.h b/trunk/include/linux/preempt.h index 5769d14d1e6a..d9a2f5254a51 100644 --- a/trunk/include/linux/preempt.h +++ b/trunk/include/linux/preempt.h @@ -48,7 +48,6 @@ do { \ #define preempt_enable() \ do { \ preempt_enable_no_resched(); \ - barrier(); \ preempt_check_resched(); \ } while (0) diff --git a/trunk/include/linux/relayfs_fs.h b/trunk/include/linux/relayfs_fs.h index fb7e80737325..cfafc3e76bc2 100644 --- a/trunk/include/linux/relayfs_fs.h +++ b/trunk/include/linux/relayfs_fs.h @@ -20,9 +20,9 @@ #include /* - * Tracks changes to rchan/rchan_buf structs + * Tracks changes to rchan_buf struct */ -#define RELAYFS_CHANNEL_VERSION 6 +#define RELAYFS_CHANNEL_VERSION 5 /* * Per-cpu relay channel buffer @@ -60,7 +60,6 @@ struct rchan struct rchan_callbacks *cb; /* client callbacks */ struct kref kref; /* channel refcount */ void *private_data; /* for user-defined data */ - size_t last_toobig; /* tried to log event > subbuf size */ struct rchan_buf *buf[NR_CPUS]; /* per-cpu channel buffers */ }; diff --git a/trunk/include/linux/rtnetlink.h b/trunk/include/linux/rtnetlink.h index d50482ba27fe..c231e9a08f0b 100644 --- a/trunk/include/linux/rtnetlink.h +++ b/trunk/include/linux/rtnetlink.h @@ -866,7 +866,6 @@ enum rtnetlink_groups { #define RTNLGRP_IPV4_MROUTE RTNLGRP_IPV4_MROUTE RTNLGRP_IPV4_ROUTE, #define RTNLGRP_IPV4_ROUTE RTNLGRP_IPV4_ROUTE - RTNLGRP_NOP1, RTNLGRP_IPV6_IFADDR, #define RTNLGRP_IPV6_IFADDR RTNLGRP_IPV6_IFADDR RTNLGRP_IPV6_MROUTE, @@ -877,11 +876,8 @@ enum rtnetlink_groups { #define RTNLGRP_IPV6_IFINFO RTNLGRP_IPV6_IFINFO RTNLGRP_DECnet_IFADDR, #define RTNLGRP_DECnet_IFADDR RTNLGRP_DECnet_IFADDR - RTNLGRP_NOP2, RTNLGRP_DECnet_ROUTE, #define RTNLGRP_DECnet_ROUTE RTNLGRP_DECnet_ROUTE - RTNLGRP_NOP3, - RTNLGRP_NOP4, RTNLGRP_IPV6_PREFIX, #define RTNLGRP_IPV6_PREFIX RTNLGRP_IPV6_PREFIX __RTNLGRP_MAX diff --git a/trunk/include/net/if_inet6.h b/trunk/include/net/if_inet6.h index d8234f9bd4c4..e97a9accb71d 100644 --- a/trunk/include/net/if_inet6.h +++ b/trunk/include/net/if_inet6.h @@ -24,7 +24,6 @@ #define IF_RA_MANAGED 0x40 #define IF_RA_RCVD 0x20 #define IF_RS_SENT 0x10 -#define IF_READY 0x80000000 /* prefix flags */ #define IF_PREFIX_ONLINK 0x01 diff --git a/trunk/include/net/xfrm.h b/trunk/include/net/xfrm.h index 1cdb87912137..5beae1ccd574 100644 --- a/trunk/include/net/xfrm.h +++ b/trunk/include/net/xfrm.h @@ -890,7 +890,6 @@ struct xfrm_state * xfrm_find_acq(u8 mode, u32 reqid, u8 proto, extern void xfrm_policy_flush(void); extern int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol); extern int xfrm_flush_bundles(void); -extern void xfrm_flush_all_bundles(void); extern int xfrm_bundle_ok(struct xfrm_dst *xdst, struct flowi *fl, int family); extern void xfrm_init_pmtu(struct dst_entry *dst); diff --git a/trunk/include/scsi/scsi_transport_fc.h b/trunk/include/scsi/scsi_transport_fc.h index 394f14a5b7cb..fac547d32a98 100644 --- a/trunk/include/scsi/scsi_transport_fc.h +++ b/trunk/include/scsi/scsi_transport_fc.h @@ -79,7 +79,6 @@ enum fc_port_state { FC_PORTSTATE_LINKDOWN, FC_PORTSTATE_ERROR, FC_PORTSTATE_LOOPBACK, - FC_PORTSTATE_DELETED, }; @@ -326,14 +325,8 @@ struct fc_host_attrs { struct list_head rport_bindings; u32 next_rport_number; u32 next_target_id; - u8 flags; - struct work_struct rport_del_work; }; -/* values for struct fc_host_attrs "flags" field: */ -#define FC_SHOST_RPORT_DEL_SCHEDULED 0x01 - - #define fc_host_node_name(x) \ (((struct fc_host_attrs *)(x)->shost_data)->node_name) #define fc_host_port_name(x) \ @@ -372,10 +365,6 @@ struct fc_host_attrs { (((struct fc_host_attrs *)(x)->shost_data)->next_rport_number) #define fc_host_next_target_id(x) \ (((struct fc_host_attrs *)(x)->shost_data)->next_target_id) -#define fc_host_flags(x) \ - (((struct fc_host_attrs *)(x)->shost_data)->flags) -#define fc_host_rport_del_work(x) \ - (((struct fc_host_attrs *)(x)->shost_data)->rport_del_work) /* The functions by which the transport class and the driver communicate */ diff --git a/trunk/init/Kconfig b/trunk/init/Kconfig index 9fc0759fa942..6c5dbedc6e96 100644 --- a/trunk/init/Kconfig +++ b/trunk/init/Kconfig @@ -260,6 +260,7 @@ config CC_OPTIMIZE_FOR_SIZE bool "Optimize for size (Look out for broken compilers!)" default y depends on ARM || H8300 || EXPERIMENTAL + depends on !SPARC64 help Enabling this option will pass "-Os" instead of "-O2" to gcc resulting in a smaller kernel. diff --git a/trunk/ipc/sem.c b/trunk/ipc/sem.c index cb5bb2a5df96..19af028a3e38 100644 --- a/trunk/ipc/sem.c +++ b/trunk/ipc/sem.c @@ -381,7 +381,6 @@ static void update_queue (struct sem_array * sma) /* hands-off: q will disappear immediately after * writing q->status. */ - smp_wmb(); q->status = error; q = n; } else { @@ -462,7 +461,6 @@ static void freeary (struct sem_array *sma, int id) n = q->next; q->status = IN_WAKEUP; wake_up_process(q->sleeper); /* doesn't sleep */ - smp_wmb(); q->status = -EIDRM; /* hands-off q */ q = n; } diff --git a/trunk/kernel/futex.c b/trunk/kernel/futex.c index 5e71a6bf6f6b..5872e3507f35 100644 --- a/trunk/kernel/futex.c +++ b/trunk/kernel/futex.c @@ -270,13 +270,7 @@ static void wake_futex(struct futex_q *q) /* * The waiting task can free the futex_q as soon as this is written, * without taking any locks. This must come last. - * - * A memory barrier is required here to prevent the following store - * to lock_ptr from getting ahead of the wakeup. Clearing the lock - * at the end of wake_up_all() does not prevent this store from - * moving. */ - wmb(); q->lock_ptr = NULL; } diff --git a/trunk/kernel/params.c b/trunk/kernel/params.c index c76ad25e6a21..47ba69547945 100644 --- a/trunk/kernel/params.c +++ b/trunk/kernel/params.c @@ -619,7 +619,7 @@ static void __init param_sysfs_builtin(void) /* module-related sysfs stuff */ -#ifdef CONFIG_SYSFS +#ifdef CONFIG_MODULES #define to_module_attr(n) container_of(n, struct module_attribute, attr); #define to_module_kobject(n) container_of(n, struct module_kobject, kobj); diff --git a/trunk/lib/spinlock_debug.c b/trunk/lib/spinlock_debug.c index dcd4be9bd4e5..906ad101eab3 100644 --- a/trunk/lib/spinlock_debug.c +++ b/trunk/lib/spinlock_debug.c @@ -20,8 +20,7 @@ static void spin_bug(spinlock_t *lock, const char *msg) if (lock->owner && lock->owner != SPINLOCK_OWNER_INIT) owner = lock->owner; printk("BUG: spinlock %s on CPU#%d, %s/%d\n", - msg, raw_smp_processor_id(), - current->comm, current->pid); + msg, smp_processor_id(), current->comm, current->pid); printk(" lock: %p, .magic: %08x, .owner: %s/%d, .owner_cpu: %d\n", lock, lock->magic, owner ? owner->comm : "", @@ -79,8 +78,8 @@ static void __spin_lock_debug(spinlock_t *lock) if (print_once) { print_once = 0; printk("BUG: spinlock lockup on CPU#%d, %s/%d, %p\n", - raw_smp_processor_id(), current->comm, - current->pid, lock); + smp_processor_id(), current->comm, current->pid, + lock); dump_stack(); } } @@ -121,8 +120,7 @@ static void rwlock_bug(rwlock_t *lock, const char *msg) if (xchg(&print_once, 0)) { printk("BUG: rwlock %s on CPU#%d, %s/%d, %p\n", msg, - raw_smp_processor_id(), current->comm, - current->pid, lock); + smp_processor_id(), current->comm, current->pid, lock); dump_stack(); #ifdef CONFIG_SMP /* @@ -150,8 +148,8 @@ static void __read_lock_debug(rwlock_t *lock) if (print_once) { print_once = 0; printk("BUG: read-lock lockup on CPU#%d, %s/%d, %p\n", - raw_smp_processor_id(), current->comm, - current->pid, lock); + smp_processor_id(), current->comm, current->pid, + lock); dump_stack(); } } @@ -222,8 +220,8 @@ static void __write_lock_debug(rwlock_t *lock) if (print_once) { print_once = 0; printk("BUG: write-lock lockup on CPU#%d, %s/%d, %p\n", - raw_smp_processor_id(), current->comm, - current->pid, lock); + smp_processor_id(), current->comm, current->pid, + lock); dump_stack(); } } diff --git a/trunk/lib/swiotlb.c b/trunk/lib/swiotlb.c index 1ff8dcebf7c6..57216f3544ca 100644 --- a/trunk/lib/swiotlb.c +++ b/trunk/lib/swiotlb.c @@ -704,9 +704,8 @@ swiotlb_map_sg(struct device *hwdev, struct scatterlist *sg, int nelems, addr = SG_ENT_VIRT_ADDRESS(sg); dev_addr = virt_to_phys(addr); if (swiotlb_force || address_needs_mapping(hwdev, dev_addr)) { - void *map = map_single(hwdev, addr, sg->length, dir); - sg->dma_address = virt_to_bus(map); - if (!map) { + sg->dma_address = (dma_addr_t) virt_to_phys(map_single(hwdev, addr, sg->length, dir)); + if (!sg->dma_address) { /* Don't panic here, we expect map_sg users to do proper error handling. */ swiotlb_full(hwdev, sg->length, dir, 0); diff --git a/trunk/net/8021q/vlan.c b/trunk/net/8021q/vlan.c index 67465b65abe4..91e412b0ab00 100644 --- a/trunk/net/8021q/vlan.c +++ b/trunk/net/8021q/vlan.c @@ -753,8 +753,6 @@ static int vlan_ioctl_handler(void __user *arg) break; case GET_VLAN_REALDEV_NAME_CMD: err = vlan_dev_get_realdev_name(args.device1, args.u.device2); - if (err) - goto out; if (copy_to_user(arg, &args, sizeof(struct vlan_ioctl_args))) { err = -EFAULT; @@ -763,8 +761,6 @@ static int vlan_ioctl_handler(void __user *arg) case GET_VLAN_VID_CMD: err = vlan_dev_get_vid(args.device1, &vid); - if (err) - goto out; args.u.VID = vid; if (copy_to_user(arg, &args, sizeof(struct vlan_ioctl_args))) { @@ -778,7 +774,7 @@ static int vlan_ioctl_handler(void __user *arg) __FUNCTION__, args.cmd); return -EINVAL; }; -out: + return err; } diff --git a/trunk/net/bridge/br_netfilter.c b/trunk/net/bridge/br_netfilter.c index 43a0b35dfe6f..d8e36b775125 100644 --- a/trunk/net/bridge/br_netfilter.c +++ b/trunk/net/bridge/br_netfilter.c @@ -295,7 +295,7 @@ static int check_hbh_len(struct sk_buff *skb) len -= 2; while (len > 0) { - int optlen = skb->nh.raw[off+1]+2; + int optlen = raw[off+1]+2; switch (skb->nh.raw[off]) { case IPV6_TLV_PAD0: @@ -308,15 +308,18 @@ static int check_hbh_len(struct sk_buff *skb) case IPV6_TLV_JUMBO: if (skb->nh.raw[off+1] != 4 || (off&3) != 2) goto bad; + pkt_len = ntohl(*(u32*)(skb->nh.raw+off+2)); - if (pkt_len <= IPV6_MAXPLEN || - skb->nh.ipv6h->payload_len) - goto bad; + if (pkt_len > skb->len - sizeof(struct ipv6hdr)) goto bad; - if (pskb_trim_rcsum(skb, - pkt_len+sizeof(struct ipv6hdr))) - goto bad; + if (pkt_len + sizeof(struct ipv6hdr) < skb->len) { + if (__pskb_trim(skb, + pkt_len + sizeof(struct ipv6hdr))) + goto bad; + if (skb->ip_summed == CHECKSUM_HW) + skb->ip_summed = CHECKSUM_NONE; + } break; default: if (optlen > len) diff --git a/trunk/net/dccp/ipv4.c b/trunk/net/dccp/ipv4.c index 656e13e38cfb..ca03521112c5 100644 --- a/trunk/net/dccp/ipv4.c +++ b/trunk/net/dccp/ipv4.c @@ -1251,7 +1251,7 @@ static int dccp_v4_destroy_sock(struct sock *sk) struct dccp_sock *dp = dccp_sk(sk); /* - * DCCP doesn't use sk_write_queue, just sk_send_head + * DCCP doesn't use sk_qrite_queue, just sk_send_head * for retransmissions */ if (sk->sk_send_head != NULL) { diff --git a/trunk/net/ipv4/netfilter/Makefile b/trunk/net/ipv4/netfilter/Makefile index d0a447e520a2..058c48e258fc 100644 --- a/trunk/net/ipv4/netfilter/Makefile +++ b/trunk/net/ipv4/netfilter/Makefile @@ -12,7 +12,6 @@ ip_nat_pptp-objs := ip_nat_helper_pptp.o ip_nat_proto_gre.o # connection tracking obj-$(CONFIG_IP_NF_CONNTRACK) += ip_conntrack.o -obj-$(CONFIG_IP_NF_NAT) += ip_nat.o # conntrack netlink interface obj-$(CONFIG_IP_NF_CONNTRACK_NETLINK) += ip_conntrack_netlink.o @@ -42,7 +41,7 @@ obj-$(CONFIG_IP_NF_IPTABLES) += ip_tables.o # the three instances of ip_tables obj-$(CONFIG_IP_NF_FILTER) += iptable_filter.o obj-$(CONFIG_IP_NF_MANGLE) += iptable_mangle.o -obj-$(CONFIG_IP_NF_NAT) += iptable_nat.o +obj-$(CONFIG_IP_NF_NAT) += iptable_nat.o ip_nat.o obj-$(CONFIG_IP_NF_RAW) += iptable_raw.o # matches diff --git a/trunk/net/ipv4/xfrm4_policy.c b/trunk/net/ipv4/xfrm4_policy.c index 42196ba3b0b9..b2b60f3e9cdd 100644 --- a/trunk/net/ipv4/xfrm4_policy.c +++ b/trunk/net/ipv4/xfrm4_policy.c @@ -182,7 +182,6 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl) case IPPROTO_UDP: case IPPROTO_TCP: case IPPROTO_SCTP: - case IPPROTO_DCCP: if (pskb_may_pull(skb, xprth + 4 - skb->data)) { u16 *ports = (u16 *)xprth; diff --git a/trunk/net/ipv6/addrconf.c b/trunk/net/ipv6/addrconf.c index 2a6439e3c91c..73a23b4130a5 100644 --- a/trunk/net/ipv6/addrconf.c +++ b/trunk/net/ipv6/addrconf.c @@ -137,7 +137,6 @@ static int addrconf_ifdown(struct net_device *dev, int how); static void addrconf_dad_start(struct inet6_ifaddr *ifp, u32 flags); static void addrconf_dad_timer(unsigned long data); static void addrconf_dad_completed(struct inet6_ifaddr *ifp); -static void addrconf_dad_run(struct inet6_dev *idev); static void addrconf_rs_timer(unsigned long data); static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifa); static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifa); @@ -389,9 +388,6 @@ static struct inet6_dev * ipv6_add_dev(struct net_device *dev) } #endif - if (netif_carrier_ok(dev)) - ndev->if_flags |= IF_READY; - write_lock_bh(&addrconf_lock); dev->ip6_ptr = ndev; write_unlock_bh(&addrconf_lock); @@ -419,7 +415,6 @@ static struct inet6_dev * ipv6_find_idev(struct net_device *dev) if ((idev = ipv6_add_dev(dev)) == NULL) return NULL; } - if (dev->flags&IFF_UP) ipv6_mc_up(idev); return idev; @@ -639,7 +634,8 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp) } #endif - for (ifap = &idev->addr_list; (ifa=*ifap) != NULL;) { + for (ifap = &idev->addr_list; (ifa=*ifap) != NULL; + ifap = &ifa->if_next) { if (ifa == ifp) { *ifap = ifa->if_next; __in6_ifa_put(ifp); @@ -647,7 +643,6 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp) if (!(ifp->flags & IFA_F_PERMANENT) || onlink > 0) break; deleted = 1; - continue; } else if (ifp->flags & IFA_F_PERMANENT) { if (ipv6_prefix_equal(&ifa->addr, &ifp->addr, ifp->prefix_len)) { @@ -671,7 +666,6 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp) } } } - ifap = &ifa->if_next; } write_unlock_bh(&idev->lock); @@ -909,18 +903,11 @@ int ipv6_dev_get_saddr(struct net_device *daddr_dev, score.addr_type = __ipv6_addr_type(&ifa->addr); - /* Rule 0: - * - Tentative Address (RFC2462 section 5.4) - * - A tentative address is not considered - * "assigned to an interface" in the traditional - * sense. - * - Candidate Source Address (section 4) + /* Rule 0: Candidate Source Address (section 4) * - In any case, anycast addresses, multicast * addresses, and the unspecified address MUST * NOT be included in a candidate set. */ - if (ifa->flags & IFA_F_TENTATIVE) - continue; if (unlikely(score.addr_type == IPV6_ADDR_ANY || score.addr_type & IPV6_ADDR_MULTICAST)) { LIMIT_NETDEBUG(KERN_DEBUG @@ -1228,8 +1215,10 @@ int ipv6_rcv_saddr_equal(const struct sock *sk, const struct sock *sk2) /* Gets referenced address, destroys ifaddr */ -void addrconf_dad_stop(struct inet6_ifaddr *ifp) +void addrconf_dad_failure(struct inet6_ifaddr *ifp) { + if (net_ratelimit()) + printk(KERN_INFO "%s: duplicate address detected!\n", ifp->idev->dev->name); if (ifp->flags&IFA_F_PERMANENT) { spin_lock_bh(&ifp->lock); addrconf_del_timer(ifp); @@ -1255,12 +1244,6 @@ void addrconf_dad_stop(struct inet6_ifaddr *ifp) ipv6_del_addr(ifp); } -void addrconf_dad_failure(struct inet6_ifaddr *ifp) -{ - if (net_ratelimit()) - printk(KERN_INFO "%s: duplicate address detected!\n", ifp->idev->dev->name); - addrconf_dad_stop(ifp); -} /* Join to solicited addr multicast group. */ @@ -1613,17 +1596,9 @@ void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len) not good. */ if (valid_lft >= 0x7FFFFFFF/HZ) - rt_expires = 0x7FFFFFFF - (0x7FFFFFFF % HZ); + rt_expires = 0; else - rt_expires = valid_lft * HZ; - - /* - * We convert this (in jiffies) to clock_t later. - * Avoid arithmetic overflow there as well. - * Overflow can happen only if HZ < USER_HZ. - */ - if (HZ < USER_HZ && rt_expires > 0x7FFFFFFF / USER_HZ) - rt_expires = 0x7FFFFFFF / USER_HZ; + rt_expires = jiffies + valid_lft * HZ; if (pinfo->onlink) { struct rt6_info *rt; @@ -1635,12 +1610,12 @@ void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len) ip6_del_rt(rt, NULL, NULL, NULL); rt = NULL; } else { - rt->rt6i_expires = jiffies + rt_expires; + rt->rt6i_expires = rt_expires; } } } else if (valid_lft) { addrconf_prefix_route(&pinfo->prefix, pinfo->prefix_len, - dev, jiffies_to_clock_t(rt_expires), RTF_ADDRCONF|RTF_EXPIRES|RTF_PREFIX_RT); + dev, rt_expires, RTF_ADDRCONF|RTF_EXPIRES|RTF_PREFIX_RT); } if (rt) dst_release(&rt->u.dst); @@ -2150,42 +2125,9 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event, { struct net_device *dev = (struct net_device *) data; struct inet6_dev *idev = __in6_dev_get(dev); - int run_pending = 0; switch(event) { case NETDEV_UP: - case NETDEV_CHANGE: - if (event == NETDEV_UP) { - if (!netif_carrier_ok(dev)) { - /* device is not ready yet. */ - printk(KERN_INFO - "ADDRCONF(NETDEV_UP): %s: " - "link is not ready\n", - dev->name); - break; - } - } else { - if (!netif_carrier_ok(dev)) { - /* device is still not ready. */ - break; - } - - if (idev) { - if (idev->if_flags & IF_READY) { - /* device is already configured. */ - break; - } - idev->if_flags |= IF_READY; - } - - printk(KERN_INFO - "ADDRCONF(NETDEV_CHANGE): %s: " - "link becomes ready\n", - dev->name); - - run_pending = 1; - } - switch(dev->type) { case ARPHRD_SIT: addrconf_sit_config(dev); @@ -2202,9 +2144,6 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event, break; }; if (idev) { - if (run_pending) - addrconf_dad_run(idev); - /* If the MTU changed during the interface down, when the interface up, the changed MTU must be reflected in the idev as well as routers. @@ -2239,7 +2178,8 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event, */ addrconf_ifdown(dev, event != NETDEV_DOWN); break; - + case NETDEV_CHANGE: + break; case NETDEV_CHANGENAME: #ifdef CONFIG_SYSCTL if (idev) { @@ -2320,7 +2260,7 @@ static int addrconf_ifdown(struct net_device *dev, int how) /* Step 3: clear flags for stateless addrconf */ if (how != 1) - idev->if_flags &= ~(IF_RS_SENT|IF_RA_RCVD|IF_READY); + idev->if_flags &= ~(IF_RS_SENT|IF_RA_RCVD); /* Step 4: clear address list */ #ifdef CONFIG_IPV6_PRIVACY @@ -2429,20 +2369,11 @@ static void addrconf_rs_timer(unsigned long data) /* * Duplicate Address Detection */ -static void addrconf_dad_kick(struct inet6_ifaddr *ifp) -{ - unsigned long rand_num; - struct inet6_dev *idev = ifp->idev; - - rand_num = net_random() % (idev->cnf.rtr_solicit_delay ? : 1); - ifp->probes = idev->cnf.dad_transmits; - addrconf_mod_timer(ifp, AC_DAD, rand_num); -} - static void addrconf_dad_start(struct inet6_ifaddr *ifp, u32 flags) { struct inet6_dev *idev = ifp->idev; struct net_device *dev = idev->dev; + unsigned long rand_num; addrconf_join_solict(dev, &ifp->addr); @@ -2451,6 +2382,7 @@ static void addrconf_dad_start(struct inet6_ifaddr *ifp, u32 flags) flags); net_srandom(ifp->addr.s6_addr32[3]); + rand_num = net_random() % (idev->cnf.rtr_solicit_delay ? : 1); read_lock_bh(&idev->lock); if (ifp->dead) @@ -2467,19 +2399,10 @@ static void addrconf_dad_start(struct inet6_ifaddr *ifp, u32 flags) return; } - if (idev->if_flags & IF_READY) { - addrconf_dad_kick(ifp); - spin_unlock_bh(&ifp->lock); - } else { - spin_unlock_bh(&ifp->lock); - /* - * If the defice is not ready: - * - keep it tentative if it is a permanent address. - * - otherwise, kill it. - */ - in6_ifa_hold(ifp); - addrconf_dad_stop(ifp); - } + ifp->probes = idev->cnf.dad_transmits; + addrconf_mod_timer(ifp, AC_DAD, rand_num); + + spin_unlock_bh(&ifp->lock); out: read_unlock_bh(&idev->lock); } @@ -2561,22 +2484,6 @@ static void addrconf_dad_completed(struct inet6_ifaddr *ifp) } } -static void addrconf_dad_run(struct inet6_dev *idev) { - struct inet6_ifaddr *ifp; - - read_lock_bh(&idev->lock); - for (ifp = idev->addr_list; ifp; ifp = ifp->if_next) { - spin_lock_bh(&ifp->lock); - if (!(ifp->flags & IFA_F_TENTATIVE)) { - spin_unlock_bh(&ifp->lock); - continue; - } - spin_unlock_bh(&ifp->lock); - addrconf_dad_kick(ifp); - } - read_unlock_bh(&idev->lock); -} - #ifdef CONFIG_PROC_FS struct if6_iter_state { int bucket; @@ -2782,9 +2689,6 @@ static void addrconf_verify(unsigned long foo) in6_ifa_hold(ifpub); spin_unlock(&ifp->lock); read_unlock(&addrconf_hash_lock); - spin_lock(&ifpub->lock); - ifpub->regen_count = 0; - spin_unlock(&ifpub->lock); ipv6_create_tempaddr(ifpub, ifp); in6_ifa_put(ifpub); in6_ifa_put(ifp); diff --git a/trunk/net/ipv6/icmp.c b/trunk/net/ipv6/icmp.c index 6ec6a2b549bb..34a332225c17 100644 --- a/trunk/net/ipv6/icmp.c +++ b/trunk/net/ipv6/icmp.c @@ -328,10 +328,8 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info, iif = skb->dev->ifindex; /* - * Must not send error if the source does not uniquely - * identify a single node (RFC2463 Section 2.4). - * We check unspecified / multicast addresses here, - * and anycast addresses will be checked later. + * Must not send if we know that source is Anycast also. + * for now we don't know that. */ if ((addr_type == IPV6_ADDR_ANY) || (addr_type & IPV6_ADDR_MULTICAST)) { LIMIT_NETDEBUG(KERN_DEBUG "icmpv6_send: addr_any/mcast source\n"); @@ -375,16 +373,6 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info, err = ip6_dst_lookup(sk, &dst, &fl); if (err) goto out; - - /* - * We won't send icmp if the destination is known - * anycast. - */ - if (((struct rt6_info *)dst)->rt6i_flags & RTF_ANYCAST) { - LIMIT_NETDEBUG(KERN_DEBUG "icmpv6_send: acast source\n"); - goto out_dst_release; - } - if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0) goto out; diff --git a/trunk/net/ipv6/netfilter/Kconfig b/trunk/net/ipv6/netfilter/Kconfig index 04912f9b35c3..060d61202412 100644 --- a/trunk/net/ipv6/netfilter/Kconfig +++ b/trunk/net/ipv6/netfilter/Kconfig @@ -211,7 +211,7 @@ config IP6_NF_TARGET_REJECT config IP6_NF_TARGET_NFQUEUE tristate "NFQUEUE Target Support" - depends on IP6_NF_IPTABLES + depends on IP_NF_IPTABLES help This Target replaced the old obsolete QUEUE target. diff --git a/trunk/net/ipv6/route.c b/trunk/net/ipv6/route.c index 66140f13d119..a7a537b50595 100644 --- a/trunk/net/ipv6/route.c +++ b/trunk/net/ipv6/route.c @@ -413,14 +413,11 @@ static struct rt6_info *rt6_cow(struct rt6_info *ort, struct in6_addr *daddr, rt = ip6_rt_copy(ort); if (rt) { - if (!(rt->rt6i_flags&RTF_GATEWAY)) { - if (rt->rt6i_dst.plen != 128 && - ipv6_addr_equal(&rt->rt6i_dst.addr, daddr)) - rt->rt6i_flags |= RTF_ANYCAST; + ipv6_addr_copy(&rt->rt6i_dst.addr, daddr); + + if (!(rt->rt6i_flags&RTF_GATEWAY)) ipv6_addr_copy(&rt->rt6i_gateway, daddr); - } - ipv6_addr_copy(&rt->rt6i_dst.addr, daddr); rt->rt6i_dst.plen = 128; rt->rt6i_flags |= RTF_CACHE; rt->u.dst.flags |= DST_HOST; @@ -832,7 +829,7 @@ int ip6_route_add(struct in6_rtmsg *rtmsg, struct nlmsghdr *nlh, } rt->u.dst.obsolete = -1; - rt->rt6i_expires = jiffies + clock_t_to_jiffies(rtmsg->rtmsg_info); + rt->rt6i_expires = clock_t_to_jiffies(rtmsg->rtmsg_info); if (nlh && (r = NLMSG_DATA(nlh))) { rt->rt6i_protocol = r->rtm_protocol; } else { @@ -1416,9 +1413,7 @@ struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev, rt->u.dst.obsolete = -1; rt->rt6i_flags = RTF_UP | RTF_NONEXTHOP; - if (anycast) - rt->rt6i_flags |= RTF_ANYCAST; - else + if (!anycast) rt->rt6i_flags |= RTF_LOCAL; rt->rt6i_nexthop = ndisc_get_neigh(rt->rt6i_dev, &rt->rt6i_gateway); if (rt->rt6i_nexthop == NULL) { diff --git a/trunk/net/ipv6/xfrm6_policy.c b/trunk/net/ipv6/xfrm6_policy.c index 69bd957380e7..cf1d91e74c82 100644 --- a/trunk/net/ipv6/xfrm6_policy.c +++ b/trunk/net/ipv6/xfrm6_policy.c @@ -214,7 +214,6 @@ _decode_session6(struct sk_buff *skb, struct flowi *fl) case IPPROTO_UDP: case IPPROTO_TCP: case IPPROTO_SCTP: - case IPPROTO_DCCP: if (pskb_may_pull(skb, skb->nh.raw + offset + 4 - skb->data)) { u16 *ports = (u16 *)exthdr; diff --git a/trunk/net/netrom/nr_in.c b/trunk/net/netrom/nr_in.c index a7d88b5ad756..004e8599b8fe 100644 --- a/trunk/net/netrom/nr_in.c +++ b/trunk/net/netrom/nr_in.c @@ -99,7 +99,7 @@ static int nr_state1_machine(struct sock *sk, struct sk_buff *skb, break; case NR_RESET: - if (sysctl_netrom_reset_circuit) + if (sysctl_netrom_reset_circuit); nr_disconnect(sk, ECONNRESET); break; @@ -130,7 +130,7 @@ static int nr_state2_machine(struct sock *sk, struct sk_buff *skb, break; case NR_RESET: - if (sysctl_netrom_reset_circuit) + if (sysctl_netrom_reset_circuit); nr_disconnect(sk, ECONNRESET); break; @@ -265,7 +265,7 @@ static int nr_state3_machine(struct sock *sk, struct sk_buff *skb, int frametype break; case NR_RESET: - if (sysctl_netrom_reset_circuit) + if (sysctl_netrom_reset_circuit); nr_disconnect(sk, ECONNRESET); break; diff --git a/trunk/net/sctp/socket.c b/trunk/net/sctp/socket.c index 9df888e932c5..1f7f244806b7 100644 --- a/trunk/net/sctp/socket.c +++ b/trunk/net/sctp/socket.c @@ -156,6 +156,10 @@ static inline void sctp_set_owner_w(struct sctp_chunk *chunk) sizeof(struct sk_buff) + sizeof(struct sctp_chunk); + sk->sk_wmem_queued += SCTP_DATA_SNDSIZE(chunk) + + sizeof(struct sk_buff) + + sizeof(struct sctp_chunk); + atomic_add(sizeof(struct sctp_chunk), &sk->sk_wmem_alloc); } @@ -4422,7 +4426,7 @@ int sctp_inet_listen(struct socket *sock, int backlog) * tcp_poll(). Note that, based on these implementations, we don't * lock the socket in this function, even though it seems that, * ideally, locking or some other mechanisms can be used to ensure - * the integrity of the counters (sndbuf and wmem_alloc) used + * the integrity of the counters (sndbuf and wmem_queued) used * in this place. We assume that we don't need locks either until proven * otherwise. * @@ -4829,6 +4833,10 @@ static void sctp_wfree(struct sk_buff *skb) sizeof(struct sk_buff) + sizeof(struct sctp_chunk); + sk->sk_wmem_queued -= SCTP_DATA_SNDSIZE(chunk) + + sizeof(struct sk_buff) + + sizeof(struct sctp_chunk); + atomic_sub(sizeof(struct sctp_chunk), &sk->sk_wmem_alloc); sock_wfree(skb); @@ -4912,7 +4920,7 @@ void sctp_write_space(struct sock *sk) /* Is there any sndbuf space available on the socket? * - * Note that sk_wmem_alloc is the sum of the send buffers on all of the + * Note that wmem_queued is the sum of the send buffers on all of the * associations on the same socket. For a UDP-style socket with * multiple associations, it is possible for it to be "unwriteable" * prematurely. I assume that this is acceptable because @@ -4925,7 +4933,7 @@ static int sctp_writeable(struct sock *sk) { int amt = 0; - amt = sk->sk_sndbuf - atomic_read(&sk->sk_wmem_alloc); + amt = sk->sk_sndbuf - sk->sk_wmem_queued; if (amt < 0) amt = 0; return amt; diff --git a/trunk/net/sunrpc/auth_gss/auth_gss.c b/trunk/net/sunrpc/auth_gss/auth_gss.c index 8d782282ec19..f44f46f1d8e0 100644 --- a/trunk/net/sunrpc/auth_gss/auth_gss.c +++ b/trunk/net/sunrpc/auth_gss/auth_gss.c @@ -638,7 +638,7 @@ gss_pipe_destroy_msg(struct rpc_pipe_msg *msg) gss_msg); atomic_inc(&gss_msg->count); gss_unhash_msg(gss_msg); - if (msg->errno == -ETIMEDOUT) { + if (msg->errno == -ETIMEDOUT || msg->errno == -EPIPE) { unsigned long now = jiffies; if (time_after(now, ratelimit)) { printk(KERN_WARNING "RPC: AUTH_GSS upcall timed out.\n" @@ -786,9 +786,7 @@ gss_create_cred(struct rpc_auth *auth, struct auth_cred *acred, int taskflags) cred->gc_flags = 0; cred->gc_base.cr_ops = &gss_credops; cred->gc_service = gss_auth->service; - do { - err = gss_create_upcall(gss_auth, cred); - } while (err == -EAGAIN); + err = gss_create_upcall(gss_auth, cred); if (err < 0) goto out_err; diff --git a/trunk/net/sunrpc/rpc_pipe.c b/trunk/net/sunrpc/rpc_pipe.c index 16a2458f38f7..c76ea221798c 100644 --- a/trunk/net/sunrpc/rpc_pipe.c +++ b/trunk/net/sunrpc/rpc_pipe.c @@ -174,7 +174,7 @@ rpc_pipe_release(struct inode *inode, struct file *filp) goto out; msg = (struct rpc_pipe_msg *)filp->private_data; if (msg != NULL) { - msg->errno = -EAGAIN; + msg->errno = -EPIPE; list_del_init(&msg->list); rpci->ops->destroy_msg(msg); } @@ -183,7 +183,7 @@ rpc_pipe_release(struct inode *inode, struct file *filp) if (filp->f_mode & FMODE_READ) rpci->nreaders --; if (!rpci->nreaders) - __rpc_purge_upcall(inode, -EAGAIN); + __rpc_purge_upcall(inode, -EPIPE); if (rpci->ops->release_pipe) rpci->ops->release_pipe(inode); out: diff --git a/trunk/net/sunrpc/xprtsock.c b/trunk/net/sunrpc/xprtsock.c index 77e8800d4127..0a51fd46a848 100644 --- a/trunk/net/sunrpc/xprtsock.c +++ b/trunk/net/sunrpc/xprtsock.c @@ -990,7 +990,6 @@ static void xs_udp_connect_worker(void *args) sk->sk_data_ready = xs_udp_data_ready; sk->sk_write_space = xs_udp_write_space; sk->sk_no_check = UDP_CSUM_NORCV; - sk->sk_allocation = GFP_ATOMIC; xprt_set_connected(xprt); @@ -1075,7 +1074,6 @@ static void xs_tcp_connect_worker(void *args) sk->sk_data_ready = xs_tcp_data_ready; sk->sk_state_change = xs_tcp_state_change; sk->sk_write_space = xs_tcp_write_space; - sk->sk_allocation = GFP_ATOMIC; /* socket options */ sk->sk_userlocks |= SOCK_BINDPORT_LOCK; diff --git a/trunk/net/xfrm/xfrm_policy.c b/trunk/net/xfrm/xfrm_policy.c index d19e274b9c4a..0db9e57013fd 100644 --- a/trunk/net/xfrm/xfrm_policy.c +++ b/trunk/net/xfrm/xfrm_policy.c @@ -346,7 +346,6 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl) struct xfrm_policy *pol, **p; struct xfrm_policy *delpol = NULL; struct xfrm_policy **newpos = NULL; - struct dst_entry *gc_list; write_lock_bh(&xfrm_policy_lock); for (p = &xfrm_policy_list[dir]; (pol=*p)!=NULL;) { @@ -382,36 +381,9 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl) xfrm_pol_hold(policy); write_unlock_bh(&xfrm_policy_lock); - if (delpol) + if (delpol) { xfrm_policy_kill(delpol); - - read_lock_bh(&xfrm_policy_lock); - gc_list = NULL; - for (policy = policy->next; policy; policy = policy->next) { - struct dst_entry *dst; - - write_lock(&policy->lock); - dst = policy->bundles; - if (dst) { - struct dst_entry *tail = dst; - while (tail->next) - tail = tail->next; - tail->next = gc_list; - gc_list = dst; - - policy->bundles = NULL; - } - write_unlock(&policy->lock); - } - read_unlock_bh(&xfrm_policy_lock); - - while (gc_list) { - struct dst_entry *dst = gc_list; - - gc_list = dst->next; - dst_free(dst); } - return 0; } EXPORT_SYMBOL(xfrm_policy_insert); @@ -1042,12 +1014,13 @@ int __xfrm_route_forward(struct sk_buff *skb, unsigned short family) } EXPORT_SYMBOL(__xfrm_route_forward); +/* Optimize later using cookies and generation ids. */ + static struct dst_entry *xfrm_dst_check(struct dst_entry *dst, u32 cookie) { - /* If it is marked obsolete, which is how we even get here, - * then we have purged it from the policy bundle list and we - * did that for a good reason. - */ + if (!stale_bundle(dst)) + return dst; + return NULL; } @@ -1131,16 +1104,6 @@ int xfrm_flush_bundles(void) return 0; } -static int always_true(struct dst_entry *dst) -{ - return 1; -} - -void xfrm_flush_all_bundles(void) -{ - xfrm_prune_bundles(always_true); -} - void xfrm_init_pmtu(struct dst_entry *dst) { do { diff --git a/trunk/net/xfrm/xfrm_state.c b/trunk/net/xfrm/xfrm_state.c index 479effc97666..7cf48aa6c95b 100644 --- a/trunk/net/xfrm/xfrm_state.c +++ b/trunk/net/xfrm/xfrm_state.c @@ -431,8 +431,6 @@ void xfrm_state_insert(struct xfrm_state *x) spin_lock_bh(&xfrm_state_lock); __xfrm_state_insert(x); spin_unlock_bh(&xfrm_state_lock); - - xfrm_flush_all_bundles(); } EXPORT_SYMBOL(xfrm_state_insert); @@ -480,9 +478,6 @@ int xfrm_state_add(struct xfrm_state *x) spin_unlock_bh(&xfrm_state_lock); xfrm_state_put_afinfo(afinfo); - if (!err) - xfrm_flush_all_bundles(); - if (x1) { xfrm_state_delete(x1); xfrm_state_put(x1); diff --git a/trunk/sound/sparc/Kconfig b/trunk/sound/sparc/Kconfig index ef022a846b06..09ab138646a6 100644 --- a/trunk/sound/sparc/Kconfig +++ b/trunk/sound/sparc/Kconfig @@ -1,7 +1,7 @@ # ALSA Sparc drivers menu "ALSA Sparc devices" - depends on SND!=n && SPARC + depends on SND!=n && (SPARC32 || SPARC64) config SND_SUN_AMD7930 tristate "Sun AMD7930"