Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'master'

+1194 -894
+3 -3
MAINTAINERS
··· 536 536 M: mchehab@brturbo.com.br 537 537 L: video4linux-list@redhat.com 538 538 W: http://linuxtv.org 539 - T: quilt http://www.linuxtv.org/download/quilt/ 539 + T: git kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb.git 540 540 S: Maintained 541 541 542 542 BUSLOGIC SCSI DRIVER ··· 834 834 M: linux-dvb-maintainer@linuxtv.org 835 835 L: linux-dvb@linuxtv.org (subscription required) 836 836 W: http://linuxtv.org/ 837 - T: quilt http://www.linuxtv.org/download/quilt/ 837 + T: git kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb.git 838 838 S: Supported 839 839 840 840 EATA-DMA SCSI DRIVER ··· 2896 2896 M: mchehab@brturbo.com.br 2897 2897 L: video4linux-list@redhat.com 2898 2898 W: http://linuxtv.org 2899 - T: quilt http://www.linuxtv.org/download/quilt/ 2899 + T: git kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb.git 2900 2900 S: Maintained 2901 2901 2902 2902 W1 DALLAS'S 1-WIRE BUS
+1 -1
Makefile
··· 1 1 VERSION = 2 2 2 PATCHLEVEL = 6 3 3 SUBLEVEL = 15 4 - EXTRAVERSION =-rc6 4 + EXTRAVERSION = 5 5 NAME=Sliding Snow Leopard 6 6 7 7 # *DOCUMENTATION*
+4 -4
arch/arm/kernel/calls.S
··· 131 131 .long sys_wait4 132 132 /* 115 */ .long sys_swapoff 133 133 .long sys_sysinfo 134 - .long sys_ipc_wrapper 134 + .long sys_ipc 135 135 .long sys_fsync 136 136 .long sys_sigreturn_wrapper 137 137 /* 120 */ .long sys_clone_wrapper ··· 254 254 .long sys_fremovexattr 255 255 .long sys_tkill 256 256 .long sys_sendfile64 257 - /* 240 */ .long sys_futex_wrapper 257 + /* 240 */ .long sys_futex 258 258 .long sys_sched_setaffinity 259 259 .long sys_sched_getaffinity 260 260 .long sys_io_setup ··· 284 284 .long sys_fstatfs64 285 285 .long sys_tgkill 286 286 .long sys_utimes 287 - /* 270 */ .long sys_arm_fadvise64_64_wrapper 287 + /* 270 */ .long sys_arm_fadvise64_64 288 288 .long sys_pciconfig_iobase 289 289 .long sys_pciconfig_read 290 290 .long sys_pciconfig_write ··· 333 333 .long sys_inotify_init 334 334 .long sys_inotify_add_watch 335 335 .long sys_inotify_rm_watch 336 - .long sys_mbind_wrapper 336 + .long sys_mbind 337 337 /* 320 */ .long sys_get_mempolicy 338 338 .long sys_set_mempolicy 339 339 __syscall_end:
+49
arch/arm/kernel/entry-armv.S
··· 614 614 /* 615 615 * Reference prototype: 616 616 * 617 + * void __kernel_memory_barrier(void) 618 + * 619 + * Input: 620 + * 621 + * lr = return address 622 + * 623 + * Output: 624 + * 625 + * none 626 + * 627 + * Clobbered: 628 + * 629 + * the Z flag might be lost 630 + * 631 + * Definition and user space usage example: 632 + * 633 + * typedef void (__kernel_dmb_t)(void); 634 + * #define __kernel_dmb (*(__kernel_dmb_t *)0xffff0fa0) 635 + * 636 + * Apply any needed memory barrier to preserve consistency with data modified 637 + * manually and __kuser_cmpxchg usage. 638 + * 639 + * This could be used as follows: 640 + * 641 + * #define __kernel_dmb() \ 642 + * asm volatile ( "mov r0, #0xffff0fff; mov lr, pc; sub pc, r0, #95" \ 643 + * : : : "lr","cc" ) 644 + */ 645 + 646 + __kuser_memory_barrier: @ 0xffff0fa0 647 + 648 + #if __LINUX_ARM_ARCH__ >= 6 && defined(CONFIG_SMP) 649 + mcr p15, 0, r0, c7, c10, 5 @ dmb 650 + #endif 651 + mov pc, lr 652 + 653 + .align 5 654 + 655 + /* 656 + * Reference prototype: 657 + * 617 658 * int __kernel_cmpxchg(int oldval, int newval, int *ptr) 618 659 * 619 660 * Input: ··· 682 641 * Return zero if *ptr was changed or non-zero if no exchange happened. 683 642 * The C flag is also set if *ptr was changed to allow for assembly 684 643 * optimization in the calling code. 644 + * 645 + * Note: this routine already includes memory barriers as needed. 685 646 * 686 647 * For example, a user space atomic_add implementation could look like this: 687 648 * ··· 741 698 742 699 #else 743 700 701 + #ifdef CONFIG_SMP 702 + mcr p15, 0, r0, c7, c10, 5 @ dmb 703 + #endif 744 704 ldrex r3, [r2] 745 705 subs r3, r3, r0 746 706 strexeq r3, r1, [r2] 747 707 rsbs r0, r3, #0 708 + #ifdef CONFIG_SMP 709 + mcr p15, 0, r0, c7, c10, 5 @ dmb 710 + #endif 748 711 mov pc, lr 749 712 750 713 #endif
+2 -18
arch/arm/kernel/entry-common.S
··· 145 145 #endif 146 146 enable_irq 147 147 148 - str r4, [sp, #-S_OFF]! @ push fifth arg 148 + stmdb sp!, {r4, r5} @ push fifth and sixth args 149 149 150 150 get_thread_info tsk 151 151 ldr ip, [tsk, #TI_FLAGS] @ check for syscall tracing ··· 204 204 * Special system call wrappers 205 205 */ 206 206 @ r0 = syscall number 207 - @ r5 = syscall table 207 + @ r8 = syscall table 208 208 .type sys_syscall, #function 209 209 sys_syscall: 210 210 eor scno, r0, #__NR_SYSCALL_BASE ··· 254 254 sys_sigaltstack_wrapper: 255 255 ldr r2, [sp, #S_OFF + S_SP] 256 256 b do_sigaltstack 257 - 258 - sys_futex_wrapper: 259 - str r5, [sp, #4] @ push sixth arg 260 - b sys_futex 261 - 262 - sys_arm_fadvise64_64_wrapper: 263 - str r5, [sp, #4] @ push r5 to stack 264 - b sys_arm_fadvise64_64 265 - 266 - sys_mbind_wrapper: 267 - str r5, [sp, #4] 268 - b sys_mbind 269 - 270 - sys_ipc_wrapper: 271 - str r5, [sp, #4] @ push sixth arg 272 - b sys_ipc 273 257 274 258 /* 275 259 * Note: off_4k (r5) is always units of 4K. If we can't do the requested
+3 -1
arch/i386/kernel/process.c
··· 554 554 struct pt_regs ptregs; 555 555 556 556 ptregs = *(struct pt_regs *) 557 - ((unsigned long)tsk->thread_info+THREAD_SIZE - sizeof(ptregs)); 557 + ((unsigned long)tsk->thread_info + 558 + /* see comments in copy_thread() about -8 */ 559 + THREAD_SIZE - sizeof(ptregs) - 8); 558 560 ptregs.xcs &= 0xffff; 559 561 ptregs.xds &= 0xffff; 560 562 ptregs.xes &= 0xffff;
+1 -1
arch/i386/pci/Makefile
··· 1 1 obj-y := i386.o 2 2 3 3 obj-$(CONFIG_PCI_BIOS) += pcbios.o 4 - obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o 4 + obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o direct.o 5 5 obj-$(CONFIG_PCI_DIRECT) += direct.o 6 6 7 7 pci-y := fixup.o
+4 -3
arch/powerpc/configs/cell_defconfig
··· 1 1 # 2 2 # Automatically generated make config: don't edit 3 - # Linux kernel version: 2.6.15-rc1 4 - # Tue Nov 15 14:36:20 2005 3 + # Linux kernel version: 2.6.15-rc5 4 + # Tue Dec 20 15:59:26 2005 5 5 # 6 6 CONFIG_PPC64=y 7 7 CONFIG_64BIT=y ··· 53 53 # CONFIG_IKCONFIG is not set 54 54 # CONFIG_CPUSETS is not set 55 55 CONFIG_INITRAMFS_SOURCE="" 56 + CONFIG_CC_OPTIMIZE_FOR_SIZE=y 56 57 # CONFIG_EMBEDDED is not set 57 58 CONFIG_KALLSYMS=y 58 59 # CONFIG_KALLSYMS_ALL is not set ··· 152 151 CONFIG_FLATMEM=y 153 152 CONFIG_FLAT_NODE_MEM_MAP=y 154 153 # CONFIG_SPARSEMEM_STATIC is not set 155 - CONFIG_SPLIT_PTLOCK_CPUS=4096 154 + CONFIG_SPLIT_PTLOCK_CPUS=4 156 155 # CONFIG_PPC_64K_PAGES is not set 157 156 CONFIG_SCHED_SMT=y 158 157 CONFIG_PROC_DEVICETREE=y
+5 -4
arch/powerpc/configs/g5_defconfig
··· 1 1 # 2 2 # Automatically generated make config: don't edit 3 - # Linux kernel version: 2.6.15-rc1 4 - # Tue Nov 15 14:39:20 2005 3 + # Linux kernel version: 2.6.15-rc5 4 + # Tue Dec 20 15:59:30 2005 5 5 # 6 6 CONFIG_PPC64=y 7 7 CONFIG_64BIT=y ··· 53 53 CONFIG_IKCONFIG_PROC=y 54 54 # CONFIG_CPUSETS is not set 55 55 CONFIG_INITRAMFS_SOURCE="" 56 + CONFIG_CC_OPTIMIZE_FOR_SIZE=y 56 57 # CONFIG_EMBEDDED is not set 57 58 CONFIG_KALLSYMS=y 58 59 # CONFIG_KALLSYMS_ALL is not set ··· 163 162 CONFIG_FLATMEM=y 164 163 CONFIG_FLAT_NODE_MEM_MAP=y 165 164 # CONFIG_SPARSEMEM_STATIC is not set 166 - CONFIG_SPLIT_PTLOCK_CPUS=4096 165 + CONFIG_SPLIT_PTLOCK_CPUS=4 167 166 # CONFIG_PPC_64K_PAGES is not set 168 167 # CONFIG_SCHED_SMT is not set 169 168 CONFIG_PROC_DEVICETREE=y ··· 1204 1203 CONFIG_USB_SERIAL=m 1205 1204 CONFIG_USB_SERIAL_GENERIC=y 1206 1205 # CONFIG_USB_SERIAL_AIRPRIME is not set 1206 + # CONFIG_USB_SERIAL_ANYDATA is not set 1207 1207 CONFIG_USB_SERIAL_BELKIN=m 1208 1208 CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m 1209 1209 # CONFIG_USB_SERIAL_CP2101 is not set ··· 1235 1233 CONFIG_USB_SERIAL_KLSI=m 1236 1234 CONFIG_USB_SERIAL_KOBIL_SCT=m 1237 1235 CONFIG_USB_SERIAL_MCT_U232=m 1238 - # CONFIG_USB_SERIAL_NOKIA_DKU2 is not set 1239 1236 CONFIG_USB_SERIAL_PL2303=m 1240 1237 # CONFIG_USB_SERIAL_HP4X is not set 1241 1238 CONFIG_USB_SERIAL_SAFE=m
+4 -3
arch/powerpc/configs/iseries_defconfig
··· 1 1 # 2 2 # Automatically generated make config: don't edit 3 - # Linux kernel version: 2.6.15-rc1 4 - # Tue Nov 15 14:38:09 2005 3 + # Linux kernel version: 2.6.15-rc5 4 + # Tue Dec 20 15:59:32 2005 5 5 # 6 6 CONFIG_PPC64=y 7 7 CONFIG_64BIT=y ··· 55 55 CONFIG_IKCONFIG_PROC=y 56 56 # CONFIG_CPUSETS is not set 57 57 CONFIG_INITRAMFS_SOURCE="" 58 + CONFIG_CC_OPTIMIZE_FOR_SIZE=y 58 59 # CONFIG_EMBEDDED is not set 59 60 CONFIG_KALLSYMS=y 60 61 # CONFIG_KALLSYMS_ALL is not set ··· 145 144 CONFIG_FLATMEM=y 146 145 CONFIG_FLAT_NODE_MEM_MAP=y 147 146 # CONFIG_SPARSEMEM_STATIC is not set 148 - CONFIG_SPLIT_PTLOCK_CPUS=4096 147 + CONFIG_SPLIT_PTLOCK_CPUS=4 149 148 # CONFIG_PPC_64K_PAGES is not set 150 149 # CONFIG_SCHED_SMT is not set 151 150 CONFIG_PROC_DEVICETREE=y
+5 -5
arch/powerpc/configs/maple_defconfig
··· 1 1 # 2 2 # Automatically generated make config: don't edit 3 - # Linux kernel version: 2.6.15-rc1 4 - # Tue Nov 15 14:38:58 2005 3 + # Linux kernel version: 2.6.15-rc5 4 + # Tue Dec 20 15:59:36 2005 5 5 # 6 6 CONFIG_PPC64=y 7 7 CONFIG_64BIT=y ··· 53 53 CONFIG_IKCONFIG_PROC=y 54 54 # CONFIG_CPUSETS is not set 55 55 CONFIG_INITRAMFS_SOURCE="" 56 + CONFIG_CC_OPTIMIZE_FOR_SIZE=y 56 57 # CONFIG_EMBEDDED is not set 57 58 CONFIG_KALLSYMS=y 58 59 CONFIG_KALLSYMS_ALL=y ··· 150 149 CONFIG_FLATMEM=y 151 150 CONFIG_FLAT_NODE_MEM_MAP=y 152 151 # CONFIG_SPARSEMEM_STATIC is not set 153 - CONFIG_SPLIT_PTLOCK_CPUS=4096 152 + CONFIG_SPLIT_PTLOCK_CPUS=4 154 153 # CONFIG_PPC_64K_PAGES is not set 155 154 # CONFIG_SCHED_SMT is not set 156 155 CONFIG_PROC_DEVICETREE=y ··· 243 242 # QoS and/or fair queueing 244 243 # 245 244 # CONFIG_NET_SCHED is not set 246 - # CONFIG_NET_CLS_ROUTE is not set 247 245 248 246 # 249 247 # Network testing ··· 794 794 # CONFIG_USB_SERIAL_CONSOLE is not set 795 795 CONFIG_USB_SERIAL_GENERIC=y 796 796 # CONFIG_USB_SERIAL_AIRPRIME is not set 797 + # CONFIG_USB_SERIAL_ANYDATA is not set 797 798 # CONFIG_USB_SERIAL_BELKIN is not set 798 799 # CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set 799 800 # CONFIG_USB_SERIAL_CP2101 is not set ··· 825 824 # CONFIG_USB_SERIAL_KLSI is not set 826 825 # CONFIG_USB_SERIAL_KOBIL_SCT is not set 827 826 # CONFIG_USB_SERIAL_MCT_U232 is not set 828 - # CONFIG_USB_SERIAL_NOKIA_DKU2 is not set 829 827 # CONFIG_USB_SERIAL_PL2303 is not set 830 828 # CONFIG_USB_SERIAL_HP4X is not set 831 829 # CONFIG_USB_SERIAL_SAFE is not set
+4 -3
arch/powerpc/configs/ppc64_defconfig
··· 1 1 # 2 2 # Automatically generated make config: don't edit 3 - # Linux kernel version: 2.6.15-rc1 4 - # Fri Nov 18 16:23:24 2005 3 + # Linux kernel version: 2.6.15-rc5 4 + # Tue Dec 20 15:59:38 2005 5 5 # 6 6 CONFIG_PPC64=y 7 7 CONFIG_64BIT=y ··· 54 54 CONFIG_IKCONFIG_PROC=y 55 55 CONFIG_CPUSETS=y 56 56 CONFIG_INITRAMFS_SOURCE="" 57 + CONFIG_CC_OPTIMIZE_FOR_SIZE=y 57 58 # CONFIG_EMBEDDED is not set 58 59 CONFIG_KALLSYMS=y 59 60 CONFIG_KALLSYMS_ALL=y ··· 177 176 # CONFIG_SPARSEMEM_STATIC is not set 178 177 CONFIG_SPARSEMEM_EXTREME=y 179 178 # CONFIG_MEMORY_HOTPLUG is not set 180 - CONFIG_SPLIT_PTLOCK_CPUS=4096 179 + CONFIG_SPLIT_PTLOCK_CPUS=4 181 180 # CONFIG_PPC_64K_PAGES is not set 182 181 # CONFIG_SCHED_SMT is not set 183 182 CONFIG_PROC_DEVICETREE=y
+4 -3
arch/powerpc/configs/pseries_defconfig
··· 1 1 # 2 2 # Automatically generated make config: don't edit 3 - # Linux kernel version: 2.6.15-rc1 4 - # Tue Nov 15 14:36:55 2005 3 + # Linux kernel version: 2.6.15-rc5 4 + # Tue Dec 20 15:59:40 2005 5 5 # 6 6 CONFIG_PPC64=y 7 7 CONFIG_64BIT=y ··· 55 55 CONFIG_IKCONFIG_PROC=y 56 56 CONFIG_CPUSETS=y 57 57 CONFIG_INITRAMFS_SOURCE="" 58 + CONFIG_CC_OPTIMIZE_FOR_SIZE=y 58 59 # CONFIG_EMBEDDED is not set 59 60 CONFIG_KALLSYMS=y 60 61 CONFIG_KALLSYMS_ALL=y ··· 164 163 # CONFIG_SPARSEMEM_STATIC is not set 165 164 CONFIG_SPARSEMEM_EXTREME=y 166 165 # CONFIG_MEMORY_HOTPLUG is not set 167 - CONFIG_SPLIT_PTLOCK_CPUS=4096 166 + CONFIG_SPLIT_PTLOCK_CPUS=4 168 167 CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y 169 168 # CONFIG_PPC_64K_PAGES is not set 170 169 CONFIG_SCHED_SMT=y
+2 -2
arch/powerpc/kernel/entry_64.S
··· 183 183 ld r13,GPR13(r1) /* returning to usermode */ 184 184 1: ld r2,GPR2(r1) 185 185 li r12,MSR_RI 186 - andc r10,r10,r12 187 - mtmsrd r10,1 /* clear MSR.RI */ 186 + andc r11,r10,r12 187 + mtmsrd r11,1 /* clear MSR.RI */ 188 188 ld r1,GPR1(r1) 189 189 mtlr r4 190 190 mtcr r5
+1 -1
arch/powerpc/mm/hash_utils_64.c
··· 514 514 #undef KB 515 515 #undef MB 516 516 517 - void __init htab_initialize_secondary(void) 517 + void htab_initialize_secondary(void) 518 518 { 519 519 if (!platform_is_lpar()) 520 520 mtspr(SPRN_SDR1, _SDR1);
+3 -18
arch/powerpc/platforms/pseries/xics.c
··· 48 48 .set_affinity = xics_set_affinity 49 49 }; 50 50 51 - static struct hw_interrupt_type xics_8259_pic = { 52 - .typename = " XICS/8259", 53 - .ack = xics_mask_and_ack_irq, 54 - }; 55 - 56 51 /* This is used to map real irq numbers to virtual */ 57 52 static struct radix_tree_root irq_map = RADIX_TREE_INIT(GFP_ATOMIC); 58 53 ··· 362 367 /* for sanity, this had better be < NR_IRQS - 16 */ 363 368 if (vec == xics_irq_8259_cascade_real) { 364 369 irq = i8259_irq(regs); 365 - if (irq == -1) { 366 - /* Spurious cascaded interrupt. Still must ack xics */ 367 - xics_end_irq(irq_offset_up(xics_irq_8259_cascade)); 368 - 369 - irq = -1; 370 - } 370 + xics_end_irq(irq_offset_up(xics_irq_8259_cascade)); 371 371 } else if (vec == XICS_IRQ_SPURIOUS) { 372 372 irq = -1; 373 373 } else { ··· 532 542 xics_irq_8259_cascade_real = *ireg; 533 543 xics_irq_8259_cascade 534 544 = virt_irq_create_mapping(xics_irq_8259_cascade_real); 545 + i8259_init(0, 0); 535 546 of_node_put(np); 536 547 } 537 548 ··· 556 565 #endif /* CONFIG_SMP */ 557 566 } 558 567 559 - xics_8259_pic.enable = i8259_pic.enable; 560 - xics_8259_pic.disable = i8259_pic.disable; 561 - xics_8259_pic.end = i8259_pic.end; 562 - for (i = 0; i < 16; ++i) 563 - get_irq_desc(i)->handler = &xics_8259_pic; 564 - for (; i < NR_IRQS; ++i) 568 + for (i = irq_offset_value(); i < NR_IRQS; ++i) 565 569 get_irq_desc(i)->handler = &xics_pic; 566 570 567 571 xics_setup_cpu(); ··· 576 590 no_action, 0, "8259 cascade", NULL)) 577 591 printk(KERN_ERR "xics_setup_i8259: couldn't get 8259 " 578 592 "cascade\n"); 579 - i8259_init(0, 0); 580 593 } 581 594 return 0; 582 595 }
+2 -1
arch/ppc/platforms/85xx/mpc85xx_cds_common.c
··· 130 130 } 131 131 132 132 #ifdef CONFIG_CPM2 133 - static void cpm2_cascade(int irq, void *dev_id, struct pt_regs *regs) 133 + static irqreturn_t cpm2_cascade(int irq, void *dev_id, struct pt_regs *regs) 134 134 { 135 135 while((irq = cpm2_get_irq(regs)) >= 0) 136 136 __do_IRQ(irq, regs); 137 + return IRQ_HANDLED; 137 138 } 138 139 139 140 static struct irqaction cpm2_irqaction = {
+4
arch/sparc/Kconfig
··· 55 55 depends on SMP 56 56 default "32" 57 57 58 + config SPARC 59 + bool 60 + default y 61 + 58 62 # Identify this as a Sparc32 build 59 63 config SPARC32 60 64 bool
+1 -1
arch/sparc/kernel/sys_sunos.c
··· 894 894 ret = ARG_MAX; 895 895 break; 896 896 case _SC_CHILD_MAX: 897 - ret = CHILD_MAX; 897 + ret = -1; /* no limit */ 898 898 break; 899 899 case _SC_CLK_TCK: 900 900 ret = HZ;
+4 -14
arch/sparc/kernel/vmlinux.lds.S
··· 85 85 } 86 86 _end = . ; 87 87 PROVIDE (end = .); 88 - /* Stabs debugging sections. */ 89 - .stab 0 : { *(.stab) } 90 - .stabstr 0 : { *(.stabstr) } 91 - .stab.excl 0 : { *(.stab.excl) } 92 - .stab.exclstr 0 : { *(.stab.exclstr) } 93 - .stab.index 0 : { *(.stab.index) } 94 - .stab.indexstr 0 : { *(.stab.indexstr) } 95 - .comment 0 : { *(.comment) } 96 - .debug 0 : { *(.debug) } 97 - .debug_srcinfo 0 : { *(.debug_srcinfo) } 98 - .debug_aranges 0 : { *(.debug_aranges) } 99 - .debug_pubnames 0 : { *(.debug_pubnames) } 100 - .debug_sfnames 0 : { *(.debug_sfnames) } 101 - .line 0 : { *(.line) } 102 88 /DISCARD/ : { *(.exit.text) *(.exit.data) *(.exitcall.exit) } 89 + 90 + STABS_DEBUG 91 + 92 + DWARF_DEBUG 103 93 }
+4
arch/sparc64/Kconfig
··· 5 5 6 6 mainmenu "Linux/UltraSPARC Kernel Configuration" 7 7 8 + config SPARC 9 + bool 10 + default y 11 + 8 12 config SPARC64 9 13 bool 10 14 default y
-5
arch/sparc64/Makefile
··· 17 17 NEW_GCC := $(call cc-option-yn, -m64 -mcmodel=medlow) 18 18 NEW_GAS := $(shell if $(LD) -V 2>&1 | grep 'elf64_sparc' > /dev/null; then echo y; else echo n; fi) 19 19 UNDECLARED_REGS := $(shell if $(CC) -c -x assembler /dev/null -Wa,--help | grep undeclared-regs > /dev/null; then echo y; else echo n; fi; ) 20 - INLINE_LIMIT := $(call cc-option-yn, -m64 -finline-limit=100000) 21 20 22 21 export NEW_GCC 23 22 ··· 46 47 -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare \ 47 48 $(CC_UNDECL) 48 49 AFLAGS += -m64 -mcpu=ultrasparc $(CC_UNDECL) 49 - endif 50 - 51 - ifeq ($(INLINE_LIMIT),y) 52 - CFLAGS := $(CFLAGS) -finline-limit=100000 53 50 endif 54 51 55 52 ifeq ($(CONFIG_MCOUNT),y)
+1 -1
arch/sparc64/kernel/sys_sunos32.c
··· 854 854 ret = ARG_MAX; 855 855 break; 856 856 case _SC_CHILD_MAX: 857 - ret = CHILD_MAX; 857 + ret = -1; /* no limit */ 858 858 break; 859 859 case _SC_CLK_TCK: 860 860 ret = HZ;
+4 -14
arch/sparc64/kernel/vmlinux.lds.S
··· 90 90 } 91 91 _end = . ; 92 92 PROVIDE (end = .); 93 - /* Stabs debugging sections. */ 94 - .stab 0 : { *(.stab) } 95 - .stabstr 0 : { *(.stabstr) } 96 - .stab.excl 0 : { *(.stab.excl) } 97 - .stab.exclstr 0 : { *(.stab.exclstr) } 98 - .stab.index 0 : { *(.stab.index) } 99 - .stab.indexstr 0 : { *(.stab.indexstr) } 100 - .comment 0 : { *(.comment) } 101 - .debug 0 : { *(.debug) } 102 - .debug_srcinfo 0 : { *(.debug_srcinfo) } 103 - .debug_aranges 0 : { *(.debug_aranges) } 104 - .debug_pubnames 0 : { *(.debug_pubnames) } 105 - .debug_sfnames 0 : { *(.debug_sfnames) } 106 - .line 0 : { *(.line) } 107 93 /DISCARD/ : { *(.exit.text) *(.exit.data) *(.exitcall.exit) } 94 + 95 + STABS_DEBUG 96 + 97 + DWARF_DEBUG 108 98 }
+1 -1
arch/sparc64/solaris/misc.c
··· 353 353 { 354 354 switch (id) { 355 355 case SOLARIS_CONFIG_NGROUPS: return NGROUPS_MAX; 356 - case SOLARIS_CONFIG_CHILD_MAX: return CHILD_MAX; 356 + case SOLARIS_CONFIG_CHILD_MAX: return -1; /* no limit */ 357 357 case SOLARIS_CONFIG_OPEN_FILES: return OPEN_MAX; 358 358 case SOLARIS_CONFIG_POSIX_VER: return 199309; 359 359 case SOLARIS_CONFIG_PAGESIZE: return PAGE_SIZE;
+12 -10
arch/um/os-Linux/start_up.c
··· 116 116 if(!WIFEXITED(status) || (WEXITSTATUS(status) != exitcode)) { 117 117 int exit_with = WEXITSTATUS(status); 118 118 if (exit_with == 2) 119 - printk("check_ptrace : child exited with status 2. " 119 + printf("check_ptrace : child exited with status 2. " 120 120 "Serious trouble happening! Try updating your " 121 121 "host skas patch!\nDisabling SYSEMU support."); 122 - printk("check_ptrace : child exited with exitcode %d, while " 122 + printf("check_ptrace : child exited with exitcode %d, while " 123 123 "expecting %d; status 0x%x", exit_with, 124 124 exitcode, status); 125 125 if (mustpanic) 126 126 panic("\n"); 127 127 else 128 - printk("\n"); 128 + printf("\n"); 129 129 ret = -1; 130 130 } 131 131 ··· 183 183 void *stack; 184 184 int pid, n, status, count=0; 185 185 186 - printk("Checking syscall emulation patch for ptrace..."); 186 + printf("Checking syscall emulation patch for ptrace..."); 187 187 sysemu_supported = 0; 188 188 pid = start_ptraced_child(&stack); 189 189 ··· 207 207 goto fail_stopped; 208 208 209 209 sysemu_supported = 1; 210 - printk("OK\n"); 210 + printf("OK\n"); 211 211 set_using_sysemu(!force_sysemu_disabled); 212 212 213 - printk("Checking advanced syscall emulation patch for ptrace..."); 213 + printf("Checking advanced syscall emulation patch for ptrace..."); 214 214 pid = start_ptraced_child(&stack); 215 215 216 216 if(ptrace(PTRACE_OLDSETOPTIONS, pid, 0, ··· 246 246 goto fail_stopped; 247 247 248 248 sysemu_supported = 2; 249 - printk("OK\n"); 249 + printf("OK\n"); 250 250 251 251 if ( !force_sysemu_disabled ) 252 252 set_using_sysemu(sysemu_supported); ··· 255 255 fail: 256 256 stop_ptraced_child(pid, stack, 1, 0); 257 257 fail_stopped: 258 - printk("missing\n"); 258 + printf("missing\n"); 259 259 } 260 260 261 261 static void __init check_ptrace(void) ··· 263 263 void *stack; 264 264 int pid, syscall, n, status; 265 265 266 - printk("Checking that ptrace can change system call numbers..."); 266 + printf("Checking that ptrace can change system call numbers..."); 267 267 pid = start_ptraced_child(&stack); 268 268 269 269 if(ptrace(PTRACE_OLDSETOPTIONS, pid, 0, (void *)PTRACE_O_TRACESYSGOOD) < 0) ··· 292 292 } 293 293 } 294 294 stop_ptraced_child(pid, stack, 0, 1); 295 - printk("OK\n"); 295 + printf("OK\n"); 296 296 check_sysemu(); 297 297 } 298 298 ··· 471 471 #endif 472 472 473 473 int have_devanon = 0; 474 + 475 + /* Runs on boot kernel stack - already safe to use printk. */ 474 476 475 477 void check_devanon(void) 476 478 {
+5
arch/um/os-Linux/user_syms.c
··· 34 34 int sym(void); \ 35 35 EXPORT_SYMBOL(sym); 36 36 37 + extern void readdir64(void) __attribute__((weak)); 38 + EXPORT_SYMBOL(readdir64); 39 + extern void truncate64(void) __attribute__((weak)); 40 + EXPORT_SYMBOL(truncate64); 41 + 37 42 #ifdef SUBARCH_i386 38 43 EXPORT_SYMBOL(vsyscall_ehdr); 39 44 EXPORT_SYMBOL(vsyscall_end);
+5 -3
arch/um/sys-i386/Makefile
··· 1 - obj-y = bitops.o bugs.o checksum.o delay.o fault.o ksyms.o ldt.o ptrace.o \ 2 - ptrace_user.o semaphore.o signal.o sigcontext.o stub.o stub_segv.o \ 3 - syscalls.o sysrq.o sys_call_table.o 1 + obj-y := bitops.o bugs.o checksum.o delay.o fault.o ksyms.o ldt.o ptrace.o \ 2 + ptrace_user.o semaphore.o signal.o sigcontext.o syscalls.o sysrq.o \ 3 + sys_call_table.o 4 + 5 + obj-$(CONFIG_MODE_SKAS) += stub.o stub_segv.o 4 6 5 7 obj-$(CONFIG_HIGHMEM) += highmem.o 6 8 obj-$(CONFIG_MODULES) += module.o
+3 -2
arch/um/sys-x86_64/Makefile
··· 6 6 7 7 #XXX: why into lib-y? 8 8 lib-y = bitops.o bugs.o csum-partial.o delay.o fault.o ldt.o mem.o memcpy.o \ 9 - ptrace.o ptrace_user.o sigcontext.o signal.o stub.o \ 10 - stub_segv.o syscalls.o syscall_table.o sysrq.o thunk.o 9 + ptrace.o ptrace_user.o sigcontext.o signal.o syscalls.o \ 10 + syscall_table.o sysrq.o thunk.o 11 + lib-$(CONFIG_MODE_SKAS) += stub.o stub_segv.o 11 12 12 13 obj-y := ksyms.o 13 14 obj-$(CONFIG_MODULES) += module.o um_module.o
+1 -1
arch/x86_64/mm/init.c
··· 348 348 } 349 349 350 350 /* Compute holes */ 351 - w = 0; 351 + w = start_pfn; 352 352 for (i = 0; i < MAX_NR_ZONES; i++) { 353 353 unsigned long s = w; 354 354 w += z[i];
+1 -1
arch/x86_64/pci/Makefile
··· 11 11 obj-$(CONFIG_ACPI) += acpi.o 12 12 obj-y += legacy.o irq.o common.o 13 13 # mmconfig has a 64bit special 14 - obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o 14 + obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o direct.o 15 15 16 16 obj-$(CONFIG_NUMA) += k8-bus.o 17 17
+31 -14
block/scsi_ioctl.c
··· 442 442 return err; 443 443 } 444 444 445 + 446 + /* Send basic block requests */ 447 + static int __blk_send_generic(request_queue_t *q, struct gendisk *bd_disk, int cmd, int data) 448 + { 449 + struct request *rq; 450 + int err; 451 + 452 + rq = blk_get_request(q, WRITE, __GFP_WAIT); 453 + rq->flags |= REQ_BLOCK_PC; 454 + rq->data = NULL; 455 + rq->data_len = 0; 456 + rq->timeout = BLK_DEFAULT_TIMEOUT; 457 + memset(rq->cmd, 0, sizeof(rq->cmd)); 458 + rq->cmd[0] = cmd; 459 + rq->cmd[4] = data; 460 + rq->cmd_len = 6; 461 + err = blk_execute_rq(q, bd_disk, rq, 0); 462 + blk_put_request(rq); 463 + 464 + return err; 465 + } 466 + 467 + static inline int blk_send_start_stop(request_queue_t *q, struct gendisk *bd_disk, int data) 468 + { 469 + return __blk_send_generic(q, bd_disk, GPCMD_START_STOP_UNIT, data); 470 + } 471 + 445 472 int scsi_cmd_ioctl(struct file *file, struct gendisk *bd_disk, unsigned int cmd, void __user *arg) 446 473 { 447 474 request_queue_t *q; 448 - struct request *rq; 449 - int close = 0, err; 475 + int err; 450 476 451 477 q = bd_disk->queue; 452 478 if (!q) ··· 590 564 err = sg_scsi_ioctl(file, q, bd_disk, arg); 591 565 break; 592 566 case CDROMCLOSETRAY: 593 - close = 1; 567 + err = blk_send_start_stop(q, bd_disk, 0x03); 568 + break; 594 569 case CDROMEJECT: 595 - rq = blk_get_request(q, WRITE, __GFP_WAIT); 596 - rq->flags |= REQ_BLOCK_PC; 597 - rq->data = NULL; 598 - rq->data_len = 0; 599 - rq->timeout = BLK_DEFAULT_TIMEOUT; 600 - memset(rq->cmd, 0, sizeof(rq->cmd)); 601 - rq->cmd[0] = GPCMD_START_STOP_UNIT; 602 - rq->cmd[4] = 0x02 + (close != 0); 603 - rq->cmd_len = 6; 604 - err = blk_execute_rq(q, bd_disk, rq, 0); 605 - blk_put_request(rq); 570 + err = blk_send_start_stop(q, bd_disk, 0x02); 606 571 break; 607 572 default: 608 573 err = -ENOTTY;
+15 -5
drivers/acpi/processor_idle.c
··· 274 274 } 275 275 } 276 276 277 - cx->usage++; 278 - 279 277 #ifdef CONFIG_HOTPLUG_CPU 280 278 /* 281 279 * Check for P_LVL2_UP flag before entering C2 and above on ··· 281 283 * detection phase, to work cleanly with logical CPU hotplug. 282 284 */ 283 285 if ((cx->type != ACPI_STATE_C1) && (num_online_cpus() > 1) && 284 - !pr->flags.has_cst && acpi_fadt.plvl2_up) 285 - cx->type = ACPI_STATE_C1; 286 + !pr->flags.has_cst && !acpi_fadt.plvl2_up) 287 + cx = &pr->power.states[ACPI_STATE_C1]; 286 288 #endif 289 + 290 + cx->usage++; 291 + 287 292 /* 288 293 * Sleep: 289 294 * ------ ··· 386 385 } 387 386 388 387 next_state = pr->power.state; 388 + 389 + #ifdef CONFIG_HOTPLUG_CPU 390 + /* Don't do promotion/demotion */ 391 + if ((cx->type == ACPI_STATE_C1) && (num_online_cpus() > 1) && 392 + !pr->flags.has_cst && !acpi_fadt.plvl2_up) { 393 + next_state = cx; 394 + goto end; 395 + } 396 + #endif 389 397 390 398 /* 391 399 * Promotion? ··· 567 557 * Check for P_LVL2_UP flag before entering C2 and above on 568 558 * an SMP system. 569 559 */ 570 - if ((num_online_cpus() > 1) && acpi_fadt.plvl2_up) 560 + if ((num_online_cpus() > 1) && !acpi_fadt.plvl2_up) 571 561 return_VALUE(-ENODEV); 572 562 #endif 573 563
+2 -2
drivers/acpi/processor_thermal.c
··· 102 102 { 103 103 struct cpufreq_policy policy; 104 104 if (!acpi_thermal_cpufreq_is_init || cpufreq_get_policy(&policy, cpu)) 105 - return -ENODEV; 106 - return 0; 105 + return 0; 106 + return 1; 107 107 } 108 108 109 109 static int acpi_thermal_cpufreq_increase(unsigned int cpu)
+9 -9
drivers/acpi/utilities/utmisc.c
··· 84 84 85 85 /* Find a free owner ID */ 86 86 87 - for (i = 0; i < 32; i++) { 88 - if (!(acpi_gbl_owner_id_mask & (1 << i))) { 87 + for (i = 0; i < 64; i++) { 88 + if (!(acpi_gbl_owner_id_mask & (1ULL << i))) { 89 89 ACPI_DEBUG_PRINT((ACPI_DB_VALUES, 90 - "Current owner_id mask: %8.8X New ID: %2.2X\n", 90 + "Current owner_id mask: %16.16LX New ID: %2.2X\n", 91 91 acpi_gbl_owner_id_mask, 92 92 (unsigned int)(i + 1))); 93 93 94 - acpi_gbl_owner_id_mask |= (1 << i); 94 + acpi_gbl_owner_id_mask |= (1ULL << i); 95 95 *owner_id = (acpi_owner_id) (i + 1); 96 96 goto exit; 97 97 } ··· 106 106 */ 107 107 *owner_id = 0; 108 108 status = AE_OWNER_ID_LIMIT; 109 - ACPI_REPORT_ERROR(("Could not allocate new owner_id (32 max), AE_OWNER_ID_LIMIT\n")); 109 + ACPI_REPORT_ERROR(("Could not allocate new owner_id (64 max), AE_OWNER_ID_LIMIT\n")); 110 110 111 111 exit: 112 112 (void)acpi_ut_release_mutex(ACPI_MTX_CACHES); ··· 123 123 * control method or unloading a table. Either way, we would 124 124 * ignore any error anyway. 125 125 * 126 - * DESCRIPTION: Release a table or method owner ID. Valid IDs are 1 - 32 126 + * DESCRIPTION: Release a table or method owner ID. Valid IDs are 1 - 64 127 127 * 128 128 ******************************************************************************/ 129 129 ··· 140 140 141 141 /* Zero is not a valid owner_iD */ 142 142 143 - if ((owner_id == 0) || (owner_id > 32)) { 143 + if ((owner_id == 0) || (owner_id > 64)) { 144 144 ACPI_REPORT_ERROR(("Invalid owner_id: %2.2X\n", owner_id)); 145 145 return_VOID; 146 146 } ··· 158 158 159 159 /* Free the owner ID only if it is valid */ 160 160 161 - if (acpi_gbl_owner_id_mask & (1 << owner_id)) { 162 - acpi_gbl_owner_id_mask ^= (1 << owner_id); 161 + if (acpi_gbl_owner_id_mask & (1ULL << owner_id)) { 162 + acpi_gbl_owner_id_mask ^= (1ULL << owner_id); 163 163 } 164 164 165 165 (void)acpi_ut_release_mutex(ACPI_MTX_CACHES);
+2 -2
drivers/char/Kconfig
··· 687 687 688 688 config RTC 689 689 tristate "Enhanced Real Time Clock Support" 690 - depends on !PPC32 && !PARISC && !IA64 && !M68K 690 + depends on !PPC32 && !PARISC && !IA64 && !M68K && (!SPARC || PCI) 691 691 ---help--- 692 692 If you say Y here and create a character special file /dev/rtc with 693 693 major number 10 and minor number 135 using mknod ("man mknod"), you ··· 735 735 736 736 config GEN_RTC 737 737 tristate "Generic /dev/rtc emulation" 738 - depends on RTC!=y && !IA64 && !ARM && !M32R && !SPARC32 && !SPARC64 738 + depends on RTC!=y && !IA64 && !ARM && !M32R && !SPARC 739 739 ---help--- 740 740 If you say Y here and create a character special file /dev/rtc with 741 741 major number 10 and minor number 135 using mknod ("man mknod"), you
+2 -7
drivers/char/drm/radeon_cp.c
··· 1312 1312 static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init) 1313 1313 { 1314 1314 drm_radeon_private_t *dev_priv = dev->dev_private; 1315 - unsigned int mem_size; 1316 - 1317 1315 DRM_DEBUG("\n"); 1318 1316 1319 1317 dev_priv->is_pci = init->is_pci; ··· 1521 1523 + dev_priv->fb_location) >> 10)); 1522 1524 1523 1525 dev_priv->gart_size = init->gart_size; 1524 - 1525 - mem_size = RADEON_READ(RADEON_CONFIG_MEMSIZE); 1526 - if (mem_size == 0) 1527 - mem_size = 0x800000; 1528 - dev_priv->gart_vm_start = dev_priv->fb_location + mem_size; 1526 + dev_priv->gart_vm_start = dev_priv->fb_location 1527 + + RADEON_READ(RADEON_CONFIG_APER_SIZE); 1529 1528 1530 1529 #if __OS_HAS_AGP 1531 1530 if (!dev_priv->is_pci)
+5 -5
drivers/char/keyboard.c
··· 930 930 } 931 931 932 932 #if defined(CONFIG_X86) || defined(CONFIG_IA64) || defined(CONFIG_ALPHA) ||\ 933 - defined(CONFIG_MIPS) || defined(CONFIG_PPC) || defined(CONFIG_SPARC32) ||\ 934 - defined(CONFIG_SPARC64) || defined(CONFIG_PARISC) || defined(CONFIG_SUPERH) ||\ 933 + defined(CONFIG_MIPS) || defined(CONFIG_PPC) || defined(CONFIG_SPARC) ||\ 934 + defined(CONFIG_PARISC) || defined(CONFIG_SUPERH) ||\ 935 935 (defined(CONFIG_ARM) && defined(CONFIG_KEYBOARD_ATKBD) && !defined(CONFIG_ARCH_RPC)) 936 936 937 937 #define HW_RAW(dev) (test_bit(EV_MSC, dev->evbit) && test_bit(MSC_RAW, dev->mscbit) &&\ ··· 958 958 extern int mac_hid_mouse_emulate_buttons(int, int, int); 959 959 #endif /* CONFIG_MAC_EMUMOUSEBTN */ 960 960 961 - #if defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64) 961 + #ifdef CONFIG_SPARC 962 962 static int sparc_l1_a_state = 0; 963 963 extern void sun_do_break(void); 964 964 #endif ··· 1045 1045 1046 1046 if (keycode == KEY_LEFTALT || keycode == KEY_RIGHTALT) 1047 1047 sysrq_alt = down; 1048 - #if defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64) 1048 + #ifdef CONFIG_SPARC 1049 1049 if (keycode == KEY_STOP) 1050 1050 sparc_l1_a_state = down; 1051 1051 #endif ··· 1072 1072 return; 1073 1073 } 1074 1074 #endif 1075 - #if defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64) 1075 + #ifdef CONFIG_SPARC 1076 1076 if (keycode == KEY_A && sparc_l1_a_state) { 1077 1077 sparc_l1_a_state = 0; 1078 1078 sun_do_break();
+1 -1
drivers/char/vc_screen.c
··· 419 419 while (this_round > 1) { 420 420 unsigned short w; 421 421 422 - w = get_unaligned(((const unsigned short *)con_buf0)); 422 + w = get_unaligned(((unsigned short *)con_buf0)); 423 423 vcs_scr_writew(vc, w, org++); 424 424 con_buf0 += 2; 425 425 this_round -= 2;
+4 -4
drivers/fc4/Kconfig
··· 26 26 27 27 config FC4_SOC 28 28 tristate "Sun SOC/Sbus" 29 - depends on FC4!=n && (SPARC32 || SPARC64) 29 + depends on FC4!=n && SPARC 30 30 help 31 31 Serial Optical Channel is an interface card with one or two Fibre 32 32 Optic ports, each of which can be connected to a disk array. Note ··· 38 38 39 39 config FC4_SOCAL 40 40 tristate "Sun SOC+ (aka SOCAL)" 41 - depends on FC4!=n && (SPARC32 || SPARC64) 41 + depends on FC4!=n && SPARC 42 42 ---help--- 43 43 Serial Optical Channel Plus is an interface card with up to two 44 44 Fibre Optic ports. This card supports FC Arbitrated Loop (usually ··· 62 62 be called pluto. 63 63 64 64 config SCSI_FCAL 65 - tristate "Sun Enterprise Network Array (A5000 and EX500)" if SPARC32 || SPARC64 65 + tristate "Sun Enterprise Network Array (A5000 and EX500)" if SPARC 66 66 depends on FC4!=n && SCSI 67 67 help 68 68 This driver drives FC-AL disks connected through a Fibre Channel ··· 75 75 76 76 config SCSI_FCAL 77 77 prompt "Generic FC-AL disk driver" 78 - depends on FC4!=n && SCSI && !SPARC32 && !SPARC64 78 + depends on FC4!=n && SCSI && !SPARC 79 79 80 80 endmenu 81 81
+1 -1
drivers/input/joystick/warrior.c
··· 172 172 input_set_abs_params(input_dev, ABS_Y, -64, 64, 0, 8); 173 173 input_set_abs_params(input_dev, ABS_THROTTLE, -112, 112, 0, 0); 174 174 input_set_abs_params(input_dev, ABS_HAT0X, -1, 1, 0, 0); 175 - input_set_abs_params(input_dev, ABS_HAT0X, -1, 1, 0, 0); 175 + input_set_abs_params(input_dev, ABS_HAT0Y, -1, 1, 0, 0); 176 176 177 177 serio_set_drvdata(serio, warrior); 178 178
+1 -1
drivers/input/misc/Kconfig
··· 26 26 27 27 config INPUT_SPARCSPKR 28 28 tristate "SPARC Speaker support" 29 - depends on PCI && (SPARC32 || SPARC64) 29 + depends on PCI && SPARC 30 30 help 31 31 Say Y here if you want the standard Speaker on Sparc PCI systems 32 32 to be used for bells and whistles.
+1 -1
drivers/input/mouse/sermouse.c
··· 95 95 96 96 input_sync(dev); 97 97 98 - if (++sermouse->count == (5 - ((sermouse->type == SERIO_SUN) << 1))) 98 + if (++sermouse->count == 5) 99 99 sermouse->count = 0; 100 100 } 101 101
+1 -1
drivers/input/serio/i8042.h
··· 21 21 #include "i8042-ip22io.h" 22 22 #elif defined(CONFIG_PPC) 23 23 #include "i8042-ppcio.h" 24 - #elif defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64) 24 + #elif defined(CONFIG_SPARC) 25 25 #include "i8042-sparcio.h" 26 26 #elif defined(CONFIG_X86) || defined(CONFIG_IA64) 27 27 #include "i8042-x86ia64io.h"
+4 -4
drivers/macintosh/therm_pm72.c
··· 923 923 if (temp_combi >= ((state0->mpu.tmax + 8) << 16)) { 924 924 printk(KERN_WARNING "Warning ! Temperature way above maximum (%d) !\n", 925 925 temp_combi >> 16); 926 - state0->overtemp = CPU_MAX_OVERTEMP; 926 + state0->overtemp += CPU_MAX_OVERTEMP / 4; 927 927 } else if (temp_combi > (state0->mpu.tmax << 16)) 928 928 state0->overtemp++; 929 929 else ··· 933 933 if (state0->overtemp > 0) { 934 934 state0->rpm = state0->mpu.rmaxn_exhaust_fan; 935 935 state0->intake_rpm = intake = state0->mpu.rmaxn_intake_fan; 936 - pump = state0->pump_min; 936 + pump = state0->pump_max; 937 937 goto do_set_fans; 938 938 } 939 939 ··· 998 998 printk(KERN_WARNING "Warning ! CPU %d temperature way above maximum" 999 999 " (%d) !\n", 1000 1000 state->index, temp >> 16); 1001 - state->overtemp = CPU_MAX_OVERTEMP; 1001 + state->overtemp += CPU_MAX_OVERTEMP / 4; 1002 1002 } else if (temp > (state->mpu.tmax << 16)) 1003 1003 state->overtemp++; 1004 1004 else ··· 1060 1060 printk(KERN_WARNING "Warning ! CPU %d temperature way above maximum" 1061 1061 " (%d) !\n", 1062 1062 state->index, temp >> 16); 1063 - state->overtemp = CPU_MAX_OVERTEMP; 1063 + state->overtemp = CPU_MAX_OVERTEMP / 4; 1064 1064 } else if (temp > (state->mpu.tmax << 16)) 1065 1065 state->overtemp++; 1066 1066 else
+1 -1
drivers/md/md.c
··· 1729 1729 if (p == NULL && mddev->raid_disks == 0) 1730 1730 return 0; 1731 1731 if (mddev->level >= 0) 1732 - return sprintf(page, "RAID-%d\n", mddev->level); 1732 + return sprintf(page, "raid%d\n", mddev->level); 1733 1733 else 1734 1734 return sprintf(page, "%s\n", p->name); 1735 1735 }
+3
drivers/media/dvb/ttpci/av7110.c
··· 176 176 } 177 177 } 178 178 179 + if (dev->pci->subsystem_vendor == 0x13c2 && dev->pci->subsystem_device == 0x000e) 180 + av7110_fw_cmd(av7110, COMTYPE_AUDIODAC, SpdifSwitch, 1, 0); // SPDIF on 181 + 179 182 ret = av7110_set_volume(av7110, av7110->mixer.volume_left, av7110->mixer.volume_right); 180 183 if (ret < 0) 181 184 printk("dvb-ttpci:cannot set volume :%d\n",ret);
+2 -1
drivers/media/dvb/ttpci/av7110_hw.h
··· 143 143 MainSwitch, 144 144 ADSwitch, 145 145 SendDiSEqC, 146 - SetRegister 146 + SetRegister, 147 + SpdifSwitch 147 148 }; 148 149 149 150 enum av7110_request_command {
+23 -17
drivers/media/video/cx25840/cx25840-core.c
··· 333 333 334 334 static int set_v4lstd(struct i2c_client *client, v4l2_std_id std) 335 335 { 336 - u8 fmt; 336 + u8 fmt=0; /* zero is autodetect */ 337 337 338 - switch (std) { 339 - /* zero is autodetect */ 340 - case 0: fmt = 0x0; break; 341 - /* default ntsc to ntsc-m */ 342 - case V4L2_STD_NTSC: 343 - case V4L2_STD_NTSC_M: fmt = 0x1; break; 344 - case V4L2_STD_NTSC_M_JP: fmt = 0x2; break; 345 - case V4L2_STD_NTSC_443: fmt = 0x3; break; 346 - case V4L2_STD_PAL: fmt = 0x4; break; 347 - case V4L2_STD_PAL_M: fmt = 0x5; break; 348 - case V4L2_STD_PAL_N: fmt = 0x6; break; 349 - case V4L2_STD_PAL_Nc: fmt = 0x7; break; 350 - case V4L2_STD_PAL_60: fmt = 0x8; break; 351 - case V4L2_STD_SECAM: fmt = 0xc; break; 352 - default: 353 - return -ERANGE; 338 + /* First tests should be against specific std */ 339 + if (std & V4L2_STD_NTSC_M_JP) { 340 + fmt=0x2; 341 + } else if (std & V4L2_STD_NTSC_443) { 342 + fmt=0x3; 343 + } else if (std & V4L2_STD_PAL_M) { 344 + fmt=0x5; 345 + } else if (std & V4L2_STD_PAL_N) { 346 + fmt=0x6; 347 + } else if (std & V4L2_STD_PAL_Nc) { 348 + fmt=0x7; 349 + } else if (std & V4L2_STD_PAL_60) { 350 + fmt=0x8; 351 + } else { 352 + /* Then, test against generic ones */ 353 + if (std & V4L2_STD_NTSC) { 354 + fmt=0x1; 355 + } else if (std & V4L2_STD_PAL) { 356 + fmt=0x4; 357 + } else if (std & V4L2_STD_SECAM) { 358 + fmt=0xc; 359 + } 354 360 } 355 361 356 362 cx25840_and_or(client, 0x400, ~0xf, fmt);
+3 -3
drivers/media/video/em28xx/em28xx-core.c
··· 39 39 #define em28xx_coredbg(fmt, arg...) do {\ 40 40 if (core_debug) \ 41 41 printk(KERN_INFO "%s %s :"fmt, \ 42 - dev->name, __FUNCTION__, ##arg); } while (0) 42 + dev->name, __FUNCTION__ , ##arg); } while (0) 43 43 44 44 static unsigned int reg_debug; 45 45 module_param(reg_debug,int,0644); ··· 48 48 #define em28xx_regdbg(fmt, arg...) do {\ 49 49 if (reg_debug) \ 50 50 printk(KERN_INFO "%s %s :"fmt, \ 51 - dev->name, __FUNCTION__, ##arg); } while (0) 51 + dev->name, __FUNCTION__ , ##arg); } while (0) 52 52 53 53 static unsigned int isoc_debug; 54 54 module_param(isoc_debug,int,0644); ··· 57 57 #define em28xx_isocdbg(fmt, arg...) do {\ 58 58 if (isoc_debug) \ 59 59 printk(KERN_INFO "%s %s :"fmt, \ 60 - dev->name, __FUNCTION__, ##arg); } while (0) 60 + dev->name, __FUNCTION__ , ##arg); } while (0) 61 61 62 62 static int alt = EM28XX_PINOUT; 63 63 module_param(alt, int, 0644);
+1 -1
drivers/media/video/em28xx/em28xx-i2c.c
··· 44 44 printk(fmt, ##args); } while (0) 45 45 #define dprintk2(lvl,fmt, args...) if (i2c_debug>=lvl) do{ \ 46 46 printk(KERN_DEBUG "%s at %s: " fmt, \ 47 - dev->name, __FUNCTION__, ##args); } while (0) 47 + dev->name, __FUNCTION__ , ##args); } while (0) 48 48 49 49 /* 50 50 * em2800_i2c_send_max4()
+1 -1
drivers/media/video/em28xx/em28xx-video.c
··· 45 45 #define em28xx_videodbg(fmt, arg...) do {\ 46 46 if (video_debug) \ 47 47 printk(KERN_INFO "%s %s :"fmt, \ 48 - dev->name, __FUNCTION__, ##arg); } while (0) 48 + dev->name, __FUNCTION__ , ##arg); } while (0) 49 49 50 50 MODULE_AUTHOR(DRIVER_AUTHOR); 51 51 MODULE_DESCRIPTION(DRIVER_DESC);
+4 -4
drivers/media/video/em28xx/em28xx.h
··· 392 392 /* printk macros */ 393 393 394 394 #define em28xx_err(fmt, arg...) do {\ 395 - printk(KERN_ERR fmt, ##arg); } while (0) 395 + printk(KERN_ERR fmt , ##arg); } while (0) 396 396 397 397 #define em28xx_errdev(fmt, arg...) do {\ 398 398 printk(KERN_ERR "%s: "fmt,\ 399 - dev->name, ##arg); } while (0) 399 + dev->name , ##arg); } while (0) 400 400 401 401 #define em28xx_info(fmt, arg...) do {\ 402 402 printk(KERN_INFO "%s: "fmt,\ 403 - dev->name, ##arg); } while (0) 403 + dev->name , ##arg); } while (0) 404 404 #define em28xx_warn(fmt, arg...) do {\ 405 405 printk(KERN_WARNING "%s: "fmt,\ 406 - dev->name, ##arg); } while (0) 406 + dev->name , ##arg); } while (0) 407 407 408 408 inline static int em28xx_audio_source(struct em28xx *dev, int input) 409 409 {
+3 -3
drivers/media/video/saa7127.c
··· 389 389 static int saa7127_set_cc(struct i2c_client *client, struct v4l2_sliced_vbi_data *data) 390 390 { 391 391 struct saa7127_state *state = i2c_get_clientdata(client); 392 - u16 cc = data->data[0] << 8 | data->data[1]; 392 + u16 cc = data->data[1] << 8 | data->data[0]; 393 393 int enable = (data->line != 0); 394 394 395 395 if (enable && (data->field != 0 || data->line != 21)) ··· 397 397 if (state->cc_enable != enable) { 398 398 saa7127_dbg("Turn CC %s\n", enable ? "on" : "off"); 399 399 saa7127_write(client, SAA7127_REG_CLOSED_CAPTION, 400 - (enable << 6) | 0x11); 400 + (state->xds_enable << 7) | (enable << 6) | 0x11); 401 401 state->cc_enable = enable; 402 402 } 403 403 if (!enable) ··· 423 423 if (state->xds_enable != enable) { 424 424 saa7127_dbg("Turn XDS %s\n", enable ? "on" : "off"); 425 425 saa7127_write(client, SAA7127_REG_CLOSED_CAPTION, 426 - (enable << 7) | 0x11); 426 + (enable << 7) | (state->cc_enable << 6) | 0x11); 427 427 state->xds_enable = enable; 428 428 } 429 429 if (!enable)
+24 -2
drivers/media/video/saa7134/Kconfig
··· 1 1 config VIDEO_SAA7134 2 2 tristate "Philips SAA7134 support" 3 - depends on VIDEO_DEV && PCI && I2C && SOUND && SND 3 + depends on VIDEO_DEV && PCI && I2C 4 4 select VIDEO_BUF 5 5 select VIDEO_IR 6 6 select VIDEO_TUNER 7 7 select CRC32 8 - select SND_PCM_OSS 9 8 ---help--- 10 9 This is a video4linux driver for Philips SAA713x based 11 10 TV cards. 12 11 13 12 To compile this driver as a module, choose M here: the 14 13 module will be called saa7134. 14 + 15 + config VIDEO_SAA7134_ALSA 16 + tristate "Philips SAA7134 DMA audio support" 17 + depends on VIDEO_SAA7134 && SND 18 + select SND_PCM_OSS 19 + ---help--- 20 + This is a video4linux driver for direct (DMA) audio in 21 + Philips SAA713x based TV cards using ALSA 22 + 23 + To compile this driver as a module, choose M here: the 24 + module will be called saa7134-alsa. 25 + 26 + config VIDEO_SAA7134_OSS 27 + tristate "Philips SAA7134 DMA audio support (OSS, DEPRECATED)" 28 + depends on VIDEO_SAA7134 && SOUND_PRIME && !VIDEO_SAA7134_ALSA 29 + ---help--- 30 + This is a video4linux driver for direct (DMA) audio in 31 + Philips SAA713x based TV cards using OSS 32 + 33 + This is deprecated in favor of the ALSA module 34 + 35 + To compile this driver as a module, choose M here: the 36 + module will be called saa7134-oss. 15 37 16 38 config VIDEO_SAA7134_DVB 17 39 tristate "DVB/ATSC Support for saa7134 based TV cards"
+5 -2
drivers/media/video/saa7134/Makefile
··· 4 4 saa7134-video.o saa7134-input.o 5 5 6 6 obj-$(CONFIG_VIDEO_SAA7134) += saa7134.o saa7134-empress.o \ 7 - saa6752hs.o saa7134-alsa.o \ 8 - saa7134-oss.o 7 + saa6752hs.o 8 + 9 + obj-$(CONFIG_VIDEO_SAA7134_ALSA) += saa7134-alsa.o 10 + obj-$(CONFIG_VIDEO_SAA7134_OSS) += saa7134-oss.o 11 + 9 12 obj-$(CONFIG_VIDEO_SAA7134_DVB) += saa7134-dvb.o 10 13 11 14 EXTRA_CFLAGS += -I$(src)/..
+13 -5
drivers/media/video/saa7134/saa7134-alsa.c
··· 60 60 MODULE_PARM_DESC(index, "Index value for SAA7134 capture interface(s)."); 61 61 62 62 #define dprintk(fmt, arg...) if (debug) \ 63 - printk(KERN_DEBUG "%s/alsa: " fmt, dev->name, ## arg) 63 + printk(KERN_DEBUG "%s/alsa: " fmt, dev->name , ##arg) 64 64 65 65 66 66 ··· 989 989 struct saa7134_dev *dev = NULL; 990 990 struct list_head *list; 991 991 992 + if (!dmasound_init && !dmasound_exit) { 993 + dmasound_init = alsa_device_init; 994 + dmasound_exit = alsa_device_exit; 995 + } else { 996 + printk(KERN_WARNING "saa7134 ALSA: can't load, DMA sound handler already assigned (probably to OSS)\n"); 997 + return -EBUSY; 998 + } 999 + 992 1000 printk(KERN_INFO "saa7134 ALSA driver for DMA sound loaded\n"); 993 1001 994 1002 list_for_each(list,&saa7134_devlist) { ··· 1008 1000 return -EBUSY; 1009 1001 } 1010 1002 } 1011 - 1012 - dmasound_init = alsa_device_init; 1013 - dmasound_exit = alsa_device_exit; 1014 1003 1015 1004 if (dev == NULL) 1016 1005 printk(KERN_INFO "saa7134 ALSA: no saa7134 cards found\n"); ··· 1028 1023 snd_card_free(snd_saa7134_cards[idx]); 1029 1024 } 1030 1025 1026 + dmasound_init = NULL; 1027 + dmasound_exit = NULL; 1031 1028 printk(KERN_INFO "saa7134 ALSA driver for DMA sound unloaded\n"); 1032 1029 1033 1030 return; 1034 1031 } 1035 1032 1036 - module_init(saa7134_alsa_init); 1033 + /* We initialize this late, to make sure the sound system is up and running */ 1034 + late_initcall(saa7134_alsa_init); 1037 1035 module_exit(saa7134_alsa_exit); 1038 1036 MODULE_LICENSE("GPL"); 1039 1037 MODULE_AUTHOR("Ricardo Cerqueira");
+14 -4
drivers/media/video/saa7134/saa7134-oss.c
··· 959 959 struct saa7134_dev *dev = NULL; 960 960 struct list_head *list; 961 961 962 + if (!dmasound_init && !dmasound_exit) { 963 + dmasound_init = oss_device_init; 964 + dmasound_exit = oss_device_exit; 965 + } else { 966 + printk(KERN_WARNING "saa7134 OSS: can't load, DMA sound handler already assigned (probably to ALSA)\n"); 967 + return -EBUSY; 968 + } 969 + 962 970 printk(KERN_INFO "saa7134 OSS driver for DMA sound loaded\n"); 971 + 963 972 964 973 list_for_each(list,&saa7134_devlist) { 965 974 dev = list_entry(list, struct saa7134_dev, devlist); ··· 982 973 983 974 if (dev == NULL) 984 975 printk(KERN_INFO "saa7134 OSS: no saa7134 cards found\n"); 985 - 986 - dmasound_init = oss_device_init; 987 - dmasound_exit = oss_device_exit; 988 976 989 977 return 0; 990 978 ··· 1003 997 1004 998 } 1005 999 1000 + dmasound_init = NULL; 1001 + dmasound_exit = NULL; 1002 + 1006 1003 printk(KERN_INFO "saa7134 OSS driver for DMA sound unloaded\n"); 1007 1004 1008 1005 return; 1009 1006 } 1010 1007 1011 - module_init(saa7134_oss_init); 1008 + /* We initialize this late, to make sure the sound system is up and running */ 1009 + late_initcall(saa7134_oss_init); 1012 1010 module_exit(saa7134_oss_exit); 1013 1011 MODULE_LICENSE("GPL"); 1014 1012 MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]");
+1 -1
drivers/media/video/tveeprom.c
··· 206 206 { TUNER_ABSENT, "TCL 2002MI_3H"}, 207 207 { TUNER_TCL_2002N, "TCL 2002N 5H"}, 208 208 /* 100-109 */ 209 - { TUNER_ABSENT, "Philips FMD1216ME"}, 209 + { TUNER_PHILIPS_FMD1216ME_MK3, "Philips FMD1216ME"}, 210 210 { TUNER_TEA5767, "Philips TEA5768HL FM Radio"}, 211 211 { TUNER_ABSENT, "Panasonic ENV57H12D5"}, 212 212 { TUNER_PHILIPS_FM1236_MK3, "TCL MFNM05-4"},
+9 -5
drivers/mmc/mmc_block.c
··· 359 359 md->block_bits = card->csd.read_blkbits; 360 360 361 361 blk_queue_hardsect_size(md->queue.queue, 1 << md->block_bits); 362 - set_capacity(md->disk, card->csd.capacity); 362 + 363 + /* 364 + * The CSD capacity field is in units of read_blkbits. 365 + * set_capacity takes units of 512 bytes. 366 + */ 367 + set_capacity(md->disk, card->csd.capacity << (card->csd.read_blkbits - 9)); 363 368 } 364 369 out: 365 370 return md; ··· 378 373 379 374 mmc_card_claim_host(card); 380 375 cmd.opcode = MMC_SET_BLOCKLEN; 381 - cmd.arg = 1 << card->csd.read_blkbits; 376 + cmd.arg = 1 << md->block_bits; 382 377 cmd.flags = MMC_RSP_R1; 383 378 err = mmc_wait_for_cmd(card->host, &cmd, 5); 384 379 mmc_card_release_host(card); ··· 417 412 if (err) 418 413 goto out; 419 414 420 - printk(KERN_INFO "%s: %s %s %dKiB %s\n", 415 + printk(KERN_INFO "%s: %s %s %luKiB %s\n", 421 416 md->disk->disk_name, mmc_card_id(card), mmc_card_name(card), 422 - (card->csd.capacity << card->csd.read_blkbits) / 1024, 423 - mmc_blk_readonly(card)?"(ro)":""); 417 + get_capacity(md->disk) >> 1, mmc_blk_readonly(card)?"(ro)":""); 424 418 425 419 mmc_set_drvdata(card, md); 426 420 add_disk(md->disk);
+1 -1
drivers/mtd/maps/Kconfig
··· 62 62 63 63 config MTD_SUN_UFLASH 64 64 tristate "Sun Microsystems userflash support" 65 - depends on (SPARC32 || SPARC64) && MTD_CFI 65 + depends on SPARC && MTD_CFI 66 66 help 67 67 This provides a 'mapping' driver which supports the way in 68 68 which user-programmable flash chips are connected on various
+8 -7
drivers/net/forcedeth.c
··· 10 10 * trademarks of NVIDIA Corporation in the United States and other 11 11 * countries. 12 12 * 13 - * Copyright (C) 2003,4 Manfred Spraul 13 + * Copyright (C) 2003,4,5 Manfred Spraul 14 14 * Copyright (C) 2004 Andrew de Quincey (wol support) 15 15 * Copyright (C) 2004 Carl-Daniel Hailfinger (invalid MAC handling, insane 16 16 * IRQ rate fixes, bigendian fixes, cleanups, verification) ··· 100 100 * 0.45: 18 Sep 2005: Remove nv_stop/start_rx from every link check 101 101 * 0.46: 20 Oct 2005: Add irq optimization modes. 102 102 * 0.47: 26 Oct 2005: Add phyaddr 0 in phy scan. 103 + * 0.48: 24 Dec 2005: Disable TSO, bugfix for pci_map_single 103 104 * 104 105 * Known bugs: 105 106 * We suspect that on some hardware no TX done interrupts are generated. ··· 112 111 * DEV_NEED_TIMERIRQ will not harm you on sane hardware, only generating a few 113 112 * superfluous timer interrupts from the nic. 114 113 */ 115 - #define FORCEDETH_VERSION "0.47" 114 + #define FORCEDETH_VERSION "0.48" 116 115 #define DRV_NAME "forcedeth" 117 116 118 117 #include <linux/module.h> ··· 872 871 } else { 873 872 skb = np->rx_skbuff[nr]; 874 873 } 875 - np->rx_dma[nr] = pci_map_single(np->pci_dev, skb->data, skb->len, 876 - PCI_DMA_FROMDEVICE); 874 + np->rx_dma[nr] = pci_map_single(np->pci_dev, skb->data, 875 + skb->end-skb->data, PCI_DMA_FROMDEVICE); 877 876 if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) { 878 877 np->rx_ring.orig[nr].PacketBuffer = cpu_to_le32(np->rx_dma[nr]); 879 878 wmb(); ··· 1000 999 wmb(); 1001 1000 if (np->rx_skbuff[i]) { 1002 1001 pci_unmap_single(np->pci_dev, np->rx_dma[i], 1003 - np->rx_skbuff[i]->len, 1002 + np->rx_skbuff[i]->end-np->rx_skbuff[i]->data, 1004 1003 PCI_DMA_FROMDEVICE); 1005 1004 dev_kfree_skb(np->rx_skbuff[i]); 1006 1005 np->rx_skbuff[i] = NULL; ··· 1335 1334 * the performance. 1336 1335 */ 1337 1336 pci_unmap_single(np->pci_dev, np->rx_dma[i], 1338 - np->rx_skbuff[i]->len, 1337 + np->rx_skbuff[i]->end-np->rx_skbuff[i]->data, 1339 1338 PCI_DMA_FROMDEVICE); 1340 1339 1341 1340 { ··· 2456 2455 np->txrxctl_bits |= NVREG_TXRXCTL_RXCHECK; 2457 2456 dev->features |= NETIF_F_HW_CSUM | NETIF_F_SG; 2458 2457 #ifdef NETIF_F_TSO 2459 - dev->features |= NETIF_F_TSO; 2458 + /* disabled dev->features |= NETIF_F_TSO; */ 2460 2459 #endif 2461 2460 } 2462 2461
+4
drivers/net/phy/phy_device.c
··· 38 38 #include <asm/irq.h> 39 39 #include <asm/uaccess.h> 40 40 41 + MODULE_DESCRIPTION("PHY library"); 42 + MODULE_AUTHOR("Andy Fleming"); 43 + MODULE_LICENSE("GPL"); 44 + 41 45 static struct phy_driver genphy_driver; 42 46 extern int mdio_bus_init(void); 43 47 extern void mdio_bus_exit(void);
-3
drivers/net/ppp_generic.c
··· 524 524 if (copy_from_user(&uprog, arg, sizeof(uprog))) 525 525 return -EFAULT; 526 526 527 - if (uprog.len > BPF_MAXINSNS) 528 - return -EINVAL; 529 - 530 527 if (!uprog.len) { 531 528 *p = NULL; 532 529 return 0;
+2 -2
drivers/net/sungem.c
··· 2907 2907 return 0; 2908 2908 } 2909 2909 2910 - static void __devexit gem_remove_one(struct pci_dev *pdev) 2910 + static void gem_remove_one(struct pci_dev *pdev) 2911 2911 { 2912 2912 struct net_device *dev = pci_get_drvdata(pdev); 2913 2913 ··· 3181 3181 .name = GEM_MODULE_NAME, 3182 3182 .id_table = gem_pci_tbl, 3183 3183 .probe = gem_init_one, 3184 - .remove = __devexit_p(gem_remove_one), 3184 + .remove = gem_remove_one, 3185 3185 #ifdef CONFIG_PM 3186 3186 .suspend = gem_suspend, 3187 3187 .resume = gem_resume,
+109 -88
drivers/net/tg3.c
··· 68 68 69 69 #define DRV_MODULE_NAME "tg3" 70 70 #define PFX DRV_MODULE_NAME ": " 71 - #define DRV_MODULE_VERSION "3.45" 72 - #define DRV_MODULE_RELDATE "Dec 13, 2005" 71 + #define DRV_MODULE_VERSION "3.47" 72 + #define DRV_MODULE_RELDATE "Dec 28, 2005" 73 73 74 74 #define TG3_DEF_MAC_MODE 0 75 75 #define TG3_DEF_RX_MODE 0 ··· 341 341 { "interrupt test (offline)" }, 342 342 }; 343 343 344 + static void tg3_write32(struct tg3 *tp, u32 off, u32 val) 345 + { 346 + writel(val, tp->regs + off); 347 + } 348 + 349 + static u32 tg3_read32(struct tg3 *tp, u32 off) 350 + { 351 + return (readl(tp->regs + off)); 352 + } 353 + 344 354 static void tg3_write_indirect_reg32(struct tg3 *tp, u32 off, u32 val) 345 355 { 346 356 unsigned long flags; ··· 421 411 return val; 422 412 } 423 413 424 - static void _tw32_flush(struct tg3 *tp, u32 off, u32 val) 414 + /* usec_wait specifies the wait time in usec when writing to certain registers 415 + * where it is unsafe to read back the register without some delay. 416 + * GRC_LOCAL_CTRL is one example if the GPIOs are toggled to switch power. 417 + * TG3PCI_CLOCK_CTRL is another example if the clock frequencies are changed. 418 + */ 419 + static void _tw32_flush(struct tg3 *tp, u32 off, u32 val, u32 usec_wait) 425 420 { 426 - tp->write32(tp, off, val); 427 - if (!(tp->tg3_flags & TG3_FLAG_PCIX_TARGET_HWBUG) && 428 - !(tp->tg3_flags & TG3_FLAG_5701_REG_WRITE_BUG) && 429 - !(tp->tg3_flags2 & TG3_FLG2_ICH_WORKAROUND)) 430 - tp->read32(tp, off); /* flush */ 421 + if ((tp->tg3_flags & TG3_FLAG_PCIX_TARGET_HWBUG) || 422 + (tp->tg3_flags2 & TG3_FLG2_ICH_WORKAROUND)) 423 + /* Non-posted methods */ 424 + tp->write32(tp, off, val); 425 + else { 426 + /* Posted method */ 427 + tg3_write32(tp, off, val); 428 + if (usec_wait) 429 + udelay(usec_wait); 430 + tp->read32(tp, off); 431 + } 432 + /* Wait again after the read for the posted method to guarantee that 433 + * the wait time is met. 434 + */ 435 + if (usec_wait) 436 + udelay(usec_wait); 431 437 } 432 438 433 439 static inline void tw32_mailbox_flush(struct tg3 *tp, u32 off, u32 val) ··· 464 438 readl(mbox); 465 439 } 466 440 467 - static void tg3_write32(struct tg3 *tp, u32 off, u32 val) 468 - { 469 - writel(val, tp->regs + off); 470 - } 471 - 472 - static u32 tg3_read32(struct tg3 *tp, u32 off) 473 - { 474 - return (readl(tp->regs + off)); 475 - } 476 - 477 441 #define tw32_mailbox(reg, val) tp->write32_mbox(tp, reg, val) 478 442 #define tw32_mailbox_f(reg, val) tw32_mailbox_flush(tp, (reg), (val)) 479 443 #define tw32_rx_mbox(reg, val) tp->write32_rx_mbox(tp, reg, val) ··· 471 455 #define tr32_mailbox(reg) tp->read32_mbox(tp, reg) 472 456 473 457 #define tw32(reg,val) tp->write32(tp, reg, val) 474 - #define tw32_f(reg,val) _tw32_flush(tp,(reg),(val)) 458 + #define tw32_f(reg,val) _tw32_flush(tp,(reg),(val), 0) 459 + #define tw32_wait_f(reg,val,us) _tw32_flush(tp,(reg),(val), (us)) 475 460 #define tr32(reg) tp->read32(tp, reg) 476 461 477 462 static void tg3_write_mem(struct tg3 *tp, u32 off, u32 val) ··· 612 595 613 596 if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS) { 614 597 if (orig_clock_ctrl & CLOCK_CTRL_625_CORE) { 615 - tw32_f(TG3PCI_CLOCK_CTRL, 616 - clock_ctrl | CLOCK_CTRL_625_CORE); 617 - udelay(40); 598 + tw32_wait_f(TG3PCI_CLOCK_CTRL, 599 + clock_ctrl | CLOCK_CTRL_625_CORE, 40); 618 600 } 619 601 } else if ((orig_clock_ctrl & CLOCK_CTRL_44MHZ_CORE) != 0) { 620 - tw32_f(TG3PCI_CLOCK_CTRL, 621 - clock_ctrl | 622 - (CLOCK_CTRL_44MHZ_CORE | CLOCK_CTRL_ALTCLK)); 623 - udelay(40); 624 - tw32_f(TG3PCI_CLOCK_CTRL, 625 - clock_ctrl | (CLOCK_CTRL_ALTCLK)); 626 - udelay(40); 602 + tw32_wait_f(TG3PCI_CLOCK_CTRL, 603 + clock_ctrl | 604 + (CLOCK_CTRL_44MHZ_CORE | CLOCK_CTRL_ALTCLK), 605 + 40); 606 + tw32_wait_f(TG3PCI_CLOCK_CTRL, 607 + clock_ctrl | (CLOCK_CTRL_ALTCLK), 608 + 40); 627 609 } 628 - tw32_f(TG3PCI_CLOCK_CTRL, clock_ctrl); 629 - udelay(40); 610 + tw32_wait_f(TG3PCI_CLOCK_CTRL, clock_ctrl, 40); 630 611 } 631 612 632 613 #define PHY_BUSY_LOOPS 5000 ··· 1032 1017 if ((tp->tg3_flags & TG3_FLAG_EEPROM_WRITE_PROT) != 0) 1033 1018 return; 1034 1019 1035 - if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) { 1036 - tp_peer = pci_get_drvdata(tp->pdev_peer); 1037 - if (!tp_peer) 1038 - BUG(); 1039 - } 1020 + if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) || 1021 + (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5714)) { 1022 + struct net_device *dev_peer; 1040 1023 1024 + dev_peer = pci_get_drvdata(tp->pdev_peer); 1025 + if (!dev_peer) 1026 + BUG(); 1027 + tp_peer = netdev_priv(dev_peer); 1028 + } 1041 1029 1042 1030 if ((tp->tg3_flags & TG3_FLAG_WOL_ENABLE) != 0 || 1043 1031 (tp->tg3_flags & TG3_FLAG_ENABLE_ASF) != 0 || ··· 1048 1030 (tp_peer->tg3_flags & TG3_FLAG_ENABLE_ASF) != 0) { 1049 1031 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700 || 1050 1032 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701) { 1051 - tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | 1052 - (GRC_LCLCTRL_GPIO_OE0 | 1053 - GRC_LCLCTRL_GPIO_OE1 | 1054 - GRC_LCLCTRL_GPIO_OE2 | 1055 - GRC_LCLCTRL_GPIO_OUTPUT0 | 1056 - GRC_LCLCTRL_GPIO_OUTPUT1)); 1057 - udelay(100); 1033 + tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | 1034 + (GRC_LCLCTRL_GPIO_OE0 | 1035 + GRC_LCLCTRL_GPIO_OE1 | 1036 + GRC_LCLCTRL_GPIO_OE2 | 1037 + GRC_LCLCTRL_GPIO_OUTPUT0 | 1038 + GRC_LCLCTRL_GPIO_OUTPUT1), 1039 + 100); 1058 1040 } else { 1059 1041 u32 no_gpio2; 1060 - u32 grc_local_ctrl; 1042 + u32 grc_local_ctrl = 0; 1061 1043 1062 1044 if (tp_peer != tp && 1063 1045 (tp_peer->tg3_flags & TG3_FLAG_INIT_COMPLETE) != 0) 1064 1046 return; 1065 1047 1048 + /* Workaround to prevent overdrawing Amps. */ 1049 + if (GET_ASIC_REV(tp->pci_chip_rev_id) == 1050 + ASIC_REV_5714) { 1051 + grc_local_ctrl |= GRC_LCLCTRL_GPIO_OE3; 1052 + tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | 1053 + grc_local_ctrl, 100); 1054 + } 1055 + 1066 1056 /* On 5753 and variants, GPIO2 cannot be used. */ 1067 1057 no_gpio2 = tp->nic_sram_data_cfg & 1068 1058 NIC_SRAM_DATA_CFG_NO_GPIO2; 1069 1059 1070 - grc_local_ctrl = GRC_LCLCTRL_GPIO_OE0 | 1060 + grc_local_ctrl |= GRC_LCLCTRL_GPIO_OE0 | 1071 1061 GRC_LCLCTRL_GPIO_OE1 | 1072 1062 GRC_LCLCTRL_GPIO_OE2 | 1073 1063 GRC_LCLCTRL_GPIO_OUTPUT1 | ··· 1084 1058 grc_local_ctrl &= ~(GRC_LCLCTRL_GPIO_OE2 | 1085 1059 GRC_LCLCTRL_GPIO_OUTPUT2); 1086 1060 } 1087 - tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | 1088 - grc_local_ctrl); 1089 - udelay(100); 1061 + tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | 1062 + grc_local_ctrl, 100); 1090 1063 1091 1064 grc_local_ctrl |= GRC_LCLCTRL_GPIO_OUTPUT0; 1092 1065 1093 - tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | 1094 - grc_local_ctrl); 1095 - udelay(100); 1066 + tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | 1067 + grc_local_ctrl, 100); 1096 1068 1097 1069 if (!no_gpio2) { 1098 1070 grc_local_ctrl &= ~GRC_LCLCTRL_GPIO_OUTPUT2; 1099 - tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | 1100 - grc_local_ctrl); 1101 - udelay(100); 1071 + tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | 1072 + grc_local_ctrl, 100); 1102 1073 } 1103 1074 } 1104 1075 } else { ··· 1105 1082 (tp_peer->tg3_flags & TG3_FLAG_INIT_COMPLETE) != 0) 1106 1083 return; 1107 1084 1108 - tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | 1109 - (GRC_LCLCTRL_GPIO_OE1 | 1110 - GRC_LCLCTRL_GPIO_OUTPUT1)); 1111 - udelay(100); 1085 + tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | 1086 + (GRC_LCLCTRL_GPIO_OE1 | 1087 + GRC_LCLCTRL_GPIO_OUTPUT1), 100); 1112 1088 1113 - tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | 1114 - (GRC_LCLCTRL_GPIO_OE1)); 1115 - udelay(100); 1089 + tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | 1090 + GRC_LCLCTRL_GPIO_OE1, 100); 1116 1091 1117 - tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | 1118 - (GRC_LCLCTRL_GPIO_OE1 | 1119 - GRC_LCLCTRL_GPIO_OUTPUT1)); 1120 - udelay(100); 1092 + tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | 1093 + (GRC_LCLCTRL_GPIO_OE1 | 1094 + GRC_LCLCTRL_GPIO_OUTPUT1), 100); 1121 1095 } 1122 1096 } 1123 1097 } ··· 1157 1137 udelay(100); /* Delay after power state change */ 1158 1138 1159 1139 /* Switch out of Vaux if it is not a LOM */ 1160 - if (!(tp->tg3_flags & TG3_FLAG_EEPROM_WRITE_PROT)) { 1161 - tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl); 1162 - udelay(100); 1163 - } 1140 + if (!(tp->tg3_flags & TG3_FLAG_EEPROM_WRITE_PROT)) 1141 + tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl, 100); 1164 1142 1165 1143 return 0; 1166 1144 ··· 1257 1239 base_val |= (CLOCK_CTRL_RXCLK_DISABLE | 1258 1240 CLOCK_CTRL_TXCLK_DISABLE); 1259 1241 1260 - tw32_f(TG3PCI_CLOCK_CTRL, base_val | 1261 - CLOCK_CTRL_ALTCLK | 1262 - CLOCK_CTRL_PWRDOWN_PLL133); 1263 - udelay(40); 1242 + tw32_wait_f(TG3PCI_CLOCK_CTRL, base_val | CLOCK_CTRL_ALTCLK | 1243 + CLOCK_CTRL_PWRDOWN_PLL133, 40); 1264 1244 } else if (tp->tg3_flags2 & TG3_FLG2_5780_CLASS) { 1265 1245 /* do nothing */ 1266 1246 } else if (!((tp->tg3_flags2 & TG3_FLG2_5750_PLUS) && ··· 1279 1263 newbits2 = newbits1 | CLOCK_CTRL_44MHZ_CORE; 1280 1264 } 1281 1265 1282 - tw32_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl | newbits1); 1283 - udelay(40); 1266 + tw32_wait_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl | newbits1, 1267 + 40); 1284 1268 1285 - tw32_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl | newbits2); 1286 - udelay(40); 1269 + tw32_wait_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl | newbits2, 1270 + 40); 1287 1271 1288 1272 if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) { 1289 1273 u32 newbits3; ··· 1297 1281 newbits3 = CLOCK_CTRL_44MHZ_CORE; 1298 1282 } 1299 1283 1300 - tw32_f(TG3PCI_CLOCK_CTRL, 1301 - tp->pci_clock_ctrl | newbits3); 1302 - udelay(40); 1284 + tw32_wait_f(TG3PCI_CLOCK_CTRL, 1285 + tp->pci_clock_ctrl | newbits3, 40); 1303 1286 } 1304 1287 } 1305 1288 ··· 1309 1294 tg3_writephy(tp, MII_TG3_EXT_CTRL, 1310 1295 MII_TG3_EXT_CTRL_FORCE_LED_OFF); 1311 1296 tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x01b2); 1312 - tg3_writephy(tp, MII_BMCR, BMCR_PDOWN); 1297 + if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5700) 1298 + tg3_writephy(tp, MII_BMCR, BMCR_PDOWN); 1313 1299 } 1314 1300 } 1315 1301 ··· 7151 7135 GET_REG32_LOOP(BUFMGR_MODE, 0x58); 7152 7136 GET_REG32_LOOP(RDMAC_MODE, 0x08); 7153 7137 GET_REG32_LOOP(WDMAC_MODE, 0x08); 7154 - GET_REG32_LOOP(RX_CPU_BASE, 0x280); 7155 - GET_REG32_LOOP(TX_CPU_BASE, 0x280); 7138 + GET_REG32_1(RX_CPU_MODE); 7139 + GET_REG32_1(RX_CPU_STATE); 7140 + GET_REG32_1(RX_CPU_PGMCTR); 7141 + GET_REG32_1(RX_CPU_HWBKPT); 7142 + GET_REG32_1(TX_CPU_MODE); 7143 + GET_REG32_1(TX_CPU_STATE); 7144 + GET_REG32_1(TX_CPU_PGMCTR); 7156 7145 GET_REG32_LOOP(GRCMBOX_INTERRUPT_0, 0x110); 7157 7146 GET_REG32_LOOP(FTQ_RESET, 0x120); 7158 7147 GET_REG32_LOOP(MSGINT_MODE, 0x0c); ··· 7980 7959 u32 offset; 7981 7960 u32 len; 7982 7961 } mem_tbl_570x[] = { 7983 - { 0x00000000, 0x01000}, 7962 + { 0x00000000, 0x00b50}, 7984 7963 { 0x00002000, 0x1c000}, 7985 7964 { 0xffffffff, 0x00000} 7986 7965 }, mem_tbl_5705[] = { 7987 7966 { 0x00000100, 0x0000c}, 7988 7967 { 0x00000200, 0x00008}, 7989 - { 0x00000b50, 0x00400}, 7990 7968 { 0x00004000, 0x00800}, 7991 7969 { 0x00006000, 0x01000}, 7992 7970 { 0x00008000, 0x02000}, ··· 10486 10466 return str; 10487 10467 } 10488 10468 10489 - static struct pci_dev * __devinit tg3_find_5704_peer(struct tg3 *tp) 10469 + static struct pci_dev * __devinit tg3_find_peer(struct tg3 *tp) 10490 10470 { 10491 10471 struct pci_dev *peer; 10492 10472 unsigned int func, devnr = tp->pdev->devfn & ~7; ··· 10739 10719 tp->rx_pending = 63; 10740 10720 } 10741 10721 10742 - if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) 10743 - tp->pdev_peer = tg3_find_5704_peer(tp); 10722 + if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) || 10723 + (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5714)) 10724 + tp->pdev_peer = tg3_find_peer(tp); 10744 10725 10745 10726 err = tg3_get_device_address(tp); 10746 10727 if (err) {
+7
drivers/net/tg3.h
··· 1124 1124 /* 0x280 --> 0x400 unused */ 1125 1125 1126 1126 #define RX_CPU_BASE 0x00005000 1127 + #define RX_CPU_MODE 0x00005000 1128 + #define RX_CPU_STATE 0x00005004 1129 + #define RX_CPU_PGMCTR 0x0000501c 1130 + #define RX_CPU_HWBKPT 0x00005034 1127 1131 #define TX_CPU_BASE 0x00005400 1132 + #define TX_CPU_MODE 0x00005400 1133 + #define TX_CPU_STATE 0x00005404 1134 + #define TX_CPU_PGMCTR 0x0000541c 1128 1135 1129 1136 /* Mailboxes */ 1130 1137 #define GRCMBOX_INTERRUPT_0 0x00005800 /* 64-bit */
+5 -1
drivers/net/wireless/orinoco_nortel.c
··· 1 1 /* orinoco_nortel.c 2 2 * 3 3 * Driver for Prism II devices which would usually be driven by orinoco_cs, 4 + * but are connected to the PCI bus by a PCI-to-PCMCIA adapter used in 5 + * Nortel emobility, Symbol LA-4113 and Symbol LA-4123. 4 6 * but are connected to the PCI bus by a Nortel PCI-PCMCIA-Adapter. 5 7 * 6 8 * Copyright (C) 2002 Tobias Hoffmann ··· 167 165 goto fail_resources; 168 166 } 169 167 170 - iomem = pci_iomap(pdev, 3, 0); 168 + iomem = pci_iomap(pdev, 2, 0); 171 169 if (!iomem) { 172 170 err = -ENOMEM; 173 171 goto fail_map_io; ··· 267 265 static struct pci_device_id nortel_pci_id_table[] = { 268 266 /* Nortel emobility PCI */ 269 267 {0x126c, 0x8030, PCI_ANY_ID, PCI_ANY_ID,}, 268 + /* Symbol LA-4123 PCI */ 269 + {0x1562, 0x0001, PCI_ANY_ID, PCI_ANY_ID,}, 270 270 {0,}, 271 271 }; 272 272
+2 -1
drivers/s390/net/qeth_eddp.c
··· 62 62 for (i = 0; i < ctx->num_pages; ++i) 63 63 free_page((unsigned long)ctx->pages[i]); 64 64 kfree(ctx->pages); 65 - kfree(ctx->elements); 65 + if (ctx->elements != NULL) 66 + kfree(ctx->elements); 66 67 kfree(ctx); 67 68 } 68 69
+29 -32
drivers/s390/net/qeth_main.c
··· 1 1 /* 2 2 * 3 - * linux/drivers/s390/net/qeth_main.c ($Revision: 1.242 $) 3 + * linux/drivers/s390/net/qeth_main.c ($Revision: 1.251 $) 4 4 * 5 5 * Linux on zSeries OSA Express and HiperSockets support 6 6 * ··· 12 12 * Frank Pavlic (fpavlic@de.ibm.com) and 13 13 * Thomas Spatzier <tspat@de.ibm.com> 14 14 * 15 - * $Revision: 1.242 $ $Date: 2005/05/04 20:19:18 $ 15 + * $Revision: 1.251 $ $Date: 2005/05/04 20:19:18 $ 16 16 * 17 17 * This program is free software; you can redistribute it and/or modify 18 18 * it under the terms of the GNU General Public License as published by ··· 72 72 #include "qeth_eddp.h" 73 73 #include "qeth_tso.h" 74 74 75 - #define VERSION_QETH_C "$Revision: 1.242 $" 75 + #define VERSION_QETH_C "$Revision: 1.251 $" 76 76 static const char *version = "qeth S/390 OSA-Express driver"; 77 77 78 78 /** ··· 518 518 519 519 QETH_DBF_TEXT(setup, 3, "setoffl"); 520 520 QETH_DBF_HEX(setup, 3, &card, sizeof(void *)); 521 - 521 + 522 + netif_carrier_off(card->dev); 522 523 recover_flag = card->state; 523 524 if (qeth_stop_card(card, recovery_mode) == -ERESTARTSYS){ 524 525 PRINT_WARN("Stopping card %s interrupted by user!\n", ··· 1021 1020 qeth_schedule_recovery(struct qeth_card *card) 1022 1021 { 1023 1022 QETH_DBF_TEXT(trace,2,"startrec"); 1024 - 1025 1023 if (qeth_set_thread_start_bit(card, QETH_RECOVER_THREAD) == 0) 1026 1024 schedule_work(&card->kernel_thread_starter); 1027 1025 } ··· 1710 1710 "IP address reset.\n", 1711 1711 QETH_CARD_IFNAME(card), 1712 1712 card->info.chpid); 1713 - netif_carrier_on(card->dev); 1714 1713 qeth_schedule_recovery(card); 1715 1714 return NULL; 1716 1715 case IPA_CMD_MODCCID: ··· 1958 1959 { 1959 1960 u16 s1, s2; 1960 1961 1961 - QETH_DBF_TEXT(trace,4,"osndipa"); 1962 + QETH_DBF_TEXT(trace,4,"osndipa"); 1962 1963 1963 1964 qeth_prepare_ipa_cmd(card, iob, QETH_PROT_OSN2); 1964 1965 s1 = (u16)(IPA_PDU_HEADER_SIZE + data_len); ··· 2202 2203 } 2203 2204 2204 2205 static inline int 2205 - qeth_check_for_inbound_error(struct qeth_qdio_buffer *buf, 2206 - unsigned int qdio_error, 2207 - unsigned int siga_error) 2206 + qeth_check_qdio_errors(struct qdio_buffer *buf, unsigned int qdio_error, 2207 + unsigned int siga_error, const char *dbftext) 2208 2208 { 2209 - int rc = 0; 2210 - 2211 2209 if (qdio_error || siga_error) { 2212 - QETH_DBF_TEXT(trace, 2, "qdinerr"); 2213 - QETH_DBF_TEXT(qerr, 2, "qdinerr"); 2210 + QETH_DBF_TEXT(trace, 2, dbftext); 2211 + QETH_DBF_TEXT(qerr, 2, dbftext); 2214 2212 QETH_DBF_TEXT_(qerr, 2, " F15=%02X", 2215 - buf->buffer->element[15].flags & 0xff); 2213 + buf->element[15].flags & 0xff); 2216 2214 QETH_DBF_TEXT_(qerr, 2, " F14=%02X", 2217 - buf->buffer->element[14].flags & 0xff); 2215 + buf->element[14].flags & 0xff); 2218 2216 QETH_DBF_TEXT_(qerr, 2, " qerr=%X", qdio_error); 2219 2217 QETH_DBF_TEXT_(qerr, 2, " serr=%X", siga_error); 2220 - rc = 1; 2218 + return 1; 2221 2219 } 2222 - return rc; 2220 + return 0; 2223 2221 } 2224 2222 2225 2223 static inline struct sk_buff * ··· 2765 2769 for (i = first_element; i < (first_element + count); ++i) { 2766 2770 index = i % QDIO_MAX_BUFFERS_PER_Q; 2767 2771 buffer = &card->qdio.in_q->bufs[index]; 2768 - if (!((status == QDIO_STATUS_LOOK_FOR_ERROR) && 2769 - qeth_check_for_inbound_error(buffer, qdio_err, siga_err))) 2772 + if (!((status & QDIO_STATUS_LOOK_FOR_ERROR) && 2773 + qeth_check_qdio_errors(buffer->buffer, 2774 + qdio_err, siga_err,"qinerr"))) 2770 2775 qeth_process_inbound_buffer(card, buffer, index); 2771 2776 /* clear buffer and give back to hardware */ 2772 2777 qeth_put_buffer_pool_entry(card, buffer->pool_entry); ··· 2782 2785 static inline int 2783 2786 qeth_handle_send_error(struct qeth_card *card, 2784 2787 struct qeth_qdio_out_buffer *buffer, 2785 - int qdio_err, int siga_err) 2788 + unsigned int qdio_err, unsigned int siga_err) 2786 2789 { 2787 2790 int sbalf15 = buffer->buffer->element[15].flags & 0xff; 2788 2791 int cc = siga_err & 3; 2789 2792 2790 2793 QETH_DBF_TEXT(trace, 6, "hdsnderr"); 2794 + qeth_check_qdio_errors(buffer->buffer, qdio_err, siga_err, "qouterr"); 2791 2795 switch (cc) { 2792 2796 case 0: 2793 2797 if (qdio_err){ ··· 3045 3047 for(i = first_element; i < (first_element + count); ++i){ 3046 3048 buffer = &queue->bufs[i % QDIO_MAX_BUFFERS_PER_Q]; 3047 3049 /*we only handle the KICK_IT error by doing a recovery */ 3048 - if (qeth_handle_send_error(card, buffer, qdio_error, siga_error) 3050 + if (qeth_handle_send_error(card, buffer, 3051 + qdio_error, siga_error) 3049 3052 == QETH_SEND_ERROR_KICK_IT){ 3050 3053 netif_stop_queue(card->dev); 3051 3054 qeth_schedule_recovery(card); ··· 3288 3289 card->qdio.in_buf_pool.buf_count = card->qdio.init_pool.buf_count; 3289 3290 INIT_LIST_HEAD(&card->qdio.in_buf_pool.entry_list); 3290 3291 INIT_LIST_HEAD(&card->qdio.init_pool.entry_list); 3291 - /* outbound */ 3292 3292 } 3293 3293 3294 3294 static int ··· 3729 3731 break; 3730 3732 } 3731 3733 } 3734 + if (rc && !(VLAN_DEV_INFO(dev)->real_dev->priv == (void *)card)) 3735 + return 0; 3736 + 3732 3737 #endif 3733 3738 return rc; 3734 3739 } ··· 3808 3807 card->data.state = CH_STATE_UP; 3809 3808 card->state = CARD_STATE_UP; 3810 3809 3811 - if (!card->lan_online){ 3812 - if (netif_carrier_ok(dev)) 3813 - netif_carrier_off(dev); 3814 - } 3810 + if (!card->lan_online && netif_carrier_ok(dev)) 3811 + netif_carrier_off(dev); 3815 3812 return 0; 3816 3813 } 3817 3814 ··· 5869 5870 struct inet6_dev *in6_dev; 5870 5871 5871 5872 QETH_DBF_TEXT(trace,4,"chkmcv6"); 5872 - if ((card->options.layer2 == 0) && 5873 - (!qeth_is_supported(card, IPA_IPV6)) ) 5873 + if (!qeth_is_supported(card, IPA_IPV6)) 5874 5874 return ; 5875 - 5876 5875 in6_dev = in6_dev_get(card->dev); 5877 5876 if (in6_dev == NULL) 5878 5877 return; ··· 7933 7936 QETH_DBF_TEXT_(setup, 2, "6err%d", rc); 7934 7937 goto out_remove; 7935 7938 } 7936 - /*maybe it was set offline without ifconfig down 7937 - * we can also use this state for recovery purposes*/ 7939 + netif_carrier_on(card->dev); 7940 + 7938 7941 qeth_set_allowed_threads(card, 0xffffffff, 0); 7939 7942 if (recover_flag == CARD_STATE_RECOVER) 7940 7943 qeth_start_again(card, recovery_mode);
+1 -1
drivers/s390/net/qeth_mpc.c
··· 11 11 #include <asm/cio.h> 12 12 #include "qeth_mpc.h" 13 13 14 - const char *VERSION_QETH_MPC_C = "$Revision: 1.12 $"; 14 + const char *VERSION_QETH_MPC_C = "$Revision: 1.13 $"; 15 15 16 16 unsigned char IDX_ACTIVATE_READ[]={ 17 17 0x00,0x00,0x80,0x00, 0x00,0x00,0x00,0x00,
+2 -2
drivers/s390/net/qeth_mpc.h
··· 14 14 15 15 #include <asm/qeth.h> 16 16 17 - #define VERSION_QETH_MPC_H "$Revision: 1.44 $" 17 + #define VERSION_QETH_MPC_H "$Revision: 1.46 $" 18 18 19 19 extern const char *VERSION_QETH_MPC_C; 20 20 21 21 #define IPA_PDU_HEADER_SIZE 0x40 22 22 #define QETH_IPA_PDU_LEN_TOTAL(buffer) (buffer+0x0e) 23 23 #define QETH_IPA_PDU_LEN_PDU1(buffer) (buffer+0x26) 24 - #define QETH_IPA_PDU_LEN_PDU2(buffer) (buffer+0x2a) 24 + #define QETH_IPA_PDU_LEN_PDU2(buffer) (buffer+0x29) 25 25 #define QETH_IPA_PDU_LEN_PDU3(buffer) (buffer+0x3a) 26 26 27 27 extern unsigned char IPA_PDU_HEADER[];
+29 -221
drivers/s390/net/qeth_proc.c
··· 1 1 /* 2 2 * 3 - * linux/drivers/s390/net/qeth_fs.c ($Revision: 1.13 $) 3 + * linux/drivers/s390/net/qeth_fs.c ($Revision: 1.16 $) 4 4 * 5 5 * Linux on zSeries OSA Express and HiperSockets support 6 6 * This file contains code related to procfs. ··· 21 21 #include "qeth_mpc.h" 22 22 #include "qeth_fs.h" 23 23 24 - const char *VERSION_QETH_PROC_C = "$Revision: 1.13 $"; 24 + const char *VERSION_QETH_PROC_C = "$Revision: 1.16 $"; 25 25 26 26 /***** /proc/qeth *****/ 27 27 #define QETH_PROCFILE_NAME "qeth" ··· 30 30 static int 31 31 qeth_procfile_seq_match(struct device *dev, void *data) 32 32 { 33 - return 1; 33 + return(dev ? 1 : 0); 34 34 } 35 35 36 36 static void * 37 37 qeth_procfile_seq_start(struct seq_file *s, loff_t *offset) 38 38 { 39 - struct device *dev; 40 - loff_t nr; 41 - 39 + struct device *dev = NULL; 40 + loff_t nr = 0; 41 + 42 42 down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); 43 - 44 - nr = *offset; 45 - if (nr == 0) 43 + if (*offset == 0) 46 44 return SEQ_START_TOKEN; 47 - 48 - dev = driver_find_device(&qeth_ccwgroup_driver.driver, NULL, 49 - NULL, qeth_procfile_seq_match); 50 - 51 - /* get card at pos *offset */ 52 - nr = *offset; 53 - while (nr-- > 1 && dev) 45 + while (1) { 54 46 dev = driver_find_device(&qeth_ccwgroup_driver.driver, dev, 55 47 NULL, qeth_procfile_seq_match); 56 - return (void *) dev; 48 + if (++nr == *offset) 49 + break; 50 + put_device(dev); 51 + } 52 + return dev; 57 53 } 58 54 59 55 static void ··· 62 66 qeth_procfile_seq_next(struct seq_file *s, void *it, loff_t *offset) 63 67 { 64 68 struct device *prev, *next; 65 - 66 - if (it == SEQ_START_TOKEN) { 67 - next = driver_find_device(&qeth_ccwgroup_driver.driver, 68 - NULL, NULL, qeth_procfile_seq_match); 69 - if (next) 70 - (*offset)++; 71 - return (void *) next; 72 - } 73 - prev = (struct device *) it; 69 + 70 + if (it == SEQ_START_TOKEN) 71 + prev = NULL; 72 + else 73 + prev = (struct device *) it; 74 74 next = driver_find_device(&qeth_ccwgroup_driver.driver, 75 75 prev, NULL, qeth_procfile_seq_match); 76 - if (next) 77 - (*offset)++; 76 + (*offset)++; 78 77 return (void *) next; 79 78 } 80 79 ··· 78 87 { 79 88 int routing_type = 0; 80 89 81 - if (ipv == 4){ 90 + if (ipv == 4) { 82 91 routing_type = card->options.route4.type; 83 92 } else { 84 93 #ifdef CONFIG_QETH_IPV6 ··· 145 154 card->qdio.in_buf_pool.buf_count); 146 155 else 147 156 seq_printf(s, " +++ LAN OFFLINE +++\n"); 157 + put_device(device); 148 158 } 149 159 return 0; 150 160 } ··· 176 184 static struct proc_dir_entry *qeth_perf_procfile; 177 185 178 186 #ifdef CONFIG_QETH_PERF_STATS 179 - 180 - static void * 181 - qeth_perf_procfile_seq_start(struct seq_file *s, loff_t *offset) 182 - { 183 - struct device *dev = NULL; 184 - int nr; 185 - 186 - down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); 187 - /* get card at pos *offset */ 188 - dev = driver_find_device(&qeth_ccwgroup_driver.driver, NULL, NULL, 189 - qeth_procfile_seq_match); 190 - 191 - /* get card at pos *offset */ 192 - nr = *offset; 193 - while (nr-- > 1 && dev) 194 - dev = driver_find_device(&qeth_ccwgroup_driver.driver, dev, 195 - NULL, qeth_procfile_seq_match); 196 - return (void *) dev; 197 - } 198 - 199 - static void 200 - qeth_perf_procfile_seq_stop(struct seq_file *s, void* it) 201 - { 202 - up_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); 203 - } 204 - 205 - static void * 206 - qeth_perf_procfile_seq_next(struct seq_file *s, void *it, loff_t *offset) 207 - { 208 - struct device *prev, *next; 209 - 210 - prev = (struct device *) it; 211 - next = driver_find_device(&qeth_ccwgroup_driver.driver, prev, 212 - NULL, qeth_procfile_seq_match); 213 - if (next) 214 - (*offset)++; 215 - return (void *) next; 216 - } 217 - 218 187 static int 219 188 qeth_perf_procfile_seq_show(struct seq_file *s, void *it) 220 189 { 221 190 struct device *device; 222 191 struct qeth_card *card; 192 + 193 + 194 + if (it == SEQ_START_TOKEN) 195 + return 0; 223 196 224 197 device = (struct device *) it; 225 198 card = device->driver_data; ··· 252 295 card->perf_stats.outbound_do_qdio_time, 253 296 card->perf_stats.outbound_do_qdio_cnt 254 297 ); 298 + put_device(device); 255 299 return 0; 256 300 } 257 301 258 302 static struct seq_operations qeth_perf_procfile_seq_ops = { 259 - .start = qeth_perf_procfile_seq_start, 260 - .stop = qeth_perf_procfile_seq_stop, 261 - .next = qeth_perf_procfile_seq_next, 303 + .start = qeth_procfile_seq_start, 304 + .stop = qeth_procfile_seq_stop, 305 + .next = qeth_procfile_seq_next, 262 306 .show = qeth_perf_procfile_seq_show, 263 307 }; 264 308 ··· 282 324 #define qeth_perf_procfile_created 1 283 325 #endif /* CONFIG_QETH_PERF_STATS */ 284 326 285 - /***** /proc/qeth_ipa_takeover *****/ 286 - #define QETH_IPATO_PROCFILE_NAME "qeth_ipa_takeover" 287 - static struct proc_dir_entry *qeth_ipato_procfile; 288 - 289 - static void * 290 - qeth_ipato_procfile_seq_start(struct seq_file *s, loff_t *offset) 291 - { 292 - struct device *dev; 293 - loff_t nr; 294 - 295 - down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); 296 - /* TODO: finish this */ 297 - /* 298 - * maybe SEQ_SATRT_TOKEN can be returned for offset 0 299 - * output driver settings then; 300 - * else output setting for respective card 301 - */ 302 - 303 - dev = driver_find_device(&qeth_ccwgroup_driver.driver, NULL, NULL, 304 - qeth_procfile_seq_match); 305 - 306 - /* get card at pos *offset */ 307 - nr = *offset; 308 - while (nr-- > 1 && dev) 309 - dev = driver_find_device(&qeth_ccwgroup_driver.driver, dev, 310 - NULL, qeth_procfile_seq_match); 311 - return (void *) dev; 312 - } 313 - 314 - static void 315 - qeth_ipato_procfile_seq_stop(struct seq_file *s, void* it) 316 - { 317 - up_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); 318 - } 319 - 320 - static void * 321 - qeth_ipato_procfile_seq_next(struct seq_file *s, void *it, loff_t *offset) 322 - { 323 - struct device *prev, *next; 324 - 325 - prev = (struct device *) it; 326 - next = driver_find_device(&qeth_ccwgroup_driver.driver, prev, 327 - NULL, qeth_procfile_seq_match); 328 - if (next) 329 - (*offset)++; 330 - return (void *) next; 331 - } 332 - 333 - static int 334 - qeth_ipato_procfile_seq_show(struct seq_file *s, void *it) 335 - { 336 - struct device *device; 337 - struct qeth_card *card; 338 - 339 - /* TODO: finish this */ 340 - /* 341 - * maybe SEQ_SATRT_TOKEN can be returned for offset 0 342 - * output driver settings then; 343 - * else output setting for respective card 344 - */ 345 - device = (struct device *) it; 346 - card = device->driver_data; 347 - 348 - return 0; 349 - } 350 - 351 - static struct seq_operations qeth_ipato_procfile_seq_ops = { 352 - .start = qeth_ipato_procfile_seq_start, 353 - .stop = qeth_ipato_procfile_seq_stop, 354 - .next = qeth_ipato_procfile_seq_next, 355 - .show = qeth_ipato_procfile_seq_show, 356 - }; 357 - 358 - static int 359 - qeth_ipato_procfile_open(struct inode *inode, struct file *file) 360 - { 361 - return seq_open(file, &qeth_ipato_procfile_seq_ops); 362 - } 363 - 364 - static struct file_operations qeth_ipato_procfile_fops = { 365 - .owner = THIS_MODULE, 366 - .open = qeth_ipato_procfile_open, 367 - .read = seq_read, 368 - .llseek = seq_lseek, 369 - .release = seq_release, 370 - }; 371 - 372 327 int __init 373 328 qeth_create_procfs_entries(void) 374 329 { ··· 297 426 qeth_perf_procfile->proc_fops = &qeth_perf_procfile_fops; 298 427 #endif /* CONFIG_QETH_PERF_STATS */ 299 428 300 - qeth_ipato_procfile = create_proc_entry(QETH_IPATO_PROCFILE_NAME, 301 - S_IFREG | 0444, NULL); 302 - if (qeth_ipato_procfile) 303 - qeth_ipato_procfile->proc_fops = &qeth_ipato_procfile_fops; 304 - 305 429 if (qeth_procfile && 306 - qeth_ipato_procfile && 307 430 qeth_perf_procfile_created) 308 431 return 0; 309 432 else ··· 311 446 remove_proc_entry(QETH_PROCFILE_NAME, NULL); 312 447 if (qeth_perf_procfile) 313 448 remove_proc_entry(QETH_PERF_PROCFILE_NAME, NULL); 314 - if (qeth_ipato_procfile) 315 - remove_proc_entry(QETH_IPATO_PROCFILE_NAME, NULL); 316 449 } 317 450 318 - 319 - /* ONLY FOR DEVELOPMENT! -> make it as module */ 320 - /* 321 - static void 322 - qeth_create_sysfs_entries(void) 323 - { 324 - struct device *dev; 325 - 326 - down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); 327 - 328 - list_for_each_entry(dev, &qeth_ccwgroup_driver.driver.devices, 329 - driver_list) 330 - qeth_create_device_attributes(dev); 331 - 332 - up_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); 333 - } 334 - 335 - static void 336 - qeth_remove_sysfs_entries(void) 337 - { 338 - struct device *dev; 339 - 340 - down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); 341 - 342 - list_for_each_entry(dev, &qeth_ccwgroup_driver.driver.devices, 343 - driver_list) 344 - qeth_remove_device_attributes(dev); 345 - 346 - up_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); 347 - } 348 - 349 - static int __init 350 - qeth_fs_init(void) 351 - { 352 - printk(KERN_INFO "qeth_fs_init\n"); 353 - qeth_create_procfs_entries(); 354 - qeth_create_sysfs_entries(); 355 - 356 - return 0; 357 - } 358 - 359 - static void __exit 360 - qeth_fs_exit(void) 361 - { 362 - printk(KERN_INFO "qeth_fs_exit\n"); 363 - qeth_remove_procfs_entries(); 364 - qeth_remove_sysfs_entries(); 365 - } 366 - 367 - 368 - module_init(qeth_fs_init); 369 - module_exit(qeth_fs_exit); 370 - 371 - MODULE_LICENSE("GPL"); 372 - */
+3 -3
drivers/s390/net/qeth_sys.c
··· 1 1 /* 2 2 * 3 - * linux/drivers/s390/net/qeth_sys.c ($Revision: 1.58 $) 3 + * linux/drivers/s390/net/qeth_sys.c ($Revision: 1.60 $) 4 4 * 5 5 * Linux on zSeries OSA Express and HiperSockets support 6 6 * This file contains code related to sysfs. ··· 20 20 #include "qeth_mpc.h" 21 21 #include "qeth_fs.h" 22 22 23 - const char *VERSION_QETH_SYS_C = "$Revision: 1.58 $"; 23 + const char *VERSION_QETH_SYS_C = "$Revision: 1.60 $"; 24 24 25 25 /*****************************************************************************/ 26 26 /* */ ··· 160 160 return -EPERM; 161 161 162 162 tmp = strsep((char **) &buf, "\n"); 163 - if ((strlen(tmp) > 8) || (strlen(tmp) < 2)) 163 + if ((strlen(tmp) > 8) || (strlen(tmp) == 0)) 164 164 return -EINVAL; 165 165 166 166 card->info.portname[0] = strlen(tmp);
+2 -2
drivers/s390/net/qeth_tso.h
··· 1 1 /* 2 - * linux/drivers/s390/net/qeth_tso.h ($Revision: 1.7 $) 2 + * linux/drivers/s390/net/qeth_tso.h ($Revision: 1.8 $) 3 3 * 4 4 * Header file for qeth TCP Segmentation Offload support. 5 5 * ··· 7 7 * 8 8 * Author(s): Frank Pavlic <fpavlic@de.ibm.com> 9 9 * 10 - * $Revision: 1.7 $ $Date: 2005/05/04 20:19:18 $ 10 + * $Revision: 1.8 $ $Date: 2005/05/04 20:19:18 $ 11 11 * 12 12 */ 13 13 #ifndef __QETH_TSO_H__
+1 -4
drivers/scsi/libata-scsi.c
··· 2044 2044 else { 2045 2045 u8 *scsicmd = cmd->cmnd; 2046 2046 2047 - if (scsicmd[0] == INQUIRY) { 2047 + if ((scsicmd[0] == INQUIRY) && ((scsicmd[1] & 0x03) == 0)) { 2048 2048 u8 *buf = NULL; 2049 2049 unsigned int buflen; 2050 2050 ··· 2057 2057 * to indicate to the Linux scsi midlayer this is a modern 2058 2058 * device. 2) Ensure response data format / ATAPI information 2059 2059 * are always correct. 2060 - */ 2061 - /* FIXME: do we ever override EVPD pages and the like, with 2062 - * this code? 2063 2060 */ 2064 2061 if (buf[2] == 0) { 2065 2062 buf[2] = 0x5;
+39 -10
drivers/scsi/scsi_scan.c
··· 400 400 return found_target; 401 401 } 402 402 403 + struct work_queue_wrapper { 404 + struct work_struct work; 405 + struct scsi_target *starget; 406 + }; 407 + 408 + static void scsi_target_reap_work(void *data) { 409 + struct work_queue_wrapper *wqw = (struct work_queue_wrapper *)data; 410 + struct scsi_target *starget = wqw->starget; 411 + struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); 412 + unsigned long flags; 413 + 414 + kfree(wqw); 415 + 416 + spin_lock_irqsave(shost->host_lock, flags); 417 + 418 + if (--starget->reap_ref == 0 && list_empty(&starget->devices)) { 419 + list_del_init(&starget->siblings); 420 + spin_unlock_irqrestore(shost->host_lock, flags); 421 + transport_remove_device(&starget->dev); 422 + device_del(&starget->dev); 423 + transport_destroy_device(&starget->dev); 424 + put_device(&starget->dev); 425 + return; 426 + 427 + } 428 + spin_unlock_irqrestore(shost->host_lock, flags); 429 + 430 + return; 431 + } 432 + 403 433 /** 404 434 * scsi_target_reap - check to see if target is in use and destroy if not 405 435 * ··· 441 411 */ 442 412 void scsi_target_reap(struct scsi_target *starget) 443 413 { 444 - struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); 445 - unsigned long flags; 446 - spin_lock_irqsave(shost->host_lock, flags); 414 + struct work_queue_wrapper *wqw = 415 + kzalloc(sizeof(struct work_queue_wrapper), GFP_ATOMIC); 447 416 448 - if (--starget->reap_ref == 0 && list_empty(&starget->devices)) { 449 - list_del_init(&starget->siblings); 450 - spin_unlock_irqrestore(shost->host_lock, flags); 451 - device_del(&starget->dev); 452 - transport_unregister_device(&starget->dev); 453 - put_device(&starget->dev); 417 + if (!wqw) { 418 + starget_printk(KERN_ERR, starget, 419 + "Failed to allocate memory in scsi_reap_target()\n"); 454 420 return; 455 421 } 456 - spin_unlock_irqrestore(shost->host_lock, flags); 422 + 423 + INIT_WORK(&wqw->work, scsi_target_reap_work, wqw); 424 + wqw->starget = starget; 425 + schedule_work(&wqw->work); 457 426 } 458 427 459 428 /**
+55 -4
drivers/scsi/scsi_transport_fc.c
··· 105 105 { FC_PORTSTATE_LINKDOWN, "Linkdown" }, 106 106 { FC_PORTSTATE_ERROR, "Error" }, 107 107 { FC_PORTSTATE_LOOPBACK, "Loopback" }, 108 + { FC_PORTSTATE_DELETED, "Deleted" }, 108 109 }; 109 110 fc_enum_name_search(port_state, fc_port_state, fc_port_state_names) 110 111 #define FC_PORTSTATE_MAX_NAMELEN 20 ··· 212 211 #define FC_MGMTSRVR_PORTID 0x00000a 213 212 214 213 214 + static void fc_shost_remove_rports(void *data); 215 215 static void fc_timeout_deleted_rport(void *data); 216 216 static void fc_scsi_scan_rport(void *data); 217 217 static void fc_rport_terminate(struct fc_rport *rport); ··· 320 318 fc_host_next_rport_number(shost) = 0; 321 319 fc_host_next_target_id(shost) = 0; 322 320 321 + fc_host_flags(shost) = 0; 322 + INIT_WORK(&fc_host_rport_del_work(shost), fc_shost_remove_rports, shost); 323 323 return 0; 324 324 } 325 325 ··· 391 387 struct fc_internal *i = to_fc_internal(shost->transportt); \ 392 388 if ((i->f->get_rport_##field) && \ 393 389 !((rport->port_state == FC_PORTSTATE_BLOCKED) || \ 390 + (rport->port_state == FC_PORTSTATE_DELETED) || \ 394 391 (rport->port_state == FC_PORTSTATE_NOTPRESENT))) \ 395 392 i->f->get_rport_##field(rport); \ 396 393 return snprintf(buf, sz, format_string, cast rport->field); \ ··· 407 402 struct Scsi_Host *shost = rport_to_shost(rport); \ 408 403 struct fc_internal *i = to_fc_internal(shost->transportt); \ 409 404 if ((rport->port_state == FC_PORTSTATE_BLOCKED) || \ 405 + (rport->port_state == FC_PORTSTATE_DELETED) || \ 410 406 (rport->port_state == FC_PORTSTATE_NOTPRESENT)) \ 411 407 return -EBUSY; \ 412 408 val = simple_strtoul(buf, NULL, 0); \ ··· 525 519 struct Scsi_Host *shost = rport_to_shost(rport); 526 520 struct fc_internal *i = to_fc_internal(shost->transportt); 527 521 if ((rport->port_state == FC_PORTSTATE_BLOCKED) || 522 + (rport->port_state == FC_PORTSTATE_DELETED) || 528 523 (rport->port_state == FC_PORTSTATE_NOTPRESENT)) 529 524 return -EBUSY; 530 525 val = simple_strtoul(buf, NULL, 0); ··· 1776 1769 rport->maxframe_size = -1; 1777 1770 rport->supported_classes = FC_COS_UNSPECIFIED; 1778 1771 rport->roles = FC_RPORT_ROLE_UNKNOWN; 1779 - rport->port_state = FC_PORTSTATE_NOTPRESENT; 1772 + rport->port_state = FC_PORTSTATE_DELETED; 1780 1773 1781 1774 /* remove the identifiers that aren't used in the consisting binding */ 1782 1775 switch (fc_host_tgtid_bind_type(shost)) { ··· 1796 1789 break; 1797 1790 } 1798 1791 1799 - spin_unlock_irqrestore(shost->host_lock, flags); 1800 - 1801 1792 /* 1802 1793 * As this only occurs if the remote port (scsi target) 1803 1794 * went away and didn't come back - we'll remove 1804 1795 * all attached scsi devices. 1796 + * 1797 + * We'll schedule the shost work item to perform the actual removal 1798 + * to avoid recursion in the different flush calls if we perform 1799 + * the removal in each target - and there are lots of targets 1800 + * whose timeouts fire at the same time. 1805 1801 */ 1806 - fc_rport_tgt_remove(rport); 1802 + 1803 + if ( !(fc_host_flags(shost) & FC_SHOST_RPORT_DEL_SCHEDULED)) { 1804 + fc_host_flags(shost) |= FC_SHOST_RPORT_DEL_SCHEDULED; 1805 + scsi_queue_work(shost, &fc_host_rport_del_work(shost)); 1806 + } 1807 + 1808 + spin_unlock_irqrestore(shost->host_lock, flags); 1807 1809 } 1808 1810 1809 1811 /** ··· 1831 1815 scsi_target_unblock(&rport->dev); 1832 1816 scsi_scan_target(&rport->dev, rport->channel, rport->scsi_target_id, 1833 1817 SCAN_WILD_CARD, 1); 1818 + } 1819 + 1820 + 1821 + /** 1822 + * fc_shost_remove_rports - called to remove all rports that are marked 1823 + * as in a deleted (not connected) state. 1824 + * 1825 + * @data: shost whose rports are to be looked at 1826 + **/ 1827 + static void 1828 + fc_shost_remove_rports(void *data) 1829 + { 1830 + struct Scsi_Host *shost = (struct Scsi_Host *)data; 1831 + struct fc_rport *rport, *next_rport; 1832 + unsigned long flags; 1833 + 1834 + spin_lock_irqsave(shost->host_lock, flags); 1835 + while (fc_host_flags(shost) & FC_SHOST_RPORT_DEL_SCHEDULED) { 1836 + 1837 + fc_host_flags(shost) &= ~FC_SHOST_RPORT_DEL_SCHEDULED; 1838 + 1839 + restart_search: 1840 + list_for_each_entry_safe(rport, next_rport, 1841 + &fc_host_rport_bindings(shost), peers) { 1842 + if (rport->port_state == FC_PORTSTATE_DELETED) { 1843 + rport->port_state = FC_PORTSTATE_NOTPRESENT; 1844 + spin_unlock_irqrestore(shost->host_lock, flags); 1845 + fc_rport_tgt_remove(rport); 1846 + spin_lock_irqsave(shost->host_lock, flags); 1847 + goto restart_search; 1848 + } 1849 + } 1850 + 1851 + } 1852 + spin_unlock_irqrestore(shost->host_lock, flags); 1834 1853 } 1835 1854 1836 1855
+5 -5
drivers/serial/Kconfig
··· 10 10 # The new 8250/16550 serial drivers 11 11 config SERIAL_8250 12 12 tristate "8250/16550 and compatible serial support" 13 - depends on (BROKEN || !(SPARC64 || SPARC32)) 13 + depends on (BROKEN || !SPARC) 14 14 select SERIAL_CORE 15 15 ---help--- 16 16 This selects whether you want to include the driver for the standard ··· 469 469 470 470 config SERIAL_SUNCORE 471 471 bool 472 - depends on SPARC32 || SPARC64 472 + depends on SPARC 473 473 select SERIAL_CORE 474 474 select SERIAL_CORE_CONSOLE 475 475 default y 476 476 477 477 config SERIAL_SUNZILOG 478 478 tristate "Sun Zilog8530 serial support" 479 - depends on SPARC32 || SPARC64 479 + depends on SPARC 480 480 help 481 481 This driver supports the Zilog8530 serial ports found on many Sparc 482 482 systems. Say Y or M if you want to be able to these serial ports. ··· 491 491 492 492 config SERIAL_SUNSU 493 493 tristate "Sun SU serial support" 494 - depends on (SPARC32 || SPARC64) && PCI 494 + depends on SPARC && PCI 495 495 help 496 496 This driver supports the 8250 serial ports that run the keyboard and 497 497 mouse on (PCI) UltraSPARC systems. Say Y or M if you want to be able ··· 547 547 548 548 config SERIAL_SUNSAB 549 549 tristate "Sun Siemens SAB82532 serial support" 550 - depends on (SPARC32 || SPARC64) && PCI 550 + depends on SPARC && PCI 551 551 help 552 552 This driver supports the Siemens SAB82532 DUSCC serial ports on newer 553 553 (PCI) UltraSPARC systems. Say Y or M if you want to be able to these
+1 -1
drivers/serial/amba-pl011.c
··· 160 160 flag = TTY_FRAME; 161 161 } 162 162 163 - if (uart_handle_sysrq_char(&uap->port, ch, regs)) 163 + if (uart_handle_sysrq_char(&uap->port, ch & 255, regs)) 164 164 goto ignore_char; 165 165 166 166 uart_insert_char(&uap->port, ch, UART011_DR_OE, ch, flag);
+2 -2
drivers/serial/pxa.c
··· 361 361 if (port->line == 3) /* HWUART */ 362 362 up->mcr |= UART_MCR_AFE; 363 363 else 364 - up->mcr = 0; 364 + up->mcr = 0; 365 365 366 366 /* 367 367 * Allocate the IRQ ··· 641 641 int i; 642 642 643 643 /* 644 - * First save the UER then disable the interrupts 644 + * First save the IER then disable the interrupts 645 645 */ 646 646 ier = serial_in(up, UART_IER); 647 647 serial_out(up, UART_IER, UART_IER_UUE);
+6 -3
drivers/usb/core/usb.c
··· 1432 1432 mark_quiesced(intf); 1433 1433 } else { 1434 1434 // FIXME else if there's no suspend method, disconnect... 1435 - dev_warn(dev, "no %s?\n", "suspend"); 1435 + dev_warn(dev, "no suspend for driver %s?\n", driver->name); 1436 + mark_quiesced(intf); 1436 1437 status = 0; 1437 1438 } 1438 1439 return status; ··· 1461 1460 } 1462 1461 1463 1462 if ((dev->driver == NULL) || 1464 - (dev->driver_data == &usb_generic_driver_data)) 1463 + (dev->driver_data == &usb_generic_driver_data)) { 1464 + dev->power.power_state.event = PM_EVENT_FREEZE; 1465 1465 return 0; 1466 + } 1466 1467 1467 1468 intf = to_usb_interface(dev); 1468 1469 driver = to_usb_driver(dev->driver); ··· 1484 1481 mark_quiesced(intf); 1485 1482 } 1486 1483 } else 1487 - dev_warn(dev, "no %s?\n", "resume"); 1484 + dev_warn(dev, "no resume for driver %s?\n", driver->name); 1488 1485 return 0; 1489 1486 } 1490 1487
+1 -1
drivers/usb/input/aiptek.c
··· 2103 2103 * values. 2104 2104 */ 2105 2105 input_set_abs_params(inputdev, ABS_X, 0, 2999, 0, 0); 2106 - input_set_abs_params(inputdev, ABS_X, 0, 2249, 0, 0); 2106 + input_set_abs_params(inputdev, ABS_Y, 0, 2249, 0, 0); 2107 2107 input_set_abs_params(inputdev, ABS_PRESSURE, 0, 511, 0, 0); 2108 2108 input_set_abs_params(inputdev, ABS_TILT_X, AIPTEK_TILT_MIN, AIPTEK_TILT_MAX, 0, 0); 2109 2109 input_set_abs_params(inputdev, ABS_TILT_Y, AIPTEK_TILT_MIN, AIPTEK_TILT_MAX, 0, 0);
+1 -1
drivers/usb/input/kbtab.c
··· 159 159 input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_TOUCH); 160 160 input_dev->mscbit[0] |= BIT(MSC_SERIAL); 161 161 input_set_abs_params(input_dev, ABS_X, 0, 0x2000, 4, 0); 162 - input_set_abs_params(input_dev, ABS_X, 0, 0x1750, 4, 0); 162 + input_set_abs_params(input_dev, ABS_Y, 0, 0x1750, 4, 0); 163 163 input_set_abs_params(input_dev, ABS_PRESSURE, 0, 0xff, 0, 0); 164 164 165 165 endpoint = &intf->cur_altsetting->endpoint[0].desc;
+1 -1
drivers/usb/input/wacom.c
··· 854 854 855 855 input_dev->evbit[0] |= BIT(EV_KEY) | BIT(EV_ABS); 856 856 input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_TOUCH) | BIT(BTN_STYLUS); 857 - input_set_abs_params(input_dev, ABS_X, 0, wacom->features->y_max, 4, 0); 857 + input_set_abs_params(input_dev, ABS_X, 0, wacom->features->x_max, 4, 0); 858 858 input_set_abs_params(input_dev, ABS_Y, 0, wacom->features->y_max, 4, 0); 859 859 input_set_abs_params(input_dev, ABS_PRESSURE, 0, wacom->features->pressure_max, 0, 0); 860 860
+2 -2
drivers/usb/storage/scsiglue.c
··· 109 109 * data comes from. 110 110 */ 111 111 if (sdev->scsi_level < SCSI_2) 112 - sdev->scsi_level = SCSI_2; 112 + sdev->scsi_level = sdev->sdev_target->scsi_level = SCSI_2; 113 113 114 114 /* According to the technical support people at Genesys Logic, 115 115 * devices using their chips have problems transferring more than ··· 162 162 * a Get-Max-LUN request, we won't lose much by setting the 163 163 * revision level down to 2. The only devices that would be 164 164 * affected are those with sparse LUNs. */ 165 - sdev->scsi_level = SCSI_2; 165 + sdev->scsi_level = sdev->sdev_target->scsi_level = SCSI_2; 166 166 167 167 /* USB-IDE bridges tend to report SK = 0x04 (Non-recoverable 168 168 * Hardware Error) when any low-level error occurs,
+5 -5
drivers/video/Kconfig
··· 536 536 537 537 config FB_SBUS 538 538 bool "SBUS and UPA framebuffers" 539 - depends on (FB = y) && (SPARC32 || SPARC64) 539 + depends on (FB = y) && SPARC 540 540 help 541 541 Say Y if you want support for SBUS or UPA based frame buffer device. 542 542 543 543 config FB_BW2 544 544 bool "BWtwo support" 545 - depends on (FB = y) && ((SPARC32 || SPARC64) && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) 545 + depends on (FB = y) && (SPARC && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) 546 546 select FB_CFB_FILLRECT 547 547 select FB_CFB_COPYAREA 548 548 select FB_CFB_IMAGEBLIT ··· 551 551 552 552 config FB_CG3 553 553 bool "CGthree support" 554 - depends on (FB = y) && ((SPARC32 || SPARC64) && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) 554 + depends on (FB = y) && (SPARC && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) 555 555 select FB_CFB_FILLRECT 556 556 select FB_CFB_COPYAREA 557 557 select FB_CFB_IMAGEBLIT ··· 560 560 561 561 config FB_CG6 562 562 bool "CGsix (GX,TurboGX) support" 563 - depends on (FB = y) && ((SPARC32 || SPARC64) && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) 563 + depends on (FB = y) && (SPARC && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) 564 564 select FB_CFB_COPYAREA 565 565 select FB_CFB_IMAGEBLIT 566 566 help ··· 1268 1268 1269 1269 config FB_PCI 1270 1270 bool "PCI framebuffers" 1271 - depends on (FB = y) && PCI && (SPARC64 || SPARC32) 1271 + depends on (FB = y) && PCI && SPARC 1272 1272 1273 1273 config FB_IGA 1274 1274 bool "IGA 168x display support"
+10 -10
drivers/video/console/Kconfig
··· 6 6 7 7 config VGA_CONSOLE 8 8 bool "VGA text console" if EMBEDDED || !X86 9 - depends on !ARCH_ACORN && !ARCH_EBSA110 && !4xx && !8xx && !SPARC32 && !SPARC64 && !M68K && !PARISC && !ARCH_VERSATILE 9 + depends on !ARCH_ACORN && !ARCH_EBSA110 && !4xx && !8xx && !SPARC && !M68K && !PARISC && !ARCH_VERSATILE 10 10 default y 11 11 help 12 12 Saying Y here will allow you to use Linux in text mode through a ··· 68 68 69 69 config PROM_CONSOLE 70 70 bool "PROM console" 71 - depends on SPARC32 || SPARC64 71 + depends on SPARC 72 72 help 73 73 Say Y to build a console driver for Sun machines that uses the 74 74 terminal emulation built into their console PROMS. ··· 136 136 config FONT_8x8 137 137 bool "VGA 8x8 font" if FONTS 138 138 depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE 139 - default y if !SPARC32 && !SPARC64 && !FONTS 139 + default y if !SPARC && !FONTS 140 140 help 141 141 This is the "high resolution" font for the VGA frame buffer (the one 142 142 provided by the text console 80x50 (and higher) modes). ··· 150 150 config FONT_8x16 151 151 bool "VGA 8x16 font" if FONTS 152 152 depends on FRAMEBUFFER_CONSOLE || SGI_NEWPORT_CONSOLE=y || STI_CONSOLE || USB_SISUSBVGA_CON 153 - default y if !SPARC32 && !SPARC64 && !FONTS 153 + default y if !SPARC && !FONTS 154 154 help 155 155 This is the "high resolution" font for the VGA frame buffer (the one 156 156 provided by the VGA text console 80x25 mode. ··· 160 160 config FONT_6x11 161 161 bool "Mac console 6x11 font (not supported by all drivers)" if FONTS 162 162 depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE 163 - default y if !SPARC32 && !SPARC64 && !FONTS && MAC 163 + default y if !SPARC && !FONTS && MAC 164 164 help 165 165 Small console font with Macintosh-style high-half glyphs. Some Mac 166 166 framebuffer drivers don't support this one at all. ··· 176 176 config FONT_PEARL_8x8 177 177 bool "Pearl (old m68k) console 8x8 font" if FONTS 178 178 depends on FRAMEBUFFER_CONSOLE 179 - default y if !SPARC32 && !SPARC64 && !FONTS && AMIGA 179 + default y if !SPARC && !FONTS && AMIGA 180 180 help 181 181 Small console font with PC-style control-character and high-half 182 182 glyphs. ··· 184 184 config FONT_ACORN_8x8 185 185 bool "Acorn console 8x8 font" if FONTS 186 186 depends on FRAMEBUFFER_CONSOLE 187 - default y if !SPARC32 && !SPARC64 && !FONTS && ARM && ARCH_ACORN 187 + default y if !SPARC && !FONTS && ARM && ARCH_ACORN 188 188 help 189 189 Small console font with PC-style control characters and high-half 190 190 glyphs. 191 191 192 192 config FONT_MINI_4x6 193 193 bool "Mini 4x6 font" 194 - depends on !SPARC32 && !SPARC64 && FONTS 194 + depends on !SPARC && FONTS 195 195 196 196 config FONT_SUN8x16 197 197 bool "Sparc console 8x16 font" 198 - depends on FRAMEBUFFER_CONSOLE && (!SPARC32 && !SPARC64 && FONTS || SPARC32 || SPARC64) 198 + depends on FRAMEBUFFER_CONSOLE && (!SPARC && FONTS || SPARC) 199 199 help 200 200 This is the high resolution console font for Sun machines. Say Y. 201 201 202 202 config FONT_SUN12x22 203 203 bool "Sparc console 12x22 font (not supported by all drivers)" 204 - depends on FRAMEBUFFER_CONSOLE && (!SPARC32 && !SPARC64 && FONTS || SPARC32 || SPARC64) 204 + depends on FRAMEBUFFER_CONSOLE && (!SPARC && FONTS || SPARC) 205 205 help 206 206 This is the high resolution console font for Sun machines with very 207 207 big letters (like the letters used in the SPARC PROM). If the
+5 -3
drivers/video/console/fbcon_ud.c
··· 420 420 int ud_update_start(struct fb_info *info) 421 421 { 422 422 struct fbcon_ops *ops = info->fbcon_par; 423 - u32 xoffset, yoffset; 423 + int xoffset, yoffset; 424 424 u32 vyres = GETVYRES(ops->p->scrollmode, info); 425 425 u32 vxres = GETVXRES(ops->p->scrollmode, info); 426 426 int err; 427 427 428 - xoffset = (vxres - info->var.xres) - ops->var.xoffset; 429 - yoffset = (vyres - info->var.yres) - ops->var.yoffset; 428 + xoffset = vxres - info->var.xres - ops->var.xoffset; 429 + yoffset = vyres - info->var.yres - ops->var.yoffset; 430 + if (yoffset < 0) 431 + yoffset += vyres; 430 432 ops->var.xoffset = xoffset; 431 433 ops->var.yoffset = yoffset; 432 434 err = fb_pan_display(info, &ops->var);
+5
drivers/video/intelfb/intelfb.h
··· 41 41 42 42 /*** hw-related values ***/ 43 43 44 + /* Resource Allocation */ 45 + #define INTELFB_FB_ACQUIRED 1 46 + #define INTELFB_MMIO_ACQUIRED 2 47 + 44 48 /* PCI ids for supported devices */ 45 49 #define PCI_DEVICE_ID_INTEL_830M 0x3577 46 50 #define PCI_DEVICE_ID_INTEL_845G 0x2562 ··· 261 257 int hwcursor; 262 258 int fixed_mode; 263 259 int ring_active; 260 + int flag; 264 261 265 262 /* hw cursor */ 266 263 int cursor_on;
+20 -31
drivers/video/intelfb/intelfbdrv.c
··· 135 135 static void __devinit get_initial_mode(struct intelfb_info *dinfo); 136 136 static void update_dinfo(struct intelfb_info *dinfo, 137 137 struct fb_var_screeninfo *var); 138 - static int intelfb_get_fix(struct fb_fix_screeninfo *fix, 139 - struct fb_info *info); 140 - 141 138 static int intelfb_check_var(struct fb_var_screeninfo *var, 142 139 struct fb_info *info); 143 140 static int intelfb_set_par(struct fb_info *info); ··· 470 473 if (dinfo->aperture.virtual) 471 474 iounmap((void __iomem *)dinfo->aperture.virtual); 472 475 473 - if (dinfo->mmio_base_phys) 476 + if (dinfo->flag & INTELFB_MMIO_ACQUIRED) 474 477 release_mem_region(dinfo->mmio_base_phys, INTEL_REG_SIZE); 475 - if (dinfo->aperture.physical) 478 + if (dinfo->flag & INTELFB_FB_ACQUIRED) 476 479 release_mem_region(dinfo->aperture.physical, 477 480 dinfo->aperture.size); 478 481 framebuffer_release(dinfo->info); ··· 569 572 cleanup(dinfo); 570 573 return -ENODEV; 571 574 } 575 + 576 + dinfo->flag |= INTELFB_FB_ACQUIRED; 577 + 572 578 if (!request_mem_region(dinfo->mmio_base_phys, 573 579 INTEL_REG_SIZE, 574 580 INTELFB_MODULE_NAME)) { ··· 579 579 cleanup(dinfo); 580 580 return -ENODEV; 581 581 } 582 + 583 + dinfo->flag |= INTELFB_MMIO_ACQUIRED; 582 584 583 585 /* Get the chipset info. */ 584 586 dinfo->pci_chipset = pdev->device; ··· 1093 1091 return 1; 1094 1092 1095 1093 info->pixmap.scan_align = 1; 1096 - 1094 + strcpy(info->fix.id, dinfo->name); 1095 + info->fix.smem_start = dinfo->fb.physical; 1096 + info->fix.smem_len = dinfo->fb.size; 1097 + info->fix.type = FB_TYPE_PACKED_PIXELS; 1098 + info->fix.type_aux = 0; 1099 + info->fix.xpanstep = 8; 1100 + info->fix.ypanstep = 1; 1101 + info->fix.ywrapstep = 0; 1102 + info->fix.mmio_start = dinfo->mmio_base_phys; 1103 + info->fix.mmio_len = INTEL_REG_SIZE; 1104 + info->fix.accel = FB_ACCEL_I830; 1097 1105 update_dinfo(dinfo, &info->var); 1098 1106 1099 1107 return 0; ··· 1121 1109 dinfo->yres = var->xres; 1122 1110 dinfo->pixclock = var->pixclock; 1123 1111 1124 - intelfb_get_fix(&dinfo->info->fix, dinfo->info); 1112 + dinfo->info->fix.visual = dinfo->visual; 1113 + dinfo->info->fix.line_length = dinfo->pitch; 1125 1114 1126 1115 switch (dinfo->bpp) { 1127 1116 case 8: ··· 1151 1138 } 1152 1139 1153 1140 /* fbops functions */ 1154 - 1155 - static int 1156 - intelfb_get_fix(struct fb_fix_screeninfo *fix, struct fb_info *info) 1157 - { 1158 - struct intelfb_info *dinfo = GET_DINFO(info); 1159 - 1160 - DBG_MSG("intelfb_get_fix\n"); 1161 - 1162 - memset(fix, 0, sizeof(*fix)); 1163 - strcpy(fix->id, dinfo->name); 1164 - fix->smem_start = dinfo->fb.physical; 1165 - fix->smem_len = dinfo->fb.size; 1166 - fix->type = FB_TYPE_PACKED_PIXELS; 1167 - fix->type_aux = 0; 1168 - fix->visual = dinfo->visual; 1169 - fix->xpanstep = 8; 1170 - fix->ypanstep = 1; 1171 - fix->ywrapstep = 0; 1172 - fix->line_length = dinfo->pitch; 1173 - fix->mmio_start = dinfo->mmio_base_phys; 1174 - fix->mmio_len = INTEL_REG_SIZE; 1175 - fix->accel = FB_ACCEL_I830; 1176 - return 0; 1177 - } 1178 1141 1179 1142 /*************************************************************** 1180 1143 * fbdev interface *
+1 -1
drivers/video/logo/Kconfig
··· 47 47 48 48 config LOGO_SUN_CLUT224 49 49 bool "224-color Sun Linux logo" 50 - depends on LOGO && (SPARC32 || SPARC64) 50 + depends on LOGO && SPARC 51 51 default y 52 52 53 53 config LOGO_SUPERH_MONO
+3
drivers/video/sbuslib.c
··· 46 46 unsigned long off; 47 47 int i; 48 48 49 + if (!(vma->vm_flags & (VM_SHARED | VM_MAYSHARE))) 50 + return -EINVAL; 51 + 49 52 size = vma->vm_end - vma->vm_start; 50 53 if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) 51 54 return -EINVAL;
+6 -3
fs/hostfs/hostfs_kern.c
··· 501 501 long long start; 502 502 int err = 0; 503 503 504 - start = (long long) (page->index << PAGE_CACHE_SHIFT) + from; 504 + start = (((long long) page->index) << PAGE_CACHE_SHIFT) + from; 505 505 buffer = kmap(page); 506 506 err = write_file(FILE_HOSTFS_I(file)->fd, &start, buffer + from, 507 507 to - from); 508 508 if(err > 0) err = 0; 509 + 510 + /* Actually, if !err, write_file has added to-from to start, so, despite 511 + * the appearance, we are comparing i_size against the _last_ written 512 + * location, as we should. */ 513 + 509 514 if(!err && (start > inode->i_size)) 510 515 inode->i_size = start; 511 516 ··· 915 910 int hostfs_link_readpage(struct file *file, struct page *page) 916 911 { 917 912 char *buffer, *name; 918 - long long start; 919 913 int err; 920 914 921 - start = page->index << PAGE_CACHE_SHIFT; 922 915 buffer = kmap(page); 923 916 name = inode_name(page->mapping->host, 0); 924 917 if(name == NULL) return(-ENOMEM);
+4
fs/lockd/clntlock.c
··· 157 157 inode = fl->fl_file->f_dentry->d_inode; 158 158 if (inode->i_sb->s_magic != NFS_SUPER_MAGIC) 159 159 continue; 160 + if (fl->fl_u.nfs_fl.owner == NULL) 161 + continue; 160 162 if (fl->fl_u.nfs_fl.owner->host != host) 161 163 continue; 162 164 if (!(fl->fl_u.nfs_fl.flags & NFS_LCK_GRANTED)) ··· 227 225 228 226 inode = fl->fl_file->f_dentry->d_inode; 229 227 if (inode->i_sb->s_magic != NFS_SUPER_MAGIC) 228 + continue; 229 + if (fl->fl_u.nfs_fl.owner == NULL) 230 230 continue; 231 231 if (fl->fl_u.nfs_fl.owner->host != host) 232 232 continue;
+6 -18
fs/nfs/direct.c
··· 678 678 if (!count) 679 679 goto out; 680 680 681 - if (mapping->nrpages) { 682 - retval = filemap_fdatawrite(mapping); 683 - if (retval == 0) 684 - retval = nfs_wb_all(inode); 685 - if (retval == 0) 686 - retval = filemap_fdatawait(mapping); 687 - if (retval) 688 - goto out; 689 - } 681 + retval = nfs_sync_mapping(mapping); 682 + if (retval) 683 + goto out; 690 684 691 685 retval = nfs_direct_read(inode, ctx, &iov, pos, 1); 692 686 if (retval > 0) ··· 758 764 if (!count) 759 765 goto out; 760 766 761 - if (mapping->nrpages) { 762 - retval = filemap_fdatawrite(mapping); 763 - if (retval == 0) 764 - retval = nfs_wb_all(inode); 765 - if (retval == 0) 766 - retval = filemap_fdatawait(mapping); 767 - if (retval) 768 - goto out; 769 - } 767 + retval = nfs_sync_mapping(mapping); 768 + if (retval) 769 + goto out; 770 770 771 771 retval = nfs_direct_write(inode, ctx, &iov, pos, 1); 772 772 if (mapping->nrpages)
+6 -20
fs/nfs/file.c
··· 433 433 * Flush all pending writes before doing anything 434 434 * with locks.. 435 435 */ 436 - filemap_fdatawrite(filp->f_mapping); 437 - down(&inode->i_sem); 438 - nfs_wb_all(inode); 439 - up(&inode->i_sem); 440 - filemap_fdatawait(filp->f_mapping); 436 + nfs_sync_mapping(filp->f_mapping); 441 437 442 438 /* NOTE: special case 443 439 * If we're signalled while cleaning up locks on process exit, we ··· 461 465 * Flush all pending writes before doing anything 462 466 * with locks.. 463 467 */ 464 - status = filemap_fdatawrite(filp->f_mapping); 465 - if (status == 0) { 466 - down(&inode->i_sem); 467 - status = nfs_wb_all(inode); 468 - up(&inode->i_sem); 469 - if (status == 0) 470 - status = filemap_fdatawait(filp->f_mapping); 471 - } 472 - if (status < 0) 468 + status = nfs_sync_mapping(filp->f_mapping); 469 + if (status != 0) 473 470 goto out; 474 471 475 472 lock_kernel(); ··· 486 497 * Make sure we clear the cache whenever we try to get the lock. 487 498 * This makes locking act as a cache coherency point. 488 499 */ 489 - filemap_fdatawrite(filp->f_mapping); 490 - down(&inode->i_sem); 491 - nfs_wb_all(inode); /* we may have slept */ 492 - up(&inode->i_sem); 493 - filemap_fdatawait(filp->f_mapping); 500 + nfs_sync_mapping(filp->f_mapping); 494 501 nfs_zap_caches(inode); 495 502 out: 496 503 rpc_clnt_sigunmask(NFS_CLIENT(inode), &oldset); ··· 509 524 return -EINVAL; 510 525 511 526 /* No mandatory locks over NFS */ 512 - if ((inode->i_mode & (S_ISGID | S_IXGRP)) == S_ISGID) 527 + if ((inode->i_mode & (S_ISGID | S_IXGRP)) == S_ISGID && 528 + fl->fl_type != F_UNLCK) 513 529 return -ENOLCK; 514 530 515 531 if (IS_GETLK(cmd))
+23 -5
fs/nfs/inode.c
··· 640 640 return 0; 641 641 } 642 642 643 + /** 644 + * nfs_sync_mapping - helper to flush all mmapped dirty data to disk 645 + */ 646 + int nfs_sync_mapping(struct address_space *mapping) 647 + { 648 + int ret; 649 + 650 + if (mapping->nrpages == 0) 651 + return 0; 652 + unmap_mapping_range(mapping, 0, 0, 0); 653 + ret = filemap_fdatawrite(mapping); 654 + if (ret != 0) 655 + goto out; 656 + ret = filemap_fdatawait(mapping); 657 + if (ret != 0) 658 + goto out; 659 + ret = nfs_wb_all(mapping->host); 660 + out: 661 + return ret; 662 + } 663 + 643 664 /* 644 665 * Invalidate the local caches 645 666 */ ··· 1200 1179 struct nfs_inode *nfsi = NFS_I(inode); 1201 1180 1202 1181 if (nfsi->cache_validity & NFS_INO_INVALID_DATA) { 1203 - if (S_ISREG(inode->i_mode)) { 1204 - if (filemap_fdatawrite(mapping) == 0) 1205 - filemap_fdatawait(mapping); 1206 - nfs_wb_all(inode); 1207 - } 1182 + if (S_ISREG(inode->i_mode)) 1183 + nfs_sync_mapping(mapping); 1208 1184 invalidate_inode_pages2(mapping); 1209 1185 1210 1186 spin_lock(&inode->i_lock);
+1 -1
fs/nfsd/nfs2acl.c
··· 107 107 dprintk("nfsd: SETACL(2acl) %s\n", SVCFH_fmt(&argp->fh)); 108 108 109 109 fh = fh_copy(&resp->fh, &argp->fh); 110 - nfserr = fh_verify(rqstp, &resp->fh, 0, MAY_NOP); 110 + nfserr = fh_verify(rqstp, &resp->fh, 0, MAY_SATTR); 111 111 112 112 if (!nfserr) { 113 113 nfserr = nfserrno( nfsd_set_posix_acl(
+1 -1
fs/nfsd/nfs3acl.c
··· 101 101 int nfserr = 0; 102 102 103 103 fh = fh_copy(&resp->fh, &argp->fh); 104 - nfserr = fh_verify(rqstp, &resp->fh, 0, MAY_NOP); 104 + nfserr = fh_verify(rqstp, &resp->fh, 0, MAY_SATTR); 105 105 106 106 if (!nfserr) { 107 107 nfserr = nfserrno( nfsd_set_posix_acl(
+1 -1
fs/partitions/Kconfig
··· 203 203 204 204 config SUN_PARTITION 205 205 bool "Sun partition tables support" if PARTITION_ADVANCED 206 - default y if (SPARC32 || SPARC64 || SUN3 || SUN3X) 206 + default y if (SPARC || SUN3 || SUN3X) 207 207 ---help--- 208 208 Like most systems, SunOS uses its own hard disk partition table 209 209 format, incompatible with all others. Saying Y here allows you to
+23 -24
fs/proc/generic.c
··· 54 54 ssize_t n, count; 55 55 char *start; 56 56 struct proc_dir_entry * dp; 57 + unsigned long long pos; 58 + 59 + /* 60 + * Gaah, please just use "seq_file" instead. The legacy /proc 61 + * interfaces cut loff_t down to off_t for reads, and ignore 62 + * the offset entirely for writes.. 63 + */ 64 + pos = *ppos; 65 + if (pos > MAX_NON_LFS) 66 + return 0; 67 + if (nbytes > MAX_NON_LFS - pos) 68 + nbytes = MAX_NON_LFS - pos; 57 69 58 70 dp = PDE(inode); 59 71 if (!(page = (char*) __get_free_page(GFP_KERNEL))) ··· 214 202 static loff_t 215 203 proc_file_lseek(struct file *file, loff_t offset, int orig) 216 204 { 217 - lock_kernel(); 218 - 219 - switch (orig) { 220 - case 0: 221 - if (offset < 0) 222 - goto out; 223 - file->f_pos = offset; 224 - unlock_kernel(); 225 - return(file->f_pos); 226 - case 1: 227 - if (offset + file->f_pos < 0) 228 - goto out; 229 - file->f_pos += offset; 230 - unlock_kernel(); 231 - return(file->f_pos); 232 - case 2: 233 - goto out; 234 - default: 235 - goto out; 236 - } 237 - 238 - out: 239 - unlock_kernel(); 240 - return -EINVAL; 205 + loff_t retval = -EINVAL; 206 + switch (orig) { 207 + case 1: 208 + offset += file->f_pos; 209 + /* fallthrough */ 210 + case 0: 211 + if (offset < 0 || offset > MAX_NON_LFS) 212 + break; 213 + file->f_pos = retval = offset; 214 + } 215 + return retval; 241 216 } 242 217 243 218 static int proc_notify_change(struct dentry *dentry, struct iattr *iattr)
+6 -2
fs/relayfs/relay.c
··· 333 333 return length; 334 334 335 335 toobig: 336 - printk(KERN_WARNING "relayfs: event too large (%Zd)\n", length); 337 - WARN_ON(1); 336 + buf->chan->last_toobig = length; 338 337 return 0; 339 338 } 340 339 ··· 397 398 continue; 398 399 relay_close_buf(chan->buf[i]); 399 400 } 401 + 402 + if (chan->last_toobig) 403 + printk(KERN_WARNING "relayfs: one or more items not logged " 404 + "[item size (%Zd) > sub-buffer size (%Zd)]\n", 405 + chan->last_toobig, chan->subbuf_size); 400 406 401 407 kref_put(&chan->kref, relay_destroy_channel); 402 408 }
+1 -1
include/acpi/acglobal.h
··· 211 211 ACPI_EXTERN u32 acpi_gbl_rsdp_original_location; 212 212 ACPI_EXTERN u32 acpi_gbl_ns_lookup_count; 213 213 ACPI_EXTERN u32 acpi_gbl_ps_find_count; 214 - ACPI_EXTERN u32 acpi_gbl_owner_id_mask; 214 + ACPI_EXTERN u64 acpi_gbl_owner_id_mask; 215 215 ACPI_EXTERN u16 acpi_gbl_pm1_enable_register_save; 216 216 ACPI_EXTERN u16 acpi_gbl_global_lock_handle; 217 217 ACPI_EXTERN u8 acpi_gbl_debugger_configuration;
+1 -2
include/asm-i386/param.h
··· 1 - #include <linux/config.h> 2 - 3 1 #ifndef _ASMi386_PARAM_H 4 2 #define _ASMi386_PARAM_H 5 3 6 4 #ifdef __KERNEL__ 5 + # include <linux/config.h> 7 6 # define HZ CONFIG_HZ /* Internal kernel timer frequency */ 8 7 # define USER_HZ 100 /* .. some user interfaces are in "ticks" */ 9 8 # define CLOCKS_PER_SEC (USER_HZ) /* like times() */
+1 -1
include/asm-ia64/topology.h
··· 38 38 /* 39 39 * Returns the number of the first CPU on Node 'node'. 40 40 */ 41 - #define node_to_first_cpu(node) (__ffs(node_to_cpumask(node))) 41 + #define node_to_first_cpu(node) (first_cpu(node_to_cpumask(node))) 42 42 43 43 /* 44 44 * Determines the node for a given pci bus
+1 -2
include/asm-x86_64/param.h
··· 1 - #include <linux/config.h> 2 - 3 1 #ifndef _ASMx86_64_PARAM_H 4 2 #define _ASMx86_64_PARAM_H 5 3 6 4 #ifdef __KERNEL__ 5 + # include <linux/config.h> 7 6 # define HZ CONFIG_HZ /* Internal kernel timer frequency */ 8 7 # define USER_HZ 100 /* .. some user interfaces are in "ticks */ 9 8 #define CLOCKS_PER_SEC (USER_HZ) /* like times() */
+1 -1
include/asm-x86_64/rwlock.h
··· 64 64 ::"a" (rw) : "memory") 65 65 66 66 #define __build_write_lock_const(rw, helper) \ 67 - asm volatile(LOCK "subl $" RW_LOCK_BIAS_STR ",(%0)\n\t" \ 67 + asm volatile(LOCK "subl $" RW_LOCK_BIAS_STR ",%0\n\t" \ 68 68 "jnz 2f\n" \ 69 69 "1:\n" \ 70 70 LOCK_SECTION_START("") \
+1 -1
include/asm-x86_64/topology.h
··· 23 23 24 24 #define cpu_to_node(cpu) (cpu_to_node[cpu]) 25 25 #define parent_node(node) (node) 26 - #define node_to_first_cpu(node) (__ffs(node_to_cpumask[node])) 26 + #define node_to_first_cpu(node) (first_cpu(node_to_cpumask[node])) 27 27 #define node_to_cpumask(node) (node_to_cpumask[node]) 28 28 #define pcibus_to_node(bus) ((long)(bus->sysdata)) 29 29 #define pcibus_to_cpumask(bus) node_to_cpumask(pcibus_to_node(bus));
+1
include/linux/ipv6_route.h
··· 18 18 fallback, no routers on link */ 19 19 #define RTF_ADDRCONF 0x00040000 /* addrconf route - RA */ 20 20 #define RTF_PREFIX_RT 0x00080000 /* A prefix only route - RA */ 21 + #define RTF_ANYCAST 0x00100000 /* Anycast */ 21 22 22 23 #define RTF_NONEXTHOP 0x00200000 /* route with no nexthop */ 23 24 #define RTF_EXPIRES 0x00400000
+1 -1
include/linux/irq.h
··· 10 10 */ 11 11 12 12 #include <linux/config.h> 13 - #include <asm/smp.h> /* cpu_online_map */ 13 + #include <linux/smp.h> 14 14 15 15 #if !defined(CONFIG_ARCH_S390) 16 16
+13 -7
include/linux/n_r3964.h
··· 13 13 * L. Haag 14 14 * 15 15 * $Log: r3964.h,v $ 16 + * Revision 1.4 2005/12/21 19:54:24 Kurt Huwig <kurt huwig de> 17 + * Fixed HZ usage on 2.6 kernels 18 + * Removed unnecessary include 19 + * 16 20 * Revision 1.3 2001/03/18 13:02:24 dwmw2 17 21 * Fix timer usage, use spinlocks properly. 18 22 * ··· 49 45 #define __LINUX_N_R3964_H__ 50 46 51 47 /* line disciplines for r3964 protocol */ 52 - #include <asm/termios.h> 53 48 54 49 #ifdef __KERNEL__ 50 + 51 + #include <linux/param.h> 52 + 55 53 /* 56 54 * Common ascii handshake characters: 57 55 */ ··· 64 58 #define NAK 0x15 65 59 66 60 /* 67 - * Timeouts (msecs/10 msecs per timer interrupt): 61 + * Timeouts (from milliseconds to jiffies) 68 62 */ 69 63 70 - #define R3964_TO_QVZ 550/10 71 - #define R3964_TO_ZVZ 220/10 72 - #define R3964_TO_NO_BUF 400/10 73 - #define R3964_NO_TX_ROOM 100/10 74 - #define R3964_TO_RX_PANIC 4000/10 64 + #define R3964_TO_QVZ ((550)*HZ/1000) 65 + #define R3964_TO_ZVZ ((220)*HZ/1000) 66 + #define R3964_TO_NO_BUF ((400)*HZ/1000) 67 + #define R3964_NO_TX_ROOM ((100)*HZ/1000) 68 + #define R3964_TO_RX_PANIC ((4000)*HZ/1000) 75 69 #define R3964_MAX_RETRIES 5 76 70 77 71 #endif
+1
include/linux/nfs_fs.h
··· 291 291 /* 292 292 * linux/fs/nfs/inode.c 293 293 */ 294 + extern int nfs_sync_mapping(struct address_space *mapping); 294 295 extern void nfs_zap_caches(struct inode *); 295 296 extern struct inode *nfs_fhget(struct super_block *, struct nfs_fh *, 296 297 struct nfs_fattr *);
+1
include/linux/preempt.h
··· 48 48 #define preempt_enable() \ 49 49 do { \ 50 50 preempt_enable_no_resched(); \ 51 + barrier(); \ 51 52 preempt_check_resched(); \ 52 53 } while (0) 53 54
+3 -2
include/linux/relayfs_fs.h
··· 20 20 #include <linux/kref.h> 21 21 22 22 /* 23 - * Tracks changes to rchan_buf struct 23 + * Tracks changes to rchan/rchan_buf structs 24 24 */ 25 - #define RELAYFS_CHANNEL_VERSION 5 25 + #define RELAYFS_CHANNEL_VERSION 6 26 26 27 27 /* 28 28 * Per-cpu relay channel buffer ··· 60 60 struct rchan_callbacks *cb; /* client callbacks */ 61 61 struct kref kref; /* channel refcount */ 62 62 void *private_data; /* for user-defined data */ 63 + size_t last_toobig; /* tried to log event > subbuf size */ 63 64 struct rchan_buf *buf[NR_CPUS]; /* per-cpu channel buffers */ 64 65 }; 65 66
+4
include/linux/rtnetlink.h
··· 866 866 #define RTNLGRP_IPV4_MROUTE RTNLGRP_IPV4_MROUTE 867 867 RTNLGRP_IPV4_ROUTE, 868 868 #define RTNLGRP_IPV4_ROUTE RTNLGRP_IPV4_ROUTE 869 + RTNLGRP_NOP1, 869 870 RTNLGRP_IPV6_IFADDR, 870 871 #define RTNLGRP_IPV6_IFADDR RTNLGRP_IPV6_IFADDR 871 872 RTNLGRP_IPV6_MROUTE, ··· 877 876 #define RTNLGRP_IPV6_IFINFO RTNLGRP_IPV6_IFINFO 878 877 RTNLGRP_DECnet_IFADDR, 879 878 #define RTNLGRP_DECnet_IFADDR RTNLGRP_DECnet_IFADDR 879 + RTNLGRP_NOP2, 880 880 RTNLGRP_DECnet_ROUTE, 881 881 #define RTNLGRP_DECnet_ROUTE RTNLGRP_DECnet_ROUTE 882 + RTNLGRP_NOP3, 883 + RTNLGRP_NOP4, 882 884 RTNLGRP_IPV6_PREFIX, 883 885 #define RTNLGRP_IPV6_PREFIX RTNLGRP_IPV6_PREFIX 884 886 __RTNLGRP_MAX
+2
include/net/if_inet6.h
··· 24 24 #define IF_RA_MANAGED 0x40 25 25 #define IF_RA_RCVD 0x20 26 26 #define IF_RS_SENT 0x10 27 + #define IF_READY 0x80000000 27 28 28 29 /* prefix flags */ 29 30 #define IF_PREFIX_ONLINK 0x01 ··· 83 82 struct in6_addr addr; 84 83 int ifindex; 85 84 struct ipv6_mc_socklist *next; 85 + rwlock_t sflock; 86 86 unsigned int sfmode; /* MCAST_{INCLUDE,EXCLUDE} */ 87 87 struct ip6_sf_socklist *sflist; 88 88 };
+1
include/net/xfrm.h
··· 890 890 extern void xfrm_policy_flush(void); 891 891 extern int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol); 892 892 extern int xfrm_flush_bundles(void); 893 + extern void xfrm_flush_all_bundles(void); 893 894 extern int xfrm_bundle_ok(struct xfrm_dst *xdst, struct flowi *fl, int family); 894 895 extern void xfrm_init_pmtu(struct dst_entry *dst); 895 896
+11
include/scsi/scsi_transport_fc.h
··· 79 79 FC_PORTSTATE_LINKDOWN, 80 80 FC_PORTSTATE_ERROR, 81 81 FC_PORTSTATE_LOOPBACK, 82 + FC_PORTSTATE_DELETED, 82 83 }; 83 84 84 85 ··· 326 325 struct list_head rport_bindings; 327 326 u32 next_rport_number; 328 327 u32 next_target_id; 328 + u8 flags; 329 + struct work_struct rport_del_work; 329 330 }; 331 + 332 + /* values for struct fc_host_attrs "flags" field: */ 333 + #define FC_SHOST_RPORT_DEL_SCHEDULED 0x01 334 + 330 335 331 336 #define fc_host_node_name(x) \ 332 337 (((struct fc_host_attrs *)(x)->shost_data)->node_name) ··· 372 365 (((struct fc_host_attrs *)(x)->shost_data)->next_rport_number) 373 366 #define fc_host_next_target_id(x) \ 374 367 (((struct fc_host_attrs *)(x)->shost_data)->next_target_id) 368 + #define fc_host_flags(x) \ 369 + (((struct fc_host_attrs *)(x)->shost_data)->flags) 370 + #define fc_host_rport_del_work(x) \ 371 + (((struct fc_host_attrs *)(x)->shost_data)->rport_del_work) 375 372 376 373 377 374 /* The functions by which the transport class and the driver communicate */
-1
init/Kconfig
··· 260 260 bool "Optimize for size (Look out for broken compilers!)" 261 261 default y 262 262 depends on ARM || H8300 || EXPERIMENTAL 263 - depends on !SPARC64 264 263 help 265 264 Enabling this option will pass "-Os" instead of "-O2" to gcc 266 265 resulting in a smaller kernel.
+2
ipc/sem.c
··· 381 381 /* hands-off: q will disappear immediately after 382 382 * writing q->status. 383 383 */ 384 + smp_wmb(); 384 385 q->status = error; 385 386 q = n; 386 387 } else { ··· 462 461 n = q->next; 463 462 q->status = IN_WAKEUP; 464 463 wake_up_process(q->sleeper); /* doesn't sleep */ 464 + smp_wmb(); 465 465 q->status = -EIDRM; /* hands-off q */ 466 466 q = n; 467 467 }
+6
kernel/futex.c
··· 270 270 /* 271 271 * The waiting task can free the futex_q as soon as this is written, 272 272 * without taking any locks. This must come last. 273 + * 274 + * A memory barrier is required here to prevent the following store 275 + * to lock_ptr from getting ahead of the wakeup. Clearing the lock 276 + * at the end of wake_up_all() does not prevent this store from 277 + * moving. 273 278 */ 279 + wmb(); 274 280 q->lock_ptr = NULL; 275 281 } 276 282
+1 -1
kernel/params.c
··· 619 619 620 620 621 621 /* module-related sysfs stuff */ 622 - #ifdef CONFIG_MODULES 622 + #ifdef CONFIG_SYSFS 623 623 624 624 #define to_module_attr(n) container_of(n, struct module_attribute, attr); 625 625 #define to_module_kobject(n) container_of(n, struct module_kobject, kobj);
+16 -13
kernel/sysctl.c
··· 2192 2192 void __user *oldval, size_t __user *oldlenp, 2193 2193 void __user *newval, size_t newlen, void **context) 2194 2194 { 2195 - size_t l, len; 2196 - 2197 2195 if (!table->data || !table->maxlen) 2198 2196 return -ENOTDIR; 2199 2197 2200 2198 if (oldval && oldlenp) { 2201 - if (get_user(len, oldlenp)) 2199 + size_t bufsize; 2200 + if (get_user(bufsize, oldlenp)) 2202 2201 return -EFAULT; 2203 - if (len) { 2204 - l = strlen(table->data); 2205 - if (len > l) len = l; 2206 - if (len >= table->maxlen) 2202 + if (bufsize) { 2203 + size_t len = strlen(table->data), copied; 2204 + 2205 + /* This shouldn't trigger for a well-formed sysctl */ 2206 + if (len > table->maxlen) 2207 2207 len = table->maxlen; 2208 - if(copy_to_user(oldval, table->data, len)) 2208 + 2209 + /* Copy up to a max of bufsize-1 bytes of the string */ 2210 + copied = (len >= bufsize) ? bufsize - 1 : len; 2211 + 2212 + if (copy_to_user(oldval, table->data, copied) || 2213 + put_user(0, (char __user *)(oldval + copied))) 2209 2214 return -EFAULT; 2210 - if(put_user(0, ((char __user *) oldval) + len)) 2211 - return -EFAULT; 2212 - if(put_user(len, oldlenp)) 2215 + if (put_user(len, oldlenp)) 2213 2216 return -EFAULT; 2214 2217 } 2215 2218 } 2216 2219 if (newval && newlen) { 2217 - len = newlen; 2220 + size_t len = newlen; 2218 2221 if (len > table->maxlen) 2219 2222 len = table->maxlen; 2220 2223 if(copy_from_user(table->data, newval, len)) ··· 2226 2223 len--; 2227 2224 ((char *) table->data)[len] = 0; 2228 2225 } 2229 - return 0; 2226 + return 1; 2230 2227 } 2231 2228 2232 2229 /*
+10 -8
lib/spinlock_debug.c
··· 20 20 if (lock->owner && lock->owner != SPINLOCK_OWNER_INIT) 21 21 owner = lock->owner; 22 22 printk("BUG: spinlock %s on CPU#%d, %s/%d\n", 23 - msg, smp_processor_id(), current->comm, current->pid); 23 + msg, raw_smp_processor_id(), 24 + current->comm, current->pid); 24 25 printk(" lock: %p, .magic: %08x, .owner: %s/%d, .owner_cpu: %d\n", 25 26 lock, lock->magic, 26 27 owner ? owner->comm : "<none>", ··· 79 78 if (print_once) { 80 79 print_once = 0; 81 80 printk("BUG: spinlock lockup on CPU#%d, %s/%d, %p\n", 82 - smp_processor_id(), current->comm, current->pid, 83 - lock); 81 + raw_smp_processor_id(), current->comm, 82 + current->pid, lock); 84 83 dump_stack(); 85 84 } 86 85 } ··· 121 120 122 121 if (xchg(&print_once, 0)) { 123 122 printk("BUG: rwlock %s on CPU#%d, %s/%d, %p\n", msg, 124 - smp_processor_id(), current->comm, current->pid, lock); 123 + raw_smp_processor_id(), current->comm, 124 + current->pid, lock); 125 125 dump_stack(); 126 126 #ifdef CONFIG_SMP 127 127 /* ··· 150 148 if (print_once) { 151 149 print_once = 0; 152 150 printk("BUG: read-lock lockup on CPU#%d, %s/%d, %p\n", 153 - smp_processor_id(), current->comm, current->pid, 154 - lock); 151 + raw_smp_processor_id(), current->comm, 152 + current->pid, lock); 155 153 dump_stack(); 156 154 } 157 155 } ··· 222 220 if (print_once) { 223 221 print_once = 0; 224 222 printk("BUG: write-lock lockup on CPU#%d, %s/%d, %p\n", 225 - smp_processor_id(), current->comm, current->pid, 226 - lock); 223 + raw_smp_processor_id(), current->comm, 224 + current->pid, lock); 227 225 dump_stack(); 228 226 } 229 227 }
+3 -2
lib/swiotlb.c
··· 704 704 addr = SG_ENT_VIRT_ADDRESS(sg); 705 705 dev_addr = virt_to_phys(addr); 706 706 if (swiotlb_force || address_needs_mapping(hwdev, dev_addr)) { 707 - sg->dma_address = (dma_addr_t) virt_to_phys(map_single(hwdev, addr, sg->length, dir)); 708 - if (!sg->dma_address) { 707 + void *map = map_single(hwdev, addr, sg->length, dir); 708 + sg->dma_address = virt_to_bus(map); 709 + if (!map) { 709 710 /* Don't panic here, we expect map_sg users 710 711 to do proper error handling. */ 711 712 swiotlb_full(hwdev, sg->length, dir, 0);
+4
mm/mempolicy.c
··· 161 161 switch (mode) { 162 162 case MPOL_INTERLEAVE: 163 163 policy->v.nodes = *nodes; 164 + if (nodes_weight(*nodes) == 0) { 165 + kmem_cache_free(policy_cache, policy); 166 + return ERR_PTR(-EINVAL); 167 + } 164 168 break; 165 169 case MPOL_PREFERRED: 166 170 policy->v.preferred_node = first_node(*nodes);
+5 -1
net/8021q/vlan.c
··· 753 753 break; 754 754 case GET_VLAN_REALDEV_NAME_CMD: 755 755 err = vlan_dev_get_realdev_name(args.device1, args.u.device2); 756 + if (err) 757 + goto out; 756 758 if (copy_to_user(arg, &args, 757 759 sizeof(struct vlan_ioctl_args))) { 758 760 err = -EFAULT; ··· 763 761 764 762 case GET_VLAN_VID_CMD: 765 763 err = vlan_dev_get_vid(args.device1, &vid); 764 + if (err) 765 + goto out; 766 766 args.u.VID = vid; 767 767 if (copy_to_user(arg, &args, 768 768 sizeof(struct vlan_ioctl_args))) { ··· 778 774 __FUNCTION__, args.cmd); 779 775 return -EINVAL; 780 776 }; 781 - 777 + out: 782 778 return err; 783 779 } 784 780
+9 -10
net/bridge/br_netfilter.c
··· 295 295 len -= 2; 296 296 297 297 while (len > 0) { 298 - int optlen = raw[off+1]+2; 298 + int optlen = skb->nh.raw[off+1]+2; 299 299 300 300 switch (skb->nh.raw[off]) { 301 301 case IPV6_TLV_PAD0: ··· 308 308 case IPV6_TLV_JUMBO: 309 309 if (skb->nh.raw[off+1] != 4 || (off&3) != 2) 310 310 goto bad; 311 - 312 311 pkt_len = ntohl(*(u32*)(skb->nh.raw+off+2)); 313 - 312 + if (pkt_len <= IPV6_MAXPLEN || 313 + skb->nh.ipv6h->payload_len) 314 + goto bad; 314 315 if (pkt_len > skb->len - sizeof(struct ipv6hdr)) 315 316 goto bad; 316 - if (pkt_len + sizeof(struct ipv6hdr) < skb->len) { 317 - if (__pskb_trim(skb, 318 - pkt_len + sizeof(struct ipv6hdr))) 319 - goto bad; 320 - if (skb->ip_summed == CHECKSUM_HW) 321 - skb->ip_summed = CHECKSUM_NONE; 322 - } 317 + if (pskb_trim_rcsum(skb, 318 + pkt_len+sizeof(struct ipv6hdr))) 319 + goto bad; 323 320 break; 324 321 default: 325 322 if (optlen > len) ··· 369 372 if (hdr->nexthdr == NEXTHDR_HOP && check_hbh_len(skb)) 370 373 goto inhdr_error; 371 374 375 + nf_bridge_put(skb->nf_bridge); 372 376 if ((nf_bridge = nf_bridge_alloc(skb)) == NULL) 373 377 return NF_DROP; 374 378 setup_pre_routing(skb); ··· 453 455 skb->ip_summed = CHECKSUM_NONE; 454 456 } 455 457 458 + nf_bridge_put(skb->nf_bridge); 456 459 if ((nf_bridge = nf_bridge_alloc(skb)) == NULL) 457 460 return NF_DROP; 458 461 setup_pre_routing(skb);
+2 -2
net/core/filter.c
··· 293 293 struct sock_filter *ftest; 294 294 int pc; 295 295 296 - if (((unsigned int)flen >= (~0U / sizeof(struct sock_filter))) || flen == 0) 296 + if (flen == 0 || flen > BPF_MAXINSNS) 297 297 return -EINVAL; 298 298 299 299 /* check the filter code now */ ··· 360 360 int err; 361 361 362 362 /* Make sure new filter is there and in the right amounts. */ 363 - if (fprog->filter == NULL || fprog->len > BPF_MAXINSNS) 363 + if (fprog->filter == NULL) 364 364 return -EINVAL; 365 365 366 366 fp = sock_kmalloc(sk, fsize+sizeof(*fp), GFP_KERNEL);
+1 -1
net/dccp/ipv4.c
··· 1251 1251 struct dccp_sock *dp = dccp_sk(sk); 1252 1252 1253 1253 /* 1254 - * DCCP doesn't use sk_qrite_queue, just sk_send_head 1254 + * DCCP doesn't use sk_write_queue, just sk_send_head 1255 1255 * for retransmissions 1256 1256 */ 1257 1257 if (sk->sk_send_head != NULL) {
+2 -1
net/ipv4/netfilter/Makefile
··· 12 12 13 13 # connection tracking 14 14 obj-$(CONFIG_IP_NF_CONNTRACK) += ip_conntrack.o 15 + obj-$(CONFIG_IP_NF_NAT) += ip_nat.o 15 16 16 17 # conntrack netlink interface 17 18 obj-$(CONFIG_IP_NF_CONNTRACK_NETLINK) += ip_conntrack_netlink.o ··· 42 41 # the three instances of ip_tables 43 42 obj-$(CONFIG_IP_NF_FILTER) += iptable_filter.o 44 43 obj-$(CONFIG_IP_NF_MANGLE) += iptable_mangle.o 45 - obj-$(CONFIG_IP_NF_NAT) += iptable_nat.o ip_nat.o 44 + obj-$(CONFIG_IP_NF_NAT) += iptable_nat.o 46 45 obj-$(CONFIG_IP_NF_RAW) += iptable_raw.o 47 46 48 47 # matches
+1
net/ipv4/xfrm4_policy.c
··· 182 182 case IPPROTO_UDP: 183 183 case IPPROTO_TCP: 184 184 case IPPROTO_SCTP: 185 + case IPPROTO_DCCP: 185 186 if (pskb_may_pull(skb, xprth + 4 - skb->data)) { 186 187 u16 *ports = (u16 *)xprth; 187 188
+115 -18
net/ipv6/addrconf.c
··· 137 137 static void addrconf_dad_start(struct inet6_ifaddr *ifp, u32 flags); 138 138 static void addrconf_dad_timer(unsigned long data); 139 139 static void addrconf_dad_completed(struct inet6_ifaddr *ifp); 140 + static void addrconf_dad_run(struct inet6_dev *idev); 140 141 static void addrconf_rs_timer(unsigned long data); 141 142 static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifa); 142 143 static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifa); ··· 389 388 } 390 389 #endif 391 390 391 + if (netif_carrier_ok(dev)) 392 + ndev->if_flags |= IF_READY; 393 + 392 394 write_lock_bh(&addrconf_lock); 393 395 dev->ip6_ptr = ndev; 394 396 write_unlock_bh(&addrconf_lock); ··· 419 415 if ((idev = ipv6_add_dev(dev)) == NULL) 420 416 return NULL; 421 417 } 418 + 422 419 if (dev->flags&IFF_UP) 423 420 ipv6_mc_up(idev); 424 421 return idev; ··· 639 634 } 640 635 #endif 641 636 642 - for (ifap = &idev->addr_list; (ifa=*ifap) != NULL; 643 - ifap = &ifa->if_next) { 637 + for (ifap = &idev->addr_list; (ifa=*ifap) != NULL;) { 644 638 if (ifa == ifp) { 645 639 *ifap = ifa->if_next; 646 640 __in6_ifa_put(ifp); ··· 647 643 if (!(ifp->flags & IFA_F_PERMANENT) || onlink > 0) 648 644 break; 649 645 deleted = 1; 646 + continue; 650 647 } else if (ifp->flags & IFA_F_PERMANENT) { 651 648 if (ipv6_prefix_equal(&ifa->addr, &ifp->addr, 652 649 ifp->prefix_len)) { ··· 671 666 } 672 667 } 673 668 } 669 + ifap = &ifa->if_next; 674 670 } 675 671 write_unlock_bh(&idev->lock); 676 672 ··· 909 903 910 904 score.addr_type = __ipv6_addr_type(&ifa->addr); 911 905 912 - /* Rule 0: Candidate Source Address (section 4) 906 + /* Rule 0: 907 + * - Tentative Address (RFC2462 section 5.4) 908 + * - A tentative address is not considered 909 + * "assigned to an interface" in the traditional 910 + * sense. 911 + * - Candidate Source Address (section 4) 913 912 * - In any case, anycast addresses, multicast 914 913 * addresses, and the unspecified address MUST 915 914 * NOT be included in a candidate set. 916 915 */ 916 + if (ifa->flags & IFA_F_TENTATIVE) 917 + continue; 917 918 if (unlikely(score.addr_type == IPV6_ADDR_ANY || 918 919 score.addr_type & IPV6_ADDR_MULTICAST)) { 919 920 LIMIT_NETDEBUG(KERN_DEBUG ··· 1228 1215 1229 1216 /* Gets referenced address, destroys ifaddr */ 1230 1217 1231 - void addrconf_dad_failure(struct inet6_ifaddr *ifp) 1218 + void addrconf_dad_stop(struct inet6_ifaddr *ifp) 1232 1219 { 1233 - if (net_ratelimit()) 1234 - printk(KERN_INFO "%s: duplicate address detected!\n", ifp->idev->dev->name); 1235 1220 if (ifp->flags&IFA_F_PERMANENT) { 1236 1221 spin_lock_bh(&ifp->lock); 1237 1222 addrconf_del_timer(ifp); ··· 1255 1244 ipv6_del_addr(ifp); 1256 1245 } 1257 1246 1247 + void addrconf_dad_failure(struct inet6_ifaddr *ifp) 1248 + { 1249 + if (net_ratelimit()) 1250 + printk(KERN_INFO "%s: duplicate address detected!\n", ifp->idev->dev->name); 1251 + addrconf_dad_stop(ifp); 1252 + } 1258 1253 1259 1254 /* Join to solicited addr multicast group. */ 1260 1255 ··· 1613 1596 not good. 1614 1597 */ 1615 1598 if (valid_lft >= 0x7FFFFFFF/HZ) 1616 - rt_expires = 0; 1599 + rt_expires = 0x7FFFFFFF - (0x7FFFFFFF % HZ); 1617 1600 else 1618 - rt_expires = jiffies + valid_lft * HZ; 1601 + rt_expires = valid_lft * HZ; 1602 + 1603 + /* 1604 + * We convert this (in jiffies) to clock_t later. 1605 + * Avoid arithmetic overflow there as well. 1606 + * Overflow can happen only if HZ < USER_HZ. 1607 + */ 1608 + if (HZ < USER_HZ && rt_expires > 0x7FFFFFFF / USER_HZ) 1609 + rt_expires = 0x7FFFFFFF / USER_HZ; 1619 1610 1620 1611 if (pinfo->onlink) { 1621 1612 struct rt6_info *rt; ··· 1635 1610 ip6_del_rt(rt, NULL, NULL, NULL); 1636 1611 rt = NULL; 1637 1612 } else { 1638 - rt->rt6i_expires = rt_expires; 1613 + rt->rt6i_expires = jiffies + rt_expires; 1639 1614 } 1640 1615 } 1641 1616 } else if (valid_lft) { 1642 1617 addrconf_prefix_route(&pinfo->prefix, pinfo->prefix_len, 1643 - dev, rt_expires, RTF_ADDRCONF|RTF_EXPIRES|RTF_PREFIX_RT); 1618 + dev, jiffies_to_clock_t(rt_expires), RTF_ADDRCONF|RTF_EXPIRES|RTF_PREFIX_RT); 1644 1619 } 1645 1620 if (rt) 1646 1621 dst_release(&rt->u.dst); ··· 2150 2125 { 2151 2126 struct net_device *dev = (struct net_device *) data; 2152 2127 struct inet6_dev *idev = __in6_dev_get(dev); 2128 + int run_pending = 0; 2153 2129 2154 2130 switch(event) { 2155 2131 case NETDEV_UP: 2132 + case NETDEV_CHANGE: 2133 + if (event == NETDEV_UP) { 2134 + if (!netif_carrier_ok(dev)) { 2135 + /* device is not ready yet. */ 2136 + printk(KERN_INFO 2137 + "ADDRCONF(NETDEV_UP): %s: " 2138 + "link is not ready\n", 2139 + dev->name); 2140 + break; 2141 + } 2142 + } else { 2143 + if (!netif_carrier_ok(dev)) { 2144 + /* device is still not ready. */ 2145 + break; 2146 + } 2147 + 2148 + if (idev) { 2149 + if (idev->if_flags & IF_READY) { 2150 + /* device is already configured. */ 2151 + break; 2152 + } 2153 + idev->if_flags |= IF_READY; 2154 + } 2155 + 2156 + printk(KERN_INFO 2157 + "ADDRCONF(NETDEV_CHANGE): %s: " 2158 + "link becomes ready\n", 2159 + dev->name); 2160 + 2161 + run_pending = 1; 2162 + } 2163 + 2156 2164 switch(dev->type) { 2157 2165 case ARPHRD_SIT: 2158 2166 addrconf_sit_config(dev); ··· 2202 2144 break; 2203 2145 }; 2204 2146 if (idev) { 2147 + if (run_pending) 2148 + addrconf_dad_run(idev); 2149 + 2205 2150 /* If the MTU changed during the interface down, when the 2206 2151 interface up, the changed MTU must be reflected in the 2207 2152 idev as well as routers. ··· 2239 2178 */ 2240 2179 addrconf_ifdown(dev, event != NETDEV_DOWN); 2241 2180 break; 2242 - case NETDEV_CHANGE: 2243 - break; 2181 + 2244 2182 case NETDEV_CHANGENAME: 2245 2183 #ifdef CONFIG_SYSCTL 2246 2184 if (idev) { ··· 2320 2260 2321 2261 /* Step 3: clear flags for stateless addrconf */ 2322 2262 if (how != 1) 2323 - idev->if_flags &= ~(IF_RS_SENT|IF_RA_RCVD); 2263 + idev->if_flags &= ~(IF_RS_SENT|IF_RA_RCVD|IF_READY); 2324 2264 2325 2265 /* Step 4: clear address list */ 2326 2266 #ifdef CONFIG_IPV6_PRIVACY ··· 2429 2369 /* 2430 2370 * Duplicate Address Detection 2431 2371 */ 2372 + static void addrconf_dad_kick(struct inet6_ifaddr *ifp) 2373 + { 2374 + unsigned long rand_num; 2375 + struct inet6_dev *idev = ifp->idev; 2376 + 2377 + rand_num = net_random() % (idev->cnf.rtr_solicit_delay ? : 1); 2378 + ifp->probes = idev->cnf.dad_transmits; 2379 + addrconf_mod_timer(ifp, AC_DAD, rand_num); 2380 + } 2381 + 2432 2382 static void addrconf_dad_start(struct inet6_ifaddr *ifp, u32 flags) 2433 2383 { 2434 2384 struct inet6_dev *idev = ifp->idev; 2435 2385 struct net_device *dev = idev->dev; 2436 - unsigned long rand_num; 2437 2386 2438 2387 addrconf_join_solict(dev, &ifp->addr); 2439 2388 ··· 2451 2382 flags); 2452 2383 2453 2384 net_srandom(ifp->addr.s6_addr32[3]); 2454 - rand_num = net_random() % (idev->cnf.rtr_solicit_delay ? : 1); 2455 2385 2456 2386 read_lock_bh(&idev->lock); 2457 2387 if (ifp->dead) ··· 2467 2399 return; 2468 2400 } 2469 2401 2470 - ifp->probes = idev->cnf.dad_transmits; 2471 - addrconf_mod_timer(ifp, AC_DAD, rand_num); 2472 - 2402 + if (!(idev->if_flags & IF_READY)) { 2403 + spin_unlock_bh(&ifp->lock); 2404 + read_unlock_bh(&idev->lock); 2405 + /* 2406 + * If the defice is not ready: 2407 + * - keep it tentative if it is a permanent address. 2408 + * - otherwise, kill it. 2409 + */ 2410 + in6_ifa_hold(ifp); 2411 + addrconf_dad_stop(ifp); 2412 + return; 2413 + } 2414 + addrconf_dad_kick(ifp); 2473 2415 spin_unlock_bh(&ifp->lock); 2474 2416 out: 2475 2417 read_unlock_bh(&idev->lock); ··· 2560 2482 addrconf_mod_timer(ifp, AC_RS, ifp->idev->cnf.rtr_solicit_interval); 2561 2483 spin_unlock_bh(&ifp->lock); 2562 2484 } 2485 + } 2486 + 2487 + static void addrconf_dad_run(struct inet6_dev *idev) { 2488 + struct inet6_ifaddr *ifp; 2489 + 2490 + read_lock_bh(&idev->lock); 2491 + for (ifp = idev->addr_list; ifp; ifp = ifp->if_next) { 2492 + spin_lock_bh(&ifp->lock); 2493 + if (!(ifp->flags & IFA_F_TENTATIVE)) { 2494 + spin_unlock_bh(&ifp->lock); 2495 + continue; 2496 + } 2497 + spin_unlock_bh(&ifp->lock); 2498 + addrconf_dad_kick(ifp); 2499 + } 2500 + read_unlock_bh(&idev->lock); 2563 2501 } 2564 2502 2565 2503 #ifdef CONFIG_PROC_FS ··· 2783 2689 in6_ifa_hold(ifpub); 2784 2690 spin_unlock(&ifp->lock); 2785 2691 read_unlock(&addrconf_hash_lock); 2692 + spin_lock(&ifpub->lock); 2693 + ifpub->regen_count = 0; 2694 + spin_unlock(&ifpub->lock); 2786 2695 ipv6_create_tempaddr(ifpub, ifp); 2787 2696 in6_ifa_put(ifpub); 2788 2697 in6_ifa_put(ifp);
+14 -2
net/ipv6/icmp.c
··· 328 328 iif = skb->dev->ifindex; 329 329 330 330 /* 331 - * Must not send if we know that source is Anycast also. 332 - * for now we don't know that. 331 + * Must not send error if the source does not uniquely 332 + * identify a single node (RFC2463 Section 2.4). 333 + * We check unspecified / multicast addresses here, 334 + * and anycast addresses will be checked later. 333 335 */ 334 336 if ((addr_type == IPV6_ADDR_ANY) || (addr_type & IPV6_ADDR_MULTICAST)) { 335 337 LIMIT_NETDEBUG(KERN_DEBUG "icmpv6_send: addr_any/mcast source\n"); ··· 375 373 err = ip6_dst_lookup(sk, &dst, &fl); 376 374 if (err) 377 375 goto out; 376 + 377 + /* 378 + * We won't send icmp if the destination is known 379 + * anycast. 380 + */ 381 + if (((struct rt6_info *)dst)->rt6i_flags & RTF_ANYCAST) { 382 + LIMIT_NETDEBUG(KERN_DEBUG "icmpv6_send: acast source\n"); 383 + goto out_dst_release; 384 + } 385 + 378 386 if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0) 379 387 goto out; 380 388
+111 -31
net/ipv6/mcast.c
··· 170 170 #define MLDV2_QQIC(value) MLDV2_EXP(0x80, 4, 3, value) 171 171 #define MLDV2_MRC(value) MLDV2_EXP(0x8000, 12, 3, value) 172 172 173 - #define IPV6_MLD_MAX_MSF 10 173 + #define IPV6_MLD_MAX_MSF 64 174 174 175 175 int sysctl_mld_max_msf = IPV6_MLD_MAX_MSF; 176 176 ··· 224 224 225 225 mc_lst->ifindex = dev->ifindex; 226 226 mc_lst->sfmode = MCAST_EXCLUDE; 227 + mc_lst->sflock = RW_LOCK_UNLOCKED; 227 228 mc_lst->sflist = NULL; 228 229 229 230 /* ··· 361 360 struct ip6_sf_socklist *psl; 362 361 int i, j, rv; 363 362 int leavegroup = 0; 363 + int pmclocked = 0; 364 364 int err; 365 365 366 366 if (pgsr->gsr_group.ss_family != AF_INET6 || ··· 404 402 ip6_mc_del_src(idev, group, pmc->sfmode, 0, NULL, 0); 405 403 pmc->sfmode = omode; 406 404 } 405 + 406 + write_lock_bh(&pmc->sflock); 407 + pmclocked = 1; 407 408 408 409 psl = pmc->sflist; 409 410 if (!add) { ··· 480 475 /* update the interface list */ 481 476 ip6_mc_add_src(idev, group, omode, 1, source, 1); 482 477 done: 478 + if (pmclocked) 479 + write_unlock_bh(&pmc->sflock); 483 480 read_unlock_bh(&ipv6_sk_mc_lock); 484 481 read_unlock_bh(&idev->lock); 485 482 in6_dev_put(idev); ··· 517 510 dev = idev->dev; 518 511 519 512 err = 0; 513 + read_lock_bh(&ipv6_sk_mc_lock); 514 + 520 515 if (gsf->gf_fmode == MCAST_INCLUDE && gsf->gf_numsrc == 0) { 521 516 leavegroup = 1; 522 517 goto done; ··· 558 549 newpsl = NULL; 559 550 (void) ip6_mc_add_src(idev, group, gsf->gf_fmode, 0, NULL, 0); 560 551 } 552 + 553 + write_lock_bh(&pmc->sflock); 561 554 psl = pmc->sflist; 562 555 if (psl) { 563 556 (void) ip6_mc_del_src(idev, group, pmc->sfmode, ··· 569 558 (void) ip6_mc_del_src(idev, group, pmc->sfmode, 0, NULL, 0); 570 559 pmc->sflist = newpsl; 571 560 pmc->sfmode = gsf->gf_fmode; 561 + write_unlock_bh(&pmc->sflock); 572 562 err = 0; 573 563 done: 564 + read_unlock_bh(&ipv6_sk_mc_lock); 574 565 read_unlock_bh(&idev->lock); 575 566 in6_dev_put(idev); 576 567 dev_put(dev); ··· 605 592 dev = idev->dev; 606 593 607 594 err = -EADDRNOTAVAIL; 595 + /* 596 + * changes to the ipv6_mc_list require the socket lock and 597 + * a read lock on ip6_sk_mc_lock. We have the socket lock, 598 + * so reading the list is safe. 599 + */ 608 600 609 601 for (pmc=inet6->ipv6_mc_list; pmc; pmc=pmc->next) { 610 602 if (pmc->ifindex != gsf->gf_interface) ··· 632 614 copy_to_user(optval, gsf, GROUP_FILTER_SIZE(0))) { 633 615 return -EFAULT; 634 616 } 617 + /* changes to psl require the socket lock, a read lock on 618 + * on ipv6_sk_mc_lock and a write lock on pmc->sflock. We 619 + * have the socket lock, so reading here is safe. 620 + */ 635 621 for (i=0; i<copycount; i++) { 636 622 struct sockaddr_in6 *psin6; 637 623 struct sockaddr_storage ss; ··· 672 650 read_unlock(&ipv6_sk_mc_lock); 673 651 return 1; 674 652 } 653 + read_lock(&mc->sflock); 675 654 psl = mc->sflist; 676 655 if (!psl) { 677 656 rv = mc->sfmode == MCAST_EXCLUDE; ··· 688 665 if (mc->sfmode == MCAST_EXCLUDE && i < psl->sl_count) 689 666 rv = 0; 690 667 } 668 + read_unlock(&mc->sflock); 691 669 read_unlock(&ipv6_sk_mc_lock); 692 670 693 671 return rv; ··· 1092 1068 ma->mca_flags |= MAF_TIMER_RUNNING; 1093 1069 } 1094 1070 1095 - static void mld_marksources(struct ifmcaddr6 *pmc, int nsrcs, 1071 + /* mark EXCLUDE-mode sources */ 1072 + static int mld_xmarksources(struct ifmcaddr6 *pmc, int nsrcs, 1096 1073 struct in6_addr *srcs) 1097 1074 { 1098 1075 struct ip6_sf_list *psf; ··· 1103 1078 for (psf=pmc->mca_sources; psf; psf=psf->sf_next) { 1104 1079 if (scount == nsrcs) 1105 1080 break; 1106 - for (i=0; i<nsrcs; i++) 1081 + for (i=0; i<nsrcs; i++) { 1082 + /* skip inactive filters */ 1083 + if (pmc->mca_sfcount[MCAST_INCLUDE] || 1084 + pmc->mca_sfcount[MCAST_EXCLUDE] != 1085 + psf->sf_count[MCAST_EXCLUDE]) 1086 + continue; 1087 + if (ipv6_addr_equal(&srcs[i], &psf->sf_addr)) { 1088 + scount++; 1089 + break; 1090 + } 1091 + } 1092 + } 1093 + pmc->mca_flags &= ~MAF_GSQUERY; 1094 + if (scount == nsrcs) /* all sources excluded */ 1095 + return 0; 1096 + return 1; 1097 + } 1098 + 1099 + static int mld_marksources(struct ifmcaddr6 *pmc, int nsrcs, 1100 + struct in6_addr *srcs) 1101 + { 1102 + struct ip6_sf_list *psf; 1103 + int i, scount; 1104 + 1105 + if (pmc->mca_sfmode == MCAST_EXCLUDE) 1106 + return mld_xmarksources(pmc, nsrcs, srcs); 1107 + 1108 + /* mark INCLUDE-mode sources */ 1109 + 1110 + scount = 0; 1111 + for (psf=pmc->mca_sources; psf; psf=psf->sf_next) { 1112 + if (scount == nsrcs) 1113 + break; 1114 + for (i=0; i<nsrcs; i++) { 1107 1115 if (ipv6_addr_equal(&srcs[i], &psf->sf_addr)) { 1108 1116 psf->sf_gsresp = 1; 1109 1117 scount++; 1110 1118 break; 1111 1119 } 1120 + } 1112 1121 } 1122 + if (!scount) { 1123 + pmc->mca_flags &= ~MAF_GSQUERY; 1124 + return 0; 1125 + } 1126 + pmc->mca_flags |= MAF_GSQUERY; 1127 + return 1; 1113 1128 } 1114 1129 1115 1130 int igmp6_event_query(struct sk_buff *skb) ··· 1232 1167 /* mark sources to include, if group & source-specific */ 1233 1168 if (mlh2->nsrcs != 0) { 1234 1169 if (!pskb_may_pull(skb, srcs_offset + 1235 - mlh2->nsrcs * sizeof(struct in6_addr))) { 1170 + ntohs(mlh2->nsrcs) * sizeof(struct in6_addr))) { 1236 1171 in6_dev_put(idev); 1237 1172 return -EINVAL; 1238 1173 } ··· 1268 1203 else 1269 1204 ma->mca_flags &= ~MAF_GSQUERY; 1270 1205 } 1271 - if (ma->mca_flags & MAF_GSQUERY) 1272 - mld_marksources(ma, ntohs(mlh2->nsrcs), 1273 - mlh2->srcs); 1274 - igmp6_group_queried(ma, max_delay); 1206 + if (!(ma->mca_flags & MAF_GSQUERY) || 1207 + mld_marksources(ma, ntohs(mlh2->nsrcs), mlh2->srcs)) 1208 + igmp6_group_queried(ma, max_delay); 1275 1209 spin_unlock_bh(&ma->mca_lock); 1276 1210 if (group_type != IPV6_ADDR_ANY) 1277 1211 break; ··· 1345 1281 case MLD2_MODE_IS_EXCLUDE: 1346 1282 if (gdeleted || sdeleted) 1347 1283 return 0; 1348 - return !((pmc->mca_flags & MAF_GSQUERY) && !psf->sf_gsresp); 1284 + if (!((pmc->mca_flags & MAF_GSQUERY) && !psf->sf_gsresp)) { 1285 + if (pmc->mca_sfmode == MCAST_INCLUDE) 1286 + return 1; 1287 + /* don't include if this source is excluded 1288 + * in all filters 1289 + */ 1290 + if (psf->sf_count[MCAST_INCLUDE]) 1291 + return 0; 1292 + return pmc->mca_sfcount[MCAST_EXCLUDE] == 1293 + psf->sf_count[MCAST_EXCLUDE]; 1294 + } 1295 + return 0; 1349 1296 case MLD2_CHANGE_TO_INCLUDE: 1350 1297 if (gdeleted || sdeleted) 1351 1298 return 0; ··· 1525 1450 struct mld2_report *pmr; 1526 1451 struct mld2_grec *pgr = NULL; 1527 1452 struct ip6_sf_list *psf, *psf_next, *psf_prev, **psf_list; 1528 - int scount, first, isquery, truncate; 1453 + int scount, stotal, first, isquery, truncate; 1529 1454 1530 1455 if (pmc->mca_flags & MAF_NOREPORT) 1531 1456 return skb; ··· 1535 1460 truncate = type == MLD2_MODE_IS_EXCLUDE || 1536 1461 type == MLD2_CHANGE_TO_EXCLUDE; 1537 1462 1463 + stotal = scount = 0; 1464 + 1538 1465 psf_list = sdeleted ? &pmc->mca_tomb : &pmc->mca_sources; 1539 1466 1540 - if (!*psf_list) { 1541 - if (type == MLD2_ALLOW_NEW_SOURCES || 1542 - type == MLD2_BLOCK_OLD_SOURCES) 1543 - return skb; 1544 - if (pmc->mca_crcount || isquery) { 1545 - /* make sure we have room for group header and at 1546 - * least one source. 1547 - */ 1548 - if (skb && AVAILABLE(skb) < sizeof(struct mld2_grec)+ 1549 - sizeof(struct in6_addr)) { 1550 - mld_sendpack(skb); 1551 - skb = NULL; /* add_grhead will get a new one */ 1552 - } 1553 - skb = add_grhead(skb, pmc, type, &pgr); 1554 - } 1555 - return skb; 1556 - } 1467 + if (!*psf_list) 1468 + goto empty_source; 1469 + 1557 1470 pmr = skb ? (struct mld2_report *)skb->h.raw : NULL; 1558 1471 1559 1472 /* EX and TO_EX get a fresh packet, if needed */ ··· 1554 1491 } 1555 1492 } 1556 1493 first = 1; 1557 - scount = 0; 1558 1494 psf_prev = NULL; 1559 1495 for (psf=*psf_list; psf; psf=psf_next) { 1560 1496 struct in6_addr *psrc; ··· 1587 1525 } 1588 1526 psrc = (struct in6_addr *)skb_put(skb, sizeof(*psrc)); 1589 1527 *psrc = psf->sf_addr; 1590 - scount++; 1528 + scount++; stotal++; 1591 1529 if ((type == MLD2_ALLOW_NEW_SOURCES || 1592 1530 type == MLD2_BLOCK_OLD_SOURCES) && psf->sf_crcount) { 1593 1531 psf->sf_crcount--; ··· 1601 1539 } 1602 1540 } 1603 1541 psf_prev = psf; 1542 + } 1543 + 1544 + empty_source: 1545 + if (!stotal) { 1546 + if (type == MLD2_ALLOW_NEW_SOURCES || 1547 + type == MLD2_BLOCK_OLD_SOURCES) 1548 + return skb; 1549 + if (pmc->mca_crcount || isquery) { 1550 + /* make sure we have room for group header */ 1551 + if (skb && AVAILABLE(skb) < sizeof(struct mld2_grec)) { 1552 + mld_sendpack(skb); 1553 + skb = NULL; /* add_grhead will get a new one */ 1554 + } 1555 + skb = add_grhead(skb, pmc, type, &pgr); 1556 + } 1604 1557 } 1605 1558 if (pgr) 1606 1559 pgr->grec_nsrcs = htons(scount); ··· 1698 1621 skb = add_grec(skb, pmc, dtype, 1, 1); 1699 1622 } 1700 1623 if (pmc->mca_crcount) { 1701 - pmc->mca_crcount--; 1702 1624 if (pmc->mca_sfmode == MCAST_EXCLUDE) { 1703 1625 type = MLD2_CHANGE_TO_INCLUDE; 1704 1626 skb = add_grec(skb, pmc, type, 1, 0); 1705 1627 } 1628 + pmc->mca_crcount--; 1706 1629 if (pmc->mca_crcount == 0) { 1707 1630 mld_clear_zeros(&pmc->mca_tomb); 1708 1631 mld_clear_zeros(&pmc->mca_sources); ··· 1736 1659 1737 1660 /* filter mode changes */ 1738 1661 if (pmc->mca_crcount) { 1739 - pmc->mca_crcount--; 1740 1662 if (pmc->mca_sfmode == MCAST_EXCLUDE) 1741 1663 type = MLD2_CHANGE_TO_EXCLUDE; 1742 1664 else 1743 1665 type = MLD2_CHANGE_TO_INCLUDE; 1744 1666 skb = add_grec(skb, pmc, type, 0, 0); 1667 + pmc->mca_crcount--; 1745 1668 } 1746 1669 spin_unlock_bh(&pmc->mca_lock); 1747 1670 } ··· 2100 2023 { 2101 2024 int err; 2102 2025 2026 + /* callers have the socket lock and a write lock on ipv6_sk_mc_lock, 2027 + * so no other readers or writers of iml or its sflist 2028 + */ 2103 2029 if (iml->sflist == 0) { 2104 2030 /* any-source empty exclude case */ 2105 2031 return ip6_mc_del_src(idev, &iml->addr, iml->sfmode, 0, NULL, 0);
+1 -1
net/ipv6/netfilter/Kconfig
··· 211 211 212 212 config IP6_NF_TARGET_NFQUEUE 213 213 tristate "NFQUEUE Target Support" 214 - depends on IP_NF_IPTABLES 214 + depends on IP6_NF_IPTABLES 215 215 help 216 216 This Target replaced the old obsolete QUEUE target. 217 217
+10 -5
net/ipv6/route.c
··· 413 413 rt = ip6_rt_copy(ort); 414 414 415 415 if (rt) { 416 - ipv6_addr_copy(&rt->rt6i_dst.addr, daddr); 417 - 418 - if (!(rt->rt6i_flags&RTF_GATEWAY)) 416 + if (!(rt->rt6i_flags&RTF_GATEWAY)) { 417 + if (rt->rt6i_dst.plen != 128 && 418 + ipv6_addr_equal(&rt->rt6i_dst.addr, daddr)) 419 + rt->rt6i_flags |= RTF_ANYCAST; 419 420 ipv6_addr_copy(&rt->rt6i_gateway, daddr); 421 + } 420 422 423 + ipv6_addr_copy(&rt->rt6i_dst.addr, daddr); 421 424 rt->rt6i_dst.plen = 128; 422 425 rt->rt6i_flags |= RTF_CACHE; 423 426 rt->u.dst.flags |= DST_HOST; ··· 832 829 } 833 830 834 831 rt->u.dst.obsolete = -1; 835 - rt->rt6i_expires = clock_t_to_jiffies(rtmsg->rtmsg_info); 832 + rt->rt6i_expires = jiffies + clock_t_to_jiffies(rtmsg->rtmsg_info); 836 833 if (nlh && (r = NLMSG_DATA(nlh))) { 837 834 rt->rt6i_protocol = r->rtm_protocol; 838 835 } else { ··· 1416 1413 rt->u.dst.obsolete = -1; 1417 1414 1418 1415 rt->rt6i_flags = RTF_UP | RTF_NONEXTHOP; 1419 - if (!anycast) 1416 + if (anycast) 1417 + rt->rt6i_flags |= RTF_ANYCAST; 1418 + else 1420 1419 rt->rt6i_flags |= RTF_LOCAL; 1421 1420 rt->rt6i_nexthop = ndisc_get_neigh(rt->rt6i_dev, &rt->rt6i_gateway); 1422 1421 if (rt->rt6i_nexthop == NULL) {
+1
net/ipv6/xfrm6_policy.c
··· 214 214 case IPPROTO_UDP: 215 215 case IPPROTO_TCP: 216 216 case IPPROTO_SCTP: 217 + case IPPROTO_DCCP: 217 218 if (pskb_may_pull(skb, skb->nh.raw + offset + 4 - skb->data)) { 218 219 u16 *ports = (u16 *)exthdr; 219 220
+3 -3
net/netrom/nr_in.c
··· 99 99 break; 100 100 101 101 case NR_RESET: 102 - if (sysctl_netrom_reset_circuit); 102 + if (sysctl_netrom_reset_circuit) 103 103 nr_disconnect(sk, ECONNRESET); 104 104 break; 105 105 ··· 130 130 break; 131 131 132 132 case NR_RESET: 133 - if (sysctl_netrom_reset_circuit); 133 + if (sysctl_netrom_reset_circuit) 134 134 nr_disconnect(sk, ECONNRESET); 135 135 break; 136 136 ··· 265 265 break; 266 266 267 267 case NR_RESET: 268 - if (sysctl_netrom_reset_circuit); 268 + if (sysctl_netrom_reset_circuit) 269 269 nr_disconnect(sk, ECONNRESET); 270 270 break; 271 271
+3 -11
net/sctp/socket.c
··· 156 156 sizeof(struct sk_buff) + 157 157 sizeof(struct sctp_chunk); 158 158 159 - sk->sk_wmem_queued += SCTP_DATA_SNDSIZE(chunk) + 160 - sizeof(struct sk_buff) + 161 - sizeof(struct sctp_chunk); 162 - 163 159 atomic_add(sizeof(struct sctp_chunk), &sk->sk_wmem_alloc); 164 160 } 165 161 ··· 4422 4426 * tcp_poll(). Note that, based on these implementations, we don't 4423 4427 * lock the socket in this function, even though it seems that, 4424 4428 * ideally, locking or some other mechanisms can be used to ensure 4425 - * the integrity of the counters (sndbuf and wmem_queued) used 4429 + * the integrity of the counters (sndbuf and wmem_alloc) used 4426 4430 * in this place. We assume that we don't need locks either until proven 4427 4431 * otherwise. 4428 4432 * ··· 4829 4833 sizeof(struct sk_buff) + 4830 4834 sizeof(struct sctp_chunk); 4831 4835 4832 - sk->sk_wmem_queued -= SCTP_DATA_SNDSIZE(chunk) + 4833 - sizeof(struct sk_buff) + 4834 - sizeof(struct sctp_chunk); 4835 - 4836 4836 atomic_sub(sizeof(struct sctp_chunk), &sk->sk_wmem_alloc); 4837 4837 4838 4838 sock_wfree(skb); ··· 4912 4920 4913 4921 /* Is there any sndbuf space available on the socket? 4914 4922 * 4915 - * Note that wmem_queued is the sum of the send buffers on all of the 4923 + * Note that sk_wmem_alloc is the sum of the send buffers on all of the 4916 4924 * associations on the same socket. For a UDP-style socket with 4917 4925 * multiple associations, it is possible for it to be "unwriteable" 4918 4926 * prematurely. I assume that this is acceptable because ··· 4925 4933 { 4926 4934 int amt = 0; 4927 4935 4928 - amt = sk->sk_sndbuf - sk->sk_wmem_queued; 4936 + amt = sk->sk_sndbuf - atomic_read(&sk->sk_wmem_alloc); 4929 4937 if (amt < 0) 4930 4938 amt = 0; 4931 4939 return amt;
+4 -2
net/sunrpc/auth_gss/auth_gss.c
··· 638 638 gss_msg); 639 639 atomic_inc(&gss_msg->count); 640 640 gss_unhash_msg(gss_msg); 641 - if (msg->errno == -ETIMEDOUT || msg->errno == -EPIPE) { 641 + if (msg->errno == -ETIMEDOUT) { 642 642 unsigned long now = jiffies; 643 643 if (time_after(now, ratelimit)) { 644 644 printk(KERN_WARNING "RPC: AUTH_GSS upcall timed out.\n" ··· 786 786 cred->gc_flags = 0; 787 787 cred->gc_base.cr_ops = &gss_credops; 788 788 cred->gc_service = gss_auth->service; 789 - err = gss_create_upcall(gss_auth, cred); 789 + do { 790 + err = gss_create_upcall(gss_auth, cred); 791 + } while (err == -EAGAIN); 790 792 if (err < 0) 791 793 goto out_err; 792 794
+2 -2
net/sunrpc/rpc_pipe.c
··· 174 174 goto out; 175 175 msg = (struct rpc_pipe_msg *)filp->private_data; 176 176 if (msg != NULL) { 177 - msg->errno = -EPIPE; 177 + msg->errno = -EAGAIN; 178 178 list_del_init(&msg->list); 179 179 rpci->ops->destroy_msg(msg); 180 180 } ··· 183 183 if (filp->f_mode & FMODE_READ) 184 184 rpci->nreaders --; 185 185 if (!rpci->nreaders) 186 - __rpc_purge_upcall(inode, -EPIPE); 186 + __rpc_purge_upcall(inode, -EAGAIN); 187 187 if (rpci->ops->release_pipe) 188 188 rpci->ops->release_pipe(inode); 189 189 out:
+2
net/sunrpc/xprtsock.c
··· 990 990 sk->sk_data_ready = xs_udp_data_ready; 991 991 sk->sk_write_space = xs_udp_write_space; 992 992 sk->sk_no_check = UDP_CSUM_NORCV; 993 + sk->sk_allocation = GFP_ATOMIC; 993 994 994 995 xprt_set_connected(xprt); 995 996 ··· 1075 1074 sk->sk_data_ready = xs_tcp_data_ready; 1076 1075 sk->sk_state_change = xs_tcp_state_change; 1077 1076 sk->sk_write_space = xs_tcp_write_space; 1077 + sk->sk_allocation = GFP_ATOMIC; 1078 1078 1079 1079 /* socket options */ 1080 1080 sk->sk_userlocks |= SOCK_BINDPORT_LOCK;
+43 -6
net/xfrm/xfrm_policy.c
··· 346 346 struct xfrm_policy *pol, **p; 347 347 struct xfrm_policy *delpol = NULL; 348 348 struct xfrm_policy **newpos = NULL; 349 + struct dst_entry *gc_list; 349 350 350 351 write_lock_bh(&xfrm_policy_lock); 351 352 for (p = &xfrm_policy_list[dir]; (pol=*p)!=NULL;) { ··· 382 381 xfrm_pol_hold(policy); 383 382 write_unlock_bh(&xfrm_policy_lock); 384 383 385 - if (delpol) { 384 + if (delpol) 386 385 xfrm_policy_kill(delpol); 386 + 387 + read_lock_bh(&xfrm_policy_lock); 388 + gc_list = NULL; 389 + for (policy = policy->next; policy; policy = policy->next) { 390 + struct dst_entry *dst; 391 + 392 + write_lock(&policy->lock); 393 + dst = policy->bundles; 394 + if (dst) { 395 + struct dst_entry *tail = dst; 396 + while (tail->next) 397 + tail = tail->next; 398 + tail->next = gc_list; 399 + gc_list = dst; 400 + 401 + policy->bundles = NULL; 402 + } 403 + write_unlock(&policy->lock); 387 404 } 405 + read_unlock_bh(&xfrm_policy_lock); 406 + 407 + while (gc_list) { 408 + struct dst_entry *dst = gc_list; 409 + 410 + gc_list = dst->next; 411 + dst_free(dst); 412 + } 413 + 388 414 return 0; 389 415 } 390 416 EXPORT_SYMBOL(xfrm_policy_insert); ··· 1042 1014 } 1043 1015 EXPORT_SYMBOL(__xfrm_route_forward); 1044 1016 1045 - /* Optimize later using cookies and generation ids. */ 1046 - 1047 1017 static struct dst_entry *xfrm_dst_check(struct dst_entry *dst, u32 cookie) 1048 1018 { 1049 - if (!stale_bundle(dst)) 1050 - return dst; 1051 - 1019 + /* If it is marked obsolete, which is how we even get here, 1020 + * then we have purged it from the policy bundle list and we 1021 + * did that for a good reason. 1022 + */ 1052 1023 return NULL; 1053 1024 } 1054 1025 ··· 1129 1102 { 1130 1103 xfrm_prune_bundles(stale_bundle); 1131 1104 return 0; 1105 + } 1106 + 1107 + static int always_true(struct dst_entry *dst) 1108 + { 1109 + return 1; 1110 + } 1111 + 1112 + void xfrm_flush_all_bundles(void) 1113 + { 1114 + xfrm_prune_bundles(always_true); 1132 1115 } 1133 1116 1134 1117 void xfrm_init_pmtu(struct dst_entry *dst)
+5
net/xfrm/xfrm_state.c
··· 431 431 spin_lock_bh(&xfrm_state_lock); 432 432 __xfrm_state_insert(x); 433 433 spin_unlock_bh(&xfrm_state_lock); 434 + 435 + xfrm_flush_all_bundles(); 434 436 } 435 437 EXPORT_SYMBOL(xfrm_state_insert); 436 438 ··· 479 477 out: 480 478 spin_unlock_bh(&xfrm_state_lock); 481 479 xfrm_state_put_afinfo(afinfo); 480 + 481 + if (!err) 482 + xfrm_flush_all_bundles(); 482 483 483 484 if (x1) { 484 485 xfrm_state_delete(x1);
+1 -1
sound/sparc/Kconfig
··· 1 1 # ALSA Sparc drivers 2 2 3 3 menu "ALSA Sparc devices" 4 - depends on SND!=n && (SPARC32 || SPARC64) 4 + depends on SND!=n && SPARC 5 5 6 6 config SND_SUN_AMD7930 7 7 tristate "Sun AMD7930"