diff options
115 files changed, 936 insertions, 731 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index da6973adacda..6af683025ae0 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -536,7 +536,7 @@ P: Mauro Carvalho Chehab | |||
536 | M: mchehab@brturbo.com.br | 536 | M: mchehab@brturbo.com.br |
537 | L: video4linux-list@redhat.com | 537 | L: video4linux-list@redhat.com |
538 | W: http://linuxtv.org | 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 | S: Maintained | 540 | S: Maintained |
541 | 541 | ||
542 | BUSLOGIC SCSI DRIVER | 542 | BUSLOGIC SCSI DRIVER |
@@ -834,7 +834,7 @@ P: LinuxTV.org Project | |||
834 | M: linux-dvb-maintainer@linuxtv.org | 834 | M: linux-dvb-maintainer@linuxtv.org |
835 | L: linux-dvb@linuxtv.org (subscription required) | 835 | L: linux-dvb@linuxtv.org (subscription required) |
836 | W: http://linuxtv.org/ | 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 | S: Supported | 838 | S: Supported |
839 | 839 | ||
840 | EATA-DMA SCSI DRIVER | 840 | EATA-DMA SCSI DRIVER |
@@ -2896,7 +2896,7 @@ P: Mauro Carvalho Chehab | |||
2896 | M: mchehab@brturbo.com.br | 2896 | M: mchehab@brturbo.com.br |
2897 | L: video4linux-list@redhat.com | 2897 | L: video4linux-list@redhat.com |
2898 | W: http://linuxtv.org | 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 | S: Maintained | 2900 | S: Maintained |
2901 | 2901 | ||
2902 | W1 DALLAS'S 1-WIRE BUS | 2902 | W1 DALLAS'S 1-WIRE BUS |
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S index 2ad4aa2a1536..55076a75e5bf 100644 --- a/arch/arm/kernel/calls.S +++ b/arch/arm/kernel/calls.S | |||
@@ -131,7 +131,7 @@ __syscall_start: | |||
131 | .long sys_wait4 | 131 | .long sys_wait4 |
132 | /* 115 */ .long sys_swapoff | 132 | /* 115 */ .long sys_swapoff |
133 | .long sys_sysinfo | 133 | .long sys_sysinfo |
134 | .long sys_ipc_wrapper | 134 | .long sys_ipc |
135 | .long sys_fsync | 135 | .long sys_fsync |
136 | .long sys_sigreturn_wrapper | 136 | .long sys_sigreturn_wrapper |
137 | /* 120 */ .long sys_clone_wrapper | 137 | /* 120 */ .long sys_clone_wrapper |
@@ -254,7 +254,7 @@ __syscall_start: | |||
254 | .long sys_fremovexattr | 254 | .long sys_fremovexattr |
255 | .long sys_tkill | 255 | .long sys_tkill |
256 | .long sys_sendfile64 | 256 | .long sys_sendfile64 |
257 | /* 240 */ .long sys_futex_wrapper | 257 | /* 240 */ .long sys_futex |
258 | .long sys_sched_setaffinity | 258 | .long sys_sched_setaffinity |
259 | .long sys_sched_getaffinity | 259 | .long sys_sched_getaffinity |
260 | .long sys_io_setup | 260 | .long sys_io_setup |
@@ -284,7 +284,7 @@ __syscall_start: | |||
284 | .long sys_fstatfs64 | 284 | .long sys_fstatfs64 |
285 | .long sys_tgkill | 285 | .long sys_tgkill |
286 | .long sys_utimes | 286 | .long sys_utimes |
287 | /* 270 */ .long sys_arm_fadvise64_64_wrapper | 287 | /* 270 */ .long sys_arm_fadvise64_64 |
288 | .long sys_pciconfig_iobase | 288 | .long sys_pciconfig_iobase |
289 | .long sys_pciconfig_read | 289 | .long sys_pciconfig_read |
290 | .long sys_pciconfig_write | 290 | .long sys_pciconfig_write |
@@ -333,7 +333,7 @@ __syscall_start: | |||
333 | .long sys_inotify_init | 333 | .long sys_inotify_init |
334 | .long sys_inotify_add_watch | 334 | .long sys_inotify_add_watch |
335 | .long sys_inotify_rm_watch | 335 | .long sys_inotify_rm_watch |
336 | .long sys_mbind_wrapper | 336 | .long sys_mbind |
337 | /* 320 */ .long sys_get_mempolicy | 337 | /* 320 */ .long sys_get_mempolicy |
338 | .long sys_set_mempolicy | 338 | .long sys_set_mempolicy |
339 | __syscall_end: | 339 | __syscall_end: |
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index d9fb819bf7cc..2a8d27e18fa7 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -614,6 +614,47 @@ __kuser_helper_start: | |||
614 | /* | 614 | /* |
615 | * Reference prototype: | 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 | * int __kernel_cmpxchg(int oldval, int newval, int *ptr) | 658 | * int __kernel_cmpxchg(int oldval, int newval, int *ptr) |
618 | * | 659 | * |
619 | * Input: | 660 | * Input: |
@@ -642,6 +683,8 @@ __kuser_helper_start: | |||
642 | * The C flag is also set if *ptr was changed to allow for assembly | 683 | * The C flag is also set if *ptr was changed to allow for assembly |
643 | * optimization in the calling code. | 684 | * optimization in the calling code. |
644 | * | 685 | * |
686 | * Note: this routine already includes memory barriers as needed. | ||
687 | * | ||
645 | * For example, a user space atomic_add implementation could look like this: | 688 | * For example, a user space atomic_add implementation could look like this: |
646 | * | 689 | * |
647 | * #define atomic_add(ptr, val) \ | 690 | * #define atomic_add(ptr, val) \ |
@@ -698,10 +741,16 @@ __kuser_cmpxchg: @ 0xffff0fc0 | |||
698 | 741 | ||
699 | #else | 742 | #else |
700 | 743 | ||
744 | #ifdef CONFIG_SMP | ||
745 | mcr p15, 0, r0, c7, c10, 5 @ dmb | ||
746 | #endif | ||
701 | ldrex r3, [r2] | 747 | ldrex r3, [r2] |
702 | subs r3, r3, r0 | 748 | subs r3, r3, r0 |
703 | strexeq r3, r1, [r2] | 749 | strexeq r3, r1, [r2] |
704 | rsbs r0, r3, #0 | 750 | rsbs r0, r3, #0 |
751 | #ifdef CONFIG_SMP | ||
752 | mcr p15, 0, r0, c7, c10, 5 @ dmb | ||
753 | #endif | ||
705 | mov pc, lr | 754 | mov pc, lr |
706 | 755 | ||
707 | #endif | 756 | #endif |
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S index f7f183075237..e2b42997ad33 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S | |||
@@ -145,7 +145,7 @@ ENTRY(vector_swi) | |||
145 | #endif | 145 | #endif |
146 | enable_irq | 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 | get_thread_info tsk | 150 | get_thread_info tsk |
151 | ldr ip, [tsk, #TI_FLAGS] @ check for syscall tracing | 151 | ldr ip, [tsk, #TI_FLAGS] @ check for syscall tracing |
@@ -204,7 +204,7 @@ ENTRY(sys_call_table) | |||
204 | * Special system call wrappers | 204 | * Special system call wrappers |
205 | */ | 205 | */ |
206 | @ r0 = syscall number | 206 | @ r0 = syscall number |
207 | @ r5 = syscall table | 207 | @ r8 = syscall table |
208 | .type sys_syscall, #function | 208 | .type sys_syscall, #function |
209 | sys_syscall: | 209 | sys_syscall: |
210 | eor scno, r0, #__NR_SYSCALL_BASE | 210 | eor scno, r0, #__NR_SYSCALL_BASE |
@@ -255,22 +255,6 @@ sys_sigaltstack_wrapper: | |||
255 | ldr r2, [sp, #S_OFF + S_SP] | 255 | ldr r2, [sp, #S_OFF + S_SP] |
256 | b do_sigaltstack | 256 | b do_sigaltstack |
257 | 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 | |||
274 | /* | 258 | /* |
275 | * Note: off_4k (r5) is always units of 4K. If we can't do the requested | 259 | * Note: off_4k (r5) is always units of 4K. If we can't do the requested |
276 | * offset, we return EINVAL. | 260 | * offset, we return EINVAL. |
diff --git a/arch/i386/pci/Makefile b/arch/i386/pci/Makefile index ead6122dd06d..5461d4d5ea1e 100644 --- a/arch/i386/pci/Makefile +++ b/arch/i386/pci/Makefile | |||
@@ -1,7 +1,7 @@ | |||
1 | obj-y := i386.o | 1 | obj-y := i386.o |
2 | 2 | ||
3 | obj-$(CONFIG_PCI_BIOS) += pcbios.o | 3 | obj-$(CONFIG_PCI_BIOS) += pcbios.o |
4 | obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o | 4 | obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o direct.o |
5 | obj-$(CONFIG_PCI_DIRECT) += direct.o | 5 | obj-$(CONFIG_PCI_DIRECT) += direct.o |
6 | 6 | ||
7 | pci-y := fixup.o | 7 | pci-y := fixup.o |
diff --git a/arch/powerpc/configs/cell_defconfig b/arch/powerpc/configs/cell_defconfig index 4b433411b9e3..b657f7e44762 100644 --- a/arch/powerpc/configs/cell_defconfig +++ b/arch/powerpc/configs/cell_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.15-rc1 | 3 | # Linux kernel version: 2.6.15-rc5 |
4 | # Tue Nov 15 14:36:20 2005 | 4 | # Tue Dec 20 15:59:26 2005 |
5 | # | 5 | # |
6 | CONFIG_PPC64=y | 6 | CONFIG_PPC64=y |
7 | CONFIG_64BIT=y | 7 | CONFIG_64BIT=y |
@@ -53,6 +53,7 @@ CONFIG_KOBJECT_UEVENT=y | |||
53 | # CONFIG_IKCONFIG is not set | 53 | # CONFIG_IKCONFIG is not set |
54 | # CONFIG_CPUSETS is not set | 54 | # CONFIG_CPUSETS is not set |
55 | CONFIG_INITRAMFS_SOURCE="" | 55 | CONFIG_INITRAMFS_SOURCE="" |
56 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
56 | # CONFIG_EMBEDDED is not set | 57 | # CONFIG_EMBEDDED is not set |
57 | CONFIG_KALLSYMS=y | 58 | CONFIG_KALLSYMS=y |
58 | # CONFIG_KALLSYMS_ALL is not set | 59 | # CONFIG_KALLSYMS_ALL is not set |
@@ -151,7 +152,7 @@ CONFIG_FLATMEM_MANUAL=y | |||
151 | CONFIG_FLATMEM=y | 152 | CONFIG_FLATMEM=y |
152 | CONFIG_FLAT_NODE_MEM_MAP=y | 153 | CONFIG_FLAT_NODE_MEM_MAP=y |
153 | # CONFIG_SPARSEMEM_STATIC is not set | 154 | # CONFIG_SPARSEMEM_STATIC is not set |
154 | CONFIG_SPLIT_PTLOCK_CPUS=4096 | 155 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
155 | # CONFIG_PPC_64K_PAGES is not set | 156 | # CONFIG_PPC_64K_PAGES is not set |
156 | CONFIG_SCHED_SMT=y | 157 | CONFIG_SCHED_SMT=y |
157 | CONFIG_PROC_DEVICETREE=y | 158 | CONFIG_PROC_DEVICETREE=y |
diff --git a/arch/powerpc/configs/g5_defconfig b/arch/powerpc/configs/g5_defconfig index e7c23e3902b8..3c22ccb18519 100644 --- a/arch/powerpc/configs/g5_defconfig +++ b/arch/powerpc/configs/g5_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.15-rc1 | 3 | # Linux kernel version: 2.6.15-rc5 |
4 | # Tue Nov 15 14:39:20 2005 | 4 | # Tue Dec 20 15:59:30 2005 |
5 | # | 5 | # |
6 | CONFIG_PPC64=y | 6 | CONFIG_PPC64=y |
7 | CONFIG_64BIT=y | 7 | CONFIG_64BIT=y |
@@ -53,6 +53,7 @@ CONFIG_IKCONFIG=y | |||
53 | CONFIG_IKCONFIG_PROC=y | 53 | CONFIG_IKCONFIG_PROC=y |
54 | # CONFIG_CPUSETS is not set | 54 | # CONFIG_CPUSETS is not set |
55 | CONFIG_INITRAMFS_SOURCE="" | 55 | CONFIG_INITRAMFS_SOURCE="" |
56 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
56 | # CONFIG_EMBEDDED is not set | 57 | # CONFIG_EMBEDDED is not set |
57 | CONFIG_KALLSYMS=y | 58 | CONFIG_KALLSYMS=y |
58 | # CONFIG_KALLSYMS_ALL is not set | 59 | # CONFIG_KALLSYMS_ALL is not set |
@@ -162,7 +163,7 @@ CONFIG_FLATMEM_MANUAL=y | |||
162 | CONFIG_FLATMEM=y | 163 | CONFIG_FLATMEM=y |
163 | CONFIG_FLAT_NODE_MEM_MAP=y | 164 | CONFIG_FLAT_NODE_MEM_MAP=y |
164 | # CONFIG_SPARSEMEM_STATIC is not set | 165 | # CONFIG_SPARSEMEM_STATIC is not set |
165 | CONFIG_SPLIT_PTLOCK_CPUS=4096 | 166 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
166 | # CONFIG_PPC_64K_PAGES is not set | 167 | # CONFIG_PPC_64K_PAGES is not set |
167 | # CONFIG_SCHED_SMT is not set | 168 | # CONFIG_SCHED_SMT is not set |
168 | CONFIG_PROC_DEVICETREE=y | 169 | CONFIG_PROC_DEVICETREE=y |
@@ -1203,6 +1204,7 @@ CONFIG_USB_MON=y | |||
1203 | CONFIG_USB_SERIAL=m | 1204 | CONFIG_USB_SERIAL=m |
1204 | CONFIG_USB_SERIAL_GENERIC=y | 1205 | CONFIG_USB_SERIAL_GENERIC=y |
1205 | # CONFIG_USB_SERIAL_AIRPRIME is not set | 1206 | # CONFIG_USB_SERIAL_AIRPRIME is not set |
1207 | # CONFIG_USB_SERIAL_ANYDATA is not set | ||
1206 | CONFIG_USB_SERIAL_BELKIN=m | 1208 | CONFIG_USB_SERIAL_BELKIN=m |
1207 | CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m | 1209 | CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m |
1208 | # CONFIG_USB_SERIAL_CP2101 is not set | 1210 | # CONFIG_USB_SERIAL_CP2101 is not set |
@@ -1233,7 +1235,6 @@ CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y | |||
1233 | CONFIG_USB_SERIAL_KLSI=m | 1235 | CONFIG_USB_SERIAL_KLSI=m |
1234 | CONFIG_USB_SERIAL_KOBIL_SCT=m | 1236 | CONFIG_USB_SERIAL_KOBIL_SCT=m |
1235 | CONFIG_USB_SERIAL_MCT_U232=m | 1237 | CONFIG_USB_SERIAL_MCT_U232=m |
1236 | # CONFIG_USB_SERIAL_NOKIA_DKU2 is not set | ||
1237 | CONFIG_USB_SERIAL_PL2303=m | 1238 | CONFIG_USB_SERIAL_PL2303=m |
1238 | # CONFIG_USB_SERIAL_HP4X is not set | 1239 | # CONFIG_USB_SERIAL_HP4X is not set |
1239 | CONFIG_USB_SERIAL_SAFE=m | 1240 | CONFIG_USB_SERIAL_SAFE=m |
diff --git a/arch/powerpc/configs/iseries_defconfig b/arch/powerpc/configs/iseries_defconfig index 5d0866707a75..751a622fb7a7 100644 --- a/arch/powerpc/configs/iseries_defconfig +++ b/arch/powerpc/configs/iseries_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.15-rc1 | 3 | # Linux kernel version: 2.6.15-rc5 |
4 | # Tue Nov 15 14:38:09 2005 | 4 | # Tue Dec 20 15:59:32 2005 |
5 | # | 5 | # |
6 | CONFIG_PPC64=y | 6 | CONFIG_PPC64=y |
7 | CONFIG_64BIT=y | 7 | CONFIG_64BIT=y |
@@ -55,6 +55,7 @@ CONFIG_IKCONFIG=y | |||
55 | CONFIG_IKCONFIG_PROC=y | 55 | CONFIG_IKCONFIG_PROC=y |
56 | # CONFIG_CPUSETS is not set | 56 | # CONFIG_CPUSETS is not set |
57 | CONFIG_INITRAMFS_SOURCE="" | 57 | CONFIG_INITRAMFS_SOURCE="" |
58 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
58 | # CONFIG_EMBEDDED is not set | 59 | # CONFIG_EMBEDDED is not set |
59 | CONFIG_KALLSYMS=y | 60 | CONFIG_KALLSYMS=y |
60 | # CONFIG_KALLSYMS_ALL is not set | 61 | # CONFIG_KALLSYMS_ALL is not set |
@@ -144,7 +145,7 @@ CONFIG_FLATMEM_MANUAL=y | |||
144 | CONFIG_FLATMEM=y | 145 | CONFIG_FLATMEM=y |
145 | CONFIG_FLAT_NODE_MEM_MAP=y | 146 | CONFIG_FLAT_NODE_MEM_MAP=y |
146 | # CONFIG_SPARSEMEM_STATIC is not set | 147 | # CONFIG_SPARSEMEM_STATIC is not set |
147 | CONFIG_SPLIT_PTLOCK_CPUS=4096 | 148 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
148 | # CONFIG_PPC_64K_PAGES is not set | 149 | # CONFIG_PPC_64K_PAGES is not set |
149 | # CONFIG_SCHED_SMT is not set | 150 | # CONFIG_SCHED_SMT is not set |
150 | CONFIG_PROC_DEVICETREE=y | 151 | CONFIG_PROC_DEVICETREE=y |
diff --git a/arch/powerpc/configs/maple_defconfig b/arch/powerpc/configs/maple_defconfig index 92e42613ef06..07b6d3d23360 100644 --- a/arch/powerpc/configs/maple_defconfig +++ b/arch/powerpc/configs/maple_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.15-rc1 | 3 | # Linux kernel version: 2.6.15-rc5 |
4 | # Tue Nov 15 14:38:58 2005 | 4 | # Tue Dec 20 15:59:36 2005 |
5 | # | 5 | # |
6 | CONFIG_PPC64=y | 6 | CONFIG_PPC64=y |
7 | CONFIG_64BIT=y | 7 | CONFIG_64BIT=y |
@@ -53,6 +53,7 @@ CONFIG_IKCONFIG=y | |||
53 | CONFIG_IKCONFIG_PROC=y | 53 | CONFIG_IKCONFIG_PROC=y |
54 | # CONFIG_CPUSETS is not set | 54 | # CONFIG_CPUSETS is not set |
55 | CONFIG_INITRAMFS_SOURCE="" | 55 | CONFIG_INITRAMFS_SOURCE="" |
56 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
56 | # CONFIG_EMBEDDED is not set | 57 | # CONFIG_EMBEDDED is not set |
57 | CONFIG_KALLSYMS=y | 58 | CONFIG_KALLSYMS=y |
58 | CONFIG_KALLSYMS_ALL=y | 59 | CONFIG_KALLSYMS_ALL=y |
@@ -149,7 +150,7 @@ CONFIG_FLATMEM_MANUAL=y | |||
149 | CONFIG_FLATMEM=y | 150 | CONFIG_FLATMEM=y |
150 | CONFIG_FLAT_NODE_MEM_MAP=y | 151 | CONFIG_FLAT_NODE_MEM_MAP=y |
151 | # CONFIG_SPARSEMEM_STATIC is not set | 152 | # CONFIG_SPARSEMEM_STATIC is not set |
152 | CONFIG_SPLIT_PTLOCK_CPUS=4096 | 153 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
153 | # CONFIG_PPC_64K_PAGES is not set | 154 | # CONFIG_PPC_64K_PAGES is not set |
154 | # CONFIG_SCHED_SMT is not set | 155 | # CONFIG_SCHED_SMT is not set |
155 | CONFIG_PROC_DEVICETREE=y | 156 | CONFIG_PROC_DEVICETREE=y |
@@ -242,7 +243,6 @@ CONFIG_TCP_CONG_BIC=y | |||
242 | # QoS and/or fair queueing | 243 | # QoS and/or fair queueing |
243 | # | 244 | # |
244 | # CONFIG_NET_SCHED is not set | 245 | # CONFIG_NET_SCHED is not set |
245 | # CONFIG_NET_CLS_ROUTE is not set | ||
246 | 246 | ||
247 | # | 247 | # |
248 | # Network testing | 248 | # Network testing |
@@ -794,6 +794,7 @@ CONFIG_USB_SERIAL=y | |||
794 | # CONFIG_USB_SERIAL_CONSOLE is not set | 794 | # CONFIG_USB_SERIAL_CONSOLE is not set |
795 | CONFIG_USB_SERIAL_GENERIC=y | 795 | CONFIG_USB_SERIAL_GENERIC=y |
796 | # CONFIG_USB_SERIAL_AIRPRIME is not set | 796 | # CONFIG_USB_SERIAL_AIRPRIME is not set |
797 | # CONFIG_USB_SERIAL_ANYDATA is not set | ||
797 | # CONFIG_USB_SERIAL_BELKIN is not set | 798 | # CONFIG_USB_SERIAL_BELKIN is not set |
798 | # CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set | 799 | # CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set |
799 | # CONFIG_USB_SERIAL_CP2101 is not set | 800 | # CONFIG_USB_SERIAL_CP2101 is not set |
@@ -824,7 +825,6 @@ CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y | |||
824 | # CONFIG_USB_SERIAL_KLSI is not set | 825 | # CONFIG_USB_SERIAL_KLSI is not set |
825 | # CONFIG_USB_SERIAL_KOBIL_SCT is not set | 826 | # CONFIG_USB_SERIAL_KOBIL_SCT is not set |
826 | # CONFIG_USB_SERIAL_MCT_U232 is not set | 827 | # CONFIG_USB_SERIAL_MCT_U232 is not set |
827 | # CONFIG_USB_SERIAL_NOKIA_DKU2 is not set | ||
828 | # CONFIG_USB_SERIAL_PL2303 is not set | 828 | # CONFIG_USB_SERIAL_PL2303 is not set |
829 | # CONFIG_USB_SERIAL_HP4X is not set | 829 | # CONFIG_USB_SERIAL_HP4X is not set |
830 | # CONFIG_USB_SERIAL_SAFE is not set | 830 | # CONFIG_USB_SERIAL_SAFE is not set |
diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig index b5ba3bbd96fb..509399eab6f5 100644 --- a/arch/powerpc/configs/ppc64_defconfig +++ b/arch/powerpc/configs/ppc64_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.15-rc1 | 3 | # Linux kernel version: 2.6.15-rc5 |
4 | # Fri Nov 18 16:23:24 2005 | 4 | # Tue Dec 20 15:59:38 2005 |
5 | # | 5 | # |
6 | CONFIG_PPC64=y | 6 | CONFIG_PPC64=y |
7 | CONFIG_64BIT=y | 7 | CONFIG_64BIT=y |
@@ -54,6 +54,7 @@ CONFIG_IKCONFIG=y | |||
54 | CONFIG_IKCONFIG_PROC=y | 54 | CONFIG_IKCONFIG_PROC=y |
55 | CONFIG_CPUSETS=y | 55 | CONFIG_CPUSETS=y |
56 | CONFIG_INITRAMFS_SOURCE="" | 56 | CONFIG_INITRAMFS_SOURCE="" |
57 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
57 | # CONFIG_EMBEDDED is not set | 58 | # CONFIG_EMBEDDED is not set |
58 | CONFIG_KALLSYMS=y | 59 | CONFIG_KALLSYMS=y |
59 | CONFIG_KALLSYMS_ALL=y | 60 | CONFIG_KALLSYMS_ALL=y |
@@ -176,7 +177,7 @@ CONFIG_HAVE_MEMORY_PRESENT=y | |||
176 | # CONFIG_SPARSEMEM_STATIC is not set | 177 | # CONFIG_SPARSEMEM_STATIC is not set |
177 | CONFIG_SPARSEMEM_EXTREME=y | 178 | CONFIG_SPARSEMEM_EXTREME=y |
178 | # CONFIG_MEMORY_HOTPLUG is not set | 179 | # CONFIG_MEMORY_HOTPLUG is not set |
179 | CONFIG_SPLIT_PTLOCK_CPUS=4096 | 180 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
180 | # CONFIG_PPC_64K_PAGES is not set | 181 | # CONFIG_PPC_64K_PAGES is not set |
181 | # CONFIG_SCHED_SMT is not set | 182 | # CONFIG_SCHED_SMT is not set |
182 | CONFIG_PROC_DEVICETREE=y | 183 | CONFIG_PROC_DEVICETREE=y |
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig index b589b196eb3f..a50ce0fa9243 100644 --- a/arch/powerpc/configs/pseries_defconfig +++ b/arch/powerpc/configs/pseries_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.15-rc1 | 3 | # Linux kernel version: 2.6.15-rc5 |
4 | # Tue Nov 15 14:36:55 2005 | 4 | # Tue Dec 20 15:59:40 2005 |
5 | # | 5 | # |
6 | CONFIG_PPC64=y | 6 | CONFIG_PPC64=y |
7 | CONFIG_64BIT=y | 7 | CONFIG_64BIT=y |
@@ -55,6 +55,7 @@ CONFIG_IKCONFIG=y | |||
55 | CONFIG_IKCONFIG_PROC=y | 55 | CONFIG_IKCONFIG_PROC=y |
56 | CONFIG_CPUSETS=y | 56 | CONFIG_CPUSETS=y |
57 | CONFIG_INITRAMFS_SOURCE="" | 57 | CONFIG_INITRAMFS_SOURCE="" |
58 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
58 | # CONFIG_EMBEDDED is not set | 59 | # CONFIG_EMBEDDED is not set |
59 | CONFIG_KALLSYMS=y | 60 | CONFIG_KALLSYMS=y |
60 | CONFIG_KALLSYMS_ALL=y | 61 | CONFIG_KALLSYMS_ALL=y |
@@ -163,7 +164,7 @@ CONFIG_HAVE_MEMORY_PRESENT=y | |||
163 | # CONFIG_SPARSEMEM_STATIC is not set | 164 | # CONFIG_SPARSEMEM_STATIC is not set |
164 | CONFIG_SPARSEMEM_EXTREME=y | 165 | CONFIG_SPARSEMEM_EXTREME=y |
165 | # CONFIG_MEMORY_HOTPLUG is not set | 166 | # CONFIG_MEMORY_HOTPLUG is not set |
166 | CONFIG_SPLIT_PTLOCK_CPUS=4096 | 167 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
167 | CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y | 168 | CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y |
168 | # CONFIG_PPC_64K_PAGES is not set | 169 | # CONFIG_PPC_64K_PAGES is not set |
169 | CONFIG_SCHED_SMT=y | 170 | CONFIG_SCHED_SMT=y |
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index 2d22bf03484e..bce33a38399f 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S | |||
@@ -183,8 +183,8 @@ syscall_exit_trace_cont: | |||
183 | ld r13,GPR13(r1) /* returning to usermode */ | 183 | ld r13,GPR13(r1) /* returning to usermode */ |
184 | 1: ld r2,GPR2(r1) | 184 | 1: ld r2,GPR2(r1) |
185 | li r12,MSR_RI | 185 | li r12,MSR_RI |
186 | andc r10,r10,r12 | 186 | andc r11,r10,r12 |
187 | mtmsrd r10,1 /* clear MSR.RI */ | 187 | mtmsrd r11,1 /* clear MSR.RI */ |
188 | ld r1,GPR1(r1) | 188 | ld r1,GPR1(r1) |
189 | mtlr r4 | 189 | mtlr r4 |
190 | mtcr r5 | 190 | mtcr r5 |
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c index 72ac18067ece..0377decc0719 100644 --- a/arch/powerpc/platforms/pseries/xics.c +++ b/arch/powerpc/platforms/pseries/xics.c | |||
@@ -48,11 +48,6 @@ static struct hw_interrupt_type xics_pic = { | |||
48 | .set_affinity = xics_set_affinity | 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 | /* This is used to map real irq numbers to virtual */ | 51 | /* This is used to map real irq numbers to virtual */ |
57 | static struct radix_tree_root irq_map = RADIX_TREE_INIT(GFP_ATOMIC); | 52 | static struct radix_tree_root irq_map = RADIX_TREE_INIT(GFP_ATOMIC); |
58 | 53 | ||
@@ -367,12 +362,7 @@ int xics_get_irq(struct pt_regs *regs) | |||
367 | /* for sanity, this had better be < NR_IRQS - 16 */ | 362 | /* for sanity, this had better be < NR_IRQS - 16 */ |
368 | if (vec == xics_irq_8259_cascade_real) { | 363 | if (vec == xics_irq_8259_cascade_real) { |
369 | irq = i8259_irq(regs); | 364 | irq = i8259_irq(regs); |
370 | if (irq == -1) { | 365 | xics_end_irq(irq_offset_up(xics_irq_8259_cascade)); |
371 | /* Spurious cascaded interrupt. Still must ack xics */ | ||
372 | xics_end_irq(irq_offset_up(xics_irq_8259_cascade)); | ||
373 | |||
374 | irq = -1; | ||
375 | } | ||
376 | } else if (vec == XICS_IRQ_SPURIOUS) { | 366 | } else if (vec == XICS_IRQ_SPURIOUS) { |
377 | irq = -1; | 367 | irq = -1; |
378 | } else { | 368 | } else { |
@@ -542,6 +532,7 @@ nextnode: | |||
542 | xics_irq_8259_cascade_real = *ireg; | 532 | xics_irq_8259_cascade_real = *ireg; |
543 | xics_irq_8259_cascade | 533 | xics_irq_8259_cascade |
544 | = virt_irq_create_mapping(xics_irq_8259_cascade_real); | 534 | = virt_irq_create_mapping(xics_irq_8259_cascade_real); |
535 | i8259_init(0, 0); | ||
545 | of_node_put(np); | 536 | of_node_put(np); |
546 | } | 537 | } |
547 | 538 | ||
@@ -565,12 +556,7 @@ nextnode: | |||
565 | #endif /* CONFIG_SMP */ | 556 | #endif /* CONFIG_SMP */ |
566 | } | 557 | } |
567 | 558 | ||
568 | xics_8259_pic.enable = i8259_pic.enable; | 559 | for (i = irq_offset_value(); i < NR_IRQS; ++i) |
569 | xics_8259_pic.disable = i8259_pic.disable; | ||
570 | xics_8259_pic.end = i8259_pic.end; | ||
571 | for (i = 0; i < 16; ++i) | ||
572 | get_irq_desc(i)->handler = &xics_8259_pic; | ||
573 | for (; i < NR_IRQS; ++i) | ||
574 | get_irq_desc(i)->handler = &xics_pic; | 560 | get_irq_desc(i)->handler = &xics_pic; |
575 | 561 | ||
576 | xics_setup_cpu(); | 562 | xics_setup_cpu(); |
@@ -590,7 +576,6 @@ static int __init xics_setup_i8259(void) | |||
590 | no_action, 0, "8259 cascade", NULL)) | 576 | no_action, 0, "8259 cascade", NULL)) |
591 | printk(KERN_ERR "xics_setup_i8259: couldn't get 8259 " | 577 | printk(KERN_ERR "xics_setup_i8259: couldn't get 8259 " |
592 | "cascade\n"); | 578 | "cascade\n"); |
593 | i8259_init(0, 0); | ||
594 | } | 579 | } |
595 | return 0; | 580 | return 0; |
596 | } | 581 | } |
diff --git a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c index d8991b88dc9c..5e8cc5ec6ab5 100644 --- a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c +++ b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c | |||
@@ -130,10 +130,11 @@ mpc85xx_cds_show_cpuinfo(struct seq_file *m) | |||
130 | } | 130 | } |
131 | 131 | ||
132 | #ifdef CONFIG_CPM2 | 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 | while((irq = cpm2_get_irq(regs)) >= 0) | 135 | while((irq = cpm2_get_irq(regs)) >= 0) |
136 | __do_IRQ(irq, regs); | 136 | __do_IRQ(irq, regs); |
137 | return IRQ_HANDLED; | ||
137 | } | 138 | } |
138 | 139 | ||
139 | static struct irqaction cpm2_irqaction = { | 140 | static struct irqaction cpm2_irqaction = { |
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index 3cfb8be3ff6d..56c34e7fd4ee 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig | |||
@@ -55,6 +55,10 @@ config NR_CPUS | |||
55 | depends on SMP | 55 | depends on SMP |
56 | default "32" | 56 | default "32" |
57 | 57 | ||
58 | config SPARC | ||
59 | bool | ||
60 | default y | ||
61 | |||
58 | # Identify this as a Sparc32 build | 62 | # Identify this as a Sparc32 build |
59 | config SPARC32 | 63 | config SPARC32 |
60 | bool | 64 | bool |
diff --git a/arch/sparc/kernel/sys_sunos.c b/arch/sparc/kernel/sys_sunos.c index 81c894acd0db..d07ae02101ad 100644 --- a/arch/sparc/kernel/sys_sunos.c +++ b/arch/sparc/kernel/sys_sunos.c | |||
@@ -894,7 +894,7 @@ asmlinkage long sunos_sysconf (int name) | |||
894 | ret = ARG_MAX; | 894 | ret = ARG_MAX; |
895 | break; | 895 | break; |
896 | case _SC_CHILD_MAX: | 896 | case _SC_CHILD_MAX: |
897 | ret = CHILD_MAX; | 897 | ret = -1; /* no limit */ |
898 | break; | 898 | break; |
899 | case _SC_CLK_TCK: | 899 | case _SC_CLK_TCK: |
900 | ret = HZ; | 900 | ret = HZ; |
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig index 3fded69b1922..c4b7ad70cd7c 100644 --- a/arch/sparc64/Kconfig +++ b/arch/sparc64/Kconfig | |||
@@ -5,6 +5,10 @@ | |||
5 | 5 | ||
6 | mainmenu "Linux/UltraSPARC Kernel Configuration" | 6 | mainmenu "Linux/UltraSPARC Kernel Configuration" |
7 | 7 | ||
8 | config SPARC | ||
9 | bool | ||
10 | default y | ||
11 | |||
8 | config SPARC64 | 12 | config SPARC64 |
9 | bool | 13 | bool |
10 | default y | 14 | default y |
diff --git a/arch/sparc64/Makefile b/arch/sparc64/Makefile index 43fe382da078..cad10c5b83d3 100644 --- a/arch/sparc64/Makefile +++ b/arch/sparc64/Makefile | |||
@@ -17,7 +17,6 @@ CC := $(shell if $(CC) -m64 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then | |||
17 | NEW_GCC := $(call cc-option-yn, -m64 -mcmodel=medlow) | 17 | NEW_GCC := $(call cc-option-yn, -m64 -mcmodel=medlow) |
18 | NEW_GAS := $(shell if $(LD) -V 2>&1 | grep 'elf64_sparc' > /dev/null; then echo y; else echo n; fi) | 18 | NEW_GAS := $(shell if $(LD) -V 2>&1 | grep 'elf64_sparc' > /dev/null; then echo y; else echo n; fi) |
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; ) | 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 | export NEW_GCC | 21 | export NEW_GCC |
23 | 22 | ||
@@ -49,10 +48,6 @@ else | |||
49 | AFLAGS += -m64 -mcpu=ultrasparc $(CC_UNDECL) | 48 | AFLAGS += -m64 -mcpu=ultrasparc $(CC_UNDECL) |
50 | endif | 49 | endif |
51 | 50 | ||
52 | ifeq ($(INLINE_LIMIT),y) | ||
53 | CFLAGS := $(CFLAGS) -finline-limit=100000 | ||
54 | endif | ||
55 | |||
56 | ifeq ($(CONFIG_MCOUNT),y) | 51 | ifeq ($(CONFIG_MCOUNT),y) |
57 | CFLAGS := $(CFLAGS) -pg | 52 | CFLAGS := $(CFLAGS) -pg |
58 | endif | 53 | endif |
diff --git a/arch/sparc64/kernel/sys_sunos32.c b/arch/sparc64/kernel/sys_sunos32.c index d0592ed54ea5..bfa4aa68312d 100644 --- a/arch/sparc64/kernel/sys_sunos32.c +++ b/arch/sparc64/kernel/sys_sunos32.c | |||
@@ -854,7 +854,7 @@ asmlinkage s32 sunos_sysconf (int name) | |||
854 | ret = ARG_MAX; | 854 | ret = ARG_MAX; |
855 | break; | 855 | break; |
856 | case _SC_CHILD_MAX: | 856 | case _SC_CHILD_MAX: |
857 | ret = CHILD_MAX; | 857 | ret = -1; /* no limit */ |
858 | break; | 858 | break; |
859 | case _SC_CLK_TCK: | 859 | case _SC_CLK_TCK: |
860 | ret = HZ; | 860 | ret = HZ; |
diff --git a/arch/sparc64/solaris/misc.c b/arch/sparc64/solaris/misc.c index 302efbcba70e..3ab4677395f2 100644 --- a/arch/sparc64/solaris/misc.c +++ b/arch/sparc64/solaris/misc.c | |||
@@ -353,7 +353,7 @@ asmlinkage int solaris_sysconf(int id) | |||
353 | { | 353 | { |
354 | switch (id) { | 354 | switch (id) { |
355 | case SOLARIS_CONFIG_NGROUPS: return NGROUPS_MAX; | 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 | case SOLARIS_CONFIG_OPEN_FILES: return OPEN_MAX; | 357 | case SOLARIS_CONFIG_OPEN_FILES: return OPEN_MAX; |
358 | case SOLARIS_CONFIG_POSIX_VER: return 199309; | 358 | case SOLARIS_CONFIG_POSIX_VER: return 199309; |
359 | case SOLARIS_CONFIG_PAGESIZE: return PAGE_SIZE; | 359 | case SOLARIS_CONFIG_PAGESIZE: return PAGE_SIZE; |
diff --git a/arch/x86_64/pci/Makefile b/arch/x86_64/pci/Makefile index bb34e5ef916c..a8f75a2a0f6f 100644 --- a/arch/x86_64/pci/Makefile +++ b/arch/x86_64/pci/Makefile | |||
@@ -11,7 +11,7 @@ obj-y += fixup.o | |||
11 | obj-$(CONFIG_ACPI) += acpi.o | 11 | obj-$(CONFIG_ACPI) += acpi.o |
12 | obj-y += legacy.o irq.o common.o | 12 | obj-y += legacy.o irq.o common.o |
13 | # mmconfig has a 64bit special | 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 | obj-$(CONFIG_NUMA) += k8-bus.o | 16 | obj-$(CONFIG_NUMA) += k8-bus.o |
17 | 17 | ||
diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c index 382dea7b224c..6e7db2e79f42 100644 --- a/block/scsi_ioctl.c +++ b/block/scsi_ioctl.c | |||
@@ -442,11 +442,37 @@ error: | |||
442 | return err; | 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 | int scsi_cmd_ioctl(struct file *file, struct gendisk *bd_disk, unsigned int cmd, void __user *arg) | 472 | int scsi_cmd_ioctl(struct file *file, struct gendisk *bd_disk, unsigned int cmd, void __user *arg) |
446 | { | 473 | { |
447 | request_queue_t *q; | 474 | request_queue_t *q; |
448 | struct request *rq; | 475 | int err; |
449 | int close = 0, err; | ||
450 | 476 | ||
451 | q = bd_disk->queue; | 477 | q = bd_disk->queue; |
452 | if (!q) | 478 | if (!q) |
@@ -564,19 +590,10 @@ int scsi_cmd_ioctl(struct file *file, struct gendisk *bd_disk, unsigned int cmd, | |||
564 | err = sg_scsi_ioctl(file, q, bd_disk, arg); | 590 | err = sg_scsi_ioctl(file, q, bd_disk, arg); |
565 | break; | 591 | break; |
566 | case CDROMCLOSETRAY: | 592 | case CDROMCLOSETRAY: |
567 | close = 1; | 593 | err = blk_send_start_stop(q, bd_disk, 0x03); |
594 | break; | ||
568 | case CDROMEJECT: | 595 | case CDROMEJECT: |
569 | rq = blk_get_request(q, WRITE, __GFP_WAIT); | 596 | err = blk_send_start_stop(q, bd_disk, 0x02); |
570 | rq->flags |= REQ_BLOCK_PC; | ||
571 | rq->data = NULL; | ||
572 | rq->data_len = 0; | ||
573 | rq->timeout = BLK_DEFAULT_TIMEOUT; | ||
574 | memset(rq->cmd, 0, sizeof(rq->cmd)); | ||
575 | rq->cmd[0] = GPCMD_START_STOP_UNIT; | ||
576 | rq->cmd[4] = 0x02 + (close != 0); | ||
577 | rq->cmd_len = 6; | ||
578 | err = blk_execute_rq(q, bd_disk, rq, 0); | ||
579 | blk_put_request(rq); | ||
580 | break; | 597 | break; |
581 | default: | 598 | default: |
582 | err = -ENOTTY; | 599 | err = -ENOTTY; |
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 5f51057518b0..807b0df308f1 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
@@ -274,8 +274,6 @@ static void acpi_processor_idle(void) | |||
274 | } | 274 | } |
275 | } | 275 | } |
276 | 276 | ||
277 | cx->usage++; | ||
278 | |||
279 | #ifdef CONFIG_HOTPLUG_CPU | 277 | #ifdef CONFIG_HOTPLUG_CPU |
280 | /* | 278 | /* |
281 | * Check for P_LVL2_UP flag before entering C2 and above on | 279 | * Check for P_LVL2_UP flag before entering C2 and above on |
@@ -283,9 +281,12 @@ static void acpi_processor_idle(void) | |||
283 | * detection phase, to work cleanly with logical CPU hotplug. | 281 | * detection phase, to work cleanly with logical CPU hotplug. |
284 | */ | 282 | */ |
285 | if ((cx->type != ACPI_STATE_C1) && (num_online_cpus() > 1) && | 283 | if ((cx->type != ACPI_STATE_C1) && (num_online_cpus() > 1) && |
286 | !pr->flags.has_cst && acpi_fadt.plvl2_up) | 284 | !pr->flags.has_cst && !acpi_fadt.plvl2_up) |
287 | cx->type = ACPI_STATE_C1; | 285 | cx = &pr->power.states[ACPI_STATE_C1]; |
288 | #endif | 286 | #endif |
287 | |||
288 | cx->usage++; | ||
289 | |||
289 | /* | 290 | /* |
290 | * Sleep: | 291 | * Sleep: |
291 | * ------ | 292 | * ------ |
@@ -386,6 +387,15 @@ static void acpi_processor_idle(void) | |||
386 | 387 | ||
387 | next_state = pr->power.state; | 388 | next_state = pr->power.state; |
388 | 389 | ||
390 | #ifdef CONFIG_HOTPLUG_CPU | ||
391 | /* Don't do promotion/demotion */ | ||
392 | if ((cx->type == ACPI_STATE_C1) && (num_online_cpus() > 1) && | ||
393 | !pr->flags.has_cst && !acpi_fadt.plvl2_up) { | ||
394 | next_state = cx; | ||
395 | goto end; | ||
396 | } | ||
397 | #endif | ||
398 | |||
389 | /* | 399 | /* |
390 | * Promotion? | 400 | * Promotion? |
391 | * ---------- | 401 | * ---------- |
@@ -557,7 +567,7 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr) | |||
557 | * Check for P_LVL2_UP flag before entering C2 and above on | 567 | * Check for P_LVL2_UP flag before entering C2 and above on |
558 | * an SMP system. | 568 | * an SMP system. |
559 | */ | 569 | */ |
560 | if ((num_online_cpus() > 1) && acpi_fadt.plvl2_up) | 570 | if ((num_online_cpus() > 1) && !acpi_fadt.plvl2_up) |
561 | return_VALUE(-ENODEV); | 571 | return_VALUE(-ENODEV); |
562 | #endif | 572 | #endif |
563 | 573 | ||
diff --git a/drivers/acpi/processor_thermal.c b/drivers/acpi/processor_thermal.c index f37584015324..dc9817cfb882 100644 --- a/drivers/acpi/processor_thermal.c +++ b/drivers/acpi/processor_thermal.c | |||
@@ -102,8 +102,8 @@ static int cpu_has_cpufreq(unsigned int cpu) | |||
102 | { | 102 | { |
103 | struct cpufreq_policy policy; | 103 | struct cpufreq_policy policy; |
104 | if (!acpi_thermal_cpufreq_is_init || cpufreq_get_policy(&policy, cpu)) | 104 | if (!acpi_thermal_cpufreq_is_init || cpufreq_get_policy(&policy, cpu)) |
105 | return -ENODEV; | 105 | return 0; |
106 | return 0; | 106 | return 1; |
107 | } | 107 | } |
108 | 108 | ||
109 | static int acpi_thermal_cpufreq_increase(unsigned int cpu) | 109 | static int acpi_thermal_cpufreq_increase(unsigned int cpu) |
diff --git a/drivers/acpi/utilities/utmisc.c b/drivers/acpi/utilities/utmisc.c index 0c5abc536c7a..2ce872d75890 100644 --- a/drivers/acpi/utilities/utmisc.c +++ b/drivers/acpi/utilities/utmisc.c | |||
@@ -84,14 +84,14 @@ acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id) | |||
84 | 84 | ||
85 | /* Find a free owner ID */ | 85 | /* Find a free owner ID */ |
86 | 86 | ||
87 | for (i = 0; i < 32; i++) { | 87 | for (i = 0; i < 64; i++) { |
88 | if (!(acpi_gbl_owner_id_mask & (1 << i))) { | 88 | if (!(acpi_gbl_owner_id_mask & (1ULL << i))) { |
89 | ACPI_DEBUG_PRINT((ACPI_DB_VALUES, | 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 | acpi_gbl_owner_id_mask, | 91 | acpi_gbl_owner_id_mask, |
92 | (unsigned int)(i + 1))); | 92 | (unsigned int)(i + 1))); |
93 | 93 | ||
94 | acpi_gbl_owner_id_mask |= (1 << i); | 94 | acpi_gbl_owner_id_mask |= (1ULL << i); |
95 | *owner_id = (acpi_owner_id) (i + 1); | 95 | *owner_id = (acpi_owner_id) (i + 1); |
96 | goto exit; | 96 | goto exit; |
97 | } | 97 | } |
@@ -106,7 +106,7 @@ acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id) | |||
106 | */ | 106 | */ |
107 | *owner_id = 0; | 107 | *owner_id = 0; |
108 | status = AE_OWNER_ID_LIMIT; | 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 | exit: | 111 | exit: |
112 | (void)acpi_ut_release_mutex(ACPI_MTX_CACHES); | 112 | (void)acpi_ut_release_mutex(ACPI_MTX_CACHES); |
@@ -123,7 +123,7 @@ acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id) | |||
123 | * control method or unloading a table. Either way, we would | 123 | * control method or unloading a table. Either way, we would |
124 | * ignore any error anyway. | 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,7 +140,7 @@ void acpi_ut_release_owner_id(acpi_owner_id * owner_id_ptr) | |||
140 | 140 | ||
141 | /* Zero is not a valid owner_iD */ | 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 | ACPI_REPORT_ERROR(("Invalid owner_id: %2.2X\n", owner_id)); | 144 | ACPI_REPORT_ERROR(("Invalid owner_id: %2.2X\n", owner_id)); |
145 | return_VOID; | 145 | return_VOID; |
146 | } | 146 | } |
@@ -158,8 +158,8 @@ void acpi_ut_release_owner_id(acpi_owner_id * owner_id_ptr) | |||
158 | 158 | ||
159 | /* Free the owner ID only if it is valid */ | 159 | /* Free the owner ID only if it is valid */ |
160 | 160 | ||
161 | if (acpi_gbl_owner_id_mask & (1 << owner_id)) { | 161 | if (acpi_gbl_owner_id_mask & (1ULL << owner_id)) { |
162 | acpi_gbl_owner_id_mask ^= (1 << owner_id); | 162 | acpi_gbl_owner_id_mask ^= (1ULL << owner_id); |
163 | } | 163 | } |
164 | 164 | ||
165 | (void)acpi_ut_release_mutex(ACPI_MTX_CACHES); | 165 | (void)acpi_ut_release_mutex(ACPI_MTX_CACHES); |
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index b46a72d782d6..84e68cdd451b 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig | |||
@@ -687,7 +687,7 @@ config NVRAM | |||
687 | 687 | ||
688 | config RTC | 688 | config RTC |
689 | tristate "Enhanced Real Time Clock Support" | 689 | tristate "Enhanced Real Time Clock Support" |
690 | depends on !PPC32 && !PARISC && !IA64 && !M68K | 690 | depends on !PPC32 && !PARISC && !IA64 && !M68K && (!SPARC || PCI) |
691 | ---help--- | 691 | ---help--- |
692 | If you say Y here and create a character special file /dev/rtc with | 692 | If you say Y here and create a character special file /dev/rtc with |
693 | major number 10 and minor number 135 using mknod ("man mknod"), you | 693 | major number 10 and minor number 135 using mknod ("man mknod"), you |
@@ -735,7 +735,7 @@ config SGI_IP27_RTC | |||
735 | 735 | ||
736 | config GEN_RTC | 736 | config GEN_RTC |
737 | tristate "Generic /dev/rtc emulation" | 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 | ---help--- | 739 | ---help--- |
740 | If you say Y here and create a character special file /dev/rtc with | 740 | If you say Y here and create a character special file /dev/rtc with |
741 | major number 10 and minor number 135 using mknod ("man mknod"), you | 741 | major number 10 and minor number 135 using mknod ("man mknod"), you |
diff --git a/drivers/char/keyboard.c b/drivers/char/keyboard.c index 449d029ad4f4..8b603b2d1c42 100644 --- a/drivers/char/keyboard.c +++ b/drivers/char/keyboard.c | |||
@@ -930,8 +930,8 @@ static void kbd_refresh_leds(struct input_handle *handle) | |||
930 | } | 930 | } |
931 | 931 | ||
932 | #if defined(CONFIG_X86) || defined(CONFIG_IA64) || defined(CONFIG_ALPHA) ||\ | 932 | #if defined(CONFIG_X86) || defined(CONFIG_IA64) || defined(CONFIG_ALPHA) ||\ |
933 | defined(CONFIG_MIPS) || defined(CONFIG_PPC) || defined(CONFIG_SPARC32) ||\ | 933 | defined(CONFIG_MIPS) || defined(CONFIG_PPC) || defined(CONFIG_SPARC) ||\ |
934 | defined(CONFIG_SPARC64) || defined(CONFIG_PARISC) || defined(CONFIG_SUPERH) ||\ | 934 | defined(CONFIG_PARISC) || defined(CONFIG_SUPERH) ||\ |
935 | (defined(CONFIG_ARM) && defined(CONFIG_KEYBOARD_ATKBD) && !defined(CONFIG_ARCH_RPC)) | 935 | (defined(CONFIG_ARM) && defined(CONFIG_KEYBOARD_ATKBD) && !defined(CONFIG_ARCH_RPC)) |
936 | 936 | ||
937 | #define HW_RAW(dev) (test_bit(EV_MSC, dev->evbit) && test_bit(MSC_RAW, dev->mscbit) &&\ | 937 | #define HW_RAW(dev) (test_bit(EV_MSC, dev->evbit) && test_bit(MSC_RAW, dev->mscbit) &&\ |
@@ -958,7 +958,7 @@ static unsigned short x86_keycodes[256] = | |||
958 | extern int mac_hid_mouse_emulate_buttons(int, int, int); | 958 | extern int mac_hid_mouse_emulate_buttons(int, int, int); |
959 | #endif /* CONFIG_MAC_EMUMOUSEBTN */ | 959 | #endif /* CONFIG_MAC_EMUMOUSEBTN */ |
960 | 960 | ||
961 | #if defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64) | 961 | #ifdef CONFIG_SPARC |
962 | static int sparc_l1_a_state = 0; | 962 | static int sparc_l1_a_state = 0; |
963 | extern void sun_do_break(void); | 963 | extern void sun_do_break(void); |
964 | #endif | 964 | #endif |
@@ -1045,7 +1045,7 @@ static void kbd_keycode(unsigned int keycode, int down, | |||
1045 | 1045 | ||
1046 | if (keycode == KEY_LEFTALT || keycode == KEY_RIGHTALT) | 1046 | if (keycode == KEY_LEFTALT || keycode == KEY_RIGHTALT) |
1047 | sysrq_alt = down; | 1047 | sysrq_alt = down; |
1048 | #if defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64) | 1048 | #ifdef CONFIG_SPARC |
1049 | if (keycode == KEY_STOP) | 1049 | if (keycode == KEY_STOP) |
1050 | sparc_l1_a_state = down; | 1050 | sparc_l1_a_state = down; |
1051 | #endif | 1051 | #endif |
@@ -1072,7 +1072,7 @@ static void kbd_keycode(unsigned int keycode, int down, | |||
1072 | return; | 1072 | return; |
1073 | } | 1073 | } |
1074 | #endif | 1074 | #endif |
1075 | #if defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64) | 1075 | #ifdef CONFIG_SPARC |
1076 | if (keycode == KEY_A && sparc_l1_a_state) { | 1076 | if (keycode == KEY_A && sparc_l1_a_state) { |
1077 | sparc_l1_a_state = 0; | 1077 | sparc_l1_a_state = 0; |
1078 | sun_do_break(); | 1078 | sun_do_break(); |
diff --git a/drivers/fc4/Kconfig b/drivers/fc4/Kconfig index f00c02a13ed6..345dbe6f10df 100644 --- a/drivers/fc4/Kconfig +++ b/drivers/fc4/Kconfig | |||
@@ -26,7 +26,7 @@ comment "FC4 drivers" | |||
26 | 26 | ||
27 | config FC4_SOC | 27 | config FC4_SOC |
28 | tristate "Sun SOC/Sbus" | 28 | tristate "Sun SOC/Sbus" |
29 | depends on FC4!=n && (SPARC32 || SPARC64) | 29 | depends on FC4!=n && SPARC |
30 | help | 30 | help |
31 | Serial Optical Channel is an interface card with one or two Fibre | 31 | Serial Optical Channel is an interface card with one or two Fibre |
32 | Optic ports, each of which can be connected to a disk array. Note | 32 | Optic ports, each of which can be connected to a disk array. Note |
@@ -38,7 +38,7 @@ config FC4_SOC | |||
38 | 38 | ||
39 | config FC4_SOCAL | 39 | config FC4_SOCAL |
40 | tristate "Sun SOC+ (aka SOCAL)" | 40 | tristate "Sun SOC+ (aka SOCAL)" |
41 | depends on FC4!=n && (SPARC32 || SPARC64) | 41 | depends on FC4!=n && SPARC |
42 | ---help--- | 42 | ---help--- |
43 | Serial Optical Channel Plus is an interface card with up to two | 43 | Serial Optical Channel Plus is an interface card with up to two |
44 | Fibre Optic ports. This card supports FC Arbitrated Loop (usually | 44 | Fibre Optic ports. This card supports FC Arbitrated Loop (usually |
@@ -62,7 +62,7 @@ config SCSI_PLUTO | |||
62 | be called pluto. | 62 | be called pluto. |
63 | 63 | ||
64 | config SCSI_FCAL | 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 | depends on FC4!=n && SCSI | 66 | depends on FC4!=n && SCSI |
67 | help | 67 | help |
68 | This driver drives FC-AL disks connected through a Fibre Channel | 68 | This driver drives FC-AL disks connected through a Fibre Channel |
@@ -75,7 +75,7 @@ config SCSI_FCAL | |||
75 | 75 | ||
76 | config SCSI_FCAL | 76 | config SCSI_FCAL |
77 | prompt "Generic FC-AL disk driver" | 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 | endmenu | 80 | endmenu |
81 | 81 | ||
diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index 07813fc0523f..e08dbe08f46d 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig | |||
@@ -26,7 +26,7 @@ config INPUT_PCSPKR | |||
26 | 26 | ||
27 | config INPUT_SPARCSPKR | 27 | config INPUT_SPARCSPKR |
28 | tristate "SPARC Speaker support" | 28 | tristate "SPARC Speaker support" |
29 | depends on PCI && (SPARC32 || SPARC64) | 29 | depends on PCI && SPARC |
30 | help | 30 | help |
31 | Say Y here if you want the standard Speaker on Sparc PCI systems | 31 | Say Y here if you want the standard Speaker on Sparc PCI systems |
32 | to be used for bells and whistles. | 32 | to be used for bells and whistles. |
diff --git a/drivers/input/serio/i8042.h b/drivers/input/serio/i8042.h index 13835039a2a7..cbbf3842da5b 100644 --- a/drivers/input/serio/i8042.h +++ b/drivers/input/serio/i8042.h | |||
@@ -21,7 +21,7 @@ | |||
21 | #include "i8042-ip22io.h" | 21 | #include "i8042-ip22io.h" |
22 | #elif defined(CONFIG_PPC) | 22 | #elif defined(CONFIG_PPC) |
23 | #include "i8042-ppcio.h" | 23 | #include "i8042-ppcio.h" |
24 | #elif defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64) | 24 | #elif defined(CONFIG_SPARC) |
25 | #include "i8042-sparcio.h" | 25 | #include "i8042-sparcio.h" |
26 | #elif defined(CONFIG_X86) || defined(CONFIG_IA64) | 26 | #elif defined(CONFIG_X86) || defined(CONFIG_IA64) |
27 | #include "i8042-x86ia64io.h" | 27 | #include "i8042-x86ia64io.h" |
diff --git a/drivers/macintosh/therm_pm72.c b/drivers/macintosh/therm_pm72.c index 3fc8cdd94c3d..5bb36274a5c6 100644 --- a/drivers/macintosh/therm_pm72.c +++ b/drivers/macintosh/therm_pm72.c | |||
@@ -933,7 +933,7 @@ static void do_monitor_cpu_combined(void) | |||
933 | if (state0->overtemp > 0) { | 933 | if (state0->overtemp > 0) { |
934 | state0->rpm = state0->mpu.rmaxn_exhaust_fan; | 934 | state0->rpm = state0->mpu.rmaxn_exhaust_fan; |
935 | state0->intake_rpm = intake = state0->mpu.rmaxn_intake_fan; | 935 | state0->intake_rpm = intake = state0->mpu.rmaxn_intake_fan; |
936 | pump = state0->pump_min; | 936 | pump = state0->pump_max; |
937 | goto do_set_fans; | 937 | goto do_set_fans; |
938 | } | 938 | } |
939 | 939 | ||
diff --git a/drivers/md/md.c b/drivers/md/md.c index cd12fca73b0d..8175a2a222da 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -1729,7 +1729,7 @@ level_show(mddev_t *mddev, char *page) | |||
1729 | if (p == NULL && mddev->raid_disks == 0) | 1729 | if (p == NULL && mddev->raid_disks == 0) |
1730 | return 0; | 1730 | return 0; |
1731 | if (mddev->level >= 0) | 1731 | if (mddev->level >= 0) |
1732 | return sprintf(page, "RAID-%d\n", mddev->level); | 1732 | return sprintf(page, "raid%d\n", mddev->level); |
1733 | else | 1733 | else |
1734 | return sprintf(page, "%s\n", p->name); | 1734 | return sprintf(page, "%s\n", p->name); |
1735 | } | 1735 | } |
diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c index 992be0be6b1e..7dae91e5863c 100644 --- a/drivers/media/dvb/ttpci/av7110.c +++ b/drivers/media/dvb/ttpci/av7110.c | |||
@@ -176,6 +176,9 @@ static void init_av7110_av(struct av7110 *av7110) | |||
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 | ret = av7110_set_volume(av7110, av7110->mixer.volume_left, av7110->mixer.volume_right); | 182 | ret = av7110_set_volume(av7110, av7110->mixer.volume_left, av7110->mixer.volume_right); |
180 | if (ret < 0) | 183 | if (ret < 0) |
181 | printk("dvb-ttpci:cannot set volume :%d\n",ret); | 184 | printk("dvb-ttpci:cannot set volume :%d\n",ret); |
diff --git a/drivers/media/dvb/ttpci/av7110_hw.h b/drivers/media/dvb/ttpci/av7110_hw.h index fedd20f9815d..2a5e87ba1052 100644 --- a/drivers/media/dvb/ttpci/av7110_hw.h +++ b/drivers/media/dvb/ttpci/av7110_hw.h | |||
@@ -143,7 +143,8 @@ enum av7110_audio_command { | |||
143 | MainSwitch, | 143 | MainSwitch, |
144 | ADSwitch, | 144 | ADSwitch, |
145 | SendDiSEqC, | 145 | SendDiSEqC, |
146 | SetRegister | 146 | SetRegister, |
147 | SpdifSwitch | ||
147 | }; | 148 | }; |
148 | 149 | ||
149 | enum av7110_request_command { | 150 | enum av7110_request_command { |
diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c index aea3f038cff6..5b93723a1768 100644 --- a/drivers/media/video/cx25840/cx25840-core.c +++ b/drivers/media/video/cx25840/cx25840-core.c | |||
@@ -333,24 +333,30 @@ static int set_input(struct i2c_client *client, enum cx25840_input input) | |||
333 | 333 | ||
334 | static int set_v4lstd(struct i2c_client *client, v4l2_std_id std) | 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) { | 338 | /* First tests should be against specific std */ |
339 | /* zero is autodetect */ | 339 | if (std & V4L2_STD_NTSC_M_JP) { |
340 | case 0: fmt = 0x0; break; | 340 | fmt=0x2; |
341 | /* default ntsc to ntsc-m */ | 341 | } else if (std & V4L2_STD_NTSC_443) { |
342 | case V4L2_STD_NTSC: | 342 | fmt=0x3; |
343 | case V4L2_STD_NTSC_M: fmt = 0x1; break; | 343 | } else if (std & V4L2_STD_PAL_M) { |
344 | case V4L2_STD_NTSC_M_JP: fmt = 0x2; break; | 344 | fmt=0x5; |
345 | case V4L2_STD_NTSC_443: fmt = 0x3; break; | 345 | } else if (std & V4L2_STD_PAL_N) { |
346 | case V4L2_STD_PAL: fmt = 0x4; break; | 346 | fmt=0x6; |
347 | case V4L2_STD_PAL_M: fmt = 0x5; break; | 347 | } else if (std & V4L2_STD_PAL_Nc) { |
348 | case V4L2_STD_PAL_N: fmt = 0x6; break; | 348 | fmt=0x7; |
349 | case V4L2_STD_PAL_Nc: fmt = 0x7; break; | 349 | } else if (std & V4L2_STD_PAL_60) { |
350 | case V4L2_STD_PAL_60: fmt = 0x8; break; | 350 | fmt=0x8; |
351 | case V4L2_STD_SECAM: fmt = 0xc; break; | 351 | } else { |
352 | default: | 352 | /* Then, test against generic ones */ |
353 | return -ERANGE; | 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 | cx25840_and_or(client, 0x400, ~0xf, fmt); | 362 | cx25840_and_or(client, 0x400, ~0xf, fmt); |
diff --git a/drivers/media/video/em28xx/em28xx-core.c b/drivers/media/video/em28xx/em28xx-core.c index ec11619f8ea9..0cfe75416ec6 100644 --- a/drivers/media/video/em28xx/em28xx-core.c +++ b/drivers/media/video/em28xx/em28xx-core.c | |||
@@ -39,7 +39,7 @@ MODULE_PARM_DESC(core_debug,"enable debug messages [core]"); | |||
39 | #define em28xx_coredbg(fmt, arg...) do {\ | 39 | #define em28xx_coredbg(fmt, arg...) do {\ |
40 | if (core_debug) \ | 40 | if (core_debug) \ |
41 | printk(KERN_INFO "%s %s :"fmt, \ | 41 | printk(KERN_INFO "%s %s :"fmt, \ |
42 | dev->name, __FUNCTION__, ##arg); } while (0) | 42 | dev->name, __FUNCTION__ , ##arg); } while (0) |
43 | 43 | ||
44 | static unsigned int reg_debug; | 44 | static unsigned int reg_debug; |
45 | module_param(reg_debug,int,0644); | 45 | module_param(reg_debug,int,0644); |
@@ -48,7 +48,7 @@ MODULE_PARM_DESC(reg_debug,"enable debug messages [URB reg]"); | |||
48 | #define em28xx_regdbg(fmt, arg...) do {\ | 48 | #define em28xx_regdbg(fmt, arg...) do {\ |
49 | if (reg_debug) \ | 49 | if (reg_debug) \ |
50 | printk(KERN_INFO "%s %s :"fmt, \ | 50 | printk(KERN_INFO "%s %s :"fmt, \ |
51 | dev->name, __FUNCTION__, ##arg); } while (0) | 51 | dev->name, __FUNCTION__ , ##arg); } while (0) |
52 | 52 | ||
53 | static unsigned int isoc_debug; | 53 | static unsigned int isoc_debug; |
54 | module_param(isoc_debug,int,0644); | 54 | module_param(isoc_debug,int,0644); |
@@ -57,7 +57,7 @@ MODULE_PARM_DESC(isoc_debug,"enable debug messages [isoc transfers]"); | |||
57 | #define em28xx_isocdbg(fmt, arg...) do {\ | 57 | #define em28xx_isocdbg(fmt, arg...) do {\ |
58 | if (isoc_debug) \ | 58 | if (isoc_debug) \ |
59 | printk(KERN_INFO "%s %s :"fmt, \ | 59 | printk(KERN_INFO "%s %s :"fmt, \ |
60 | dev->name, __FUNCTION__, ##arg); } while (0) | 60 | dev->name, __FUNCTION__ , ##arg); } while (0) |
61 | 61 | ||
62 | static int alt = EM28XX_PINOUT; | 62 | static int alt = EM28XX_PINOUT; |
63 | module_param(alt, int, 0644); | 63 | module_param(alt, int, 0644); |
diff --git a/drivers/media/video/em28xx/em28xx-i2c.c b/drivers/media/video/em28xx/em28xx-i2c.c index 29e21ad187cc..7f5603054f02 100644 --- a/drivers/media/video/em28xx/em28xx-i2c.c +++ b/drivers/media/video/em28xx/em28xx-i2c.c | |||
@@ -44,7 +44,7 @@ MODULE_PARM_DESC(i2c_debug, "enable debug messages [i2c]"); | |||
44 | printk(fmt, ##args); } while (0) | 44 | printk(fmt, ##args); } while (0) |
45 | #define dprintk2(lvl,fmt, args...) if (i2c_debug>=lvl) do{ \ | 45 | #define dprintk2(lvl,fmt, args...) if (i2c_debug>=lvl) do{ \ |
46 | printk(KERN_DEBUG "%s at %s: " fmt, \ | 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 | * em2800_i2c_send_max4() | 50 | * em2800_i2c_send_max4() |
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c index 8ecaa0803e08..06d76879bde2 100644 --- a/drivers/media/video/em28xx/em28xx-video.c +++ b/drivers/media/video/em28xx/em28xx-video.c | |||
@@ -45,7 +45,7 @@ | |||
45 | #define em28xx_videodbg(fmt, arg...) do {\ | 45 | #define em28xx_videodbg(fmt, arg...) do {\ |
46 | if (video_debug) \ | 46 | if (video_debug) \ |
47 | printk(KERN_INFO "%s %s :"fmt, \ | 47 | printk(KERN_INFO "%s %s :"fmt, \ |
48 | dev->name, __FUNCTION__, ##arg); } while (0) | 48 | dev->name, __FUNCTION__ , ##arg); } while (0) |
49 | 49 | ||
50 | MODULE_AUTHOR(DRIVER_AUTHOR); | 50 | MODULE_AUTHOR(DRIVER_AUTHOR); |
51 | MODULE_DESCRIPTION(DRIVER_DESC); | 51 | MODULE_DESCRIPTION(DRIVER_DESC); |
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h index 1e2ee43db394..5c7a41ce69f3 100644 --- a/drivers/media/video/em28xx/em28xx.h +++ b/drivers/media/video/em28xx/em28xx.h | |||
@@ -392,18 +392,18 @@ extern const unsigned int em28xx_bcount; | |||
392 | /* printk macros */ | 392 | /* printk macros */ |
393 | 393 | ||
394 | #define em28xx_err(fmt, arg...) do {\ | 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 | #define em28xx_errdev(fmt, arg...) do {\ | 397 | #define em28xx_errdev(fmt, arg...) do {\ |
398 | printk(KERN_ERR "%s: "fmt,\ | 398 | printk(KERN_ERR "%s: "fmt,\ |
399 | dev->name, ##arg); } while (0) | 399 | dev->name , ##arg); } while (0) |
400 | 400 | ||
401 | #define em28xx_info(fmt, arg...) do {\ | 401 | #define em28xx_info(fmt, arg...) do {\ |
402 | printk(KERN_INFO "%s: "fmt,\ | 402 | printk(KERN_INFO "%s: "fmt,\ |
403 | dev->name, ##arg); } while (0) | 403 | dev->name , ##arg); } while (0) |
404 | #define em28xx_warn(fmt, arg...) do {\ | 404 | #define em28xx_warn(fmt, arg...) do {\ |
405 | printk(KERN_WARNING "%s: "fmt,\ | 405 | printk(KERN_WARNING "%s: "fmt,\ |
406 | dev->name, ##arg); } while (0) | 406 | dev->name , ##arg); } while (0) |
407 | 407 | ||
408 | inline static int em28xx_audio_source(struct em28xx *dev, int input) | 408 | inline static int em28xx_audio_source(struct em28xx *dev, int input) |
409 | { | 409 | { |
diff --git a/drivers/media/video/saa7127.c b/drivers/media/video/saa7127.c index 3428e1ed0032..c36f014f1fdf 100644 --- a/drivers/media/video/saa7127.c +++ b/drivers/media/video/saa7127.c | |||
@@ -389,7 +389,7 @@ static int saa7127_set_vps(struct i2c_client *client, struct v4l2_sliced_vbi_dat | |||
389 | static int saa7127_set_cc(struct i2c_client *client, struct v4l2_sliced_vbi_data *data) | 389 | static int saa7127_set_cc(struct i2c_client *client, struct v4l2_sliced_vbi_data *data) |
390 | { | 390 | { |
391 | struct saa7127_state *state = i2c_get_clientdata(client); | 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 | int enable = (data->line != 0); | 393 | int enable = (data->line != 0); |
394 | 394 | ||
395 | if (enable && (data->field != 0 || data->line != 21)) | 395 | if (enable && (data->field != 0 || data->line != 21)) |
@@ -397,7 +397,7 @@ static int saa7127_set_cc(struct i2c_client *client, struct v4l2_sliced_vbi_data | |||
397 | if (state->cc_enable != enable) { | 397 | if (state->cc_enable != enable) { |
398 | saa7127_dbg("Turn CC %s\n", enable ? "on" : "off"); | 398 | saa7127_dbg("Turn CC %s\n", enable ? "on" : "off"); |
399 | saa7127_write(client, SAA7127_REG_CLOSED_CAPTION, | 399 | saa7127_write(client, SAA7127_REG_CLOSED_CAPTION, |
400 | (enable << 6) | 0x11); | 400 | (state->xds_enable << 7) | (enable << 6) | 0x11); |
401 | state->cc_enable = enable; | 401 | state->cc_enable = enable; |
402 | } | 402 | } |
403 | if (!enable) | 403 | if (!enable) |
@@ -423,7 +423,7 @@ static int saa7127_set_xds(struct i2c_client *client, struct v4l2_sliced_vbi_dat | |||
423 | if (state->xds_enable != enable) { | 423 | if (state->xds_enable != enable) { |
424 | saa7127_dbg("Turn XDS %s\n", enable ? "on" : "off"); | 424 | saa7127_dbg("Turn XDS %s\n", enable ? "on" : "off"); |
425 | saa7127_write(client, SAA7127_REG_CLOSED_CAPTION, | 425 | saa7127_write(client, SAA7127_REG_CLOSED_CAPTION, |
426 | (enable << 7) | 0x11); | 426 | (enable << 7) | (state->cc_enable << 6) | 0x11); |
427 | state->xds_enable = enable; | 427 | state->xds_enable = enable; |
428 | } | 428 | } |
429 | if (!enable) | 429 | if (!enable) |
diff --git a/drivers/media/video/saa7134/Kconfig b/drivers/media/video/saa7134/Kconfig index c512c4411b38..c0f604a6fe42 100644 --- a/drivers/media/video/saa7134/Kconfig +++ b/drivers/media/video/saa7134/Kconfig | |||
@@ -1,11 +1,10 @@ | |||
1 | config VIDEO_SAA7134 | 1 | config VIDEO_SAA7134 |
2 | tristate "Philips SAA7134 support" | 2 | tristate "Philips SAA7134 support" |
3 | depends on VIDEO_DEV && PCI && I2C && SOUND && SND | 3 | depends on VIDEO_DEV && PCI && I2C |
4 | select VIDEO_BUF | 4 | select VIDEO_BUF |
5 | select VIDEO_IR | 5 | select VIDEO_IR |
6 | select VIDEO_TUNER | 6 | select VIDEO_TUNER |
7 | select CRC32 | 7 | select CRC32 |
8 | select SND_PCM_OSS | ||
9 | ---help--- | 8 | ---help--- |
10 | This is a video4linux driver for Philips SAA713x based | 9 | This is a video4linux driver for Philips SAA713x based |
11 | TV cards. | 10 | TV cards. |
@@ -13,6 +12,29 @@ config VIDEO_SAA7134 | |||
13 | To compile this driver as a module, choose M here: the | 12 | To compile this driver as a module, choose M here: the |
14 | module will be called saa7134. | 13 | module will be called saa7134. |
15 | 14 | ||
15 | config VIDEO_SAA7134_ALSA | ||
16 | tristate "Philips SAA7134 DMA audio support" | ||
17 | depends on VIDEO_SAA7134 && SOUND && SND && (!VIDEO_SAA7134_OSS || VIDEO_SAA7134_OSS = m) | ||
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 || VIDEO_SAA7134_ALSA = m) | ||
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. | ||
37 | |||
16 | config VIDEO_SAA7134_DVB | 38 | config VIDEO_SAA7134_DVB |
17 | tristate "DVB/ATSC Support for saa7134 based TV cards" | 39 | tristate "DVB/ATSC Support for saa7134 based TV cards" |
18 | depends on VIDEO_SAA7134 && DVB_CORE | 40 | depends on VIDEO_SAA7134 && DVB_CORE |
diff --git a/drivers/media/video/saa7134/Makefile b/drivers/media/video/saa7134/Makefile index 134f83a96218..1ba998424bbd 100644 --- a/drivers/media/video/saa7134/Makefile +++ b/drivers/media/video/saa7134/Makefile | |||
@@ -4,8 +4,11 @@ saa7134-objs := saa7134-cards.o saa7134-core.o saa7134-i2c.o \ | |||
4 | saa7134-video.o saa7134-input.o | 4 | saa7134-video.o saa7134-input.o |
5 | 5 | ||
6 | obj-$(CONFIG_VIDEO_SAA7134) += saa7134.o saa7134-empress.o \ | 6 | obj-$(CONFIG_VIDEO_SAA7134) += saa7134.o saa7134-empress.o \ |
7 | saa6752hs.o saa7134-alsa.o \ | 7 | saa6752hs.o |
8 | saa7134-oss.o | 8 | |
9 | obj-$(CONFIG_VIDEO_SAA7134_ALSA) += saa7134-alsa.o | ||
10 | obj-$(CONFIG_VIDEO_SAA7134_OSS) += saa7134-oss.o | ||
11 | |||
9 | obj-$(CONFIG_VIDEO_SAA7134_DVB) += saa7134-dvb.o | 12 | obj-$(CONFIG_VIDEO_SAA7134_DVB) += saa7134-dvb.o |
10 | 13 | ||
11 | EXTRA_CFLAGS += -I$(src)/.. | 14 | EXTRA_CFLAGS += -I$(src)/.. |
diff --git a/drivers/media/video/saa7134/saa7134-alsa.c b/drivers/media/video/saa7134/saa7134-alsa.c index b24a26b065c2..ade05f75fdb0 100644 --- a/drivers/media/video/saa7134/saa7134-alsa.c +++ b/drivers/media/video/saa7134/saa7134-alsa.c | |||
@@ -60,7 +60,7 @@ module_param_array(index, int, NULL, 0444); | |||
60 | MODULE_PARM_DESC(index, "Index value for SAA7134 capture interface(s)."); | 60 | MODULE_PARM_DESC(index, "Index value for SAA7134 capture interface(s)."); |
61 | 61 | ||
62 | #define dprintk(fmt, arg...) if (debug) \ | 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,6 +989,14 @@ static int saa7134_alsa_init(void) | |||
989 | struct saa7134_dev *dev = NULL; | 989 | struct saa7134_dev *dev = NULL; |
990 | struct list_head *list; | 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 | printk(KERN_INFO "saa7134 ALSA driver for DMA sound loaded\n"); | 1000 | printk(KERN_INFO "saa7134 ALSA driver for DMA sound loaded\n"); |
993 | 1001 | ||
994 | list_for_each(list,&saa7134_devlist) { | 1002 | list_for_each(list,&saa7134_devlist) { |
@@ -1001,9 +1009,6 @@ static int saa7134_alsa_init(void) | |||
1001 | } | 1009 | } |
1002 | } | 1010 | } |
1003 | 1011 | ||
1004 | dmasound_init = alsa_device_init; | ||
1005 | dmasound_exit = alsa_device_exit; | ||
1006 | |||
1007 | if (dev == NULL) | 1012 | if (dev == NULL) |
1008 | printk(KERN_INFO "saa7134 ALSA: no saa7134 cards found\n"); | 1013 | printk(KERN_INFO "saa7134 ALSA: no saa7134 cards found\n"); |
1009 | 1014 | ||
@@ -1023,12 +1028,15 @@ static void saa7134_alsa_exit(void) | |||
1023 | snd_card_free(snd_saa7134_cards[idx]); | 1028 | snd_card_free(snd_saa7134_cards[idx]); |
1024 | } | 1029 | } |
1025 | 1030 | ||
1031 | dmasound_init = NULL; | ||
1032 | dmasound_exit = NULL; | ||
1026 | printk(KERN_INFO "saa7134 ALSA driver for DMA sound unloaded\n"); | 1033 | printk(KERN_INFO "saa7134 ALSA driver for DMA sound unloaded\n"); |
1027 | 1034 | ||
1028 | return; | 1035 | return; |
1029 | } | 1036 | } |
1030 | 1037 | ||
1031 | module_init(saa7134_alsa_init); | 1038 | /* We initialize this late, to make sure the sound system is up and running */ |
1039 | late_initcall(saa7134_alsa_init); | ||
1032 | module_exit(saa7134_alsa_exit); | 1040 | module_exit(saa7134_alsa_exit); |
1033 | MODULE_LICENSE("GPL"); | 1041 | MODULE_LICENSE("GPL"); |
1034 | MODULE_AUTHOR("Ricardo Cerqueira"); | 1042 | MODULE_AUTHOR("Ricardo Cerqueira"); |
diff --git a/drivers/media/video/saa7134/saa7134-oss.c b/drivers/media/video/saa7134/saa7134-oss.c index 513a699a6df2..8badd2a9cb2f 100644 --- a/drivers/media/video/saa7134/saa7134-oss.c +++ b/drivers/media/video/saa7134/saa7134-oss.c | |||
@@ -959,8 +959,17 @@ static int saa7134_oss_init(void) | |||
959 | struct saa7134_dev *dev = NULL; | 959 | struct saa7134_dev *dev = NULL; |
960 | struct list_head *list; | 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 | printk(KERN_INFO "saa7134 OSS driver for DMA sound loaded\n"); | 970 | printk(KERN_INFO "saa7134 OSS driver for DMA sound loaded\n"); |
963 | 971 | ||
972 | |||
964 | list_for_each(list,&saa7134_devlist) { | 973 | list_for_each(list,&saa7134_devlist) { |
965 | dev = list_entry(list, struct saa7134_dev, devlist); | 974 | dev = list_entry(list, struct saa7134_dev, devlist); |
966 | if (dev->dmasound.priv_data == NULL) { | 975 | if (dev->dmasound.priv_data == NULL) { |
@@ -974,9 +983,6 @@ static int saa7134_oss_init(void) | |||
974 | if (dev == NULL) | 983 | if (dev == NULL) |
975 | printk(KERN_INFO "saa7134 OSS: no saa7134 cards found\n"); | 984 | printk(KERN_INFO "saa7134 OSS: no saa7134 cards found\n"); |
976 | 985 | ||
977 | dmasound_init = oss_device_init; | ||
978 | dmasound_exit = oss_device_exit; | ||
979 | |||
980 | return 0; | 986 | return 0; |
981 | 987 | ||
982 | } | 988 | } |
@@ -997,12 +1003,16 @@ static void saa7134_oss_exit(void) | |||
997 | 1003 | ||
998 | } | 1004 | } |
999 | 1005 | ||
1006 | dmasound_init = NULL; | ||
1007 | dmasound_exit = NULL; | ||
1008 | |||
1000 | printk(KERN_INFO "saa7134 OSS driver for DMA sound unloaded\n"); | 1009 | printk(KERN_INFO "saa7134 OSS driver for DMA sound unloaded\n"); |
1001 | 1010 | ||
1002 | return; | 1011 | return; |
1003 | } | 1012 | } |
1004 | 1013 | ||
1005 | module_init(saa7134_oss_init); | 1014 | /* We initialize this late, to make sure the sound system is up and running */ |
1015 | late_initcall(saa7134_oss_init); | ||
1006 | module_exit(saa7134_oss_exit); | 1016 | module_exit(saa7134_oss_exit); |
1007 | MODULE_LICENSE("GPL"); | 1017 | MODULE_LICENSE("GPL"); |
1008 | MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]"); | 1018 | MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]"); |
diff --git a/drivers/media/video/tveeprom.c b/drivers/media/video/tveeprom.c index cd7cf1bd12b4..5ac235365dd8 100644 --- a/drivers/media/video/tveeprom.c +++ b/drivers/media/video/tveeprom.c | |||
@@ -206,7 +206,7 @@ hauppauge_tuner[] = | |||
206 | { TUNER_ABSENT, "TCL 2002MI_3H"}, | 206 | { TUNER_ABSENT, "TCL 2002MI_3H"}, |
207 | { TUNER_TCL_2002N, "TCL 2002N 5H"}, | 207 | { TUNER_TCL_2002N, "TCL 2002N 5H"}, |
208 | /* 100-109 */ | 208 | /* 100-109 */ |
209 | { TUNER_ABSENT, "Philips FMD1216ME"}, | 209 | { TUNER_PHILIPS_FMD1216ME_MK3, "Philips FMD1216ME"}, |
210 | { TUNER_TEA5767, "Philips TEA5768HL FM Radio"}, | 210 | { TUNER_TEA5767, "Philips TEA5768HL FM Radio"}, |
211 | { TUNER_ABSENT, "Panasonic ENV57H12D5"}, | 211 | { TUNER_ABSENT, "Panasonic ENV57H12D5"}, |
212 | { TUNER_PHILIPS_FM1236_MK3, "TCL MFNM05-4"}, | 212 | { TUNER_PHILIPS_FM1236_MK3, "TCL MFNM05-4"}, |
diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig index 452ccd5037c3..b9b77cf39a18 100644 --- a/drivers/mtd/maps/Kconfig +++ b/drivers/mtd/maps/Kconfig | |||
@@ -62,7 +62,7 @@ config MTD_PHYSMAP_BANKWIDTH | |||
62 | 62 | ||
63 | config MTD_SUN_UFLASH | 63 | config MTD_SUN_UFLASH |
64 | tristate "Sun Microsystems userflash support" | 64 | tristate "Sun Microsystems userflash support" |
65 | depends on (SPARC32 || SPARC64) && MTD_CFI | 65 | depends on SPARC && MTD_CFI |
66 | help | 66 | help |
67 | This provides a 'mapping' driver which supports the way in | 67 | This provides a 'mapping' driver which supports the way in |
68 | which user-programmable flash chips are connected on various | 68 | which user-programmable flash chips are connected on various |
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 525624fc03b4..c39344adecce 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
@@ -10,7 +10,7 @@ | |||
10 | * trademarks of NVIDIA Corporation in the United States and other | 10 | * trademarks of NVIDIA Corporation in the United States and other |
11 | * countries. | 11 | * countries. |
12 | * | 12 | * |
13 | * Copyright (C) 2003,4 Manfred Spraul | 13 | * Copyright (C) 2003,4,5 Manfred Spraul |
14 | * Copyright (C) 2004 Andrew de Quincey (wol support) | 14 | * Copyright (C) 2004 Andrew de Quincey (wol support) |
15 | * Copyright (C) 2004 Carl-Daniel Hailfinger (invalid MAC handling, insane | 15 | * Copyright (C) 2004 Carl-Daniel Hailfinger (invalid MAC handling, insane |
16 | * IRQ rate fixes, bigendian fixes, cleanups, verification) | 16 | * IRQ rate fixes, bigendian fixes, cleanups, verification) |
@@ -100,6 +100,7 @@ | |||
100 | * 0.45: 18 Sep 2005: Remove nv_stop/start_rx from every link check | 100 | * 0.45: 18 Sep 2005: Remove nv_stop/start_rx from every link check |
101 | * 0.46: 20 Oct 2005: Add irq optimization modes. | 101 | * 0.46: 20 Oct 2005: Add irq optimization modes. |
102 | * 0.47: 26 Oct 2005: Add phyaddr 0 in phy scan. | 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 | * Known bugs: | 105 | * Known bugs: |
105 | * We suspect that on some hardware no TX done interrupts are generated. | 106 | * We suspect that on some hardware no TX done interrupts are generated. |
@@ -111,7 +112,7 @@ | |||
111 | * DEV_NEED_TIMERIRQ will not harm you on sane hardware, only generating a few | 112 | * DEV_NEED_TIMERIRQ will not harm you on sane hardware, only generating a few |
112 | * superfluous timer interrupts from the nic. | 113 | * superfluous timer interrupts from the nic. |
113 | */ | 114 | */ |
114 | #define FORCEDETH_VERSION "0.47" | 115 | #define FORCEDETH_VERSION "0.48" |
115 | #define DRV_NAME "forcedeth" | 116 | #define DRV_NAME "forcedeth" |
116 | 117 | ||
117 | #include <linux/module.h> | 118 | #include <linux/module.h> |
@@ -871,8 +872,8 @@ static int nv_alloc_rx(struct net_device *dev) | |||
871 | } else { | 872 | } else { |
872 | skb = np->rx_skbuff[nr]; | 873 | skb = np->rx_skbuff[nr]; |
873 | } | 874 | } |
874 | np->rx_dma[nr] = pci_map_single(np->pci_dev, skb->data, skb->len, | 875 | np->rx_dma[nr] = pci_map_single(np->pci_dev, skb->data, |
875 | PCI_DMA_FROMDEVICE); | 876 | skb->end-skb->data, PCI_DMA_FROMDEVICE); |
876 | if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) { | 877 | if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) { |
877 | np->rx_ring.orig[nr].PacketBuffer = cpu_to_le32(np->rx_dma[nr]); | 878 | np->rx_ring.orig[nr].PacketBuffer = cpu_to_le32(np->rx_dma[nr]); |
878 | wmb(); | 879 | wmb(); |
@@ -999,7 +1000,7 @@ static void nv_drain_rx(struct net_device *dev) | |||
999 | wmb(); | 1000 | wmb(); |
1000 | if (np->rx_skbuff[i]) { | 1001 | if (np->rx_skbuff[i]) { |
1001 | pci_unmap_single(np->pci_dev, np->rx_dma[i], | 1002 | pci_unmap_single(np->pci_dev, np->rx_dma[i], |
1002 | np->rx_skbuff[i]->len, | 1003 | np->rx_skbuff[i]->end-np->rx_skbuff[i]->data, |
1003 | PCI_DMA_FROMDEVICE); | 1004 | PCI_DMA_FROMDEVICE); |
1004 | dev_kfree_skb(np->rx_skbuff[i]); | 1005 | dev_kfree_skb(np->rx_skbuff[i]); |
1005 | np->rx_skbuff[i] = NULL; | 1006 | np->rx_skbuff[i] = NULL; |
@@ -1334,7 +1335,7 @@ static void nv_rx_process(struct net_device *dev) | |||
1334 | * the performance. | 1335 | * the performance. |
1335 | */ | 1336 | */ |
1336 | pci_unmap_single(np->pci_dev, np->rx_dma[i], | 1337 | pci_unmap_single(np->pci_dev, np->rx_dma[i], |
1337 | np->rx_skbuff[i]->len, | 1338 | np->rx_skbuff[i]->end-np->rx_skbuff[i]->data, |
1338 | PCI_DMA_FROMDEVICE); | 1339 | PCI_DMA_FROMDEVICE); |
1339 | 1340 | ||
1340 | { | 1341 | { |
@@ -2455,7 +2456,7 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i | |||
2455 | np->txrxctl_bits |= NVREG_TXRXCTL_RXCHECK; | 2456 | np->txrxctl_bits |= NVREG_TXRXCTL_RXCHECK; |
2456 | dev->features |= NETIF_F_HW_CSUM | NETIF_F_SG; | 2457 | dev->features |= NETIF_F_HW_CSUM | NETIF_F_SG; |
2457 | #ifdef NETIF_F_TSO | 2458 | #ifdef NETIF_F_TSO |
2458 | dev->features |= NETIF_F_TSO; | 2459 | /* disabled dev->features |= NETIF_F_TSO; */ |
2459 | #endif | 2460 | #endif |
2460 | } | 2461 | } |
2461 | 2462 | ||
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 16bebe7a7ce1..7da0e3dd5fe3 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c | |||
@@ -38,6 +38,10 @@ | |||
38 | #include <asm/irq.h> | 38 | #include <asm/irq.h> |
39 | #include <asm/uaccess.h> | 39 | #include <asm/uaccess.h> |
40 | 40 | ||
41 | MODULE_DESCRIPTION("PHY library"); | ||
42 | MODULE_AUTHOR("Andy Fleming"); | ||
43 | MODULE_LICENSE("GPL"); | ||
44 | |||
41 | static struct phy_driver genphy_driver; | 45 | static struct phy_driver genphy_driver; |
42 | extern int mdio_bus_init(void); | 46 | extern int mdio_bus_init(void); |
43 | extern void mdio_bus_exit(void); | 47 | extern void mdio_bus_exit(void); |
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c index 081717d01374..28ce47a02408 100644 --- a/drivers/net/sungem.c +++ b/drivers/net/sungem.c | |||
@@ -2907,7 +2907,7 @@ static int __devinit gem_get_device_address(struct gem *gp) | |||
2907 | return 0; | 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 | struct net_device *dev = pci_get_drvdata(pdev); | 2912 | struct net_device *dev = pci_get_drvdata(pdev); |
2913 | 2913 | ||
@@ -3181,7 +3181,7 @@ static struct pci_driver gem_driver = { | |||
3181 | .name = GEM_MODULE_NAME, | 3181 | .name = GEM_MODULE_NAME, |
3182 | .id_table = gem_pci_tbl, | 3182 | .id_table = gem_pci_tbl, |
3183 | .probe = gem_init_one, | 3183 | .probe = gem_init_one, |
3184 | .remove = __devexit_p(gem_remove_one), | 3184 | .remove = gem_remove_one, |
3185 | #ifdef CONFIG_PM | 3185 | #ifdef CONFIG_PM |
3186 | .suspend = gem_suspend, | 3186 | .suspend = gem_suspend, |
3187 | .resume = gem_resume, | 3187 | .resume = gem_resume, |
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index a23ed28a72b8..cefb0c08a68d 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -68,8 +68,8 @@ | |||
68 | 68 | ||
69 | #define DRV_MODULE_NAME "tg3" | 69 | #define DRV_MODULE_NAME "tg3" |
70 | #define PFX DRV_MODULE_NAME ": " | 70 | #define PFX DRV_MODULE_NAME ": " |
71 | #define DRV_MODULE_VERSION "3.45" | 71 | #define DRV_MODULE_VERSION "3.46" |
72 | #define DRV_MODULE_RELDATE "Dec 13, 2005" | 72 | #define DRV_MODULE_RELDATE "Dec 19, 2005" |
73 | 73 | ||
74 | #define TG3_DEF_MAC_MODE 0 | 74 | #define TG3_DEF_MAC_MODE 0 |
75 | #define TG3_DEF_RX_MODE 0 | 75 | #define TG3_DEF_RX_MODE 0 |
@@ -341,6 +341,16 @@ static struct { | |||
341 | { "interrupt test (offline)" }, | 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 | static void tg3_write_indirect_reg32(struct tg3 *tp, u32 off, u32 val) | 354 | static void tg3_write_indirect_reg32(struct tg3 *tp, u32 off, u32 val) |
345 | { | 355 | { |
346 | unsigned long flags; | 356 | unsigned long flags; |
@@ -411,13 +421,29 @@ static u32 tg3_read_indirect_mbox(struct tg3 *tp, u32 off) | |||
411 | return val; | 421 | return val; |
412 | } | 422 | } |
413 | 423 | ||
414 | static void _tw32_flush(struct tg3 *tp, u32 off, u32 val) | 424 | /* usec_wait specifies the wait time in usec when writing to certain registers |
425 | * where it is unsafe to read back the register without some delay. | ||
426 | * GRC_LOCAL_CTRL is one example if the GPIOs are toggled to switch power. | ||
427 | * TG3PCI_CLOCK_CTRL is another example if the clock frequencies are changed. | ||
428 | */ | ||
429 | static void _tw32_flush(struct tg3 *tp, u32 off, u32 val, u32 usec_wait) | ||
415 | { | 430 | { |
416 | tp->write32(tp, off, val); | 431 | if ((tp->tg3_flags & TG3_FLAG_PCIX_TARGET_HWBUG) || |
417 | if (!(tp->tg3_flags & TG3_FLAG_PCIX_TARGET_HWBUG) && | 432 | (tp->tg3_flags2 & TG3_FLG2_ICH_WORKAROUND)) |
418 | !(tp->tg3_flags & TG3_FLAG_5701_REG_WRITE_BUG) && | 433 | /* Non-posted methods */ |
419 | !(tp->tg3_flags2 & TG3_FLG2_ICH_WORKAROUND)) | 434 | tp->write32(tp, off, val); |
420 | tp->read32(tp, off); /* flush */ | 435 | else { |
436 | /* Posted method */ | ||
437 | tg3_write32(tp, off, val); | ||
438 | if (usec_wait) | ||
439 | udelay(usec_wait); | ||
440 | tp->read32(tp, off); | ||
441 | } | ||
442 | /* Wait again after the read for the posted method to guarantee that | ||
443 | * the wait time is met. | ||
444 | */ | ||
445 | if (usec_wait) | ||
446 | udelay(usec_wait); | ||
421 | } | 447 | } |
422 | 448 | ||
423 | static inline void tw32_mailbox_flush(struct tg3 *tp, u32 off, u32 val) | 449 | static inline void tw32_mailbox_flush(struct tg3 *tp, u32 off, u32 val) |
@@ -438,16 +464,6 @@ static void tg3_write32_tx_mbox(struct tg3 *tp, u32 off, u32 val) | |||
438 | readl(mbox); | 464 | readl(mbox); |
439 | } | 465 | } |
440 | 466 | ||
441 | static void tg3_write32(struct tg3 *tp, u32 off, u32 val) | ||
442 | { | ||
443 | writel(val, tp->regs + off); | ||
444 | } | ||
445 | |||
446 | static u32 tg3_read32(struct tg3 *tp, u32 off) | ||
447 | { | ||
448 | return (readl(tp->regs + off)); | ||
449 | } | ||
450 | |||
451 | #define tw32_mailbox(reg, val) tp->write32_mbox(tp, reg, val) | 467 | #define tw32_mailbox(reg, val) tp->write32_mbox(tp, reg, val) |
452 | #define tw32_mailbox_f(reg, val) tw32_mailbox_flush(tp, (reg), (val)) | 468 | #define tw32_mailbox_f(reg, val) tw32_mailbox_flush(tp, (reg), (val)) |
453 | #define tw32_rx_mbox(reg, val) tp->write32_rx_mbox(tp, reg, val) | 469 | #define tw32_rx_mbox(reg, val) tp->write32_rx_mbox(tp, reg, val) |
@@ -455,7 +471,8 @@ static u32 tg3_read32(struct tg3 *tp, u32 off) | |||
455 | #define tr32_mailbox(reg) tp->read32_mbox(tp, reg) | 471 | #define tr32_mailbox(reg) tp->read32_mbox(tp, reg) |
456 | 472 | ||
457 | #define tw32(reg,val) tp->write32(tp, reg, val) | 473 | #define tw32(reg,val) tp->write32(tp, reg, val) |
458 | #define tw32_f(reg,val) _tw32_flush(tp,(reg),(val)) | 474 | #define tw32_f(reg,val) _tw32_flush(tp,(reg),(val), 0) |
475 | #define tw32_wait_f(reg,val,us) _tw32_flush(tp,(reg),(val), (us)) | ||
459 | #define tr32(reg) tp->read32(tp, reg) | 476 | #define tr32(reg) tp->read32(tp, reg) |
460 | 477 | ||
461 | static void tg3_write_mem(struct tg3 *tp, u32 off, u32 val) | 478 | static void tg3_write_mem(struct tg3 *tp, u32 off, u32 val) |
@@ -595,21 +612,19 @@ static void tg3_switch_clocks(struct tg3 *tp) | |||
595 | 612 | ||
596 | if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS) { | 613 | if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS) { |
597 | if (orig_clock_ctrl & CLOCK_CTRL_625_CORE) { | 614 | if (orig_clock_ctrl & CLOCK_CTRL_625_CORE) { |
598 | tw32_f(TG3PCI_CLOCK_CTRL, | 615 | tw32_wait_f(TG3PCI_CLOCK_CTRL, |
599 | clock_ctrl | CLOCK_CTRL_625_CORE); | 616 | clock_ctrl | CLOCK_CTRL_625_CORE, 40); |
600 | udelay(40); | ||
601 | } | 617 | } |
602 | } else if ((orig_clock_ctrl & CLOCK_CTRL_44MHZ_CORE) != 0) { | 618 | } else if ((orig_clock_ctrl & CLOCK_CTRL_44MHZ_CORE) != 0) { |
603 | tw32_f(TG3PCI_CLOCK_CTRL, | 619 | tw32_wait_f(TG3PCI_CLOCK_CTRL, |
604 | clock_ctrl | | 620 | clock_ctrl | |
605 | (CLOCK_CTRL_44MHZ_CORE | CLOCK_CTRL_ALTCLK)); | 621 | (CLOCK_CTRL_44MHZ_CORE | CLOCK_CTRL_ALTCLK), |
606 | udelay(40); | 622 | 40); |
607 | tw32_f(TG3PCI_CLOCK_CTRL, | 623 | tw32_wait_f(TG3PCI_CLOCK_CTRL, |
608 | clock_ctrl | (CLOCK_CTRL_ALTCLK)); | 624 | clock_ctrl | (CLOCK_CTRL_ALTCLK), |
609 | udelay(40); | 625 | 40); |
610 | } | 626 | } |
611 | tw32_f(TG3PCI_CLOCK_CTRL, clock_ctrl); | 627 | tw32_wait_f(TG3PCI_CLOCK_CTRL, clock_ctrl, 40); |
612 | udelay(40); | ||
613 | } | 628 | } |
614 | 629 | ||
615 | #define PHY_BUSY_LOOPS 5000 | 630 | #define PHY_BUSY_LOOPS 5000 |
@@ -1017,39 +1032,50 @@ static void tg3_frob_aux_power(struct tg3 *tp) | |||
1017 | if ((tp->tg3_flags & TG3_FLAG_EEPROM_WRITE_PROT) != 0) | 1032 | if ((tp->tg3_flags & TG3_FLAG_EEPROM_WRITE_PROT) != 0) |
1018 | return; | 1033 | return; |
1019 | 1034 | ||
1020 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) { | 1035 | if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) || |
1021 | tp_peer = pci_get_drvdata(tp->pdev_peer); | 1036 | (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5714)) { |
1022 | if (!tp_peer) | 1037 | struct net_device *dev_peer; |
1038 | |||
1039 | dev_peer = pci_get_drvdata(tp->pdev_peer); | ||
1040 | if (!dev_peer) | ||
1023 | BUG(); | 1041 | BUG(); |
1042 | tp_peer = netdev_priv(dev_peer); | ||
1024 | } | 1043 | } |
1025 | 1044 | ||
1026 | |||
1027 | if ((tp->tg3_flags & TG3_FLAG_WOL_ENABLE) != 0 || | 1045 | if ((tp->tg3_flags & TG3_FLAG_WOL_ENABLE) != 0 || |
1028 | (tp->tg3_flags & TG3_FLAG_ENABLE_ASF) != 0 || | 1046 | (tp->tg3_flags & TG3_FLAG_ENABLE_ASF) != 0 || |
1029 | (tp_peer->tg3_flags & TG3_FLAG_WOL_ENABLE) != 0 || | 1047 | (tp_peer->tg3_flags & TG3_FLAG_WOL_ENABLE) != 0 || |
1030 | (tp_peer->tg3_flags & TG3_FLAG_ENABLE_ASF) != 0) { | 1048 | (tp_peer->tg3_flags & TG3_FLAG_ENABLE_ASF) != 0) { |
1031 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700 || | 1049 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700 || |
1032 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701) { | 1050 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701) { |
1033 | tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | | 1051 | tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | |
1034 | (GRC_LCLCTRL_GPIO_OE0 | | 1052 | (GRC_LCLCTRL_GPIO_OE0 | |
1035 | GRC_LCLCTRL_GPIO_OE1 | | 1053 | GRC_LCLCTRL_GPIO_OE1 | |
1036 | GRC_LCLCTRL_GPIO_OE2 | | 1054 | GRC_LCLCTRL_GPIO_OE2 | |
1037 | GRC_LCLCTRL_GPIO_OUTPUT0 | | 1055 | GRC_LCLCTRL_GPIO_OUTPUT0 | |
1038 | GRC_LCLCTRL_GPIO_OUTPUT1)); | 1056 | GRC_LCLCTRL_GPIO_OUTPUT1), |
1039 | udelay(100); | 1057 | 100); |
1040 | } else { | 1058 | } else { |
1041 | u32 no_gpio2; | 1059 | u32 no_gpio2; |
1042 | u32 grc_local_ctrl; | 1060 | u32 grc_local_ctrl = 0; |
1043 | 1061 | ||
1044 | if (tp_peer != tp && | 1062 | if (tp_peer != tp && |
1045 | (tp_peer->tg3_flags & TG3_FLAG_INIT_COMPLETE) != 0) | 1063 | (tp_peer->tg3_flags & TG3_FLAG_INIT_COMPLETE) != 0) |
1046 | return; | 1064 | return; |
1047 | 1065 | ||
1066 | /* Workaround to prevent overdrawing Amps. */ | ||
1067 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == | ||
1068 | ASIC_REV_5714) { | ||
1069 | grc_local_ctrl |= GRC_LCLCTRL_GPIO_OE3; | ||
1070 | tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | | ||
1071 | grc_local_ctrl, 100); | ||
1072 | } | ||
1073 | |||
1048 | /* On 5753 and variants, GPIO2 cannot be used. */ | 1074 | /* On 5753 and variants, GPIO2 cannot be used. */ |
1049 | no_gpio2 = tp->nic_sram_data_cfg & | 1075 | no_gpio2 = tp->nic_sram_data_cfg & |
1050 | NIC_SRAM_DATA_CFG_NO_GPIO2; | 1076 | NIC_SRAM_DATA_CFG_NO_GPIO2; |
1051 | 1077 | ||
1052 | grc_local_ctrl = GRC_LCLCTRL_GPIO_OE0 | | 1078 | grc_local_ctrl |= GRC_LCLCTRL_GPIO_OE0 | |
1053 | GRC_LCLCTRL_GPIO_OE1 | | 1079 | GRC_LCLCTRL_GPIO_OE1 | |
1054 | GRC_LCLCTRL_GPIO_OE2 | | 1080 | GRC_LCLCTRL_GPIO_OE2 | |
1055 | GRC_LCLCTRL_GPIO_OUTPUT1 | | 1081 | GRC_LCLCTRL_GPIO_OUTPUT1 | |
@@ -1058,21 +1084,18 @@ static void tg3_frob_aux_power(struct tg3 *tp) | |||
1058 | grc_local_ctrl &= ~(GRC_LCLCTRL_GPIO_OE2 | | 1084 | grc_local_ctrl &= ~(GRC_LCLCTRL_GPIO_OE2 | |
1059 | GRC_LCLCTRL_GPIO_OUTPUT2); | 1085 | GRC_LCLCTRL_GPIO_OUTPUT2); |
1060 | } | 1086 | } |
1061 | tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | | 1087 | tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | |
1062 | grc_local_ctrl); | 1088 | grc_local_ctrl, 100); |
1063 | udelay(100); | ||
1064 | 1089 | ||
1065 | grc_local_ctrl |= GRC_LCLCTRL_GPIO_OUTPUT0; | 1090 | grc_local_ctrl |= GRC_LCLCTRL_GPIO_OUTPUT0; |
1066 | 1091 | ||
1067 | tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | | 1092 | tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | |
1068 | grc_local_ctrl); | 1093 | grc_local_ctrl, 100); |
1069 | udelay(100); | ||
1070 | 1094 | ||
1071 | if (!no_gpio2) { | 1095 | if (!no_gpio2) { |
1072 | grc_local_ctrl &= ~GRC_LCLCTRL_GPIO_OUTPUT2; | 1096 | grc_local_ctrl &= ~GRC_LCLCTRL_GPIO_OUTPUT2; |
1073 | tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | | 1097 | tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | |
1074 | grc_local_ctrl); | 1098 | grc_local_ctrl, 100); |
1075 | udelay(100); | ||
1076 | } | 1099 | } |
1077 | } | 1100 | } |
1078 | } else { | 1101 | } else { |
@@ -1082,19 +1105,16 @@ static void tg3_frob_aux_power(struct tg3 *tp) | |||
1082 | (tp_peer->tg3_flags & TG3_FLAG_INIT_COMPLETE) != 0) | 1105 | (tp_peer->tg3_flags & TG3_FLAG_INIT_COMPLETE) != 0) |
1083 | return; | 1106 | return; |
1084 | 1107 | ||
1085 | tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | | 1108 | tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | |
1086 | (GRC_LCLCTRL_GPIO_OE1 | | 1109 | (GRC_LCLCTRL_GPIO_OE1 | |
1087 | GRC_LCLCTRL_GPIO_OUTPUT1)); | 1110 | GRC_LCLCTRL_GPIO_OUTPUT1), 100); |
1088 | udelay(100); | ||
1089 | 1111 | ||
1090 | tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | | 1112 | tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | |
1091 | (GRC_LCLCTRL_GPIO_OE1)); | 1113 | GRC_LCLCTRL_GPIO_OE1, 100); |
1092 | udelay(100); | ||
1093 | 1114 | ||
1094 | tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | | 1115 | tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | |
1095 | (GRC_LCLCTRL_GPIO_OE1 | | 1116 | (GRC_LCLCTRL_GPIO_OE1 | |
1096 | GRC_LCLCTRL_GPIO_OUTPUT1)); | 1117 | GRC_LCLCTRL_GPIO_OUTPUT1), 100); |
1097 | udelay(100); | ||
1098 | } | 1118 | } |
1099 | } | 1119 | } |
1100 | } | 1120 | } |
@@ -1137,10 +1157,8 @@ static int tg3_set_power_state(struct tg3 *tp, int state) | |||
1137 | udelay(100); /* Delay after power state change */ | 1157 | udelay(100); /* Delay after power state change */ |
1138 | 1158 | ||
1139 | /* Switch out of Vaux if it is not a LOM */ | 1159 | /* Switch out of Vaux if it is not a LOM */ |
1140 | if (!(tp->tg3_flags & TG3_FLAG_EEPROM_WRITE_PROT)) { | 1160 | if (!(tp->tg3_flags & TG3_FLAG_EEPROM_WRITE_PROT)) |
1141 | tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl); | 1161 | tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl, 100); |
1142 | udelay(100); | ||
1143 | } | ||
1144 | 1162 | ||
1145 | return 0; | 1163 | return 0; |
1146 | 1164 | ||
@@ -1239,10 +1257,8 @@ static int tg3_set_power_state(struct tg3 *tp, int state) | |||
1239 | base_val |= (CLOCK_CTRL_RXCLK_DISABLE | | 1257 | base_val |= (CLOCK_CTRL_RXCLK_DISABLE | |
1240 | CLOCK_CTRL_TXCLK_DISABLE); | 1258 | CLOCK_CTRL_TXCLK_DISABLE); |
1241 | 1259 | ||
1242 | tw32_f(TG3PCI_CLOCK_CTRL, base_val | | 1260 | tw32_wait_f(TG3PCI_CLOCK_CTRL, base_val | CLOCK_CTRL_ALTCLK | |
1243 | CLOCK_CTRL_ALTCLK | | 1261 | CLOCK_CTRL_PWRDOWN_PLL133, 40); |
1244 | CLOCK_CTRL_PWRDOWN_PLL133); | ||
1245 | udelay(40); | ||
1246 | } else if (tp->tg3_flags2 & TG3_FLG2_5780_CLASS) { | 1262 | } else if (tp->tg3_flags2 & TG3_FLG2_5780_CLASS) { |
1247 | /* do nothing */ | 1263 | /* do nothing */ |
1248 | } else if (!((tp->tg3_flags2 & TG3_FLG2_5750_PLUS) && | 1264 | } else if (!((tp->tg3_flags2 & TG3_FLG2_5750_PLUS) && |
@@ -1263,11 +1279,11 @@ static int tg3_set_power_state(struct tg3 *tp, int state) | |||
1263 | newbits2 = newbits1 | CLOCK_CTRL_44MHZ_CORE; | 1279 | newbits2 = newbits1 | CLOCK_CTRL_44MHZ_CORE; |
1264 | } | 1280 | } |
1265 | 1281 | ||
1266 | tw32_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl | newbits1); | 1282 | tw32_wait_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl | newbits1, |
1267 | udelay(40); | 1283 | 40); |
1268 | 1284 | ||
1269 | tw32_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl | newbits2); | 1285 | tw32_wait_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl | newbits2, |
1270 | udelay(40); | 1286 | 40); |
1271 | 1287 | ||
1272 | if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) { | 1288 | if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) { |
1273 | u32 newbits3; | 1289 | u32 newbits3; |
@@ -1281,9 +1297,8 @@ static int tg3_set_power_state(struct tg3 *tp, int state) | |||
1281 | newbits3 = CLOCK_CTRL_44MHZ_CORE; | 1297 | newbits3 = CLOCK_CTRL_44MHZ_CORE; |
1282 | } | 1298 | } |
1283 | 1299 | ||
1284 | tw32_f(TG3PCI_CLOCK_CTRL, | 1300 | tw32_wait_f(TG3PCI_CLOCK_CTRL, |
1285 | tp->pci_clock_ctrl | newbits3); | 1301 | tp->pci_clock_ctrl | newbits3, 40); |
1286 | udelay(40); | ||
1287 | } | 1302 | } |
1288 | } | 1303 | } |
1289 | 1304 | ||
@@ -1294,7 +1309,8 @@ static int tg3_set_power_state(struct tg3 *tp, int state) | |||
1294 | tg3_writephy(tp, MII_TG3_EXT_CTRL, | 1309 | tg3_writephy(tp, MII_TG3_EXT_CTRL, |
1295 | MII_TG3_EXT_CTRL_FORCE_LED_OFF); | 1310 | MII_TG3_EXT_CTRL_FORCE_LED_OFF); |
1296 | tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x01b2); | 1311 | tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x01b2); |
1297 | tg3_writephy(tp, MII_BMCR, BMCR_PDOWN); | 1312 | if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5700) |
1313 | tg3_writephy(tp, MII_BMCR, BMCR_PDOWN); | ||
1298 | } | 1314 | } |
1299 | } | 1315 | } |
1300 | 1316 | ||
@@ -7959,13 +7975,12 @@ static int tg3_test_memory(struct tg3 *tp) | |||
7959 | u32 offset; | 7975 | u32 offset; |
7960 | u32 len; | 7976 | u32 len; |
7961 | } mem_tbl_570x[] = { | 7977 | } mem_tbl_570x[] = { |
7962 | { 0x00000000, 0x01000}, | 7978 | { 0x00000000, 0x00b50}, |
7963 | { 0x00002000, 0x1c000}, | 7979 | { 0x00002000, 0x1c000}, |
7964 | { 0xffffffff, 0x00000} | 7980 | { 0xffffffff, 0x00000} |
7965 | }, mem_tbl_5705[] = { | 7981 | }, mem_tbl_5705[] = { |
7966 | { 0x00000100, 0x0000c}, | 7982 | { 0x00000100, 0x0000c}, |
7967 | { 0x00000200, 0x00008}, | 7983 | { 0x00000200, 0x00008}, |
7968 | { 0x00000b50, 0x00400}, | ||
7969 | { 0x00004000, 0x00800}, | 7984 | { 0x00004000, 0x00800}, |
7970 | { 0x00006000, 0x01000}, | 7985 | { 0x00006000, 0x01000}, |
7971 | { 0x00008000, 0x02000}, | 7986 | { 0x00008000, 0x02000}, |
@@ -10466,7 +10481,7 @@ static char * __devinit tg3_bus_string(struct tg3 *tp, char *str) | |||
10466 | return str; | 10481 | return str; |
10467 | } | 10482 | } |
10468 | 10483 | ||
10469 | static struct pci_dev * __devinit tg3_find_5704_peer(struct tg3 *tp) | 10484 | static struct pci_dev * __devinit tg3_find_peer(struct tg3 *tp) |
10470 | { | 10485 | { |
10471 | struct pci_dev *peer; | 10486 | struct pci_dev *peer; |
10472 | unsigned int func, devnr = tp->pdev->devfn & ~7; | 10487 | unsigned int func, devnr = tp->pdev->devfn & ~7; |
@@ -10719,8 +10734,9 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
10719 | tp->rx_pending = 63; | 10734 | tp->rx_pending = 63; |
10720 | } | 10735 | } |
10721 | 10736 | ||
10722 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) | 10737 | if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) || |
10723 | tp->pdev_peer = tg3_find_5704_peer(tp); | 10738 | (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5714)) |
10739 | tp->pdev_peer = tg3_find_peer(tp); | ||
10724 | 10740 | ||
10725 | err = tg3_get_device_address(tp); | 10741 | err = tg3_get_device_address(tp); |
10726 | if (err) { | 10742 | if (err) { |
diff --git a/drivers/net/wireless/orinoco_nortel.c b/drivers/net/wireless/orinoco_nortel.c index d8afd51ff8a5..d1a670b35338 100644 --- a/drivers/net/wireless/orinoco_nortel.c +++ b/drivers/net/wireless/orinoco_nortel.c | |||
@@ -1,6 +1,8 @@ | |||
1 | /* orinoco_nortel.c | 1 | /* orinoco_nortel.c |
2 | * | 2 | * |
3 | * Driver for Prism II devices which would usually be driven by orinoco_cs, | 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 | * but are connected to the PCI bus by a Nortel PCI-PCMCIA-Adapter. | 6 | * but are connected to the PCI bus by a Nortel PCI-PCMCIA-Adapter. |
5 | * | 7 | * |
6 | * Copyright (C) 2002 Tobias Hoffmann | 8 | * Copyright (C) 2002 Tobias Hoffmann |
@@ -165,7 +167,7 @@ static int nortel_pci_init_one(struct pci_dev *pdev, | |||
165 | goto fail_resources; | 167 | goto fail_resources; |
166 | } | 168 | } |
167 | 169 | ||
168 | iomem = pci_iomap(pdev, 3, 0); | 170 | iomem = pci_iomap(pdev, 2, 0); |
169 | if (!iomem) { | 171 | if (!iomem) { |
170 | err = -ENOMEM; | 172 | err = -ENOMEM; |
171 | goto fail_map_io; | 173 | goto fail_map_io; |
@@ -265,6 +267,8 @@ static void __devexit nortel_pci_remove_one(struct pci_dev *pdev) | |||
265 | static struct pci_device_id nortel_pci_id_table[] = { | 267 | static struct pci_device_id nortel_pci_id_table[] = { |
266 | /* Nortel emobility PCI */ | 268 | /* Nortel emobility PCI */ |
267 | {0x126c, 0x8030, PCI_ANY_ID, PCI_ANY_ID,}, | 269 | {0x126c, 0x8030, PCI_ANY_ID, PCI_ANY_ID,}, |
270 | /* Symbol LA-4123 PCI */ | ||
271 | {0x1562, 0x0001, PCI_ANY_ID, PCI_ANY_ID,}, | ||
268 | {0,}, | 272 | {0,}, |
269 | }; | 273 | }; |
270 | 274 | ||
diff --git a/drivers/s390/net/qeth_eddp.c b/drivers/s390/net/qeth_eddp.c index 011915d5e243..f94f1f25eec6 100644 --- a/drivers/s390/net/qeth_eddp.c +++ b/drivers/s390/net/qeth_eddp.c | |||
@@ -62,7 +62,8 @@ qeth_eddp_free_context(struct qeth_eddp_context *ctx) | |||
62 | for (i = 0; i < ctx->num_pages; ++i) | 62 | for (i = 0; i < ctx->num_pages; ++i) |
63 | free_page((unsigned long)ctx->pages[i]); | 63 | free_page((unsigned long)ctx->pages[i]); |
64 | kfree(ctx->pages); | 64 | kfree(ctx->pages); |
65 | kfree(ctx->elements); | 65 | if (ctx->elements != NULL) |
66 | kfree(ctx->elements); | ||
66 | kfree(ctx); | 67 | kfree(ctx); |
67 | } | 68 | } |
68 | 69 | ||
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c index 99cceb242ec4..f8f55cc468ba 100644 --- a/drivers/s390/net/qeth_main.c +++ b/drivers/s390/net/qeth_main.c | |||
@@ -1,6 +1,6 @@ | |||
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 | * Linux on zSeries OSA Express and HiperSockets support | 5 | * Linux on zSeries OSA Express and HiperSockets support |
6 | * | 6 | * |
@@ -12,7 +12,7 @@ | |||
12 | * Frank Pavlic (fpavlic@de.ibm.com) and | 12 | * Frank Pavlic (fpavlic@de.ibm.com) and |
13 | * Thomas Spatzier <tspat@de.ibm.com> | 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 | * This program is free software; you can redistribute it and/or modify | 17 | * This program is free software; you can redistribute it and/or modify |
18 | * it under the terms of the GNU General Public License as published by | 18 | * it under the terms of the GNU General Public License as published by |
@@ -72,7 +72,7 @@ | |||
72 | #include "qeth_eddp.h" | 72 | #include "qeth_eddp.h" |
73 | #include "qeth_tso.h" | 73 | #include "qeth_tso.h" |
74 | 74 | ||
75 | #define VERSION_QETH_C "$Revision: 1.242 $" | 75 | #define VERSION_QETH_C "$Revision: 1.251 $" |
76 | static const char *version = "qeth S/390 OSA-Express driver"; | 76 | static const char *version = "qeth S/390 OSA-Express driver"; |
77 | 77 | ||
78 | /** | 78 | /** |
@@ -518,7 +518,8 @@ __qeth_set_offline(struct ccwgroup_device *cgdev, int recovery_mode) | |||
518 | 518 | ||
519 | QETH_DBF_TEXT(setup, 3, "setoffl"); | 519 | QETH_DBF_TEXT(setup, 3, "setoffl"); |
520 | QETH_DBF_HEX(setup, 3, &card, sizeof(void *)); | 520 | QETH_DBF_HEX(setup, 3, &card, sizeof(void *)); |
521 | 521 | ||
522 | netif_carrier_off(card->dev); | ||
522 | recover_flag = card->state; | 523 | recover_flag = card->state; |
523 | if (qeth_stop_card(card, recovery_mode) == -ERESTARTSYS){ | 524 | if (qeth_stop_card(card, recovery_mode) == -ERESTARTSYS){ |
524 | PRINT_WARN("Stopping card %s interrupted by user!\n", | 525 | PRINT_WARN("Stopping card %s interrupted by user!\n", |
@@ -1020,7 +1021,6 @@ void | |||
1020 | qeth_schedule_recovery(struct qeth_card *card) | 1021 | qeth_schedule_recovery(struct qeth_card *card) |
1021 | { | 1022 | { |
1022 | QETH_DBF_TEXT(trace,2,"startrec"); | 1023 | QETH_DBF_TEXT(trace,2,"startrec"); |
1023 | |||
1024 | if (qeth_set_thread_start_bit(card, QETH_RECOVER_THREAD) == 0) | 1024 | if (qeth_set_thread_start_bit(card, QETH_RECOVER_THREAD) == 0) |
1025 | schedule_work(&card->kernel_thread_starter); | 1025 | schedule_work(&card->kernel_thread_starter); |
1026 | } | 1026 | } |
@@ -1710,7 +1710,6 @@ qeth_check_ipa_data(struct qeth_card *card, struct qeth_cmd_buffer *iob) | |||
1710 | "IP address reset.\n", | 1710 | "IP address reset.\n", |
1711 | QETH_CARD_IFNAME(card), | 1711 | QETH_CARD_IFNAME(card), |
1712 | card->info.chpid); | 1712 | card->info.chpid); |
1713 | netif_carrier_on(card->dev); | ||
1714 | qeth_schedule_recovery(card); | 1713 | qeth_schedule_recovery(card); |
1715 | return NULL; | 1714 | return NULL; |
1716 | case IPA_CMD_MODCCID: | 1715 | case IPA_CMD_MODCCID: |
@@ -1959,7 +1958,7 @@ qeth_osn_send_ipa_cmd(struct qeth_card *card, struct qeth_cmd_buffer *iob, | |||
1959 | { | 1958 | { |
1960 | u16 s1, s2; | 1959 | u16 s1, s2; |
1961 | 1960 | ||
1962 | QETH_DBF_TEXT(trace,4,"osndipa"); | 1961 | QETH_DBF_TEXT(trace,4,"osndipa"); |
1963 | 1962 | ||
1964 | qeth_prepare_ipa_cmd(card, iob, QETH_PROT_OSN2); | 1963 | qeth_prepare_ipa_cmd(card, iob, QETH_PROT_OSN2); |
1965 | s1 = (u16)(IPA_PDU_HEADER_SIZE + data_len); | 1964 | s1 = (u16)(IPA_PDU_HEADER_SIZE + data_len); |
@@ -2203,24 +2202,21 @@ qeth_ulp_setup(struct qeth_card *card) | |||
2203 | } | 2202 | } |
2204 | 2203 | ||
2205 | static inline int | 2204 | static inline int |
2206 | qeth_check_for_inbound_error(struct qeth_qdio_buffer *buf, | 2205 | qeth_check_qdio_errors(struct qdio_buffer *buf, unsigned int qdio_error, |
2207 | unsigned int qdio_error, | 2206 | unsigned int siga_error, const char *dbftext) |
2208 | unsigned int siga_error) | ||
2209 | { | 2207 | { |
2210 | int rc = 0; | ||
2211 | |||
2212 | if (qdio_error || siga_error) { | 2208 | if (qdio_error || siga_error) { |
2213 | QETH_DBF_TEXT(trace, 2, "qdinerr"); | 2209 | QETH_DBF_TEXT(trace, 2, dbftext); |
2214 | QETH_DBF_TEXT(qerr, 2, "qdinerr"); | 2210 | QETH_DBF_TEXT(qerr, 2, dbftext); |
2215 | QETH_DBF_TEXT_(qerr, 2, " F15=%02X", | 2211 | QETH_DBF_TEXT_(qerr, 2, " F15=%02X", |
2216 | buf->buffer->element[15].flags & 0xff); | 2212 | buf->element[15].flags & 0xff); |
2217 | QETH_DBF_TEXT_(qerr, 2, " F14=%02X", | 2213 | QETH_DBF_TEXT_(qerr, 2, " F14=%02X", |
2218 | buf->buffer->element[14].flags & 0xff); | 2214 | buf->element[14].flags & 0xff); |
2219 | QETH_DBF_TEXT_(qerr, 2, " qerr=%X", qdio_error); | 2215 | QETH_DBF_TEXT_(qerr, 2, " qerr=%X", qdio_error); |
2220 | QETH_DBF_TEXT_(qerr, 2, " serr=%X", siga_error); | 2216 | QETH_DBF_TEXT_(qerr, 2, " serr=%X", siga_error); |
2221 | rc = 1; | 2217 | return 1; |
2222 | } | 2218 | } |
2223 | return rc; | 2219 | return 0; |
2224 | } | 2220 | } |
2225 | 2221 | ||
2226 | static inline struct sk_buff * | 2222 | static inline struct sk_buff * |
@@ -2769,8 +2765,9 @@ qeth_qdio_input_handler(struct ccw_device * ccwdev, unsigned int status, | |||
2769 | for (i = first_element; i < (first_element + count); ++i) { | 2765 | for (i = first_element; i < (first_element + count); ++i) { |
2770 | index = i % QDIO_MAX_BUFFERS_PER_Q; | 2766 | index = i % QDIO_MAX_BUFFERS_PER_Q; |
2771 | buffer = &card->qdio.in_q->bufs[index]; | 2767 | buffer = &card->qdio.in_q->bufs[index]; |
2772 | if (!((status == QDIO_STATUS_LOOK_FOR_ERROR) && | 2768 | if (!((status & QDIO_STATUS_LOOK_FOR_ERROR) && |
2773 | qeth_check_for_inbound_error(buffer, qdio_err, siga_err))) | 2769 | qeth_check_qdio_errors(buffer->buffer, |
2770 | qdio_err, siga_err,"qinerr"))) | ||
2774 | qeth_process_inbound_buffer(card, buffer, index); | 2771 | qeth_process_inbound_buffer(card, buffer, index); |
2775 | /* clear buffer and give back to hardware */ | 2772 | /* clear buffer and give back to hardware */ |
2776 | qeth_put_buffer_pool_entry(card, buffer->pool_entry); | 2773 | qeth_put_buffer_pool_entry(card, buffer->pool_entry); |
@@ -2785,12 +2782,13 @@ qeth_qdio_input_handler(struct ccw_device * ccwdev, unsigned int status, | |||
2785 | static inline int | 2782 | static inline int |
2786 | qeth_handle_send_error(struct qeth_card *card, | 2783 | qeth_handle_send_error(struct qeth_card *card, |
2787 | struct qeth_qdio_out_buffer *buffer, | 2784 | struct qeth_qdio_out_buffer *buffer, |
2788 | int qdio_err, int siga_err) | 2785 | unsigned int qdio_err, unsigned int siga_err) |
2789 | { | 2786 | { |
2790 | int sbalf15 = buffer->buffer->element[15].flags & 0xff; | 2787 | int sbalf15 = buffer->buffer->element[15].flags & 0xff; |
2791 | int cc = siga_err & 3; | 2788 | int cc = siga_err & 3; |
2792 | 2789 | ||
2793 | QETH_DBF_TEXT(trace, 6, "hdsnderr"); | 2790 | QETH_DBF_TEXT(trace, 6, "hdsnderr"); |
2791 | qeth_check_qdio_errors(buffer->buffer, qdio_err, siga_err, "qouterr"); | ||
2794 | switch (cc) { | 2792 | switch (cc) { |
2795 | case 0: | 2793 | case 0: |
2796 | if (qdio_err){ | 2794 | if (qdio_err){ |
@@ -3047,7 +3045,8 @@ qeth_qdio_output_handler(struct ccw_device * ccwdev, unsigned int status, | |||
3047 | for(i = first_element; i < (first_element + count); ++i){ | 3045 | for(i = first_element; i < (first_element + count); ++i){ |
3048 | buffer = &queue->bufs[i % QDIO_MAX_BUFFERS_PER_Q]; | 3046 | buffer = &queue->bufs[i % QDIO_MAX_BUFFERS_PER_Q]; |
3049 | /*we only handle the KICK_IT error by doing a recovery */ | 3047 | /*we only handle the KICK_IT error by doing a recovery */ |
3050 | if (qeth_handle_send_error(card, buffer, qdio_error, siga_error) | 3048 | if (qeth_handle_send_error(card, buffer, |
3049 | qdio_error, siga_error) | ||
3051 | == QETH_SEND_ERROR_KICK_IT){ | 3050 | == QETH_SEND_ERROR_KICK_IT){ |
3052 | netif_stop_queue(card->dev); | 3051 | netif_stop_queue(card->dev); |
3053 | qeth_schedule_recovery(card); | 3052 | qeth_schedule_recovery(card); |
@@ -3289,7 +3288,6 @@ qeth_init_qdio_info(struct qeth_card *card) | |||
3289 | card->qdio.in_buf_pool.buf_count = card->qdio.init_pool.buf_count; | 3288 | card->qdio.in_buf_pool.buf_count = card->qdio.init_pool.buf_count; |
3290 | INIT_LIST_HEAD(&card->qdio.in_buf_pool.entry_list); | 3289 | INIT_LIST_HEAD(&card->qdio.in_buf_pool.entry_list); |
3291 | INIT_LIST_HEAD(&card->qdio.init_pool.entry_list); | 3290 | INIT_LIST_HEAD(&card->qdio.init_pool.entry_list); |
3292 | /* outbound */ | ||
3293 | } | 3291 | } |
3294 | 3292 | ||
3295 | static int | 3293 | static int |
@@ -3731,6 +3729,9 @@ qeth_verify_vlan_dev(struct net_device *dev, struct qeth_card *card) | |||
3731 | break; | 3729 | break; |
3732 | } | 3730 | } |
3733 | } | 3731 | } |
3732 | if (rc && !(VLAN_DEV_INFO(dev)->real_dev->priv == (void *)card)) | ||
3733 | return 0; | ||
3734 | |||
3734 | #endif | 3735 | #endif |
3735 | return rc; | 3736 | return rc; |
3736 | } | 3737 | } |
@@ -3807,10 +3808,8 @@ qeth_open(struct net_device *dev) | |||
3807 | card->data.state = CH_STATE_UP; | 3808 | card->data.state = CH_STATE_UP; |
3808 | card->state = CARD_STATE_UP; | 3809 | card->state = CARD_STATE_UP; |
3809 | 3810 | ||
3810 | if (!card->lan_online){ | 3811 | if (!card->lan_online && netif_carrier_ok(dev)) |
3811 | if (netif_carrier_ok(dev)) | 3812 | netif_carrier_off(dev); |
3812 | netif_carrier_off(dev); | ||
3813 | } | ||
3814 | return 0; | 3813 | return 0; |
3815 | } | 3814 | } |
3816 | 3815 | ||
@@ -5870,10 +5869,8 @@ qeth_add_multicast_ipv6(struct qeth_card *card) | |||
5870 | struct inet6_dev *in6_dev; | 5869 | struct inet6_dev *in6_dev; |
5871 | 5870 | ||
5872 | QETH_DBF_TEXT(trace,4,"chkmcv6"); | 5871 | QETH_DBF_TEXT(trace,4,"chkmcv6"); |
5873 | if ((card->options.layer2 == 0) && | 5872 | if (!qeth_is_supported(card, IPA_IPV6)) |
5874 | (!qeth_is_supported(card, IPA_IPV6)) ) | ||
5875 | return ; | 5873 | return ; |
5876 | |||
5877 | in6_dev = in6_dev_get(card->dev); | 5874 | in6_dev = in6_dev_get(card->dev); |
5878 | if (in6_dev == NULL) | 5875 | if (in6_dev == NULL) |
5879 | return; | 5876 | return; |
@@ -7936,8 +7933,8 @@ __qeth_set_online(struct ccwgroup_device *gdev, int recovery_mode) | |||
7936 | QETH_DBF_TEXT_(setup, 2, "6err%d", rc); | 7933 | QETH_DBF_TEXT_(setup, 2, "6err%d", rc); |
7937 | goto out_remove; | 7934 | goto out_remove; |
7938 | } | 7935 | } |
7939 | /*maybe it was set offline without ifconfig down | 7936 | netif_carrier_on(card->dev); |
7940 | * we can also use this state for recovery purposes*/ | 7937 | |
7941 | qeth_set_allowed_threads(card, 0xffffffff, 0); | 7938 | qeth_set_allowed_threads(card, 0xffffffff, 0); |
7942 | if (recover_flag == CARD_STATE_RECOVER) | 7939 | if (recover_flag == CARD_STATE_RECOVER) |
7943 | qeth_start_again(card, recovery_mode); | 7940 | qeth_start_again(card, recovery_mode); |
diff --git a/drivers/s390/net/qeth_mpc.c b/drivers/s390/net/qeth_mpc.c index f0a080a9e515..5f8754addc14 100644 --- a/drivers/s390/net/qeth_mpc.c +++ b/drivers/s390/net/qeth_mpc.c | |||
@@ -11,7 +11,7 @@ | |||
11 | #include <asm/cio.h> | 11 | #include <asm/cio.h> |
12 | #include "qeth_mpc.h" | 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 | unsigned char IDX_ACTIVATE_READ[]={ | 16 | unsigned char IDX_ACTIVATE_READ[]={ |
17 | 0x00,0x00,0x80,0x00, 0x00,0x00,0x00,0x00, | 17 | 0x00,0x00,0x80,0x00, 0x00,0x00,0x00,0x00, |
diff --git a/drivers/s390/net/qeth_mpc.h b/drivers/s390/net/qeth_mpc.h index 5f71486e708c..864cec5f6c62 100644 --- a/drivers/s390/net/qeth_mpc.h +++ b/drivers/s390/net/qeth_mpc.h | |||
@@ -14,14 +14,14 @@ | |||
14 | 14 | ||
15 | #include <asm/qeth.h> | 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 | extern const char *VERSION_QETH_MPC_C; | 19 | extern const char *VERSION_QETH_MPC_C; |
20 | 20 | ||
21 | #define IPA_PDU_HEADER_SIZE 0x40 | 21 | #define IPA_PDU_HEADER_SIZE 0x40 |
22 | #define QETH_IPA_PDU_LEN_TOTAL(buffer) (buffer+0x0e) | 22 | #define QETH_IPA_PDU_LEN_TOTAL(buffer) (buffer+0x0e) |
23 | #define QETH_IPA_PDU_LEN_PDU1(buffer) (buffer+0x26) | 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 | #define QETH_IPA_PDU_LEN_PDU3(buffer) (buffer+0x3a) | 25 | #define QETH_IPA_PDU_LEN_PDU3(buffer) (buffer+0x3a) |
26 | 26 | ||
27 | extern unsigned char IPA_PDU_HEADER[]; | 27 | extern unsigned char IPA_PDU_HEADER[]; |
diff --git a/drivers/s390/net/qeth_proc.c b/drivers/s390/net/qeth_proc.c index f2ccfea8fdb8..7bf35098831e 100644 --- a/drivers/s390/net/qeth_proc.c +++ b/drivers/s390/net/qeth_proc.c | |||
@@ -1,6 +1,6 @@ | |||
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 | * Linux on zSeries OSA Express and HiperSockets support | 5 | * Linux on zSeries OSA Express and HiperSockets support |
6 | * This file contains code related to procfs. | 6 | * This file contains code related to procfs. |
@@ -21,7 +21,7 @@ | |||
21 | #include "qeth_mpc.h" | 21 | #include "qeth_mpc.h" |
22 | #include "qeth_fs.h" | 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 | /***** /proc/qeth *****/ | 26 | /***** /proc/qeth *****/ |
27 | #define QETH_PROCFILE_NAME "qeth" | 27 | #define QETH_PROCFILE_NAME "qeth" |
@@ -30,30 +30,26 @@ static struct proc_dir_entry *qeth_procfile; | |||
30 | static int | 30 | static int |
31 | qeth_procfile_seq_match(struct device *dev, void *data) | 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 | static void * | 36 | static void * |
37 | qeth_procfile_seq_start(struct seq_file *s, loff_t *offset) | 37 | qeth_procfile_seq_start(struct seq_file *s, loff_t *offset) |
38 | { | 38 | { |
39 | struct device *dev; | 39 | struct device *dev = NULL; |
40 | loff_t nr; | 40 | loff_t nr = 0; |
41 | 41 | ||
42 | down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); | 42 | down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); |
43 | 43 | if (*offset == 0) | |
44 | nr = *offset; | ||
45 | if (nr == 0) | ||
46 | return SEQ_START_TOKEN; | 44 | return SEQ_START_TOKEN; |
47 | 45 | while (1) { | |
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) | ||
54 | dev = driver_find_device(&qeth_ccwgroup_driver.driver, dev, | 46 | dev = driver_find_device(&qeth_ccwgroup_driver.driver, dev, |
55 | NULL, qeth_procfile_seq_match); | 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 | static void | 55 | static void |
@@ -66,19 +62,14 @@ static void * | |||
66 | qeth_procfile_seq_next(struct seq_file *s, void *it, loff_t *offset) | 62 | qeth_procfile_seq_next(struct seq_file *s, void *it, loff_t *offset) |
67 | { | 63 | { |
68 | struct device *prev, *next; | 64 | struct device *prev, *next; |
69 | 65 | ||
70 | if (it == SEQ_START_TOKEN) { | 66 | if (it == SEQ_START_TOKEN) |
71 | next = driver_find_device(&qeth_ccwgroup_driver.driver, | 67 | prev = NULL; |
72 | NULL, NULL, qeth_procfile_seq_match); | 68 | else |
73 | if (next) | 69 | prev = (struct device *) it; |
74 | (*offset)++; | ||
75 | return (void *) next; | ||
76 | } | ||
77 | prev = (struct device *) it; | ||
78 | next = driver_find_device(&qeth_ccwgroup_driver.driver, | 70 | next = driver_find_device(&qeth_ccwgroup_driver.driver, |
79 | prev, NULL, qeth_procfile_seq_match); | 71 | prev, NULL, qeth_procfile_seq_match); |
80 | if (next) | 72 | (*offset)++; |
81 | (*offset)++; | ||
82 | return (void *) next; | 73 | return (void *) next; |
83 | } | 74 | } |
84 | 75 | ||
@@ -87,7 +78,7 @@ qeth_get_router_str(struct qeth_card *card, int ipv) | |||
87 | { | 78 | { |
88 | int routing_type = 0; | 79 | int routing_type = 0; |
89 | 80 | ||
90 | if (ipv == 4){ | 81 | if (ipv == 4) { |
91 | routing_type = card->options.route4.type; | 82 | routing_type = card->options.route4.type; |
92 | } else { | 83 | } else { |
93 | #ifdef CONFIG_QETH_IPV6 | 84 | #ifdef CONFIG_QETH_IPV6 |
@@ -154,6 +145,7 @@ qeth_procfile_seq_show(struct seq_file *s, void *it) | |||
154 | card->qdio.in_buf_pool.buf_count); | 145 | card->qdio.in_buf_pool.buf_count); |
155 | else | 146 | else |
156 | seq_printf(s, " +++ LAN OFFLINE +++\n"); | 147 | seq_printf(s, " +++ LAN OFFLINE +++\n"); |
148 | put_device(device); | ||
157 | } | 149 | } |
158 | return 0; | 150 | return 0; |
159 | } | 151 | } |
@@ -184,51 +176,16 @@ static struct file_operations qeth_procfile_fops = { | |||
184 | static struct proc_dir_entry *qeth_perf_procfile; | 176 | static struct proc_dir_entry *qeth_perf_procfile; |
185 | 177 | ||
186 | #ifdef CONFIG_QETH_PERF_STATS | 178 | #ifdef CONFIG_QETH_PERF_STATS |
187 | |||
188 | static void * | ||
189 | qeth_perf_procfile_seq_start(struct seq_file *s, loff_t *offset) | ||
190 | { | ||
191 | struct device *dev = NULL; | ||
192 | int nr; | ||
193 | |||
194 | down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); | ||
195 | /* get card at pos *offset */ | ||
196 | dev = driver_find_device(&qeth_ccwgroup_driver.driver, NULL, NULL, | ||
197 | qeth_procfile_seq_match); | ||
198 | |||
199 | /* get card at pos *offset */ | ||
200 | nr = *offset; | ||
201 | while (nr-- > 1 && dev) | ||
202 | dev = driver_find_device(&qeth_ccwgroup_driver.driver, dev, | ||
203 | NULL, qeth_procfile_seq_match); | ||
204 | return (void *) dev; | ||
205 | } | ||
206 | |||
207 | static void | ||
208 | qeth_perf_procfile_seq_stop(struct seq_file *s, void* it) | ||
209 | { | ||
210 | up_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); | ||
211 | } | ||
212 | |||
213 | static void * | ||
214 | qeth_perf_procfile_seq_next(struct seq_file *s, void *it, loff_t *offset) | ||
215 | { | ||
216 | struct device *prev, *next; | ||
217 | |||
218 | prev = (struct device *) it; | ||
219 | next = driver_find_device(&qeth_ccwgroup_driver.driver, prev, | ||
220 | NULL, qeth_procfile_seq_match); | ||
221 | if (next) | ||
222 | (*offset)++; | ||
223 | return (void *) next; | ||
224 | } | ||
225 | |||
226 | static int | 179 | static int |
227 | qeth_perf_procfile_seq_show(struct seq_file *s, void *it) | 180 | qeth_perf_procfile_seq_show(struct seq_file *s, void *it) |
228 | { | 181 | { |
229 | struct device *device; | 182 | struct device *device; |
230 | struct qeth_card *card; | 183 | struct qeth_card *card; |
231 | 184 | ||
185 | |||
186 | if (it == SEQ_START_TOKEN) | ||
187 | return 0; | ||
188 | |||
232 | device = (struct device *) it; | 189 | device = (struct device *) it; |
233 | card = device->driver_data; | 190 | card = device->driver_data; |
234 | seq_printf(s, "For card with devnos %s/%s/%s (%s):\n", | 191 | seq_printf(s, "For card with devnos %s/%s/%s (%s):\n", |
@@ -295,13 +252,14 @@ qeth_perf_procfile_seq_show(struct seq_file *s, void *it) | |||
295 | card->perf_stats.outbound_do_qdio_time, | 252 | card->perf_stats.outbound_do_qdio_time, |
296 | card->perf_stats.outbound_do_qdio_cnt | 253 | card->perf_stats.outbound_do_qdio_cnt |
297 | ); | 254 | ); |
255 | put_device(device); | ||
298 | return 0; | 256 | return 0; |
299 | } | 257 | } |
300 | 258 | ||
301 | static struct seq_operations qeth_perf_procfile_seq_ops = { | 259 | static struct seq_operations qeth_perf_procfile_seq_ops = { |
302 | .start = qeth_perf_procfile_seq_start, | 260 | .start = qeth_procfile_seq_start, |
303 | .stop = qeth_perf_procfile_seq_stop, | 261 | .stop = qeth_procfile_seq_stop, |
304 | .next = qeth_perf_procfile_seq_next, | 262 | .next = qeth_procfile_seq_next, |
305 | .show = qeth_perf_procfile_seq_show, | 263 | .show = qeth_perf_procfile_seq_show, |
306 | }; | 264 | }; |
307 | 265 | ||
@@ -324,93 +282,6 @@ static struct file_operations qeth_perf_procfile_fops = { | |||
324 | #define qeth_perf_procfile_created 1 | 282 | #define qeth_perf_procfile_created 1 |
325 | #endif /* CONFIG_QETH_PERF_STATS */ | 283 | #endif /* CONFIG_QETH_PERF_STATS */ |
326 | 284 | ||
327 | /***** /proc/qeth_ipa_takeover *****/ | ||
328 | #define QETH_IPATO_PROCFILE_NAME "qeth_ipa_takeover" | ||
329 | static struct proc_dir_entry *qeth_ipato_procfile; | ||
330 | |||
331 | static void * | ||
332 | qeth_ipato_procfile_seq_start(struct seq_file *s, loff_t *offset) | ||
333 | { | ||
334 | struct device *dev; | ||
335 | loff_t nr; | ||
336 | |||
337 | down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); | ||
338 | /* TODO: finish this */ | ||
339 | /* | ||
340 | * maybe SEQ_SATRT_TOKEN can be returned for offset 0 | ||
341 | * output driver settings then; | ||
342 | * else output setting for respective card | ||
343 | */ | ||
344 | |||
345 | dev = driver_find_device(&qeth_ccwgroup_driver.driver, NULL, NULL, | ||
346 | qeth_procfile_seq_match); | ||
347 | |||
348 | /* get card at pos *offset */ | ||
349 | nr = *offset; | ||
350 | while (nr-- > 1 && dev) | ||
351 | dev = driver_find_device(&qeth_ccwgroup_driver.driver, dev, | ||
352 | NULL, qeth_procfile_seq_match); | ||
353 | return (void *) dev; | ||
354 | } | ||
355 | |||
356 | static void | ||
357 | qeth_ipato_procfile_seq_stop(struct seq_file *s, void* it) | ||
358 | { | ||
359 | up_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); | ||
360 | } | ||
361 | |||
362 | static void * | ||
363 | qeth_ipato_procfile_seq_next(struct seq_file *s, void *it, loff_t *offset) | ||
364 | { | ||
365 | struct device *prev, *next; | ||
366 | |||
367 | prev = (struct device *) it; | ||
368 | next = driver_find_device(&qeth_ccwgroup_driver.driver, prev, | ||
369 | NULL, qeth_procfile_seq_match); | ||
370 | if (next) | ||
371 | (*offset)++; | ||
372 | return (void *) next; | ||
373 | } | ||
374 | |||
375 | static int | ||
376 | qeth_ipato_procfile_seq_show(struct seq_file *s, void *it) | ||
377 | { | ||
378 | struct device *device; | ||
379 | struct qeth_card *card; | ||
380 | |||
381 | /* TODO: finish this */ | ||
382 | /* | ||
383 | * maybe SEQ_SATRT_TOKEN can be returned for offset 0 | ||
384 | * output driver settings then; | ||
385 | * else output setting for respective card | ||
386 | */ | ||
387 | device = (struct device *) it; | ||
388 | card = device->driver_data; | ||
389 | |||
390 | return 0; | ||
391 | } | ||
392 | |||
393 | static struct seq_operations qeth_ipato_procfile_seq_ops = { | ||
394 | .start = qeth_ipato_procfile_seq_start, | ||
395 | .stop = qeth_ipato_procfile_seq_stop, | ||
396 | .next = qeth_ipato_procfile_seq_next, | ||
397 | .show = qeth_ipato_procfile_seq_show, | ||
398 | }; | ||
399 | |||
400 | static int | ||
401 | qeth_ipato_procfile_open(struct inode *inode, struct file *file) | ||
402 | { | ||
403 | return seq_open(file, &qeth_ipato_procfile_seq_ops); | ||
404 | } | ||
405 | |||
406 | static struct file_operations qeth_ipato_procfile_fops = { | ||
407 | .owner = THIS_MODULE, | ||
408 | .open = qeth_ipato_procfile_open, | ||
409 | .read = seq_read, | ||
410 | .llseek = seq_lseek, | ||
411 | .release = seq_release, | ||
412 | }; | ||
413 | |||
414 | int __init | 285 | int __init |
415 | qeth_create_procfs_entries(void) | 286 | qeth_create_procfs_entries(void) |
416 | { | 287 | { |
@@ -426,13 +297,7 @@ qeth_create_procfs_entries(void) | |||
426 | qeth_perf_procfile->proc_fops = &qeth_perf_procfile_fops; | 297 | qeth_perf_procfile->proc_fops = &qeth_perf_procfile_fops; |
427 | #endif /* CONFIG_QETH_PERF_STATS */ | 298 | #endif /* CONFIG_QETH_PERF_STATS */ |
428 | 299 | ||
429 | qeth_ipato_procfile = create_proc_entry(QETH_IPATO_PROCFILE_NAME, | ||
430 | S_IFREG | 0444, NULL); | ||
431 | if (qeth_ipato_procfile) | ||
432 | qeth_ipato_procfile->proc_fops = &qeth_ipato_procfile_fops; | ||
433 | |||
434 | if (qeth_procfile && | 300 | if (qeth_procfile && |
435 | qeth_ipato_procfile && | ||
436 | qeth_perf_procfile_created) | 301 | qeth_perf_procfile_created) |
437 | return 0; | 302 | return 0; |
438 | else | 303 | else |
@@ -446,62 +311,5 @@ qeth_remove_procfs_entries(void) | |||
446 | remove_proc_entry(QETH_PROCFILE_NAME, NULL); | 311 | remove_proc_entry(QETH_PROCFILE_NAME, NULL); |
447 | if (qeth_perf_procfile) | 312 | if (qeth_perf_procfile) |
448 | remove_proc_entry(QETH_PERF_PROCFILE_NAME, NULL); | 313 | remove_proc_entry(QETH_PERF_PROCFILE_NAME, NULL); |
449 | if (qeth_ipato_procfile) | ||
450 | remove_proc_entry(QETH_IPATO_PROCFILE_NAME, NULL); | ||
451 | } | 314 | } |
452 | 315 | ||
453 | |||
454 | /* ONLY FOR DEVELOPMENT! -> make it as module */ | ||
455 | /* | ||
456 | static void | ||
457 | qeth_create_sysfs_entries(void) | ||
458 | { | ||
459 | struct device *dev; | ||
460 | |||
461 | down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); | ||
462 | |||
463 | list_for_each_entry(dev, &qeth_ccwgroup_driver.driver.devices, | ||
464 | driver_list) | ||
465 | qeth_create_device_attributes(dev); | ||
466 | |||
467 | up_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); | ||
468 | } | ||
469 | |||
470 | static void | ||
471 | qeth_remove_sysfs_entries(void) | ||
472 | { | ||
473 | struct device *dev; | ||
474 | |||
475 | down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); | ||
476 | |||
477 | list_for_each_entry(dev, &qeth_ccwgroup_driver.driver.devices, | ||
478 | driver_list) | ||
479 | qeth_remove_device_attributes(dev); | ||
480 | |||
481 | up_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); | ||
482 | } | ||
483 | |||
484 | static int __init | ||
485 | qeth_fs_init(void) | ||
486 | { | ||
487 | printk(KERN_INFO "qeth_fs_init\n"); | ||
488 | qeth_create_procfs_entries(); | ||
489 | qeth_create_sysfs_entries(); | ||
490 | |||
491 | return 0; | ||
492 | } | ||
493 | |||
494 | static void __exit | ||
495 | qeth_fs_exit(void) | ||
496 | { | ||
497 | printk(KERN_INFO "qeth_fs_exit\n"); | ||
498 | qeth_remove_procfs_entries(); | ||
499 | qeth_remove_sysfs_entries(); | ||
500 | } | ||
501 | |||
502 | |||
503 | module_init(qeth_fs_init); | ||
504 | module_exit(qeth_fs_exit); | ||
505 | |||
506 | MODULE_LICENSE("GPL"); | ||
507 | */ | ||
diff --git a/drivers/s390/net/qeth_sys.c b/drivers/s390/net/qeth_sys.c index ddd6019ba092..0ea185f70f75 100644 --- a/drivers/s390/net/qeth_sys.c +++ b/drivers/s390/net/qeth_sys.c | |||
@@ -1,6 +1,6 @@ | |||
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 | * Linux on zSeries OSA Express and HiperSockets support | 5 | * Linux on zSeries OSA Express and HiperSockets support |
6 | * This file contains code related to sysfs. | 6 | * This file contains code related to sysfs. |
@@ -20,7 +20,7 @@ | |||
20 | #include "qeth_mpc.h" | 20 | #include "qeth_mpc.h" |
21 | #include "qeth_fs.h" | 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,7 +160,7 @@ qeth_dev_portname_store(struct device *dev, struct device_attribute *attr, const | |||
160 | return -EPERM; | 160 | return -EPERM; |
161 | 161 | ||
162 | tmp = strsep((char **) &buf, "\n"); | 162 | tmp = strsep((char **) &buf, "\n"); |
163 | if ((strlen(tmp) > 8) || (strlen(tmp) < 2)) | 163 | if ((strlen(tmp) > 8) || (strlen(tmp) == 0)) |
164 | return -EINVAL; | 164 | return -EINVAL; |
165 | 165 | ||
166 | card->info.portname[0] = strlen(tmp); | 166 | card->info.portname[0] = strlen(tmp); |
diff --git a/drivers/s390/net/qeth_tso.h b/drivers/s390/net/qeth_tso.h index e245af3c4cbd..3c50b6f24f51 100644 --- a/drivers/s390/net/qeth_tso.h +++ b/drivers/s390/net/qeth_tso.h | |||
@@ -1,5 +1,5 @@ | |||
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 | * Header file for qeth TCP Segmentation Offload support. | 4 | * Header file for qeth TCP Segmentation Offload support. |
5 | * | 5 | * |
@@ -7,7 +7,7 @@ | |||
7 | * | 7 | * |
8 | * Author(s): Frank Pavlic <fpavlic@de.ibm.com> | 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 | #ifndef __QETH_TSO_H__ | 13 | #ifndef __QETH_TSO_H__ |
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 94e5167f260d..e36c21e06d31 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c | |||
@@ -400,6 +400,35 @@ static struct scsi_target *scsi_alloc_target(struct device *parent, | |||
400 | return found_target; | 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 | device_del(&starget->dev); | ||
422 | transport_unregister_device(&starget->dev); | ||
423 | put_device(&starget->dev); | ||
424 | return; | ||
425 | |||
426 | } | ||
427 | spin_unlock_irqrestore(shost->host_lock, flags); | ||
428 | |||
429 | return; | ||
430 | } | ||
431 | |||
403 | /** | 432 | /** |
404 | * scsi_target_reap - check to see if target is in use and destroy if not | 433 | * scsi_target_reap - check to see if target is in use and destroy if not |
405 | * | 434 | * |
@@ -411,19 +440,18 @@ static struct scsi_target *scsi_alloc_target(struct device *parent, | |||
411 | */ | 440 | */ |
412 | void scsi_target_reap(struct scsi_target *starget) | 441 | void scsi_target_reap(struct scsi_target *starget) |
413 | { | 442 | { |
414 | struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); | 443 | struct work_queue_wrapper *wqw = |
415 | unsigned long flags; | 444 | kzalloc(sizeof(struct work_queue_wrapper), GFP_ATOMIC); |
416 | spin_lock_irqsave(shost->host_lock, flags); | ||
417 | 445 | ||
418 | if (--starget->reap_ref == 0 && list_empty(&starget->devices)) { | 446 | if (!wqw) { |
419 | list_del_init(&starget->siblings); | 447 | starget_printk(KERN_ERR, starget, |
420 | spin_unlock_irqrestore(shost->host_lock, flags); | 448 | "Failed to allocate memory in scsi_reap_target()\n"); |
421 | device_del(&starget->dev); | ||
422 | transport_unregister_device(&starget->dev); | ||
423 | put_device(&starget->dev); | ||
424 | return; | 449 | return; |
425 | } | 450 | } |
426 | spin_unlock_irqrestore(shost->host_lock, flags); | 451 | |
452 | INIT_WORK(&wqw->work, scsi_target_reap_work, wqw); | ||
453 | wqw->starget = starget; | ||
454 | schedule_work(&wqw->work); | ||
427 | } | 455 | } |
428 | 456 | ||
429 | /** | 457 | /** |
diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c index 6cd5931d9a54..2a1a99a2ef56 100644 --- a/drivers/scsi/scsi_transport_fc.c +++ b/drivers/scsi/scsi_transport_fc.c | |||
@@ -105,6 +105,7 @@ static struct { | |||
105 | { FC_PORTSTATE_LINKDOWN, "Linkdown" }, | 105 | { FC_PORTSTATE_LINKDOWN, "Linkdown" }, |
106 | { FC_PORTSTATE_ERROR, "Error" }, | 106 | { FC_PORTSTATE_ERROR, "Error" }, |
107 | { FC_PORTSTATE_LOOPBACK, "Loopback" }, | 107 | { FC_PORTSTATE_LOOPBACK, "Loopback" }, |
108 | { FC_PORTSTATE_DELETED, "Deleted" }, | ||
108 | }; | 109 | }; |
109 | fc_enum_name_search(port_state, fc_port_state, fc_port_state_names) | 110 | fc_enum_name_search(port_state, fc_port_state, fc_port_state_names) |
110 | #define FC_PORTSTATE_MAX_NAMELEN 20 | 111 | #define FC_PORTSTATE_MAX_NAMELEN 20 |
@@ -211,6 +212,7 @@ fc_bitfield_name_search(remote_port_roles, fc_remote_port_role_names) | |||
211 | #define FC_MGMTSRVR_PORTID 0x00000a | 212 | #define FC_MGMTSRVR_PORTID 0x00000a |
212 | 213 | ||
213 | 214 | ||
215 | static void fc_shost_remove_rports(void *data); | ||
214 | static void fc_timeout_deleted_rport(void *data); | 216 | static void fc_timeout_deleted_rport(void *data); |
215 | static void fc_scsi_scan_rport(void *data); | 217 | static void fc_scsi_scan_rport(void *data); |
216 | static void fc_rport_terminate(struct fc_rport *rport); | 218 | static void fc_rport_terminate(struct fc_rport *rport); |
@@ -318,6 +320,8 @@ static int fc_host_setup(struct transport_container *tc, struct device *dev, | |||
318 | fc_host_next_rport_number(shost) = 0; | 320 | fc_host_next_rport_number(shost) = 0; |
319 | fc_host_next_target_id(shost) = 0; | 321 | fc_host_next_target_id(shost) = 0; |
320 | 322 | ||
323 | fc_host_flags(shost) = 0; | ||
324 | INIT_WORK(&fc_host_rport_del_work(shost), fc_shost_remove_rports, shost); | ||
321 | return 0; | 325 | return 0; |
322 | } | 326 | } |
323 | 327 | ||
@@ -387,6 +391,7 @@ show_fc_rport_##field (struct class_device *cdev, char *buf) \ | |||
387 | struct fc_internal *i = to_fc_internal(shost->transportt); \ | 391 | struct fc_internal *i = to_fc_internal(shost->transportt); \ |
388 | if ((i->f->get_rport_##field) && \ | 392 | if ((i->f->get_rport_##field) && \ |
389 | !((rport->port_state == FC_PORTSTATE_BLOCKED) || \ | 393 | !((rport->port_state == FC_PORTSTATE_BLOCKED) || \ |
394 | (rport->port_state == FC_PORTSTATE_DELETED) || \ | ||
390 | (rport->port_state == FC_PORTSTATE_NOTPRESENT))) \ | 395 | (rport->port_state == FC_PORTSTATE_NOTPRESENT))) \ |
391 | i->f->get_rport_##field(rport); \ | 396 | i->f->get_rport_##field(rport); \ |
392 | return snprintf(buf, sz, format_string, cast rport->field); \ | 397 | return snprintf(buf, sz, format_string, cast rport->field); \ |
@@ -402,6 +407,7 @@ store_fc_rport_##field(struct class_device *cdev, const char *buf, \ | |||
402 | struct Scsi_Host *shost = rport_to_shost(rport); \ | 407 | struct Scsi_Host *shost = rport_to_shost(rport); \ |
403 | struct fc_internal *i = to_fc_internal(shost->transportt); \ | 408 | struct fc_internal *i = to_fc_internal(shost->transportt); \ |
404 | if ((rport->port_state == FC_PORTSTATE_BLOCKED) || \ | 409 | if ((rport->port_state == FC_PORTSTATE_BLOCKED) || \ |
410 | (rport->port_state == FC_PORTSTATE_DELETED) || \ | ||
405 | (rport->port_state == FC_PORTSTATE_NOTPRESENT)) \ | 411 | (rport->port_state == FC_PORTSTATE_NOTPRESENT)) \ |
406 | return -EBUSY; \ | 412 | return -EBUSY; \ |
407 | val = simple_strtoul(buf, NULL, 0); \ | 413 | val = simple_strtoul(buf, NULL, 0); \ |
@@ -519,6 +525,7 @@ store_fc_rport_dev_loss_tmo(struct class_device *cdev, const char *buf, | |||
519 | struct Scsi_Host *shost = rport_to_shost(rport); | 525 | struct Scsi_Host *shost = rport_to_shost(rport); |
520 | struct fc_internal *i = to_fc_internal(shost->transportt); | 526 | struct fc_internal *i = to_fc_internal(shost->transportt); |
521 | if ((rport->port_state == FC_PORTSTATE_BLOCKED) || | 527 | if ((rport->port_state == FC_PORTSTATE_BLOCKED) || |
528 | (rport->port_state == FC_PORTSTATE_DELETED) || | ||
522 | (rport->port_state == FC_PORTSTATE_NOTPRESENT)) | 529 | (rport->port_state == FC_PORTSTATE_NOTPRESENT)) |
523 | return -EBUSY; | 530 | return -EBUSY; |
524 | val = simple_strtoul(buf, NULL, 0); | 531 | val = simple_strtoul(buf, NULL, 0); |
@@ -1769,7 +1776,7 @@ fc_timeout_deleted_rport(void *data) | |||
1769 | rport->maxframe_size = -1; | 1776 | rport->maxframe_size = -1; |
1770 | rport->supported_classes = FC_COS_UNSPECIFIED; | 1777 | rport->supported_classes = FC_COS_UNSPECIFIED; |
1771 | rport->roles = FC_RPORT_ROLE_UNKNOWN; | 1778 | rport->roles = FC_RPORT_ROLE_UNKNOWN; |
1772 | rport->port_state = FC_PORTSTATE_NOTPRESENT; | 1779 | rport->port_state = FC_PORTSTATE_DELETED; |
1773 | 1780 | ||
1774 | /* remove the identifiers that aren't used in the consisting binding */ | 1781 | /* remove the identifiers that aren't used in the consisting binding */ |
1775 | switch (fc_host_tgtid_bind_type(shost)) { | 1782 | switch (fc_host_tgtid_bind_type(shost)) { |
@@ -1789,14 +1796,23 @@ fc_timeout_deleted_rport(void *data) | |||
1789 | break; | 1796 | break; |
1790 | } | 1797 | } |
1791 | 1798 | ||
1792 | spin_unlock_irqrestore(shost->host_lock, flags); | ||
1793 | |||
1794 | /* | 1799 | /* |
1795 | * As this only occurs if the remote port (scsi target) | 1800 | * As this only occurs if the remote port (scsi target) |
1796 | * went away and didn't come back - we'll remove | 1801 | * went away and didn't come back - we'll remove |
1797 | * all attached scsi devices. | 1802 | * all attached scsi devices. |
1803 | * | ||
1804 | * We'll schedule the shost work item to perform the actual removal | ||
1805 | * to avoid recursion in the different flush calls if we perform | ||
1806 | * the removal in each target - and there are lots of targets | ||
1807 | * whose timeouts fire at the same time. | ||
1798 | */ | 1808 | */ |
1799 | fc_rport_tgt_remove(rport); | 1809 | |
1810 | if ( !(fc_host_flags(shost) & FC_SHOST_RPORT_DEL_SCHEDULED)) { | ||
1811 | fc_host_flags(shost) |= FC_SHOST_RPORT_DEL_SCHEDULED; | ||
1812 | scsi_queue_work(shost, &fc_host_rport_del_work(shost)); | ||
1813 | } | ||
1814 | |||
1815 | spin_unlock_irqrestore(shost->host_lock, flags); | ||
1800 | } | 1816 | } |
1801 | 1817 | ||
1802 | /** | 1818 | /** |
@@ -1818,6 +1834,41 @@ fc_scsi_scan_rport(void *data) | |||
1818 | } | 1834 | } |
1819 | 1835 | ||
1820 | 1836 | ||
1837 | /** | ||
1838 | * fc_shost_remove_rports - called to remove all rports that are marked | ||
1839 | * as in a deleted (not connected) state. | ||
1840 | * | ||
1841 | * @data: shost whose rports are to be looked at | ||
1842 | **/ | ||
1843 | static void | ||
1844 | fc_shost_remove_rports(void *data) | ||
1845 | { | ||
1846 | struct Scsi_Host *shost = (struct Scsi_Host *)data; | ||
1847 | struct fc_rport *rport, *next_rport; | ||
1848 | unsigned long flags; | ||
1849 | |||
1850 | spin_lock_irqsave(shost->host_lock, flags); | ||
1851 | while (fc_host_flags(shost) & FC_SHOST_RPORT_DEL_SCHEDULED) { | ||
1852 | |||
1853 | fc_host_flags(shost) &= ~FC_SHOST_RPORT_DEL_SCHEDULED; | ||
1854 | |||
1855 | restart_search: | ||
1856 | list_for_each_entry_safe(rport, next_rport, | ||
1857 | &fc_host_rport_bindings(shost), peers) { | ||
1858 | if (rport->port_state == FC_PORTSTATE_DELETED) { | ||
1859 | rport->port_state = FC_PORTSTATE_NOTPRESENT; | ||
1860 | spin_unlock_irqrestore(shost->host_lock, flags); | ||
1861 | fc_rport_tgt_remove(rport); | ||
1862 | spin_lock_irqsave(shost->host_lock, flags); | ||
1863 | goto restart_search; | ||
1864 | } | ||
1865 | } | ||
1866 | |||
1867 | } | ||
1868 | spin_unlock_irqrestore(shost->host_lock, flags); | ||
1869 | } | ||
1870 | |||
1871 | |||
1821 | MODULE_AUTHOR("Martin Hicks"); | 1872 | MODULE_AUTHOR("Martin Hicks"); |
1822 | MODULE_DESCRIPTION("FC Transport Attributes"); | 1873 | MODULE_DESCRIPTION("FC Transport Attributes"); |
1823 | MODULE_LICENSE("GPL"); | 1874 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index ad47c1b84c3f..812bae62c8ec 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig | |||
@@ -10,7 +10,7 @@ menu "Serial drivers" | |||
10 | # The new 8250/16550 serial drivers | 10 | # The new 8250/16550 serial drivers |
11 | config SERIAL_8250 | 11 | config SERIAL_8250 |
12 | tristate "8250/16550 and compatible serial support" | 12 | tristate "8250/16550 and compatible serial support" |
13 | depends on (BROKEN || !(SPARC64 || SPARC32)) | 13 | depends on (BROKEN || !SPARC) |
14 | select SERIAL_CORE | 14 | select SERIAL_CORE |
15 | ---help--- | 15 | ---help--- |
16 | This selects whether you want to include the driver for the standard | 16 | This selects whether you want to include the driver for the standard |
@@ -469,14 +469,14 @@ config SERIAL_IMX_CONSOLE | |||
469 | 469 | ||
470 | config SERIAL_SUNCORE | 470 | config SERIAL_SUNCORE |
471 | bool | 471 | bool |
472 | depends on SPARC32 || SPARC64 | 472 | depends on SPARC |
473 | select SERIAL_CORE | 473 | select SERIAL_CORE |
474 | select SERIAL_CORE_CONSOLE | 474 | select SERIAL_CORE_CONSOLE |
475 | default y | 475 | default y |
476 | 476 | ||
477 | config SERIAL_SUNZILOG | 477 | config SERIAL_SUNZILOG |
478 | tristate "Sun Zilog8530 serial support" | 478 | tristate "Sun Zilog8530 serial support" |
479 | depends on SPARC32 || SPARC64 | 479 | depends on SPARC |
480 | help | 480 | help |
481 | This driver supports the Zilog8530 serial ports found on many Sparc | 481 | This driver supports the Zilog8530 serial ports found on many Sparc |
482 | systems. Say Y or M if you want to be able to these serial ports. | 482 | systems. Say Y or M if you want to be able to these serial ports. |
@@ -491,7 +491,7 @@ config SERIAL_SUNZILOG_CONSOLE | |||
491 | 491 | ||
492 | config SERIAL_SUNSU | 492 | config SERIAL_SUNSU |
493 | tristate "Sun SU serial support" | 493 | tristate "Sun SU serial support" |
494 | depends on (SPARC32 || SPARC64) && PCI | 494 | depends on SPARC && PCI |
495 | help | 495 | help |
496 | This driver supports the 8250 serial ports that run the keyboard and | 496 | This driver supports the 8250 serial ports that run the keyboard and |
497 | mouse on (PCI) UltraSPARC systems. Say Y or M if you want to be able | 497 | mouse on (PCI) UltraSPARC systems. Say Y or M if you want to be able |
@@ -547,7 +547,7 @@ config PDC_CONSOLE | |||
547 | 547 | ||
548 | config SERIAL_SUNSAB | 548 | config SERIAL_SUNSAB |
549 | tristate "Sun Siemens SAB82532 serial support" | 549 | tristate "Sun Siemens SAB82532 serial support" |
550 | depends on (SPARC32 || SPARC64) && PCI | 550 | depends on SPARC && PCI |
551 | help | 551 | help |
552 | This driver supports the Siemens SAB82532 DUSCC serial ports on newer | 552 | This driver supports the Siemens SAB82532 DUSCC serial ports on newer |
553 | (PCI) UltraSPARC systems. Say Y or M if you want to be able to these | 553 | (PCI) UltraSPARC systems. Say Y or M if you want to be able to these |
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index e197ce9353de..e80ef9467825 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c | |||
@@ -1432,7 +1432,8 @@ static int usb_generic_suspend(struct device *dev, pm_message_t message) | |||
1432 | mark_quiesced(intf); | 1432 | mark_quiesced(intf); |
1433 | } else { | 1433 | } else { |
1434 | // FIXME else if there's no suspend method, disconnect... | 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 | status = 0; | 1437 | status = 0; |
1437 | } | 1438 | } |
1438 | return status; | 1439 | return status; |
@@ -1460,8 +1461,10 @@ static int usb_generic_resume(struct device *dev) | |||
1460 | } | 1461 | } |
1461 | 1462 | ||
1462 | if ((dev->driver == NULL) || | 1463 | if ((dev->driver == NULL) || |
1463 | (dev->driver_data == &usb_generic_driver_data)) | 1464 | (dev->driver_data == &usb_generic_driver_data)) { |
1465 | dev->power.power_state.event = PM_EVENT_FREEZE; | ||
1464 | return 0; | 1466 | return 0; |
1467 | } | ||
1465 | 1468 | ||
1466 | intf = to_usb_interface(dev); | 1469 | intf = to_usb_interface(dev); |
1467 | driver = to_usb_driver(dev->driver); | 1470 | driver = to_usb_driver(dev->driver); |
@@ -1481,7 +1484,7 @@ static int usb_generic_resume(struct device *dev) | |||
1481 | mark_quiesced(intf); | 1484 | mark_quiesced(intf); |
1482 | } | 1485 | } |
1483 | } else | 1486 | } else |
1484 | dev_warn(dev, "no %s?\n", "resume"); | 1487 | dev_warn(dev, "no resume for driver %s?\n", driver->name); |
1485 | return 0; | 1488 | return 0; |
1486 | } | 1489 | } |
1487 | 1490 | ||
diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c index 4837524eada7..4ef5527028c5 100644 --- a/drivers/usb/storage/scsiglue.c +++ b/drivers/usb/storage/scsiglue.c | |||
@@ -109,7 +109,7 @@ static int slave_configure(struct scsi_device *sdev) | |||
109 | * data comes from. | 109 | * data comes from. |
110 | */ | 110 | */ |
111 | if (sdev->scsi_level < SCSI_2) | 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 | /* According to the technical support people at Genesys Logic, | 114 | /* According to the technical support people at Genesys Logic, |
115 | * devices using their chips have problems transferring more than | 115 | * devices using their chips have problems transferring more than |
@@ -162,7 +162,7 @@ static int slave_configure(struct scsi_device *sdev) | |||
162 | * a Get-Max-LUN request, we won't lose much by setting the | 162 | * a Get-Max-LUN request, we won't lose much by setting the |
163 | * revision level down to 2. The only devices that would be | 163 | * revision level down to 2. The only devices that would be |
164 | * affected are those with sparse LUNs. */ | 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 | /* USB-IDE bridges tend to report SK = 0x04 (Non-recoverable | 167 | /* USB-IDE bridges tend to report SK = 0x04 (Non-recoverable |
168 | * Hardware Error) when any low-level error occurs, | 168 | * Hardware Error) when any low-level error occurs, |
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 3e470c8b4193..cc8e3bf5001b 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig | |||
@@ -536,13 +536,13 @@ config FB_SUN3 | |||
536 | 536 | ||
537 | config FB_SBUS | 537 | config FB_SBUS |
538 | bool "SBUS and UPA framebuffers" | 538 | bool "SBUS and UPA framebuffers" |
539 | depends on (FB = y) && (SPARC32 || SPARC64) | 539 | depends on (FB = y) && SPARC |
540 | help | 540 | help |
541 | Say Y if you want support for SBUS or UPA based frame buffer device. | 541 | Say Y if you want support for SBUS or UPA based frame buffer device. |
542 | 542 | ||
543 | config FB_BW2 | 543 | config FB_BW2 |
544 | bool "BWtwo support" | 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 | select FB_CFB_FILLRECT | 546 | select FB_CFB_FILLRECT |
547 | select FB_CFB_COPYAREA | 547 | select FB_CFB_COPYAREA |
548 | select FB_CFB_IMAGEBLIT | 548 | select FB_CFB_IMAGEBLIT |
@@ -551,7 +551,7 @@ config FB_BW2 | |||
551 | 551 | ||
552 | config FB_CG3 | 552 | config FB_CG3 |
553 | bool "CGthree support" | 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 | select FB_CFB_FILLRECT | 555 | select FB_CFB_FILLRECT |
556 | select FB_CFB_COPYAREA | 556 | select FB_CFB_COPYAREA |
557 | select FB_CFB_IMAGEBLIT | 557 | select FB_CFB_IMAGEBLIT |
@@ -560,7 +560,7 @@ config FB_CG3 | |||
560 | 560 | ||
561 | config FB_CG6 | 561 | config FB_CG6 |
562 | bool "CGsix (GX,TurboGX) support" | 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 | select FB_CFB_COPYAREA | 564 | select FB_CFB_COPYAREA |
565 | select FB_CFB_IMAGEBLIT | 565 | select FB_CFB_IMAGEBLIT |
566 | help | 566 | help |
@@ -1268,7 +1268,7 @@ config FB_LEO | |||
1268 | 1268 | ||
1269 | config FB_PCI | 1269 | config FB_PCI |
1270 | bool "PCI framebuffers" | 1270 | bool "PCI framebuffers" |
1271 | depends on (FB = y) && PCI && (SPARC64 || SPARC32) | 1271 | depends on (FB = y) && PCI && SPARC |
1272 | 1272 | ||
1273 | config FB_IGA | 1273 | config FB_IGA |
1274 | bool "IGA 168x display support" | 1274 | bool "IGA 168x display support" |
diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig index 5f74df993406..a5d09e159cd1 100644 --- a/drivers/video/console/Kconfig +++ b/drivers/video/console/Kconfig | |||
@@ -6,7 +6,7 @@ menu "Console display driver support" | |||
6 | 6 | ||
7 | config VGA_CONSOLE | 7 | config VGA_CONSOLE |
8 | bool "VGA text console" if EMBEDDED || !X86 | 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 | default y | 10 | default y |
11 | help | 11 | help |
12 | Saying Y here will allow you to use Linux in text mode through a | 12 | Saying Y here will allow you to use Linux in text mode through a |
@@ -68,7 +68,7 @@ config SGI_NEWPORT_CONSOLE | |||
68 | 68 | ||
69 | config PROM_CONSOLE | 69 | config PROM_CONSOLE |
70 | bool "PROM console" | 70 | bool "PROM console" |
71 | depends on SPARC32 || SPARC64 | 71 | depends on SPARC |
72 | help | 72 | help |
73 | Say Y to build a console driver for Sun machines that uses the | 73 | Say Y to build a console driver for Sun machines that uses the |
74 | terminal emulation built into their console PROMS. | 74 | terminal emulation built into their console PROMS. |
@@ -136,7 +136,7 @@ config FONTS | |||
136 | config FONT_8x8 | 136 | config FONT_8x8 |
137 | bool "VGA 8x8 font" if FONTS | 137 | bool "VGA 8x8 font" if FONTS |
138 | depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE | 138 | depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE |
139 | default y if !SPARC32 && !SPARC64 && !FONTS | 139 | default y if !SPARC && !FONTS |
140 | help | 140 | help |
141 | This is the "high resolution" font for the VGA frame buffer (the one | 141 | This is the "high resolution" font for the VGA frame buffer (the one |
142 | provided by the text console 80x50 (and higher) modes). | 142 | provided by the text console 80x50 (and higher) modes). |
@@ -150,7 +150,7 @@ config FONT_8x8 | |||
150 | config FONT_8x16 | 150 | config FONT_8x16 |
151 | bool "VGA 8x16 font" if FONTS | 151 | bool "VGA 8x16 font" if FONTS |
152 | depends on FRAMEBUFFER_CONSOLE || SGI_NEWPORT_CONSOLE=y || STI_CONSOLE || USB_SISUSBVGA_CON | 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 | help | 154 | help |
155 | This is the "high resolution" font for the VGA frame buffer (the one | 155 | This is the "high resolution" font for the VGA frame buffer (the one |
156 | provided by the VGA text console 80x25 mode. | 156 | provided by the VGA text console 80x25 mode. |
@@ -160,7 +160,7 @@ config FONT_8x16 | |||
160 | config FONT_6x11 | 160 | config FONT_6x11 |
161 | bool "Mac console 6x11 font (not supported by all drivers)" if FONTS | 161 | bool "Mac console 6x11 font (not supported by all drivers)" if FONTS |
162 | depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE | 162 | depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE |
163 | default y if !SPARC32 && !SPARC64 && !FONTS && MAC | 163 | default y if !SPARC && !FONTS && MAC |
164 | help | 164 | help |
165 | Small console font with Macintosh-style high-half glyphs. Some Mac | 165 | Small console font with Macintosh-style high-half glyphs. Some Mac |
166 | framebuffer drivers don't support this one at all. | 166 | framebuffer drivers don't support this one at all. |
@@ -176,7 +176,7 @@ config FONT_7x14 | |||
176 | config FONT_PEARL_8x8 | 176 | config FONT_PEARL_8x8 |
177 | bool "Pearl (old m68k) console 8x8 font" if FONTS | 177 | bool "Pearl (old m68k) console 8x8 font" if FONTS |
178 | depends on FRAMEBUFFER_CONSOLE | 178 | depends on FRAMEBUFFER_CONSOLE |
179 | default y if !SPARC32 && !SPARC64 && !FONTS && AMIGA | 179 | default y if !SPARC && !FONTS && AMIGA |
180 | help | 180 | help |
181 | Small console font with PC-style control-character and high-half | 181 | Small console font with PC-style control-character and high-half |
182 | glyphs. | 182 | glyphs. |
@@ -184,24 +184,24 @@ config FONT_PEARL_8x8 | |||
184 | config FONT_ACORN_8x8 | 184 | config FONT_ACORN_8x8 |
185 | bool "Acorn console 8x8 font" if FONTS | 185 | bool "Acorn console 8x8 font" if FONTS |
186 | depends on FRAMEBUFFER_CONSOLE | 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 | help | 188 | help |
189 | Small console font with PC-style control characters and high-half | 189 | Small console font with PC-style control characters and high-half |
190 | glyphs. | 190 | glyphs. |
191 | 191 | ||
192 | config FONT_MINI_4x6 | 192 | config FONT_MINI_4x6 |
193 | bool "Mini 4x6 font" | 193 | bool "Mini 4x6 font" |
194 | depends on !SPARC32 && !SPARC64 && FONTS | 194 | depends on !SPARC && FONTS |
195 | 195 | ||
196 | config FONT_SUN8x16 | 196 | config FONT_SUN8x16 |
197 | bool "Sparc console 8x16 font" | 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 | help | 199 | help |
200 | This is the high resolution console font for Sun machines. Say Y. | 200 | This is the high resolution console font for Sun machines. Say Y. |
201 | 201 | ||
202 | config FONT_SUN12x22 | 202 | config FONT_SUN12x22 |
203 | bool "Sparc console 12x22 font (not supported by all drivers)" | 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 | help | 205 | help |
206 | This is the high resolution console font for Sun machines with very | 206 | This is the high resolution console font for Sun machines with very |
207 | big letters (like the letters used in the SPARC PROM). If the | 207 | big letters (like the letters used in the SPARC PROM). If the |
diff --git a/drivers/video/console/fbcon_ud.c b/drivers/video/console/fbcon_ud.c index c4d7c89212b4..9dd059e8b645 100644 --- a/drivers/video/console/fbcon_ud.c +++ b/drivers/video/console/fbcon_ud.c | |||
@@ -420,13 +420,15 @@ static void ud_cursor(struct vc_data *vc, struct fb_info *info, | |||
420 | int ud_update_start(struct fb_info *info) | 420 | int ud_update_start(struct fb_info *info) |
421 | { | 421 | { |
422 | struct fbcon_ops *ops = info->fbcon_par; | 422 | struct fbcon_ops *ops = info->fbcon_par; |
423 | u32 xoffset, yoffset; | 423 | int xoffset, yoffset; |
424 | u32 vyres = GETVYRES(ops->p->scrollmode, info); | 424 | u32 vyres = GETVYRES(ops->p->scrollmode, info); |
425 | u32 vxres = GETVXRES(ops->p->scrollmode, info); | 425 | u32 vxres = GETVXRES(ops->p->scrollmode, info); |
426 | int err; | 426 | int err; |
427 | 427 | ||
428 | xoffset = (vxres - info->var.xres) - ops->var.xoffset; | 428 | xoffset = vxres - info->var.xres - ops->var.xoffset; |
429 | yoffset = (vyres - info->var.yres) - ops->var.yoffset; | 429 | yoffset = vyres - info->var.yres - ops->var.yoffset; |
430 | if (yoffset < 0) | ||
431 | yoffset += vyres; | ||
430 | ops->var.xoffset = xoffset; | 432 | ops->var.xoffset = xoffset; |
431 | ops->var.yoffset = yoffset; | 433 | ops->var.yoffset = yoffset; |
432 | err = fb_pan_display(info, &ops->var); | 434 | err = fb_pan_display(info, &ops->var); |
diff --git a/drivers/video/intelfb/intelfb.h b/drivers/video/intelfb/intelfb.h index f077ca34faba..da29d007f215 100644 --- a/drivers/video/intelfb/intelfb.h +++ b/drivers/video/intelfb/intelfb.h | |||
@@ -41,6 +41,10 @@ | |||
41 | 41 | ||
42 | /*** hw-related values ***/ | 42 | /*** hw-related values ***/ |
43 | 43 | ||
44 | /* Resource Allocation */ | ||
45 | #define INTELFB_FB_ACQUIRED 1 | ||
46 | #define INTELFB_MMIO_ACQUIRED 2 | ||
47 | |||
44 | /* PCI ids for supported devices */ | 48 | /* PCI ids for supported devices */ |
45 | #define PCI_DEVICE_ID_INTEL_830M 0x3577 | 49 | #define PCI_DEVICE_ID_INTEL_830M 0x3577 |
46 | #define PCI_DEVICE_ID_INTEL_845G 0x2562 | 50 | #define PCI_DEVICE_ID_INTEL_845G 0x2562 |
@@ -257,6 +261,7 @@ struct intelfb_info { | |||
257 | int hwcursor; | 261 | int hwcursor; |
258 | int fixed_mode; | 262 | int fixed_mode; |
259 | int ring_active; | 263 | int ring_active; |
264 | int flag; | ||
260 | 265 | ||
261 | /* hw cursor */ | 266 | /* hw cursor */ |
262 | int cursor_on; | 267 | int cursor_on; |
diff --git a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c index 427689e584da..0090544842f5 100644 --- a/drivers/video/intelfb/intelfbdrv.c +++ b/drivers/video/intelfb/intelfbdrv.c | |||
@@ -135,9 +135,6 @@ | |||
135 | static void __devinit get_initial_mode(struct intelfb_info *dinfo); | 135 | static void __devinit get_initial_mode(struct intelfb_info *dinfo); |
136 | static void update_dinfo(struct intelfb_info *dinfo, | 136 | static void update_dinfo(struct intelfb_info *dinfo, |
137 | struct fb_var_screeninfo *var); | 137 | struct fb_var_screeninfo *var); |
138 | static int intelfb_get_fix(struct fb_fix_screeninfo *fix, | ||
139 | struct fb_info *info); | ||
140 | |||
141 | static int intelfb_check_var(struct fb_var_screeninfo *var, | 138 | static int intelfb_check_var(struct fb_var_screeninfo *var, |
142 | struct fb_info *info); | 139 | struct fb_info *info); |
143 | static int intelfb_set_par(struct fb_info *info); | 140 | static int intelfb_set_par(struct fb_info *info); |
@@ -473,9 +470,9 @@ cleanup(struct intelfb_info *dinfo) | |||
473 | if (dinfo->aperture.virtual) | 470 | if (dinfo->aperture.virtual) |
474 | iounmap((void __iomem *)dinfo->aperture.virtual); | 471 | iounmap((void __iomem *)dinfo->aperture.virtual); |
475 | 472 | ||
476 | if (dinfo->mmio_base_phys) | 473 | if (dinfo->flag & INTELFB_MMIO_ACQUIRED) |
477 | release_mem_region(dinfo->mmio_base_phys, INTEL_REG_SIZE); | 474 | release_mem_region(dinfo->mmio_base_phys, INTEL_REG_SIZE); |
478 | if (dinfo->aperture.physical) | 475 | if (dinfo->flag & INTELFB_FB_ACQUIRED) |
479 | release_mem_region(dinfo->aperture.physical, | 476 | release_mem_region(dinfo->aperture.physical, |
480 | dinfo->aperture.size); | 477 | dinfo->aperture.size); |
481 | framebuffer_release(dinfo->info); | 478 | framebuffer_release(dinfo->info); |
@@ -572,6 +569,9 @@ intelfb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
572 | cleanup(dinfo); | 569 | cleanup(dinfo); |
573 | return -ENODEV; | 570 | return -ENODEV; |
574 | } | 571 | } |
572 | |||
573 | dinfo->flag |= INTELFB_FB_ACQUIRED; | ||
574 | |||
575 | if (!request_mem_region(dinfo->mmio_base_phys, | 575 | if (!request_mem_region(dinfo->mmio_base_phys, |
576 | INTEL_REG_SIZE, | 576 | INTEL_REG_SIZE, |
577 | INTELFB_MODULE_NAME)) { | 577 | INTELFB_MODULE_NAME)) { |
@@ -580,6 +580,8 @@ intelfb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
580 | return -ENODEV; | 580 | return -ENODEV; |
581 | } | 581 | } |
582 | 582 | ||
583 | dinfo->flag |= INTELFB_MMIO_ACQUIRED; | ||
584 | |||
583 | /* Get the chipset info. */ | 585 | /* Get the chipset info. */ |
584 | dinfo->pci_chipset = pdev->device; | 586 | dinfo->pci_chipset = pdev->device; |
585 | 587 | ||
@@ -1091,7 +1093,17 @@ intelfb_set_fbinfo(struct intelfb_info *dinfo) | |||
1091 | return 1; | 1093 | return 1; |
1092 | 1094 | ||
1093 | info->pixmap.scan_align = 1; | 1095 | info->pixmap.scan_align = 1; |
1094 | 1096 | strcpy(info->fix.id, dinfo->name); | |
1097 | info->fix.smem_start = dinfo->fb.physical; | ||
1098 | info->fix.smem_len = dinfo->fb.size; | ||
1099 | info->fix.type = FB_TYPE_PACKED_PIXELS; | ||
1100 | info->fix.type_aux = 0; | ||
1101 | info->fix.xpanstep = 8; | ||
1102 | info->fix.ypanstep = 1; | ||
1103 | info->fix.ywrapstep = 0; | ||
1104 | info->fix.mmio_start = dinfo->mmio_base_phys; | ||
1105 | info->fix.mmio_len = INTEL_REG_SIZE; | ||
1106 | info->fix.accel = FB_ACCEL_I830; | ||
1095 | update_dinfo(dinfo, &info->var); | 1107 | update_dinfo(dinfo, &info->var); |
1096 | 1108 | ||
1097 | return 0; | 1109 | return 0; |
@@ -1109,7 +1121,8 @@ update_dinfo(struct intelfb_info *dinfo, struct fb_var_screeninfo *var) | |||
1109 | dinfo->yres = var->xres; | 1121 | dinfo->yres = var->xres; |
1110 | dinfo->pixclock = var->pixclock; | 1122 | dinfo->pixclock = var->pixclock; |
1111 | 1123 | ||
1112 | intelfb_get_fix(&dinfo->info->fix, dinfo->info); | 1124 | dinfo->info->fix.visual = dinfo->visual; |
1125 | dinfo->info->fix.line_length = dinfo->pitch; | ||
1113 | 1126 | ||
1114 | switch (dinfo->bpp) { | 1127 | switch (dinfo->bpp) { |
1115 | case 8: | 1128 | case 8: |
@@ -1139,30 +1152,6 @@ update_dinfo(struct intelfb_info *dinfo, struct fb_var_screeninfo *var) | |||
1139 | 1152 | ||
1140 | /* fbops functions */ | 1153 | /* fbops functions */ |
1141 | 1154 | ||
1142 | static int | ||
1143 | intelfb_get_fix(struct fb_fix_screeninfo *fix, struct fb_info *info) | ||
1144 | { | ||
1145 | struct intelfb_info *dinfo = GET_DINFO(info); | ||
1146 | |||
1147 | DBG_MSG("intelfb_get_fix\n"); | ||
1148 | |||
1149 | memset(fix, 0, sizeof(*fix)); | ||
1150 | strcpy(fix->id, dinfo->name); | ||
1151 | fix->smem_start = dinfo->fb.physical; | ||
1152 | fix->smem_len = dinfo->fb.size; | ||
1153 | fix->type = FB_TYPE_PACKED_PIXELS; | ||
1154 | fix->type_aux = 0; | ||
1155 | fix->visual = dinfo->visual; | ||
1156 | fix->xpanstep = 8; | ||
1157 | fix->ypanstep = 1; | ||
1158 | fix->ywrapstep = 0; | ||
1159 | fix->line_length = dinfo->pitch; | ||
1160 | fix->mmio_start = dinfo->mmio_base_phys; | ||
1161 | fix->mmio_len = INTEL_REG_SIZE; | ||
1162 | fix->accel = FB_ACCEL_I830; | ||
1163 | return 0; | ||
1164 | } | ||
1165 | |||
1166 | /*************************************************************** | 1155 | /*************************************************************** |
1167 | * fbdev interface * | 1156 | * fbdev interface * |
1168 | ***************************************************************/ | 1157 | ***************************************************************/ |
diff --git a/drivers/video/logo/Kconfig b/drivers/video/logo/Kconfig index 8cb7fb4db441..f0e6512c87ff 100644 --- a/drivers/video/logo/Kconfig +++ b/drivers/video/logo/Kconfig | |||
@@ -47,7 +47,7 @@ config LOGO_SGI_CLUT224 | |||
47 | 47 | ||
48 | config LOGO_SUN_CLUT224 | 48 | config LOGO_SUN_CLUT224 |
49 | bool "224-color Sun Linux logo" | 49 | bool "224-color Sun Linux logo" |
50 | depends on LOGO && (SPARC32 || SPARC64) | 50 | depends on LOGO && SPARC |
51 | default y | 51 | default y |
52 | 52 | ||
53 | config LOGO_SUPERH_MONO | 53 | config LOGO_SUPERH_MONO |
diff --git a/drivers/video/sbuslib.c b/drivers/video/sbuslib.c index 646c43f921c5..3a74a63dd4f2 100644 --- a/drivers/video/sbuslib.c +++ b/drivers/video/sbuslib.c | |||
@@ -46,6 +46,9 @@ int sbusfb_mmap_helper(struct sbus_mmap_map *map, | |||
46 | unsigned long off; | 46 | unsigned long off; |
47 | int i; | 47 | int i; |
48 | 48 | ||
49 | if (!(vma->vm_flags & (VM_SHARED | VM_MAYSHARE))) | ||
50 | return -EINVAL; | ||
51 | |||
49 | size = vma->vm_end - vma->vm_start; | 52 | size = vma->vm_end - vma->vm_start; |
50 | if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) | 53 | if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) |
51 | return -EINVAL; | 54 | return -EINVAL; |
diff --git a/fs/lockd/clntlock.c b/fs/lockd/clntlock.c index 006bb9e14579..3eaf6e701087 100644 --- a/fs/lockd/clntlock.c +++ b/fs/lockd/clntlock.c | |||
@@ -157,6 +157,8 @@ void nlmclnt_mark_reclaim(struct nlm_host *host) | |||
157 | inode = fl->fl_file->f_dentry->d_inode; | 157 | inode = fl->fl_file->f_dentry->d_inode; |
158 | if (inode->i_sb->s_magic != NFS_SUPER_MAGIC) | 158 | if (inode->i_sb->s_magic != NFS_SUPER_MAGIC) |
159 | continue; | 159 | continue; |
160 | if (fl->fl_u.nfs_fl.owner == NULL) | ||
161 | continue; | ||
160 | if (fl->fl_u.nfs_fl.owner->host != host) | 162 | if (fl->fl_u.nfs_fl.owner->host != host) |
161 | continue; | 163 | continue; |
162 | if (!(fl->fl_u.nfs_fl.flags & NFS_LCK_GRANTED)) | 164 | if (!(fl->fl_u.nfs_fl.flags & NFS_LCK_GRANTED)) |
@@ -226,6 +228,8 @@ restart: | |||
226 | inode = fl->fl_file->f_dentry->d_inode; | 228 | inode = fl->fl_file->f_dentry->d_inode; |
227 | if (inode->i_sb->s_magic != NFS_SUPER_MAGIC) | 229 | if (inode->i_sb->s_magic != NFS_SUPER_MAGIC) |
228 | continue; | 230 | continue; |
231 | if (fl->fl_u.nfs_fl.owner == NULL) | ||
232 | continue; | ||
229 | if (fl->fl_u.nfs_fl.owner->host != host) | 233 | if (fl->fl_u.nfs_fl.owner->host != host) |
230 | continue; | 234 | continue; |
231 | if (!(fl->fl_u.nfs_fl.flags & NFS_LCK_RECLAIM)) | 235 | if (!(fl->fl_u.nfs_fl.flags & NFS_LCK_RECLAIM)) |
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index b497c71384e8..079228817603 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c | |||
@@ -678,15 +678,9 @@ nfs_file_direct_read(struct kiocb *iocb, char __user *buf, size_t count, loff_t | |||
678 | if (!count) | 678 | if (!count) |
679 | goto out; | 679 | goto out; |
680 | 680 | ||
681 | if (mapping->nrpages) { | 681 | retval = nfs_sync_mapping(mapping); |
682 | retval = filemap_fdatawrite(mapping); | 682 | if (retval) |
683 | if (retval == 0) | 683 | goto out; |
684 | retval = nfs_wb_all(inode); | ||
685 | if (retval == 0) | ||
686 | retval = filemap_fdatawait(mapping); | ||
687 | if (retval) | ||
688 | goto out; | ||
689 | } | ||
690 | 684 | ||
691 | retval = nfs_direct_read(inode, ctx, &iov, pos, 1); | 685 | retval = nfs_direct_read(inode, ctx, &iov, pos, 1); |
692 | if (retval > 0) | 686 | if (retval > 0) |
@@ -764,15 +758,9 @@ nfs_file_direct_write(struct kiocb *iocb, const char __user *buf, size_t count, | |||
764 | if (!count) | 758 | if (!count) |
765 | goto out; | 759 | goto out; |
766 | 760 | ||
767 | if (mapping->nrpages) { | 761 | retval = nfs_sync_mapping(mapping); |
768 | retval = filemap_fdatawrite(mapping); | 762 | if (retval) |
769 | if (retval == 0) | 763 | goto out; |
770 | retval = nfs_wb_all(inode); | ||
771 | if (retval == 0) | ||
772 | retval = filemap_fdatawait(mapping); | ||
773 | if (retval) | ||
774 | goto out; | ||
775 | } | ||
776 | 764 | ||
777 | retval = nfs_direct_write(inode, ctx, &iov, pos, 1); | 765 | retval = nfs_direct_write(inode, ctx, &iov, pos, 1); |
778 | if (mapping->nrpages) | 766 | if (mapping->nrpages) |
diff --git a/fs/nfs/file.c b/fs/nfs/file.c index 57d3e77d97ee..7a79fbe9f539 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c | |||
@@ -433,11 +433,7 @@ static int do_unlk(struct file *filp, int cmd, struct file_lock *fl) | |||
433 | * Flush all pending writes before doing anything | 433 | * Flush all pending writes before doing anything |
434 | * with locks.. | 434 | * with locks.. |
435 | */ | 435 | */ |
436 | filemap_fdatawrite(filp->f_mapping); | 436 | nfs_sync_mapping(filp->f_mapping); |
437 | down(&inode->i_sem); | ||
438 | nfs_wb_all(inode); | ||
439 | up(&inode->i_sem); | ||
440 | filemap_fdatawait(filp->f_mapping); | ||
441 | 437 | ||
442 | /* NOTE: special case | 438 | /* NOTE: special case |
443 | * If we're signalled while cleaning up locks on process exit, we | 439 | * If we're signalled while cleaning up locks on process exit, we |
@@ -465,15 +461,8 @@ static int do_setlk(struct file *filp, int cmd, struct file_lock *fl) | |||
465 | * Flush all pending writes before doing anything | 461 | * Flush all pending writes before doing anything |
466 | * with locks.. | 462 | * with locks.. |
467 | */ | 463 | */ |
468 | status = filemap_fdatawrite(filp->f_mapping); | 464 | status = nfs_sync_mapping(filp->f_mapping); |
469 | if (status == 0) { | 465 | if (status != 0) |
470 | down(&inode->i_sem); | ||
471 | status = nfs_wb_all(inode); | ||
472 | up(&inode->i_sem); | ||
473 | if (status == 0) | ||
474 | status = filemap_fdatawait(filp->f_mapping); | ||
475 | } | ||
476 | if (status < 0) | ||
477 | goto out; | 466 | goto out; |
478 | 467 | ||
479 | lock_kernel(); | 468 | lock_kernel(); |
@@ -497,11 +486,7 @@ static int do_setlk(struct file *filp, int cmd, struct file_lock *fl) | |||
497 | * Make sure we clear the cache whenever we try to get the lock. | 486 | * Make sure we clear the cache whenever we try to get the lock. |
498 | * This makes locking act as a cache coherency point. | 487 | * This makes locking act as a cache coherency point. |
499 | */ | 488 | */ |
500 | filemap_fdatawrite(filp->f_mapping); | 489 | nfs_sync_mapping(filp->f_mapping); |
501 | down(&inode->i_sem); | ||
502 | nfs_wb_all(inode); /* we may have slept */ | ||
503 | up(&inode->i_sem); | ||
504 | filemap_fdatawait(filp->f_mapping); | ||
505 | nfs_zap_caches(inode); | 490 | nfs_zap_caches(inode); |
506 | out: | 491 | out: |
507 | rpc_clnt_sigunmask(NFS_CLIENT(inode), &oldset); | 492 | rpc_clnt_sigunmask(NFS_CLIENT(inode), &oldset); |
@@ -524,7 +509,8 @@ static int nfs_lock(struct file *filp, int cmd, struct file_lock *fl) | |||
524 | return -EINVAL; | 509 | return -EINVAL; |
525 | 510 | ||
526 | /* No mandatory locks over NFS */ | 511 | /* No mandatory locks over NFS */ |
527 | if ((inode->i_mode & (S_ISGID | S_IXGRP)) == S_ISGID) | 512 | if ((inode->i_mode & (S_ISGID | S_IXGRP)) == S_ISGID && |
513 | fl->fl_type != F_UNLCK) | ||
528 | return -ENOLCK; | 514 | return -ENOLCK; |
529 | 515 | ||
530 | if (IS_GETLK(cmd)) | 516 | if (IS_GETLK(cmd)) |
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index afd75d0463fd..432f41cd75e6 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -640,6 +640,27 @@ static int nfs_show_options(struct seq_file *m, struct vfsmount *mnt) | |||
640 | return 0; | 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 | * Invalidate the local caches | 665 | * Invalidate the local caches |
645 | */ | 666 | */ |
@@ -1179,11 +1200,8 @@ void nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping) | |||
1179 | struct nfs_inode *nfsi = NFS_I(inode); | 1200 | struct nfs_inode *nfsi = NFS_I(inode); |
1180 | 1201 | ||
1181 | if (nfsi->cache_validity & NFS_INO_INVALID_DATA) { | 1202 | if (nfsi->cache_validity & NFS_INO_INVALID_DATA) { |
1182 | if (S_ISREG(inode->i_mode)) { | 1203 | if (S_ISREG(inode->i_mode)) |
1183 | if (filemap_fdatawrite(mapping) == 0) | 1204 | nfs_sync_mapping(mapping); |
1184 | filemap_fdatawait(mapping); | ||
1185 | nfs_wb_all(inode); | ||
1186 | } | ||
1187 | invalidate_inode_pages2(mapping); | 1205 | invalidate_inode_pages2(mapping); |
1188 | 1206 | ||
1189 | spin_lock(&inode->i_lock); | 1207 | spin_lock(&inode->i_lock); |
diff --git a/fs/nfsd/nfs2acl.c b/fs/nfsd/nfs2acl.c index 7cbf0682b2f0..fc95c4df6693 100644 --- a/fs/nfsd/nfs2acl.c +++ b/fs/nfsd/nfs2acl.c | |||
@@ -107,7 +107,7 @@ static int nfsacld_proc_setacl(struct svc_rqst * rqstp, | |||
107 | dprintk("nfsd: SETACL(2acl) %s\n", SVCFH_fmt(&argp->fh)); | 107 | dprintk("nfsd: SETACL(2acl) %s\n", SVCFH_fmt(&argp->fh)); |
108 | 108 | ||
109 | fh = fh_copy(&resp->fh, &argp->fh); | 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 | if (!nfserr) { | 112 | if (!nfserr) { |
113 | nfserr = nfserrno( nfsd_set_posix_acl( | 113 | nfserr = nfserrno( nfsd_set_posix_acl( |
diff --git a/fs/nfsd/nfs3acl.c b/fs/nfsd/nfs3acl.c index 64ba40572fea..16e10c170aed 100644 --- a/fs/nfsd/nfs3acl.c +++ b/fs/nfsd/nfs3acl.c | |||
@@ -101,7 +101,7 @@ static int nfsd3_proc_setacl(struct svc_rqst * rqstp, | |||
101 | int nfserr = 0; | 101 | int nfserr = 0; |
102 | 102 | ||
103 | fh = fh_copy(&resp->fh, &argp->fh); | 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 | if (!nfserr) { | 106 | if (!nfserr) { |
107 | nfserr = nfserrno( nfsd_set_posix_acl( | 107 | nfserr = nfserrno( nfsd_set_posix_acl( |
diff --git a/fs/partitions/Kconfig b/fs/partitions/Kconfig index deb25b661f04..656bc43431b9 100644 --- a/fs/partitions/Kconfig +++ b/fs/partitions/Kconfig | |||
@@ -203,7 +203,7 @@ config ULTRIX_PARTITION | |||
203 | 203 | ||
204 | config SUN_PARTITION | 204 | config SUN_PARTITION |
205 | bool "Sun partition tables support" if PARTITION_ADVANCED | 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 | ---help--- | 207 | ---help--- |
208 | Like most systems, SunOS uses its own hard disk partition table | 208 | Like most systems, SunOS uses its own hard disk partition table |
209 | format, incompatible with all others. Saying Y here allows you to | 209 | format, incompatible with all others. Saying Y here allows you to |
diff --git a/fs/relayfs/relay.c b/fs/relayfs/relay.c index 16446a15c96d..2a6f7f12b7f9 100644 --- a/fs/relayfs/relay.c +++ b/fs/relayfs/relay.c | |||
@@ -333,8 +333,7 @@ size_t relay_switch_subbuf(struct rchan_buf *buf, size_t length) | |||
333 | return length; | 333 | return length; |
334 | 334 | ||
335 | toobig: | 335 | toobig: |
336 | printk(KERN_WARNING "relayfs: event too large (%Zd)\n", length); | 336 | buf->chan->last_toobig = length; |
337 | WARN_ON(1); | ||
338 | return 0; | 337 | return 0; |
339 | } | 338 | } |
340 | 339 | ||
@@ -399,6 +398,11 @@ void relay_close(struct rchan *chan) | |||
399 | relay_close_buf(chan->buf[i]); | 398 | relay_close_buf(chan->buf[i]); |
400 | } | 399 | } |
401 | 400 | ||
401 | if (chan->last_toobig) | ||
402 | printk(KERN_WARNING "relayfs: one or more items not logged " | ||
403 | "[item size (%Zd) > sub-buffer size (%Zd)]\n", | ||
404 | chan->last_toobig, chan->subbuf_size); | ||
405 | |||
402 | kref_put(&chan->kref, relay_destroy_channel); | 406 | kref_put(&chan->kref, relay_destroy_channel); |
403 | } | 407 | } |
404 | 408 | ||
diff --git a/include/acpi/acglobal.h b/include/acpi/acglobal.h index e9c2790139ec..4ab2ca18b8df 100644 --- a/include/acpi/acglobal.h +++ b/include/acpi/acglobal.h | |||
@@ -211,7 +211,7 @@ ACPI_EXTERN u32 acpi_gbl_original_mode; | |||
211 | ACPI_EXTERN u32 acpi_gbl_rsdp_original_location; | 211 | ACPI_EXTERN u32 acpi_gbl_rsdp_original_location; |
212 | ACPI_EXTERN u32 acpi_gbl_ns_lookup_count; | 212 | ACPI_EXTERN u32 acpi_gbl_ns_lookup_count; |
213 | ACPI_EXTERN u32 acpi_gbl_ps_find_count; | 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 | ACPI_EXTERN u16 acpi_gbl_pm1_enable_register_save; | 215 | ACPI_EXTERN u16 acpi_gbl_pm1_enable_register_save; |
216 | ACPI_EXTERN u16 acpi_gbl_global_lock_handle; | 216 | ACPI_EXTERN u16 acpi_gbl_global_lock_handle; |
217 | ACPI_EXTERN u8 acpi_gbl_debugger_configuration; | 217 | ACPI_EXTERN u8 acpi_gbl_debugger_configuration; |
diff --git a/include/asm-ia64/topology.h b/include/asm-ia64/topology.h index a9f738bf18a7..f7c330467e7e 100644 --- a/include/asm-ia64/topology.h +++ b/include/asm-ia64/topology.h | |||
@@ -38,7 +38,7 @@ | |||
38 | /* | 38 | /* |
39 | * Returns the number of the first CPU on Node 'node'. | 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 | * Determines the node for a given pci bus | 44 | * Determines the node for a given pci bus |
diff --git a/include/asm-x86_64/rwlock.h b/include/asm-x86_64/rwlock.h index 8a78a4ace53c..9942cc393064 100644 --- a/include/asm-x86_64/rwlock.h +++ b/include/asm-x86_64/rwlock.h | |||
@@ -64,7 +64,7 @@ | |||
64 | ::"a" (rw) : "memory") | 64 | ::"a" (rw) : "memory") |
65 | 65 | ||
66 | #define __build_write_lock_const(rw, helper) \ | 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 | "jnz 2f\n" \ | 68 | "jnz 2f\n" \ |
69 | "1:\n" \ | 69 | "1:\n" \ |
70 | LOCK_SECTION_START("") \ | 70 | LOCK_SECTION_START("") \ |
diff --git a/include/asm-x86_64/topology.h b/include/asm-x86_64/topology.h index d39ebd5263ed..7d82bc56b9fa 100644 --- a/include/asm-x86_64/topology.h +++ b/include/asm-x86_64/topology.h | |||
@@ -23,7 +23,7 @@ extern int __node_distance(int, int); | |||
23 | 23 | ||
24 | #define cpu_to_node(cpu) (cpu_to_node[cpu]) | 24 | #define cpu_to_node(cpu) (cpu_to_node[cpu]) |
25 | #define parent_node(node) (node) | 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 | #define node_to_cpumask(node) (node_to_cpumask[node]) | 27 | #define node_to_cpumask(node) (node_to_cpumask[node]) |
28 | #define pcibus_to_node(bus) ((long)(bus->sysdata)) | 28 | #define pcibus_to_node(bus) ((long)(bus->sysdata)) |
29 | #define pcibus_to_cpumask(bus) node_to_cpumask(pcibus_to_node(bus)); | 29 | #define pcibus_to_cpumask(bus) node_to_cpumask(pcibus_to_node(bus)); |
diff --git a/include/linux/ipv6_route.h b/include/linux/ipv6_route.h index e2f935038013..d7c41d1d706a 100644 --- a/include/linux/ipv6_route.h +++ b/include/linux/ipv6_route.h | |||
@@ -18,6 +18,7 @@ | |||
18 | fallback, no routers on link */ | 18 | fallback, no routers on link */ |
19 | #define RTF_ADDRCONF 0x00040000 /* addrconf route - RA */ | 19 | #define RTF_ADDRCONF 0x00040000 /* addrconf route - RA */ |
20 | #define RTF_PREFIX_RT 0x00080000 /* A prefix only route - RA */ | 20 | #define RTF_PREFIX_RT 0x00080000 /* A prefix only route - RA */ |
21 | #define RTF_ANYCAST 0x00100000 /* Anycast */ | ||
21 | 22 | ||
22 | #define RTF_NONEXTHOP 0x00200000 /* route with no nexthop */ | 23 | #define RTF_NONEXTHOP 0x00200000 /* route with no nexthop */ |
23 | #define RTF_EXPIRES 0x00400000 | 24 | #define RTF_EXPIRES 0x00400000 |
diff --git a/include/linux/irq.h b/include/linux/irq.h index c516382fbec2..f04ba20712a2 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -10,7 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | 12 | #include <linux/config.h> |
13 | #include <asm/smp.h> /* cpu_online_map */ | 13 | #include <linux/smp.h> |
14 | 14 | ||
15 | #if !defined(CONFIG_ARCH_S390) | 15 | #if !defined(CONFIG_ARCH_S390) |
16 | 16 | ||
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 12787a9b0259..2516adeccecf 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -291,6 +291,7 @@ static inline int nfs_verify_change_attribute(struct inode *inode, unsigned long | |||
291 | /* | 291 | /* |
292 | * linux/fs/nfs/inode.c | 292 | * linux/fs/nfs/inode.c |
293 | */ | 293 | */ |
294 | extern int nfs_sync_mapping(struct address_space *mapping); | ||
294 | extern void nfs_zap_caches(struct inode *); | 295 | extern void nfs_zap_caches(struct inode *); |
295 | extern struct inode *nfs_fhget(struct super_block *, struct nfs_fh *, | 296 | extern struct inode *nfs_fhget(struct super_block *, struct nfs_fh *, |
296 | struct nfs_fattr *); | 297 | struct nfs_fattr *); |
diff --git a/include/linux/preempt.h b/include/linux/preempt.h index d9a2f5254a51..5769d14d1e6a 100644 --- a/include/linux/preempt.h +++ b/include/linux/preempt.h | |||
@@ -48,6 +48,7 @@ do { \ | |||
48 | #define preempt_enable() \ | 48 | #define preempt_enable() \ |
49 | do { \ | 49 | do { \ |
50 | preempt_enable_no_resched(); \ | 50 | preempt_enable_no_resched(); \ |
51 | barrier(); \ | ||
51 | preempt_check_resched(); \ | 52 | preempt_check_resched(); \ |
52 | } while (0) | 53 | } while (0) |
53 | 54 | ||
diff --git a/include/linux/relayfs_fs.h b/include/linux/relayfs_fs.h index cfafc3e76bc2..fb7e80737325 100644 --- a/include/linux/relayfs_fs.h +++ b/include/linux/relayfs_fs.h | |||
@@ -20,9 +20,9 @@ | |||
20 | #include <linux/kref.h> | 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 | * Per-cpu relay channel buffer | 28 | * Per-cpu relay channel buffer |
@@ -60,6 +60,7 @@ struct rchan | |||
60 | struct rchan_callbacks *cb; /* client callbacks */ | 60 | struct rchan_callbacks *cb; /* client callbacks */ |
61 | struct kref kref; /* channel refcount */ | 61 | struct kref kref; /* channel refcount */ |
62 | void *private_data; /* for user-defined data */ | 62 | void *private_data; /* for user-defined data */ |
63 | size_t last_toobig; /* tried to log event > subbuf size */ | ||
63 | struct rchan_buf *buf[NR_CPUS]; /* per-cpu channel buffers */ | 64 | struct rchan_buf *buf[NR_CPUS]; /* per-cpu channel buffers */ |
64 | }; | 65 | }; |
65 | 66 | ||
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index c231e9a08f0b..d50482ba27fe 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
@@ -866,6 +866,7 @@ enum rtnetlink_groups { | |||
866 | #define RTNLGRP_IPV4_MROUTE RTNLGRP_IPV4_MROUTE | 866 | #define RTNLGRP_IPV4_MROUTE RTNLGRP_IPV4_MROUTE |
867 | RTNLGRP_IPV4_ROUTE, | 867 | RTNLGRP_IPV4_ROUTE, |
868 | #define RTNLGRP_IPV4_ROUTE RTNLGRP_IPV4_ROUTE | 868 | #define RTNLGRP_IPV4_ROUTE RTNLGRP_IPV4_ROUTE |
869 | RTNLGRP_NOP1, | ||
869 | RTNLGRP_IPV6_IFADDR, | 870 | RTNLGRP_IPV6_IFADDR, |
870 | #define RTNLGRP_IPV6_IFADDR RTNLGRP_IPV6_IFADDR | 871 | #define RTNLGRP_IPV6_IFADDR RTNLGRP_IPV6_IFADDR |
871 | RTNLGRP_IPV6_MROUTE, | 872 | RTNLGRP_IPV6_MROUTE, |
@@ -876,8 +877,11 @@ enum rtnetlink_groups { | |||
876 | #define RTNLGRP_IPV6_IFINFO RTNLGRP_IPV6_IFINFO | 877 | #define RTNLGRP_IPV6_IFINFO RTNLGRP_IPV6_IFINFO |
877 | RTNLGRP_DECnet_IFADDR, | 878 | RTNLGRP_DECnet_IFADDR, |
878 | #define RTNLGRP_DECnet_IFADDR RTNLGRP_DECnet_IFADDR | 879 | #define RTNLGRP_DECnet_IFADDR RTNLGRP_DECnet_IFADDR |
880 | RTNLGRP_NOP2, | ||
879 | RTNLGRP_DECnet_ROUTE, | 881 | RTNLGRP_DECnet_ROUTE, |
880 | #define RTNLGRP_DECnet_ROUTE RTNLGRP_DECnet_ROUTE | 882 | #define RTNLGRP_DECnet_ROUTE RTNLGRP_DECnet_ROUTE |
883 | RTNLGRP_NOP3, | ||
884 | RTNLGRP_NOP4, | ||
881 | RTNLGRP_IPV6_PREFIX, | 885 | RTNLGRP_IPV6_PREFIX, |
882 | #define RTNLGRP_IPV6_PREFIX RTNLGRP_IPV6_PREFIX | 886 | #define RTNLGRP_IPV6_PREFIX RTNLGRP_IPV6_PREFIX |
883 | __RTNLGRP_MAX | 887 | __RTNLGRP_MAX |
diff --git a/include/net/if_inet6.h b/include/net/if_inet6.h index e97a9accb71d..d8234f9bd4c4 100644 --- a/include/net/if_inet6.h +++ b/include/net/if_inet6.h | |||
@@ -24,6 +24,7 @@ | |||
24 | #define IF_RA_MANAGED 0x40 | 24 | #define IF_RA_MANAGED 0x40 |
25 | #define IF_RA_RCVD 0x20 | 25 | #define IF_RA_RCVD 0x20 |
26 | #define IF_RS_SENT 0x10 | 26 | #define IF_RS_SENT 0x10 |
27 | #define IF_READY 0x80000000 | ||
27 | 28 | ||
28 | /* prefix flags */ | 29 | /* prefix flags */ |
29 | #define IF_PREFIX_ONLINK 0x01 | 30 | #define IF_PREFIX_ONLINK 0x01 |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 5beae1ccd574..1cdb87912137 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -890,6 +890,7 @@ struct xfrm_state * xfrm_find_acq(u8 mode, u32 reqid, u8 proto, | |||
890 | extern void xfrm_policy_flush(void); | 890 | extern void xfrm_policy_flush(void); |
891 | extern int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol); | 891 | extern int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol); |
892 | extern int xfrm_flush_bundles(void); | 892 | extern int xfrm_flush_bundles(void); |
893 | extern void xfrm_flush_all_bundles(void); | ||
893 | extern int xfrm_bundle_ok(struct xfrm_dst *xdst, struct flowi *fl, int family); | 894 | extern int xfrm_bundle_ok(struct xfrm_dst *xdst, struct flowi *fl, int family); |
894 | extern void xfrm_init_pmtu(struct dst_entry *dst); | 895 | extern void xfrm_init_pmtu(struct dst_entry *dst); |
895 | 896 | ||
diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h index fac547d32a98..394f14a5b7cb 100644 --- a/include/scsi/scsi_transport_fc.h +++ b/include/scsi/scsi_transport_fc.h | |||
@@ -79,6 +79,7 @@ enum fc_port_state { | |||
79 | FC_PORTSTATE_LINKDOWN, | 79 | FC_PORTSTATE_LINKDOWN, |
80 | FC_PORTSTATE_ERROR, | 80 | FC_PORTSTATE_ERROR, |
81 | FC_PORTSTATE_LOOPBACK, | 81 | FC_PORTSTATE_LOOPBACK, |
82 | FC_PORTSTATE_DELETED, | ||
82 | }; | 83 | }; |
83 | 84 | ||
84 | 85 | ||
@@ -325,8 +326,14 @@ struct fc_host_attrs { | |||
325 | struct list_head rport_bindings; | 326 | struct list_head rport_bindings; |
326 | u32 next_rport_number; | 327 | u32 next_rport_number; |
327 | u32 next_target_id; | 328 | u32 next_target_id; |
329 | u8 flags; | ||
330 | struct work_struct rport_del_work; | ||
328 | }; | 331 | }; |
329 | 332 | ||
333 | /* values for struct fc_host_attrs "flags" field: */ | ||
334 | #define FC_SHOST_RPORT_DEL_SCHEDULED 0x01 | ||
335 | |||
336 | |||
330 | #define fc_host_node_name(x) \ | 337 | #define fc_host_node_name(x) \ |
331 | (((struct fc_host_attrs *)(x)->shost_data)->node_name) | 338 | (((struct fc_host_attrs *)(x)->shost_data)->node_name) |
332 | #define fc_host_port_name(x) \ | 339 | #define fc_host_port_name(x) \ |
@@ -365,6 +372,10 @@ struct fc_host_attrs { | |||
365 | (((struct fc_host_attrs *)(x)->shost_data)->next_rport_number) | 372 | (((struct fc_host_attrs *)(x)->shost_data)->next_rport_number) |
366 | #define fc_host_next_target_id(x) \ | 373 | #define fc_host_next_target_id(x) \ |
367 | (((struct fc_host_attrs *)(x)->shost_data)->next_target_id) | 374 | (((struct fc_host_attrs *)(x)->shost_data)->next_target_id) |
375 | #define fc_host_flags(x) \ | ||
376 | (((struct fc_host_attrs *)(x)->shost_data)->flags) | ||
377 | #define fc_host_rport_del_work(x) \ | ||
378 | (((struct fc_host_attrs *)(x)->shost_data)->rport_del_work) | ||
368 | 379 | ||
369 | 380 | ||
370 | /* The functions by which the transport class and the driver communicate */ | 381 | /* The functions by which the transport class and the driver communicate */ |
diff --git a/init/Kconfig b/init/Kconfig index 6c5dbedc6e96..9fc0759fa942 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -260,7 +260,6 @@ config CC_OPTIMIZE_FOR_SIZE | |||
260 | bool "Optimize for size (Look out for broken compilers!)" | 260 | bool "Optimize for size (Look out for broken compilers!)" |
261 | default y | 261 | default y |
262 | depends on ARM || H8300 || EXPERIMENTAL | 262 | depends on ARM || H8300 || EXPERIMENTAL |
263 | depends on !SPARC64 | ||
264 | help | 263 | help |
265 | Enabling this option will pass "-Os" instead of "-O2" to gcc | 264 | Enabling this option will pass "-Os" instead of "-O2" to gcc |
266 | resulting in a smaller kernel. | 265 | resulting in a smaller kernel. |
@@ -381,6 +381,7 @@ static void update_queue (struct sem_array * sma) | |||
381 | /* hands-off: q will disappear immediately after | 381 | /* hands-off: q will disappear immediately after |
382 | * writing q->status. | 382 | * writing q->status. |
383 | */ | 383 | */ |
384 | smp_wmb(); | ||
384 | q->status = error; | 385 | q->status = error; |
385 | q = n; | 386 | q = n; |
386 | } else { | 387 | } else { |
@@ -461,6 +462,7 @@ static void freeary (struct sem_array *sma, int id) | |||
461 | n = q->next; | 462 | n = q->next; |
462 | q->status = IN_WAKEUP; | 463 | q->status = IN_WAKEUP; |
463 | wake_up_process(q->sleeper); /* doesn't sleep */ | 464 | wake_up_process(q->sleeper); /* doesn't sleep */ |
465 | smp_wmb(); | ||
464 | q->status = -EIDRM; /* hands-off q */ | 466 | q->status = -EIDRM; /* hands-off q */ |
465 | q = n; | 467 | q = n; |
466 | } | 468 | } |
diff --git a/kernel/futex.c b/kernel/futex.c index 5872e3507f35..5e71a6bf6f6b 100644 --- a/kernel/futex.c +++ b/kernel/futex.c | |||
@@ -270,7 +270,13 @@ static void wake_futex(struct futex_q *q) | |||
270 | /* | 270 | /* |
271 | * The waiting task can free the futex_q as soon as this is written, | 271 | * The waiting task can free the futex_q as soon as this is written, |
272 | * without taking any locks. This must come last. | 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 | q->lock_ptr = NULL; | 280 | q->lock_ptr = NULL; |
275 | } | 281 | } |
276 | 282 | ||
diff --git a/kernel/params.c b/kernel/params.c index 47ba69547945..c76ad25e6a21 100644 --- a/kernel/params.c +++ b/kernel/params.c | |||
@@ -619,7 +619,7 @@ static void __init param_sysfs_builtin(void) | |||
619 | 619 | ||
620 | 620 | ||
621 | /* module-related sysfs stuff */ | 621 | /* module-related sysfs stuff */ |
622 | #ifdef CONFIG_MODULES | 622 | #ifdef CONFIG_SYSFS |
623 | 623 | ||
624 | #define to_module_attr(n) container_of(n, struct module_attribute, attr); | 624 | #define to_module_attr(n) container_of(n, struct module_attribute, attr); |
625 | #define to_module_kobject(n) container_of(n, struct module_kobject, kobj); | 625 | #define to_module_kobject(n) container_of(n, struct module_kobject, kobj); |
diff --git a/lib/spinlock_debug.c b/lib/spinlock_debug.c index 906ad101eab3..dcd4be9bd4e5 100644 --- a/lib/spinlock_debug.c +++ b/lib/spinlock_debug.c | |||
@@ -20,7 +20,8 @@ static void spin_bug(spinlock_t *lock, const char *msg) | |||
20 | if (lock->owner && lock->owner != SPINLOCK_OWNER_INIT) | 20 | if (lock->owner && lock->owner != SPINLOCK_OWNER_INIT) |
21 | owner = lock->owner; | 21 | owner = lock->owner; |
22 | printk("BUG: spinlock %s on CPU#%d, %s/%d\n", | 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 | printk(" lock: %p, .magic: %08x, .owner: %s/%d, .owner_cpu: %d\n", | 25 | printk(" lock: %p, .magic: %08x, .owner: %s/%d, .owner_cpu: %d\n", |
25 | lock, lock->magic, | 26 | lock, lock->magic, |
26 | owner ? owner->comm : "<none>", | 27 | owner ? owner->comm : "<none>", |
@@ -78,8 +79,8 @@ static void __spin_lock_debug(spinlock_t *lock) | |||
78 | if (print_once) { | 79 | if (print_once) { |
79 | print_once = 0; | 80 | print_once = 0; |
80 | printk("BUG: spinlock lockup on CPU#%d, %s/%d, %p\n", | 81 | printk("BUG: spinlock lockup on CPU#%d, %s/%d, %p\n", |
81 | smp_processor_id(), current->comm, current->pid, | 82 | raw_smp_processor_id(), current->comm, |
82 | lock); | 83 | current->pid, lock); |
83 | dump_stack(); | 84 | dump_stack(); |
84 | } | 85 | } |
85 | } | 86 | } |
@@ -120,7 +121,8 @@ static void rwlock_bug(rwlock_t *lock, const char *msg) | |||
120 | 121 | ||
121 | if (xchg(&print_once, 0)) { | 122 | if (xchg(&print_once, 0)) { |
122 | printk("BUG: rwlock %s on CPU#%d, %s/%d, %p\n", msg, | 123 | printk("BUG: rwlock %s on CPU#%d, %s/%d, %p\n", msg, |
123 | smp_processor_id(), current->comm, current->pid, lock); | 124 | raw_smp_processor_id(), current->comm, |
125 | current->pid, lock); | ||
124 | dump_stack(); | 126 | dump_stack(); |
125 | #ifdef CONFIG_SMP | 127 | #ifdef CONFIG_SMP |
126 | /* | 128 | /* |
@@ -148,8 +150,8 @@ static void __read_lock_debug(rwlock_t *lock) | |||
148 | if (print_once) { | 150 | if (print_once) { |
149 | print_once = 0; | 151 | print_once = 0; |
150 | printk("BUG: read-lock lockup on CPU#%d, %s/%d, %p\n", | 152 | printk("BUG: read-lock lockup on CPU#%d, %s/%d, %p\n", |
151 | smp_processor_id(), current->comm, current->pid, | 153 | raw_smp_processor_id(), current->comm, |
152 | lock); | 154 | current->pid, lock); |
153 | dump_stack(); | 155 | dump_stack(); |
154 | } | 156 | } |
155 | } | 157 | } |
@@ -220,8 +222,8 @@ static void __write_lock_debug(rwlock_t *lock) | |||
220 | if (print_once) { | 222 | if (print_once) { |
221 | print_once = 0; | 223 | print_once = 0; |
222 | printk("BUG: write-lock lockup on CPU#%d, %s/%d, %p\n", | 224 | printk("BUG: write-lock lockup on CPU#%d, %s/%d, %p\n", |
223 | smp_processor_id(), current->comm, current->pid, | 225 | raw_smp_processor_id(), current->comm, |
224 | lock); | 226 | current->pid, lock); |
225 | dump_stack(); | 227 | dump_stack(); |
226 | } | 228 | } |
227 | } | 229 | } |
diff --git a/lib/swiotlb.c b/lib/swiotlb.c index 57216f3544ca..1ff8dcebf7c6 100644 --- a/lib/swiotlb.c +++ b/lib/swiotlb.c | |||
@@ -704,8 +704,9 @@ swiotlb_map_sg(struct device *hwdev, struct scatterlist *sg, int nelems, | |||
704 | addr = SG_ENT_VIRT_ADDRESS(sg); | 704 | addr = SG_ENT_VIRT_ADDRESS(sg); |
705 | dev_addr = virt_to_phys(addr); | 705 | dev_addr = virt_to_phys(addr); |
706 | if (swiotlb_force || address_needs_mapping(hwdev, dev_addr)) { | 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)); | 707 | void *map = map_single(hwdev, addr, sg->length, dir); |
708 | if (!sg->dma_address) { | 708 | sg->dma_address = virt_to_bus(map); |
709 | if (!map) { | ||
709 | /* Don't panic here, we expect map_sg users | 710 | /* Don't panic here, we expect map_sg users |
710 | to do proper error handling. */ | 711 | to do proper error handling. */ |
711 | swiotlb_full(hwdev, sg->length, dir, 0); | 712 | swiotlb_full(hwdev, sg->length, dir, 0); |
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index 91e412b0ab00..67465b65abe4 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c | |||
@@ -753,6 +753,8 @@ static int vlan_ioctl_handler(void __user *arg) | |||
753 | break; | 753 | break; |
754 | case GET_VLAN_REALDEV_NAME_CMD: | 754 | case GET_VLAN_REALDEV_NAME_CMD: |
755 | err = vlan_dev_get_realdev_name(args.device1, args.u.device2); | 755 | err = vlan_dev_get_realdev_name(args.device1, args.u.device2); |
756 | if (err) | ||
757 | goto out; | ||
756 | if (copy_to_user(arg, &args, | 758 | if (copy_to_user(arg, &args, |
757 | sizeof(struct vlan_ioctl_args))) { | 759 | sizeof(struct vlan_ioctl_args))) { |
758 | err = -EFAULT; | 760 | err = -EFAULT; |
@@ -761,6 +763,8 @@ static int vlan_ioctl_handler(void __user *arg) | |||
761 | 763 | ||
762 | case GET_VLAN_VID_CMD: | 764 | case GET_VLAN_VID_CMD: |
763 | err = vlan_dev_get_vid(args.device1, &vid); | 765 | err = vlan_dev_get_vid(args.device1, &vid); |
766 | if (err) | ||
767 | goto out; | ||
764 | args.u.VID = vid; | 768 | args.u.VID = vid; |
765 | if (copy_to_user(arg, &args, | 769 | if (copy_to_user(arg, &args, |
766 | sizeof(struct vlan_ioctl_args))) { | 770 | sizeof(struct vlan_ioctl_args))) { |
@@ -774,7 +778,7 @@ static int vlan_ioctl_handler(void __user *arg) | |||
774 | __FUNCTION__, args.cmd); | 778 | __FUNCTION__, args.cmd); |
775 | return -EINVAL; | 779 | return -EINVAL; |
776 | }; | 780 | }; |
777 | 781 | out: | |
778 | return err; | 782 | return err; |
779 | } | 783 | } |
780 | 784 | ||
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c index d8e36b775125..43a0b35dfe6f 100644 --- a/net/bridge/br_netfilter.c +++ b/net/bridge/br_netfilter.c | |||
@@ -295,7 +295,7 @@ static int check_hbh_len(struct sk_buff *skb) | |||
295 | len -= 2; | 295 | len -= 2; |
296 | 296 | ||
297 | while (len > 0) { | 297 | while (len > 0) { |
298 | int optlen = raw[off+1]+2; | 298 | int optlen = skb->nh.raw[off+1]+2; |
299 | 299 | ||
300 | switch (skb->nh.raw[off]) { | 300 | switch (skb->nh.raw[off]) { |
301 | case IPV6_TLV_PAD0: | 301 | case IPV6_TLV_PAD0: |
@@ -308,18 +308,15 @@ static int check_hbh_len(struct sk_buff *skb) | |||
308 | case IPV6_TLV_JUMBO: | 308 | case IPV6_TLV_JUMBO: |
309 | if (skb->nh.raw[off+1] != 4 || (off&3) != 2) | 309 | if (skb->nh.raw[off+1] != 4 || (off&3) != 2) |
310 | goto bad; | 310 | goto bad; |
311 | |||
312 | pkt_len = ntohl(*(u32*)(skb->nh.raw+off+2)); | 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 | if (pkt_len > skb->len - sizeof(struct ipv6hdr)) | 315 | if (pkt_len > skb->len - sizeof(struct ipv6hdr)) |
315 | goto bad; | 316 | goto bad; |
316 | if (pkt_len + sizeof(struct ipv6hdr) < skb->len) { | 317 | if (pskb_trim_rcsum(skb, |
317 | if (__pskb_trim(skb, | 318 | pkt_len+sizeof(struct ipv6hdr))) |
318 | pkt_len + sizeof(struct ipv6hdr))) | 319 | goto bad; |
319 | goto bad; | ||
320 | if (skb->ip_summed == CHECKSUM_HW) | ||
321 | skb->ip_summed = CHECKSUM_NONE; | ||
322 | } | ||
323 | break; | 320 | break; |
324 | default: | 321 | default: |
325 | if (optlen > len) | 322 | if (optlen > len) |
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c index ca03521112c5..656e13e38cfb 100644 --- a/net/dccp/ipv4.c +++ b/net/dccp/ipv4.c | |||
@@ -1251,7 +1251,7 @@ static int dccp_v4_destroy_sock(struct sock *sk) | |||
1251 | struct dccp_sock *dp = dccp_sk(sk); | 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 | * for retransmissions | 1255 | * for retransmissions |
1256 | */ | 1256 | */ |
1257 | if (sk->sk_send_head != NULL) { | 1257 | if (sk->sk_send_head != NULL) { |
diff --git a/net/ipv4/netfilter/Makefile b/net/ipv4/netfilter/Makefile index 058c48e258fc..d0a447e520a2 100644 --- a/net/ipv4/netfilter/Makefile +++ b/net/ipv4/netfilter/Makefile | |||
@@ -12,6 +12,7 @@ ip_nat_pptp-objs := ip_nat_helper_pptp.o ip_nat_proto_gre.o | |||
12 | 12 | ||
13 | # connection tracking | 13 | # connection tracking |
14 | obj-$(CONFIG_IP_NF_CONNTRACK) += ip_conntrack.o | 14 | obj-$(CONFIG_IP_NF_CONNTRACK) += ip_conntrack.o |
15 | obj-$(CONFIG_IP_NF_NAT) += ip_nat.o | ||
15 | 16 | ||
16 | # conntrack netlink interface | 17 | # conntrack netlink interface |
17 | obj-$(CONFIG_IP_NF_CONNTRACK_NETLINK) += ip_conntrack_netlink.o | 18 | obj-$(CONFIG_IP_NF_CONNTRACK_NETLINK) += ip_conntrack_netlink.o |
@@ -41,7 +42,7 @@ obj-$(CONFIG_IP_NF_IPTABLES) += ip_tables.o | |||
41 | # the three instances of ip_tables | 42 | # the three instances of ip_tables |
42 | obj-$(CONFIG_IP_NF_FILTER) += iptable_filter.o | 43 | obj-$(CONFIG_IP_NF_FILTER) += iptable_filter.o |
43 | obj-$(CONFIG_IP_NF_MANGLE) += iptable_mangle.o | 44 | obj-$(CONFIG_IP_NF_MANGLE) += iptable_mangle.o |
44 | obj-$(CONFIG_IP_NF_NAT) += iptable_nat.o ip_nat.o | 45 | obj-$(CONFIG_IP_NF_NAT) += iptable_nat.o |
45 | obj-$(CONFIG_IP_NF_RAW) += iptable_raw.o | 46 | obj-$(CONFIG_IP_NF_RAW) += iptable_raw.o |
46 | 47 | ||
47 | # matches | 48 | # matches |
diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c index b2b60f3e9cdd..42196ba3b0b9 100644 --- a/net/ipv4/xfrm4_policy.c +++ b/net/ipv4/xfrm4_policy.c | |||
@@ -182,6 +182,7 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl) | |||
182 | case IPPROTO_UDP: | 182 | case IPPROTO_UDP: |
183 | case IPPROTO_TCP: | 183 | case IPPROTO_TCP: |
184 | case IPPROTO_SCTP: | 184 | case IPPROTO_SCTP: |
185 | case IPPROTO_DCCP: | ||
185 | if (pskb_may_pull(skb, xprth + 4 - skb->data)) { | 186 | if (pskb_may_pull(skb, xprth + 4 - skb->data)) { |
186 | u16 *ports = (u16 *)xprth; | 187 | u16 *ports = (u16 *)xprth; |
187 | 188 | ||
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 73a23b4130a5..2a6439e3c91c 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -137,6 +137,7 @@ static int addrconf_ifdown(struct net_device *dev, int how); | |||
137 | static void addrconf_dad_start(struct inet6_ifaddr *ifp, u32 flags); | 137 | static void addrconf_dad_start(struct inet6_ifaddr *ifp, u32 flags); |
138 | static void addrconf_dad_timer(unsigned long data); | 138 | static void addrconf_dad_timer(unsigned long data); |
139 | static void addrconf_dad_completed(struct inet6_ifaddr *ifp); | 139 | static void addrconf_dad_completed(struct inet6_ifaddr *ifp); |
140 | static void addrconf_dad_run(struct inet6_dev *idev); | ||
140 | static void addrconf_rs_timer(unsigned long data); | 141 | static void addrconf_rs_timer(unsigned long data); |
141 | static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifa); | 142 | static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifa); |
142 | static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifa); | 143 | static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifa); |
@@ -388,6 +389,9 @@ static struct inet6_dev * ipv6_add_dev(struct net_device *dev) | |||
388 | } | 389 | } |
389 | #endif | 390 | #endif |
390 | 391 | ||
392 | if (netif_carrier_ok(dev)) | ||
393 | ndev->if_flags |= IF_READY; | ||
394 | |||
391 | write_lock_bh(&addrconf_lock); | 395 | write_lock_bh(&addrconf_lock); |
392 | dev->ip6_ptr = ndev; | 396 | dev->ip6_ptr = ndev; |
393 | write_unlock_bh(&addrconf_lock); | 397 | write_unlock_bh(&addrconf_lock); |
@@ -415,6 +419,7 @@ static struct inet6_dev * ipv6_find_idev(struct net_device *dev) | |||
415 | if ((idev = ipv6_add_dev(dev)) == NULL) | 419 | if ((idev = ipv6_add_dev(dev)) == NULL) |
416 | return NULL; | 420 | return NULL; |
417 | } | 421 | } |
422 | |||
418 | if (dev->flags&IFF_UP) | 423 | if (dev->flags&IFF_UP) |
419 | ipv6_mc_up(idev); | 424 | ipv6_mc_up(idev); |
420 | return idev; | 425 | return idev; |
@@ -634,8 +639,7 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp) | |||
634 | } | 639 | } |
635 | #endif | 640 | #endif |
636 | 641 | ||
637 | for (ifap = &idev->addr_list; (ifa=*ifap) != NULL; | 642 | for (ifap = &idev->addr_list; (ifa=*ifap) != NULL;) { |
638 | ifap = &ifa->if_next) { | ||
639 | if (ifa == ifp) { | 643 | if (ifa == ifp) { |
640 | *ifap = ifa->if_next; | 644 | *ifap = ifa->if_next; |
641 | __in6_ifa_put(ifp); | 645 | __in6_ifa_put(ifp); |
@@ -643,6 +647,7 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp) | |||
643 | if (!(ifp->flags & IFA_F_PERMANENT) || onlink > 0) | 647 | if (!(ifp->flags & IFA_F_PERMANENT) || onlink > 0) |
644 | break; | 648 | break; |
645 | deleted = 1; | 649 | deleted = 1; |
650 | continue; | ||
646 | } else if (ifp->flags & IFA_F_PERMANENT) { | 651 | } else if (ifp->flags & IFA_F_PERMANENT) { |
647 | if (ipv6_prefix_equal(&ifa->addr, &ifp->addr, | 652 | if (ipv6_prefix_equal(&ifa->addr, &ifp->addr, |
648 | ifp->prefix_len)) { | 653 | ifp->prefix_len)) { |
@@ -666,6 +671,7 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp) | |||
666 | } | 671 | } |
667 | } | 672 | } |
668 | } | 673 | } |
674 | ifap = &ifa->if_next; | ||
669 | } | 675 | } |
670 | write_unlock_bh(&idev->lock); | 676 | write_unlock_bh(&idev->lock); |
671 | 677 | ||
@@ -903,11 +909,18 @@ int ipv6_dev_get_saddr(struct net_device *daddr_dev, | |||
903 | 909 | ||
904 | score.addr_type = __ipv6_addr_type(&ifa->addr); | 910 | score.addr_type = __ipv6_addr_type(&ifa->addr); |
905 | 911 | ||
906 | /* Rule 0: Candidate Source Address (section 4) | 912 | /* Rule 0: |
913 | * - Tentative Address (RFC2462 section 5.4) | ||
914 | * - A tentative address is not considered | ||
915 | * "assigned to an interface" in the traditional | ||
916 | * sense. | ||
917 | * - Candidate Source Address (section 4) | ||
907 | * - In any case, anycast addresses, multicast | 918 | * - In any case, anycast addresses, multicast |
908 | * addresses, and the unspecified address MUST | 919 | * addresses, and the unspecified address MUST |
909 | * NOT be included in a candidate set. | 920 | * NOT be included in a candidate set. |
910 | */ | 921 | */ |
922 | if (ifa->flags & IFA_F_TENTATIVE) | ||
923 | continue; | ||
911 | if (unlikely(score.addr_type == IPV6_ADDR_ANY || | 924 | if (unlikely(score.addr_type == IPV6_ADDR_ANY || |
912 | score.addr_type & IPV6_ADDR_MULTICAST)) { | 925 | score.addr_type & IPV6_ADDR_MULTICAST)) { |
913 | LIMIT_NETDEBUG(KERN_DEBUG | 926 | LIMIT_NETDEBUG(KERN_DEBUG |
@@ -1215,10 +1228,8 @@ int ipv6_rcv_saddr_equal(const struct sock *sk, const struct sock *sk2) | |||
1215 | 1228 | ||
1216 | /* Gets referenced address, destroys ifaddr */ | 1229 | /* Gets referenced address, destroys ifaddr */ |
1217 | 1230 | ||
1218 | void addrconf_dad_failure(struct inet6_ifaddr *ifp) | 1231 | void addrconf_dad_stop(struct inet6_ifaddr *ifp) |
1219 | { | 1232 | { |
1220 | if (net_ratelimit()) | ||
1221 | printk(KERN_INFO "%s: duplicate address detected!\n", ifp->idev->dev->name); | ||
1222 | if (ifp->flags&IFA_F_PERMANENT) { | 1233 | if (ifp->flags&IFA_F_PERMANENT) { |
1223 | spin_lock_bh(&ifp->lock); | 1234 | spin_lock_bh(&ifp->lock); |
1224 | addrconf_del_timer(ifp); | 1235 | addrconf_del_timer(ifp); |
@@ -1244,6 +1255,12 @@ void addrconf_dad_failure(struct inet6_ifaddr *ifp) | |||
1244 | ipv6_del_addr(ifp); | 1255 | ipv6_del_addr(ifp); |
1245 | } | 1256 | } |
1246 | 1257 | ||
1258 | void addrconf_dad_failure(struct inet6_ifaddr *ifp) | ||
1259 | { | ||
1260 | if (net_ratelimit()) | ||
1261 | printk(KERN_INFO "%s: duplicate address detected!\n", ifp->idev->dev->name); | ||
1262 | addrconf_dad_stop(ifp); | ||
1263 | } | ||
1247 | 1264 | ||
1248 | /* Join to solicited addr multicast group. */ | 1265 | /* Join to solicited addr multicast group. */ |
1249 | 1266 | ||
@@ -1596,9 +1613,17 @@ void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len) | |||
1596 | not good. | 1613 | not good. |
1597 | */ | 1614 | */ |
1598 | if (valid_lft >= 0x7FFFFFFF/HZ) | 1615 | if (valid_lft >= 0x7FFFFFFF/HZ) |
1599 | rt_expires = 0; | 1616 | rt_expires = 0x7FFFFFFF - (0x7FFFFFFF % HZ); |
1600 | else | 1617 | else |
1601 | rt_expires = jiffies + valid_lft * HZ; | 1618 | rt_expires = valid_lft * HZ; |
1619 | |||
1620 | /* | ||
1621 | * We convert this (in jiffies) to clock_t later. | ||
1622 | * Avoid arithmetic overflow there as well. | ||
1623 | * Overflow can happen only if HZ < USER_HZ. | ||
1624 | */ | ||
1625 | if (HZ < USER_HZ && rt_expires > 0x7FFFFFFF / USER_HZ) | ||
1626 | rt_expires = 0x7FFFFFFF / USER_HZ; | ||
1602 | 1627 | ||
1603 | if (pinfo->onlink) { | 1628 | if (pinfo->onlink) { |
1604 | struct rt6_info *rt; | 1629 | struct rt6_info *rt; |
@@ -1610,12 +1635,12 @@ void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len) | |||
1610 | ip6_del_rt(rt, NULL, NULL, NULL); | 1635 | ip6_del_rt(rt, NULL, NULL, NULL); |
1611 | rt = NULL; | 1636 | rt = NULL; |
1612 | } else { | 1637 | } else { |
1613 | rt->rt6i_expires = rt_expires; | 1638 | rt->rt6i_expires = jiffies + rt_expires; |
1614 | } | 1639 | } |
1615 | } | 1640 | } |
1616 | } else if (valid_lft) { | 1641 | } else if (valid_lft) { |
1617 | addrconf_prefix_route(&pinfo->prefix, pinfo->prefix_len, | 1642 | addrconf_prefix_route(&pinfo->prefix, pinfo->prefix_len, |
1618 | dev, rt_expires, RTF_ADDRCONF|RTF_EXPIRES|RTF_PREFIX_RT); | 1643 | dev, jiffies_to_clock_t(rt_expires), RTF_ADDRCONF|RTF_EXPIRES|RTF_PREFIX_RT); |
1619 | } | 1644 | } |
1620 | if (rt) | 1645 | if (rt) |
1621 | dst_release(&rt->u.dst); | 1646 | dst_release(&rt->u.dst); |
@@ -2125,9 +2150,42 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event, | |||
2125 | { | 2150 | { |
2126 | struct net_device *dev = (struct net_device *) data; | 2151 | struct net_device *dev = (struct net_device *) data; |
2127 | struct inet6_dev *idev = __in6_dev_get(dev); | 2152 | struct inet6_dev *idev = __in6_dev_get(dev); |
2153 | int run_pending = 0; | ||
2128 | 2154 | ||
2129 | switch(event) { | 2155 | switch(event) { |
2130 | case NETDEV_UP: | 2156 | case NETDEV_UP: |
2157 | case NETDEV_CHANGE: | ||
2158 | if (event == NETDEV_UP) { | ||
2159 | if (!netif_carrier_ok(dev)) { | ||
2160 | /* device is not ready yet. */ | ||
2161 | printk(KERN_INFO | ||
2162 | "ADDRCONF(NETDEV_UP): %s: " | ||
2163 | "link is not ready\n", | ||
2164 | dev->name); | ||
2165 | break; | ||
2166 | } | ||
2167 | } else { | ||
2168 | if (!netif_carrier_ok(dev)) { | ||
2169 | /* device is still not ready. */ | ||
2170 | break; | ||
2171 | } | ||
2172 | |||
2173 | if (idev) { | ||
2174 | if (idev->if_flags & IF_READY) { | ||
2175 | /* device is already configured. */ | ||
2176 | break; | ||
2177 | } | ||
2178 | idev->if_flags |= IF_READY; | ||
2179 | } | ||
2180 | |||
2181 | printk(KERN_INFO | ||
2182 | "ADDRCONF(NETDEV_CHANGE): %s: " | ||
2183 | "link becomes ready\n", | ||
2184 | dev->name); | ||
2185 | |||
2186 | run_pending = 1; | ||
2187 | } | ||
2188 | |||
2131 | switch(dev->type) { | 2189 | switch(dev->type) { |
2132 | case ARPHRD_SIT: | 2190 | case ARPHRD_SIT: |
2133 | addrconf_sit_config(dev); | 2191 | addrconf_sit_config(dev); |
@@ -2144,6 +2202,9 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event, | |||
2144 | break; | 2202 | break; |
2145 | }; | 2203 | }; |
2146 | if (idev) { | 2204 | if (idev) { |
2205 | if (run_pending) | ||
2206 | addrconf_dad_run(idev); | ||
2207 | |||
2147 | /* If the MTU changed during the interface down, when the | 2208 | /* If the MTU changed during the interface down, when the |
2148 | interface up, the changed MTU must be reflected in the | 2209 | interface up, the changed MTU must be reflected in the |
2149 | idev as well as routers. | 2210 | idev as well as routers. |
@@ -2178,8 +2239,7 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event, | |||
2178 | */ | 2239 | */ |
2179 | addrconf_ifdown(dev, event != NETDEV_DOWN); | 2240 | addrconf_ifdown(dev, event != NETDEV_DOWN); |
2180 | break; | 2241 | break; |
2181 | case NETDEV_CHANGE: | 2242 | |
2182 | break; | ||
2183 | case NETDEV_CHANGENAME: | 2243 | case NETDEV_CHANGENAME: |
2184 | #ifdef CONFIG_SYSCTL | 2244 | #ifdef CONFIG_SYSCTL |
2185 | if (idev) { | 2245 | if (idev) { |
@@ -2260,7 +2320,7 @@ static int addrconf_ifdown(struct net_device *dev, int how) | |||
2260 | 2320 | ||
2261 | /* Step 3: clear flags for stateless addrconf */ | 2321 | /* Step 3: clear flags for stateless addrconf */ |
2262 | if (how != 1) | 2322 | if (how != 1) |
2263 | idev->if_flags &= ~(IF_RS_SENT|IF_RA_RCVD); | 2323 | idev->if_flags &= ~(IF_RS_SENT|IF_RA_RCVD|IF_READY); |
2264 | 2324 | ||
2265 | /* Step 4: clear address list */ | 2325 | /* Step 4: clear address list */ |
2266 | #ifdef CONFIG_IPV6_PRIVACY | 2326 | #ifdef CONFIG_IPV6_PRIVACY |
@@ -2369,11 +2429,20 @@ out: | |||
2369 | /* | 2429 | /* |
2370 | * Duplicate Address Detection | 2430 | * Duplicate Address Detection |
2371 | */ | 2431 | */ |
2432 | static void addrconf_dad_kick(struct inet6_ifaddr *ifp) | ||
2433 | { | ||
2434 | unsigned long rand_num; | ||
2435 | struct inet6_dev *idev = ifp->idev; | ||
2436 | |||
2437 | rand_num = net_random() % (idev->cnf.rtr_solicit_delay ? : 1); | ||
2438 | ifp->probes = idev->cnf.dad_transmits; | ||
2439 | addrconf_mod_timer(ifp, AC_DAD, rand_num); | ||
2440 | } | ||
2441 | |||
2372 | static void addrconf_dad_start(struct inet6_ifaddr *ifp, u32 flags) | 2442 | static void addrconf_dad_start(struct inet6_ifaddr *ifp, u32 flags) |
2373 | { | 2443 | { |
2374 | struct inet6_dev *idev = ifp->idev; | 2444 | struct inet6_dev *idev = ifp->idev; |
2375 | struct net_device *dev = idev->dev; | 2445 | struct net_device *dev = idev->dev; |
2376 | unsigned long rand_num; | ||
2377 | 2446 | ||
2378 | addrconf_join_solict(dev, &ifp->addr); | 2447 | addrconf_join_solict(dev, &ifp->addr); |
2379 | 2448 | ||
@@ -2382,7 +2451,6 @@ static void addrconf_dad_start(struct inet6_ifaddr *ifp, u32 flags) | |||
2382 | flags); | 2451 | flags); |
2383 | 2452 | ||
2384 | net_srandom(ifp->addr.s6_addr32[3]); | 2453 | net_srandom(ifp->addr.s6_addr32[3]); |
2385 | rand_num = net_random() % (idev->cnf.rtr_solicit_delay ? : 1); | ||
2386 | 2454 | ||
2387 | read_lock_bh(&idev->lock); | 2455 | read_lock_bh(&idev->lock); |
2388 | if (ifp->dead) | 2456 | if (ifp->dead) |
@@ -2399,10 +2467,19 @@ static void addrconf_dad_start(struct inet6_ifaddr *ifp, u32 flags) | |||
2399 | return; | 2467 | return; |
2400 | } | 2468 | } |
2401 | 2469 | ||
2402 | ifp->probes = idev->cnf.dad_transmits; | 2470 | if (idev->if_flags & IF_READY) { |
2403 | addrconf_mod_timer(ifp, AC_DAD, rand_num); | 2471 | addrconf_dad_kick(ifp); |
2404 | 2472 | spin_unlock_bh(&ifp->lock); | |
2405 | spin_unlock_bh(&ifp->lock); | 2473 | } else { |
2474 | spin_unlock_bh(&ifp->lock); | ||
2475 | /* | ||
2476 | * If the defice is not ready: | ||
2477 | * - keep it tentative if it is a permanent address. | ||
2478 | * - otherwise, kill it. | ||
2479 | */ | ||
2480 | in6_ifa_hold(ifp); | ||
2481 | addrconf_dad_stop(ifp); | ||
2482 | } | ||
2406 | out: | 2483 | out: |
2407 | read_unlock_bh(&idev->lock); | 2484 | read_unlock_bh(&idev->lock); |
2408 | } | 2485 | } |
@@ -2484,6 +2561,22 @@ static void addrconf_dad_completed(struct inet6_ifaddr *ifp) | |||
2484 | } | 2561 | } |
2485 | } | 2562 | } |
2486 | 2563 | ||
2564 | static void addrconf_dad_run(struct inet6_dev *idev) { | ||
2565 | struct inet6_ifaddr *ifp; | ||
2566 | |||
2567 | read_lock_bh(&idev->lock); | ||
2568 | for (ifp = idev->addr_list; ifp; ifp = ifp->if_next) { | ||
2569 | spin_lock_bh(&ifp->lock); | ||
2570 | if (!(ifp->flags & IFA_F_TENTATIVE)) { | ||
2571 | spin_unlock_bh(&ifp->lock); | ||
2572 | continue; | ||
2573 | } | ||
2574 | spin_unlock_bh(&ifp->lock); | ||
2575 | addrconf_dad_kick(ifp); | ||
2576 | } | ||
2577 | read_unlock_bh(&idev->lock); | ||
2578 | } | ||
2579 | |||
2487 | #ifdef CONFIG_PROC_FS | 2580 | #ifdef CONFIG_PROC_FS |
2488 | struct if6_iter_state { | 2581 | struct if6_iter_state { |
2489 | int bucket; | 2582 | int bucket; |
@@ -2689,6 +2782,9 @@ restart: | |||
2689 | in6_ifa_hold(ifpub); | 2782 | in6_ifa_hold(ifpub); |
2690 | spin_unlock(&ifp->lock); | 2783 | spin_unlock(&ifp->lock); |
2691 | read_unlock(&addrconf_hash_lock); | 2784 | read_unlock(&addrconf_hash_lock); |
2785 | spin_lock(&ifpub->lock); | ||
2786 | ifpub->regen_count = 0; | ||
2787 | spin_unlock(&ifpub->lock); | ||
2692 | ipv6_create_tempaddr(ifpub, ifp); | 2788 | ipv6_create_tempaddr(ifpub, ifp); |
2693 | in6_ifa_put(ifpub); | 2789 | in6_ifa_put(ifpub); |
2694 | in6_ifa_put(ifp); | 2790 | in6_ifa_put(ifp); |
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index 34a332225c17..6ec6a2b549bb 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c | |||
@@ -328,8 +328,10 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info, | |||
328 | iif = skb->dev->ifindex; | 328 | iif = skb->dev->ifindex; |
329 | 329 | ||
330 | /* | 330 | /* |
331 | * Must not send if we know that source is Anycast also. | 331 | * Must not send error if the source does not uniquely |
332 | * for now we don't know that. | 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 | if ((addr_type == IPV6_ADDR_ANY) || (addr_type & IPV6_ADDR_MULTICAST)) { | 336 | if ((addr_type == IPV6_ADDR_ANY) || (addr_type & IPV6_ADDR_MULTICAST)) { |
335 | LIMIT_NETDEBUG(KERN_DEBUG "icmpv6_send: addr_any/mcast source\n"); | 337 | LIMIT_NETDEBUG(KERN_DEBUG "icmpv6_send: addr_any/mcast source\n"); |
@@ -373,6 +375,16 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info, | |||
373 | err = ip6_dst_lookup(sk, &dst, &fl); | 375 | err = ip6_dst_lookup(sk, &dst, &fl); |
374 | if (err) | 376 | if (err) |
375 | goto out; | 377 | goto out; |
378 | |||
379 | /* | ||
380 | * We won't send icmp if the destination is known | ||
381 | * anycast. | ||
382 | */ | ||
383 | if (((struct rt6_info *)dst)->rt6i_flags & RTF_ANYCAST) { | ||
384 | LIMIT_NETDEBUG(KERN_DEBUG "icmpv6_send: acast source\n"); | ||
385 | goto out_dst_release; | ||
386 | } | ||
387 | |||
376 | if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0) | 388 | if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0) |
377 | goto out; | 389 | goto out; |
378 | 390 | ||
diff --git a/net/ipv6/netfilter/Kconfig b/net/ipv6/netfilter/Kconfig index 060d61202412..04912f9b35c3 100644 --- a/net/ipv6/netfilter/Kconfig +++ b/net/ipv6/netfilter/Kconfig | |||
@@ -211,7 +211,7 @@ config IP6_NF_TARGET_REJECT | |||
211 | 211 | ||
212 | config IP6_NF_TARGET_NFQUEUE | 212 | config IP6_NF_TARGET_NFQUEUE |
213 | tristate "NFQUEUE Target Support" | 213 | tristate "NFQUEUE Target Support" |
214 | depends on IP_NF_IPTABLES | 214 | depends on IP6_NF_IPTABLES |
215 | help | 215 | help |
216 | This Target replaced the old obsolete QUEUE target. | 216 | This Target replaced the old obsolete QUEUE target. |
217 | 217 | ||
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index a7a537b50595..66140f13d119 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -413,11 +413,14 @@ static struct rt6_info *rt6_cow(struct rt6_info *ort, struct in6_addr *daddr, | |||
413 | rt = ip6_rt_copy(ort); | 413 | rt = ip6_rt_copy(ort); |
414 | 414 | ||
415 | if (rt) { | 415 | if (rt) { |
416 | ipv6_addr_copy(&rt->rt6i_dst.addr, daddr); | 416 | if (!(rt->rt6i_flags&RTF_GATEWAY)) { |
417 | 417 | if (rt->rt6i_dst.plen != 128 && | |
418 | if (!(rt->rt6i_flags&RTF_GATEWAY)) | 418 | ipv6_addr_equal(&rt->rt6i_dst.addr, daddr)) |
419 | rt->rt6i_flags |= RTF_ANYCAST; | ||
419 | ipv6_addr_copy(&rt->rt6i_gateway, daddr); | 420 | ipv6_addr_copy(&rt->rt6i_gateway, daddr); |
421 | } | ||
420 | 422 | ||
423 | ipv6_addr_copy(&rt->rt6i_dst.addr, daddr); | ||
421 | rt->rt6i_dst.plen = 128; | 424 | rt->rt6i_dst.plen = 128; |
422 | rt->rt6i_flags |= RTF_CACHE; | 425 | rt->rt6i_flags |= RTF_CACHE; |
423 | rt->u.dst.flags |= DST_HOST; | 426 | rt->u.dst.flags |= DST_HOST; |
@@ -829,7 +832,7 @@ int ip6_route_add(struct in6_rtmsg *rtmsg, struct nlmsghdr *nlh, | |||
829 | } | 832 | } |
830 | 833 | ||
831 | rt->u.dst.obsolete = -1; | 834 | rt->u.dst.obsolete = -1; |
832 | rt->rt6i_expires = clock_t_to_jiffies(rtmsg->rtmsg_info); | 835 | rt->rt6i_expires = jiffies + clock_t_to_jiffies(rtmsg->rtmsg_info); |
833 | if (nlh && (r = NLMSG_DATA(nlh))) { | 836 | if (nlh && (r = NLMSG_DATA(nlh))) { |
834 | rt->rt6i_protocol = r->rtm_protocol; | 837 | rt->rt6i_protocol = r->rtm_protocol; |
835 | } else { | 838 | } else { |
@@ -1413,7 +1416,9 @@ struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev, | |||
1413 | rt->u.dst.obsolete = -1; | 1416 | rt->u.dst.obsolete = -1; |
1414 | 1417 | ||
1415 | rt->rt6i_flags = RTF_UP | RTF_NONEXTHOP; | 1418 | rt->rt6i_flags = RTF_UP | RTF_NONEXTHOP; |
1416 | if (!anycast) | 1419 | if (anycast) |
1420 | rt->rt6i_flags |= RTF_ANYCAST; | ||
1421 | else | ||
1417 | rt->rt6i_flags |= RTF_LOCAL; | 1422 | rt->rt6i_flags |= RTF_LOCAL; |
1418 | rt->rt6i_nexthop = ndisc_get_neigh(rt->rt6i_dev, &rt->rt6i_gateway); | 1423 | rt->rt6i_nexthop = ndisc_get_neigh(rt->rt6i_dev, &rt->rt6i_gateway); |
1419 | if (rt->rt6i_nexthop == NULL) { | 1424 | if (rt->rt6i_nexthop == NULL) { |
diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c index cf1d91e74c82..69bd957380e7 100644 --- a/net/ipv6/xfrm6_policy.c +++ b/net/ipv6/xfrm6_policy.c | |||
@@ -214,6 +214,7 @@ _decode_session6(struct sk_buff *skb, struct flowi *fl) | |||
214 | case IPPROTO_UDP: | 214 | case IPPROTO_UDP: |
215 | case IPPROTO_TCP: | 215 | case IPPROTO_TCP: |
216 | case IPPROTO_SCTP: | 216 | case IPPROTO_SCTP: |
217 | case IPPROTO_DCCP: | ||
217 | if (pskb_may_pull(skb, skb->nh.raw + offset + 4 - skb->data)) { | 218 | if (pskb_may_pull(skb, skb->nh.raw + offset + 4 - skb->data)) { |
218 | u16 *ports = (u16 *)exthdr; | 219 | u16 *ports = (u16 *)exthdr; |
219 | 220 | ||
diff --git a/net/netrom/nr_in.c b/net/netrom/nr_in.c index 004e8599b8fe..a7d88b5ad756 100644 --- a/net/netrom/nr_in.c +++ b/net/netrom/nr_in.c | |||
@@ -99,7 +99,7 @@ static int nr_state1_machine(struct sock *sk, struct sk_buff *skb, | |||
99 | break; | 99 | break; |
100 | 100 | ||
101 | case NR_RESET: | 101 | case NR_RESET: |
102 | if (sysctl_netrom_reset_circuit); | 102 | if (sysctl_netrom_reset_circuit) |
103 | nr_disconnect(sk, ECONNRESET); | 103 | nr_disconnect(sk, ECONNRESET); |
104 | break; | 104 | break; |
105 | 105 | ||
@@ -130,7 +130,7 @@ static int nr_state2_machine(struct sock *sk, struct sk_buff *skb, | |||
130 | break; | 130 | break; |
131 | 131 | ||
132 | case NR_RESET: | 132 | case NR_RESET: |
133 | if (sysctl_netrom_reset_circuit); | 133 | if (sysctl_netrom_reset_circuit) |
134 | nr_disconnect(sk, ECONNRESET); | 134 | nr_disconnect(sk, ECONNRESET); |
135 | break; | 135 | break; |
136 | 136 | ||
@@ -265,7 +265,7 @@ static int nr_state3_machine(struct sock *sk, struct sk_buff *skb, int frametype | |||
265 | break; | 265 | break; |
266 | 266 | ||
267 | case NR_RESET: | 267 | case NR_RESET: |
268 | if (sysctl_netrom_reset_circuit); | 268 | if (sysctl_netrom_reset_circuit) |
269 | nr_disconnect(sk, ECONNRESET); | 269 | nr_disconnect(sk, ECONNRESET); |
270 | break; | 270 | break; |
271 | 271 | ||
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 1f7f244806b7..9df888e932c5 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c | |||
@@ -156,10 +156,6 @@ static inline void sctp_set_owner_w(struct sctp_chunk *chunk) | |||
156 | sizeof(struct sk_buff) + | 156 | sizeof(struct sk_buff) + |
157 | sizeof(struct sctp_chunk); | 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 | atomic_add(sizeof(struct sctp_chunk), &sk->sk_wmem_alloc); | 159 | atomic_add(sizeof(struct sctp_chunk), &sk->sk_wmem_alloc); |
164 | } | 160 | } |
165 | 161 | ||
@@ -4426,7 +4422,7 @@ cleanup: | |||
4426 | * tcp_poll(). Note that, based on these implementations, we don't | 4422 | * tcp_poll(). Note that, based on these implementations, we don't |
4427 | * lock the socket in this function, even though it seems that, | 4423 | * lock the socket in this function, even though it seems that, |
4428 | * ideally, locking or some other mechanisms can be used to ensure | 4424 | * ideally, locking or some other mechanisms can be used to ensure |
4429 | * the integrity of the counters (sndbuf and wmem_queued) used | 4425 | * the integrity of the counters (sndbuf and wmem_alloc) used |
4430 | * in this place. We assume that we don't need locks either until proven | 4426 | * in this place. We assume that we don't need locks either until proven |
4431 | * otherwise. | 4427 | * otherwise. |
4432 | * | 4428 | * |
@@ -4833,10 +4829,6 @@ static void sctp_wfree(struct sk_buff *skb) | |||
4833 | sizeof(struct sk_buff) + | 4829 | sizeof(struct sk_buff) + |
4834 | sizeof(struct sctp_chunk); | 4830 | sizeof(struct sctp_chunk); |
4835 | 4831 | ||
4836 | sk->sk_wmem_queued -= SCTP_DATA_SNDSIZE(chunk) + | ||
4837 | sizeof(struct sk_buff) + | ||
4838 | sizeof(struct sctp_chunk); | ||
4839 | |||
4840 | atomic_sub(sizeof(struct sctp_chunk), &sk->sk_wmem_alloc); | 4832 | atomic_sub(sizeof(struct sctp_chunk), &sk->sk_wmem_alloc); |
4841 | 4833 | ||
4842 | sock_wfree(skb); | 4834 | sock_wfree(skb); |
@@ -4920,7 +4912,7 @@ void sctp_write_space(struct sock *sk) | |||
4920 | 4912 | ||
4921 | /* Is there any sndbuf space available on the socket? | 4913 | /* Is there any sndbuf space available on the socket? |
4922 | * | 4914 | * |
4923 | * Note that wmem_queued is the sum of the send buffers on all of the | 4915 | * Note that sk_wmem_alloc is the sum of the send buffers on all of the |
4924 | * associations on the same socket. For a UDP-style socket with | 4916 | * associations on the same socket. For a UDP-style socket with |
4925 | * multiple associations, it is possible for it to be "unwriteable" | 4917 | * multiple associations, it is possible for it to be "unwriteable" |
4926 | * prematurely. I assume that this is acceptable because | 4918 | * prematurely. I assume that this is acceptable because |
@@ -4933,7 +4925,7 @@ static int sctp_writeable(struct sock *sk) | |||
4933 | { | 4925 | { |
4934 | int amt = 0; | 4926 | int amt = 0; |
4935 | 4927 | ||
4936 | amt = sk->sk_sndbuf - sk->sk_wmem_queued; | 4928 | amt = sk->sk_sndbuf - atomic_read(&sk->sk_wmem_alloc); |
4937 | if (amt < 0) | 4929 | if (amt < 0) |
4938 | amt = 0; | 4930 | amt = 0; |
4939 | return amt; | 4931 | return amt; |
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index f44f46f1d8e0..8d782282ec19 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c | |||
@@ -638,7 +638,7 @@ gss_pipe_destroy_msg(struct rpc_pipe_msg *msg) | |||
638 | gss_msg); | 638 | gss_msg); |
639 | atomic_inc(&gss_msg->count); | 639 | atomic_inc(&gss_msg->count); |
640 | gss_unhash_msg(gss_msg); | 640 | gss_unhash_msg(gss_msg); |
641 | if (msg->errno == -ETIMEDOUT || msg->errno == -EPIPE) { | 641 | if (msg->errno == -ETIMEDOUT) { |
642 | unsigned long now = jiffies; | 642 | unsigned long now = jiffies; |
643 | if (time_after(now, ratelimit)) { | 643 | if (time_after(now, ratelimit)) { |
644 | printk(KERN_WARNING "RPC: AUTH_GSS upcall timed out.\n" | 644 | printk(KERN_WARNING "RPC: AUTH_GSS upcall timed out.\n" |
@@ -786,7 +786,9 @@ gss_create_cred(struct rpc_auth *auth, struct auth_cred *acred, int taskflags) | |||
786 | cred->gc_flags = 0; | 786 | cred->gc_flags = 0; |
787 | cred->gc_base.cr_ops = &gss_credops; | 787 | cred->gc_base.cr_ops = &gss_credops; |
788 | cred->gc_service = gss_auth->service; | 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 | if (err < 0) | 792 | if (err < 0) |
791 | goto out_err; | 793 | goto out_err; |
792 | 794 | ||
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c index c76ea221798c..16a2458f38f7 100644 --- a/net/sunrpc/rpc_pipe.c +++ b/net/sunrpc/rpc_pipe.c | |||
@@ -174,7 +174,7 @@ rpc_pipe_release(struct inode *inode, struct file *filp) | |||
174 | goto out; | 174 | goto out; |
175 | msg = (struct rpc_pipe_msg *)filp->private_data; | 175 | msg = (struct rpc_pipe_msg *)filp->private_data; |
176 | if (msg != NULL) { | 176 | if (msg != NULL) { |
177 | msg->errno = -EPIPE; | 177 | msg->errno = -EAGAIN; |
178 | list_del_init(&msg->list); | 178 | list_del_init(&msg->list); |
179 | rpci->ops->destroy_msg(msg); | 179 | rpci->ops->destroy_msg(msg); |
180 | } | 180 | } |
@@ -183,7 +183,7 @@ rpc_pipe_release(struct inode *inode, struct file *filp) | |||
183 | if (filp->f_mode & FMODE_READ) | 183 | if (filp->f_mode & FMODE_READ) |
184 | rpci->nreaders --; | 184 | rpci->nreaders --; |
185 | if (!rpci->nreaders) | 185 | if (!rpci->nreaders) |
186 | __rpc_purge_upcall(inode, -EPIPE); | 186 | __rpc_purge_upcall(inode, -EAGAIN); |
187 | if (rpci->ops->release_pipe) | 187 | if (rpci->ops->release_pipe) |
188 | rpci->ops->release_pipe(inode); | 188 | rpci->ops->release_pipe(inode); |
189 | out: | 189 | out: |
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 0a51fd46a848..77e8800d4127 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c | |||
@@ -990,6 +990,7 @@ static void xs_udp_connect_worker(void *args) | |||
990 | sk->sk_data_ready = xs_udp_data_ready; | 990 | sk->sk_data_ready = xs_udp_data_ready; |
991 | sk->sk_write_space = xs_udp_write_space; | 991 | sk->sk_write_space = xs_udp_write_space; |
992 | sk->sk_no_check = UDP_CSUM_NORCV; | 992 | sk->sk_no_check = UDP_CSUM_NORCV; |
993 | sk->sk_allocation = GFP_ATOMIC; | ||
993 | 994 | ||
994 | xprt_set_connected(xprt); | 995 | xprt_set_connected(xprt); |
995 | 996 | ||
@@ -1074,6 +1075,7 @@ static void xs_tcp_connect_worker(void *args) | |||
1074 | sk->sk_data_ready = xs_tcp_data_ready; | 1075 | sk->sk_data_ready = xs_tcp_data_ready; |
1075 | sk->sk_state_change = xs_tcp_state_change; | 1076 | sk->sk_state_change = xs_tcp_state_change; |
1076 | sk->sk_write_space = xs_tcp_write_space; | 1077 | sk->sk_write_space = xs_tcp_write_space; |
1078 | sk->sk_allocation = GFP_ATOMIC; | ||
1077 | 1079 | ||
1078 | /* socket options */ | 1080 | /* socket options */ |
1079 | sk->sk_userlocks |= SOCK_BINDPORT_LOCK; | 1081 | sk->sk_userlocks |= SOCK_BINDPORT_LOCK; |
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index 0db9e57013fd..d19e274b9c4a 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c | |||
@@ -346,6 +346,7 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl) | |||
346 | struct xfrm_policy *pol, **p; | 346 | struct xfrm_policy *pol, **p; |
347 | struct xfrm_policy *delpol = NULL; | 347 | struct xfrm_policy *delpol = NULL; |
348 | struct xfrm_policy **newpos = NULL; | 348 | struct xfrm_policy **newpos = NULL; |
349 | struct dst_entry *gc_list; | ||
349 | 350 | ||
350 | write_lock_bh(&xfrm_policy_lock); | 351 | write_lock_bh(&xfrm_policy_lock); |
351 | for (p = &xfrm_policy_list[dir]; (pol=*p)!=NULL;) { | 352 | for (p = &xfrm_policy_list[dir]; (pol=*p)!=NULL;) { |
@@ -381,9 +382,36 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl) | |||
381 | xfrm_pol_hold(policy); | 382 | xfrm_pol_hold(policy); |
382 | write_unlock_bh(&xfrm_policy_lock); | 383 | write_unlock_bh(&xfrm_policy_lock); |
383 | 384 | ||
384 | if (delpol) { | 385 | if (delpol) |
385 | xfrm_policy_kill(delpol); | 386 | xfrm_policy_kill(delpol); |
387 | |||
388 | read_lock_bh(&xfrm_policy_lock); | ||
389 | gc_list = NULL; | ||
390 | for (policy = policy->next; policy; policy = policy->next) { | ||
391 | struct dst_entry *dst; | ||
392 | |||
393 | write_lock(&policy->lock); | ||
394 | dst = policy->bundles; | ||
395 | if (dst) { | ||
396 | struct dst_entry *tail = dst; | ||
397 | while (tail->next) | ||
398 | tail = tail->next; | ||
399 | tail->next = gc_list; | ||
400 | gc_list = dst; | ||
401 | |||
402 | policy->bundles = NULL; | ||
403 | } | ||
404 | write_unlock(&policy->lock); | ||
405 | } | ||
406 | read_unlock_bh(&xfrm_policy_lock); | ||
407 | |||
408 | while (gc_list) { | ||
409 | struct dst_entry *dst = gc_list; | ||
410 | |||
411 | gc_list = dst->next; | ||
412 | dst_free(dst); | ||
386 | } | 413 | } |
414 | |||
387 | return 0; | 415 | return 0; |
388 | } | 416 | } |
389 | EXPORT_SYMBOL(xfrm_policy_insert); | 417 | EXPORT_SYMBOL(xfrm_policy_insert); |
@@ -1014,13 +1042,12 @@ int __xfrm_route_forward(struct sk_buff *skb, unsigned short family) | |||
1014 | } | 1042 | } |
1015 | EXPORT_SYMBOL(__xfrm_route_forward); | 1043 | EXPORT_SYMBOL(__xfrm_route_forward); |
1016 | 1044 | ||
1017 | /* Optimize later using cookies and generation ids. */ | ||
1018 | |||
1019 | static struct dst_entry *xfrm_dst_check(struct dst_entry *dst, u32 cookie) | 1045 | static struct dst_entry *xfrm_dst_check(struct dst_entry *dst, u32 cookie) |
1020 | { | 1046 | { |
1021 | if (!stale_bundle(dst)) | 1047 | /* If it is marked obsolete, which is how we even get here, |
1022 | return dst; | 1048 | * then we have purged it from the policy bundle list and we |
1023 | 1049 | * did that for a good reason. | |
1050 | */ | ||
1024 | return NULL; | 1051 | return NULL; |
1025 | } | 1052 | } |
1026 | 1053 | ||
@@ -1104,6 +1131,16 @@ int xfrm_flush_bundles(void) | |||
1104 | return 0; | 1131 | return 0; |
1105 | } | 1132 | } |
1106 | 1133 | ||
1134 | static int always_true(struct dst_entry *dst) | ||
1135 | { | ||
1136 | return 1; | ||
1137 | } | ||
1138 | |||
1139 | void xfrm_flush_all_bundles(void) | ||
1140 | { | ||
1141 | xfrm_prune_bundles(always_true); | ||
1142 | } | ||
1143 | |||
1107 | void xfrm_init_pmtu(struct dst_entry *dst) | 1144 | void xfrm_init_pmtu(struct dst_entry *dst) |
1108 | { | 1145 | { |
1109 | do { | 1146 | do { |
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index 7cf48aa6c95b..479effc97666 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c | |||
@@ -431,6 +431,8 @@ void xfrm_state_insert(struct xfrm_state *x) | |||
431 | spin_lock_bh(&xfrm_state_lock); | 431 | spin_lock_bh(&xfrm_state_lock); |
432 | __xfrm_state_insert(x); | 432 | __xfrm_state_insert(x); |
433 | spin_unlock_bh(&xfrm_state_lock); | 433 | spin_unlock_bh(&xfrm_state_lock); |
434 | |||
435 | xfrm_flush_all_bundles(); | ||
434 | } | 436 | } |
435 | EXPORT_SYMBOL(xfrm_state_insert); | 437 | EXPORT_SYMBOL(xfrm_state_insert); |
436 | 438 | ||
@@ -478,6 +480,9 @@ out: | |||
478 | spin_unlock_bh(&xfrm_state_lock); | 480 | spin_unlock_bh(&xfrm_state_lock); |
479 | xfrm_state_put_afinfo(afinfo); | 481 | xfrm_state_put_afinfo(afinfo); |
480 | 482 | ||
483 | if (!err) | ||
484 | xfrm_flush_all_bundles(); | ||
485 | |||
481 | if (x1) { | 486 | if (x1) { |
482 | xfrm_state_delete(x1); | 487 | xfrm_state_delete(x1); |
483 | xfrm_state_put(x1); | 488 | xfrm_state_put(x1); |
diff --git a/sound/sparc/Kconfig b/sound/sparc/Kconfig index 09ab138646a6..ef022a846b06 100644 --- a/sound/sparc/Kconfig +++ b/sound/sparc/Kconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # ALSA Sparc drivers | 1 | # ALSA Sparc drivers |
2 | 2 | ||
3 | menu "ALSA Sparc devices" | 3 | menu "ALSA Sparc devices" |
4 | depends on SND!=n && (SPARC32 || SPARC64) | 4 | depends on SND!=n && SPARC |
5 | 5 | ||
6 | config SND_SUN_AMD7930 | 6 | config SND_SUN_AMD7930 |
7 | tristate "Sun AMD7930" | 7 | tristate "Sun AMD7930" |