diff options
32 files changed, 195 insertions, 128 deletions
diff --git a/arch/arm/mach-davinci/psc.c b/arch/arm/mach-davinci/psc.c index 720c48b9ee04..aa2fc375a325 100644 --- a/arch/arm/mach-davinci/psc.c +++ b/arch/arm/mach-davinci/psc.c | |||
@@ -70,9 +70,6 @@ void davinci_psc_config(unsigned int domain, unsigned int id, char enable) | |||
70 | { | 70 | { |
71 | u32 epcpr, ptcmd, ptstat, pdstat, pdctl1, mdstat, mdctl, mdstat_mask; | 71 | u32 epcpr, ptcmd, ptstat, pdstat, pdctl1, mdstat, mdctl, mdstat_mask; |
72 | 72 | ||
73 | if (id < 0) | ||
74 | return; | ||
75 | |||
76 | mdctl = davinci_readl(DAVINCI_PWR_SLEEP_CNTRL_BASE + MDCTL + 4 * id); | 73 | mdctl = davinci_readl(DAVINCI_PWR_SLEEP_CNTRL_BASE + MDCTL + 4 * id); |
77 | if (enable) | 74 | if (enable) |
78 | mdctl |= 0x00000003; /* Enable Module */ | 75 | mdctl |= 0x00000003; /* Enable Module */ |
diff --git a/arch/arm/mach-sa1100/include/mach/jornada720.h b/arch/arm/mach-sa1100/include/mach/jornada720.h index bc120850d313..cc6b4bfcecf6 100644 --- a/arch/arm/mach-sa1100/include/mach/jornada720.h +++ b/arch/arm/mach-sa1100/include/mach/jornada720.h | |||
@@ -1,10 +1,10 @@ | |||
1 | /* | 1 | /* |
2 | * arch/arm/mach-sa1100/include/mach/jornada720.h | 2 | * arch/arm/mach-sa1100/include/mach/jornada720.h |
3 | * | 3 | * |
4 | * This file contains SSP/MCU communication definitions for HP Jornada 710/720/728 | 4 | * SSP/MCU communication definitions for HP Jornada 710/720/728 |
5 | * | 5 | * |
6 | * Copyright (C) 2007 Kristoffer Ericson <Kristoffer.Ericson@gmail.com> | 6 | * Copyright 2007,2008 Kristoffer Ericson <Kristoffer.Ericson@gmail.com> |
7 | * Copyright (C) 2000 John Ankcorn <jca@lcs.mit.edu> | 7 | * Copyright 2000 John Ankcorn <jca@lcs.mit.edu> |
8 | * | 8 | * |
9 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
@@ -25,3 +25,8 @@ | |||
25 | #define PWMOFF 0xDF | 25 | #define PWMOFF 0xDF |
26 | #define TXDUMMY 0x11 | 26 | #define TXDUMMY 0x11 |
27 | #define ERRORCODE 0x00 | 27 | #define ERRORCODE 0x00 |
28 | |||
29 | extern void jornada_ssp_start(void); | ||
30 | extern void jornada_ssp_end(void); | ||
31 | extern int jornada_ssp_inout(u8 byte); | ||
32 | extern int jornada_ssp_byte(u8 byte); | ||
diff --git a/arch/arm/mach-sa1100/jornada720_ssp.c b/arch/arm/mach-sa1100/jornada720_ssp.c index 06ea7abd9170..28cf36967977 100644 --- a/arch/arm/mach-sa1100/jornada720_ssp.c +++ b/arch/arm/mach-sa1100/jornada720_ssp.c | |||
@@ -21,8 +21,8 @@ | |||
21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
22 | 22 | ||
23 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
24 | #include <asm/hardware/ssp.h> | ||
25 | #include <mach/jornada720.h> | 24 | #include <mach/jornada720.h> |
25 | #include <asm/hardware/ssp.h> | ||
26 | 26 | ||
27 | static DEFINE_SPINLOCK(jornada_ssp_lock); | 27 | static DEFINE_SPINLOCK(jornada_ssp_lock); |
28 | static unsigned long jornada_ssp_flags; | 28 | static unsigned long jornada_ssp_flags; |
@@ -109,12 +109,12 @@ EXPORT_SYMBOL(jornada_ssp_inout); | |||
109 | * jornada_ssp_start - enable mcu | 109 | * jornada_ssp_start - enable mcu |
110 | * | 110 | * |
111 | */ | 111 | */ |
112 | int jornada_ssp_start() | 112 | void jornada_ssp_start(void) |
113 | { | 113 | { |
114 | spin_lock_irqsave(&jornada_ssp_lock, jornada_ssp_flags); | 114 | spin_lock_irqsave(&jornada_ssp_lock, jornada_ssp_flags); |
115 | GPCR = GPIO_GPIO25; | 115 | GPCR = GPIO_GPIO25; |
116 | udelay(50); | 116 | udelay(50); |
117 | return 0; | 117 | return; |
118 | }; | 118 | }; |
119 | EXPORT_SYMBOL(jornada_ssp_start); | 119 | EXPORT_SYMBOL(jornada_ssp_start); |
120 | 120 | ||
@@ -122,11 +122,11 @@ EXPORT_SYMBOL(jornada_ssp_start); | |||
122 | * jornada_ssp_end - disable mcu and turn off lock | 122 | * jornada_ssp_end - disable mcu and turn off lock |
123 | * | 123 | * |
124 | */ | 124 | */ |
125 | int jornada_ssp_end() | 125 | void jornada_ssp_end(void) |
126 | { | 126 | { |
127 | GPSR = GPIO_GPIO25; | 127 | GPSR = GPIO_GPIO25; |
128 | spin_unlock_irqrestore(&jornada_ssp_lock, jornada_ssp_flags); | 128 | spin_unlock_irqrestore(&jornada_ssp_lock, jornada_ssp_flags); |
129 | return 0; | 129 | return; |
130 | }; | 130 | }; |
131 | EXPORT_SYMBOL(jornada_ssp_end); | 131 | EXPORT_SYMBOL(jornada_ssp_end); |
132 | 132 | ||
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c index bc1cf30c83e0..01da719a7453 100644 --- a/arch/arm/plat-omap/devices.c +++ b/arch/arm/plat-omap/devices.c | |||
@@ -316,19 +316,6 @@ static inline void omap_init_mmc_conf(const struct omap_mmc_config *mmc_conf) | |||
316 | omap_cfg_reg(MMC_DAT3); | 316 | omap_cfg_reg(MMC_DAT3); |
317 | } | 317 | } |
318 | } | 318 | } |
319 | #if defined(CONFIG_ARCH_OMAP2420) | ||
320 | if (mmc_conf->mmc[0].internal_clock) { | ||
321 | /* | ||
322 | * Use internal loop-back in MMC/SDIO | ||
323 | * Module Input Clock selection | ||
324 | */ | ||
325 | if (cpu_is_omap24xx()) { | ||
326 | u32 v = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0); | ||
327 | v |= (1 << 24); /* not used in 243x */ | ||
328 | omap_ctrl_writel(v, OMAP2_CONTROL_DEVCONF0); | ||
329 | } | ||
330 | } | ||
331 | #endif | ||
332 | } | 319 | } |
333 | 320 | ||
334 | #ifdef CONFIG_ARCH_OMAP16XX | 321 | #ifdef CONFIG_ARCH_OMAP16XX |
diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c index ee4c292683e1..dfc3443e23aa 100644 --- a/arch/avr32/boards/atstk1000/atstk1002.c +++ b/arch/avr32/boards/atstk1000/atstk1002.c | |||
@@ -325,7 +325,7 @@ static int __init atstk1002_init(void) | |||
325 | #ifdef CONFIG_BOARD_ATSTK100X_SPI1 | 325 | #ifdef CONFIG_BOARD_ATSTK100X_SPI1 |
326 | at32_add_device_spi(1, spi1_board_info, ARRAY_SIZE(spi1_board_info)); | 326 | at32_add_device_spi(1, spi1_board_info, ARRAY_SIZE(spi1_board_info)); |
327 | #endif | 327 | #endif |
328 | #ifndef CONFIG_BOARD_ATSTK1002_SW2_CUSTOM | 328 | #ifndef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM |
329 | at32_add_device_mci(0, MCI_PDATA); | 329 | at32_add_device_mci(0, MCI_PDATA); |
330 | #endif | 330 | #endif |
331 | #ifdef CONFIG_BOARD_ATSTK1002_SW5_CUSTOM | 331 | #ifdef CONFIG_BOARD_ATSTK1002_SW5_CUSTOM |
diff --git a/arch/avr32/boot/images/.gitignore b/arch/avr32/boot/images/.gitignore new file mode 100644 index 000000000000..64ea9d0141d2 --- /dev/null +++ b/arch/avr32/boot/images/.gitignore | |||
@@ -0,0 +1,4 @@ | |||
1 | uImage | ||
2 | uImage.srec | ||
3 | vmlinux.cso | ||
4 | sfdwarf.log | ||
diff --git a/arch/avr32/kernel/.gitignore b/arch/avr32/kernel/.gitignore new file mode 100644 index 000000000000..c5f676c3c224 --- /dev/null +++ b/arch/avr32/kernel/.gitignore | |||
@@ -0,0 +1 @@ | |||
vmlinux.lds | |||
diff --git a/arch/avr32/kernel/avr32_ksyms.c b/arch/avr32/kernel/avr32_ksyms.c index 84a7d44edc67..11e310c567a9 100644 --- a/arch/avr32/kernel/avr32_ksyms.c +++ b/arch/avr32/kernel/avr32_ksyms.c | |||
@@ -58,6 +58,7 @@ EXPORT_SYMBOL(find_first_zero_bit); | |||
58 | EXPORT_SYMBOL(find_next_zero_bit); | 58 | EXPORT_SYMBOL(find_next_zero_bit); |
59 | EXPORT_SYMBOL(find_first_bit); | 59 | EXPORT_SYMBOL(find_first_bit); |
60 | EXPORT_SYMBOL(find_next_bit); | 60 | EXPORT_SYMBOL(find_next_bit); |
61 | EXPORT_SYMBOL(generic_find_next_le_bit); | ||
61 | EXPORT_SYMBOL(generic_find_next_zero_le_bit); | 62 | EXPORT_SYMBOL(generic_find_next_zero_le_bit); |
62 | 63 | ||
63 | /* I/O primitives (lib/io-*.S) */ | 64 | /* I/O primitives (lib/io-*.S) */ |
diff --git a/arch/avr32/kernel/syscall-stubs.S b/arch/avr32/kernel/syscall-stubs.S index 890286a1e62b..673178e235f3 100644 --- a/arch/avr32/kernel/syscall-stubs.S +++ b/arch/avr32/kernel/syscall-stubs.S | |||
@@ -109,3 +109,12 @@ __sys_epoll_pwait: | |||
109 | rcall sys_epoll_pwait | 109 | rcall sys_epoll_pwait |
110 | sub sp, -4 | 110 | sub sp, -4 |
111 | popm pc | 111 | popm pc |
112 | |||
113 | .global __sys_sync_file_range | ||
114 | .type __sys_sync_file_range,@function | ||
115 | __sys_sync_file_range: | ||
116 | pushm lr | ||
117 | st.w --sp, ARG6 | ||
118 | rcall sys_sync_file_range | ||
119 | sub sp, -4 | ||
120 | popm pc | ||
diff --git a/arch/avr32/kernel/syscall_table.S b/arch/avr32/kernel/syscall_table.S index 478bda4c4a09..7ee0057613b3 100644 --- a/arch/avr32/kernel/syscall_table.S +++ b/arch/avr32/kernel/syscall_table.S | |||
@@ -275,7 +275,7 @@ sys_call_table: | |||
275 | .long sys_set_robust_list | 275 | .long sys_set_robust_list |
276 | .long sys_get_robust_list /* 260 */ | 276 | .long sys_get_robust_list /* 260 */ |
277 | .long __sys_splice | 277 | .long __sys_splice |
278 | .long sys_sync_file_range | 278 | .long __sys_sync_file_range |
279 | .long sys_tee | 279 | .long sys_tee |
280 | .long sys_vmsplice | 280 | .long sys_vmsplice |
281 | .long __sys_epoll_pwait /* 265 */ | 281 | .long __sys_epoll_pwait /* 265 */ |
diff --git a/arch/avr32/kernel/traps.c b/arch/avr32/kernel/traps.c index b835c4c01368..0d987373bc01 100644 --- a/arch/avr32/kernel/traps.c +++ b/arch/avr32/kernel/traps.c | |||
@@ -116,15 +116,15 @@ asmlinkage void do_nmi(unsigned long ecr, struct pt_regs *regs) | |||
116 | switch (ret) { | 116 | switch (ret) { |
117 | case NOTIFY_OK: | 117 | case NOTIFY_OK: |
118 | case NOTIFY_STOP: | 118 | case NOTIFY_STOP: |
119 | return; | 119 | break; |
120 | case NOTIFY_BAD: | 120 | case NOTIFY_BAD: |
121 | die("Fatal Non-Maskable Interrupt", regs, SIGINT); | 121 | die("Fatal Non-Maskable Interrupt", regs, SIGINT); |
122 | default: | 122 | default: |
123 | printk(KERN_ALERT "Got NMI, but nobody cared. Disabling...\n"); | ||
124 | nmi_disable(); | ||
123 | break; | 125 | break; |
124 | } | 126 | } |
125 | 127 | nmi_exit(); | |
126 | printk(KERN_ALERT "Got NMI, but nobody cared. Disabling...\n"); | ||
127 | nmi_disable(); | ||
128 | } | 128 | } |
129 | 129 | ||
130 | asmlinkage void do_critical_exception(unsigned long ecr, struct pt_regs *regs) | 130 | asmlinkage void do_critical_exception(unsigned long ecr, struct pt_regs *regs) |
diff --git a/arch/avr32/lib/findbit.S b/arch/avr32/lib/findbit.S index c6b91dee857c..997b33b2288a 100644 --- a/arch/avr32/lib/findbit.S +++ b/arch/avr32/lib/findbit.S | |||
@@ -123,6 +123,36 @@ ENTRY(find_next_bit) | |||
123 | brgt 1b | 123 | brgt 1b |
124 | retal r11 | 124 | retal r11 |
125 | 125 | ||
126 | ENTRY(generic_find_next_le_bit) | ||
127 | lsr r8, r10, 5 | ||
128 | sub r9, r11, r10 | ||
129 | retle r11 | ||
130 | |||
131 | lsl r8, 2 | ||
132 | add r12, r8 | ||
133 | andl r10, 31, COH | ||
134 | breq 1f | ||
135 | |||
136 | /* offset is not word-aligned. Handle the first (32 - r10) bits */ | ||
137 | ldswp.w r8, r12[0] | ||
138 | sub r12, -4 | ||
139 | lsr r8, r8, r10 | ||
140 | brne .L_found | ||
141 | |||
142 | /* r9 = r9 - (32 - r10) = r9 + r10 - 32 */ | ||
143 | add r9, r10 | ||
144 | sub r9, 32 | ||
145 | retle r11 | ||
146 | |||
147 | /* Main loop. offset must be word-aligned */ | ||
148 | 1: ldswp.w r8, r12[0] | ||
149 | cp.w r8, 0 | ||
150 | brne .L_found | ||
151 | sub r12, -4 | ||
152 | sub r9, 32 | ||
153 | brgt 1b | ||
154 | retal r11 | ||
155 | |||
126 | ENTRY(generic_find_next_zero_le_bit) | 156 | ENTRY(generic_find_next_zero_le_bit) |
127 | lsr r8, r10, 5 | 157 | lsr r8, r10, 5 |
128 | sub r9, r11, r10 | 158 | sub r9, r11, r10 |
diff --git a/arch/mips/vr41xx/common/irq.c b/arch/mips/vr41xx/common/irq.c index cba36a247e32..92dd1a0ca352 100644 --- a/arch/mips/vr41xx/common/irq.c +++ b/arch/mips/vr41xx/common/irq.c | |||
@@ -72,6 +72,7 @@ static void irq_dispatch(unsigned int irq) | |||
72 | cascade = irq_cascade + irq; | 72 | cascade = irq_cascade + irq; |
73 | if (cascade->get_irq != NULL) { | 73 | if (cascade->get_irq != NULL) { |
74 | unsigned int source_irq = irq; | 74 | unsigned int source_irq = irq; |
75 | int ret; | ||
75 | desc = irq_desc + source_irq; | 76 | desc = irq_desc + source_irq; |
76 | if (desc->chip->mask_ack) | 77 | if (desc->chip->mask_ack) |
77 | desc->chip->mask_ack(source_irq); | 78 | desc->chip->mask_ack(source_irq); |
@@ -79,8 +80,9 @@ static void irq_dispatch(unsigned int irq) | |||
79 | desc->chip->mask(source_irq); | 80 | desc->chip->mask(source_irq); |
80 | desc->chip->ack(source_irq); | 81 | desc->chip->ack(source_irq); |
81 | } | 82 | } |
82 | irq = cascade->get_irq(irq); | 83 | ret = cascade->get_irq(irq); |
83 | if (irq < 0) | 84 | irq = ret; |
85 | if (ret < 0) | ||
84 | atomic_inc(&irq_err_count); | 86 | atomic_inc(&irq_err_count); |
85 | else | 87 | else |
86 | irq_dispatch(irq); | 88 | irq_dispatch(irq); |
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c index 23963882bc18..7495bc774685 100644 --- a/arch/sparc64/kernel/irq.c +++ b/arch/sparc64/kernel/irq.c | |||
@@ -7,6 +7,7 @@ | |||
7 | 7 | ||
8 | #include <linux/module.h> | 8 | #include <linux/module.h> |
9 | #include <linux/sched.h> | 9 | #include <linux/sched.h> |
10 | #include <linux/linkage.h> | ||
10 | #include <linux/ptrace.h> | 11 | #include <linux/ptrace.h> |
11 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
12 | #include <linux/kernel_stat.h> | 13 | #include <linux/kernel_stat.h> |
@@ -866,7 +867,7 @@ static void kill_prom_timer(void) | |||
866 | : "g1", "g2"); | 867 | : "g1", "g2"); |
867 | } | 868 | } |
868 | 869 | ||
869 | void init_irqwork_curcpu(void) | 870 | void notrace init_irqwork_curcpu(void) |
870 | { | 871 | { |
871 | int cpu = hard_smp_processor_id(); | 872 | int cpu = hard_smp_processor_id(); |
872 | 873 | ||
@@ -897,7 +898,7 @@ static void __cpuinit register_one_mondo(unsigned long paddr, unsigned long type | |||
897 | } | 898 | } |
898 | } | 899 | } |
899 | 900 | ||
900 | void __cpuinit sun4v_register_mondo_queues(int this_cpu) | 901 | void __cpuinit notrace sun4v_register_mondo_queues(int this_cpu) |
901 | { | 902 | { |
902 | struct trap_per_cpu *tb = &trap_block[this_cpu]; | 903 | struct trap_per_cpu *tb = &trap_block[this_cpu]; |
903 | 904 | ||
diff --git a/arch/sparc64/kernel/pci_psycho.c b/arch/sparc64/kernel/pci_psycho.c index e205ade69cfc..f85b6bebb0be 100644 --- a/arch/sparc64/kernel/pci_psycho.c +++ b/arch/sparc64/kernel/pci_psycho.c | |||
@@ -575,7 +575,7 @@ static irqreturn_t psycho_pcierr_intr_other(struct pci_pbm_info *pbm, int is_pbm | |||
575 | { | 575 | { |
576 | unsigned long csr_reg, csr, csr_error_bits; | 576 | unsigned long csr_reg, csr, csr_error_bits; |
577 | irqreturn_t ret = IRQ_NONE; | 577 | irqreturn_t ret = IRQ_NONE; |
578 | u16 stat; | 578 | u16 stat, *addr; |
579 | 579 | ||
580 | if (is_pbm_a) { | 580 | if (is_pbm_a) { |
581 | csr_reg = pbm->controller_regs + PSYCHO_PCIA_CTRL; | 581 | csr_reg = pbm->controller_regs + PSYCHO_PCIA_CTRL; |
@@ -597,7 +597,9 @@ static irqreturn_t psycho_pcierr_intr_other(struct pci_pbm_info *pbm, int is_pbm | |||
597 | printk("%s: PCI SERR signal asserted.\n", pbm->name); | 597 | printk("%s: PCI SERR signal asserted.\n", pbm->name); |
598 | ret = IRQ_HANDLED; | 598 | ret = IRQ_HANDLED; |
599 | } | 599 | } |
600 | pci_read_config_word(pbm->pci_bus->self, PCI_STATUS, &stat); | 600 | addr = psycho_pci_config_mkaddr(pbm, pbm->pci_first_busno, |
601 | 0, PCI_STATUS); | ||
602 | pci_config_read16(addr, &stat); | ||
601 | if (stat & (PCI_STATUS_PARITY | | 603 | if (stat & (PCI_STATUS_PARITY | |
602 | PCI_STATUS_SIG_TARGET_ABORT | | 604 | PCI_STATUS_SIG_TARGET_ABORT | |
603 | PCI_STATUS_REC_TARGET_ABORT | | 605 | PCI_STATUS_REC_TARGET_ABORT | |
@@ -605,7 +607,7 @@ static irqreturn_t psycho_pcierr_intr_other(struct pci_pbm_info *pbm, int is_pbm | |||
605 | PCI_STATUS_SIG_SYSTEM_ERROR)) { | 607 | PCI_STATUS_SIG_SYSTEM_ERROR)) { |
606 | printk("%s: PCI bus error, PCI_STATUS[%04x]\n", | 608 | printk("%s: PCI bus error, PCI_STATUS[%04x]\n", |
607 | pbm->name, stat); | 609 | pbm->name, stat); |
608 | pci_write_config_word(pbm->pci_bus->self, PCI_STATUS, 0xffff); | 610 | pci_config_write16(addr, 0xffff); |
609 | ret = IRQ_HANDLED; | 611 | ret = IRQ_HANDLED; |
610 | } | 612 | } |
611 | return ret; | 613 | return ret; |
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c index 3d924121c796..c824df13f589 100644 --- a/arch/sparc64/kernel/traps.c +++ b/arch/sparc64/kernel/traps.c | |||
@@ -10,6 +10,7 @@ | |||
10 | 10 | ||
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/linkage.h> | ||
13 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
14 | #include <linux/signal.h> | 15 | #include <linux/signal.h> |
15 | #include <linux/smp.h> | 16 | #include <linux/smp.h> |
@@ -2453,7 +2454,7 @@ struct trap_per_cpu trap_block[NR_CPUS]; | |||
2453 | /* This can get invoked before sched_init() so play it super safe | 2454 | /* This can get invoked before sched_init() so play it super safe |
2454 | * and use hard_smp_processor_id(). | 2455 | * and use hard_smp_processor_id(). |
2455 | */ | 2456 | */ |
2456 | void init_cur_cpu_trap(struct thread_info *t) | 2457 | void notrace init_cur_cpu_trap(struct thread_info *t) |
2457 | { | 2458 | { |
2458 | int cpu = hard_smp_processor_id(); | 2459 | int cpu = hard_smp_processor_id(); |
2459 | struct trap_per_cpu *p = &trap_block[cpu]; | 2460 | struct trap_per_cpu *p = &trap_block[cpu]; |
diff --git a/drivers/md/md.c b/drivers/md/md.c index 4790c83d78d0..deeac4b44173 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -5761,7 +5761,11 @@ void md_do_sync(mddev_t *mddev) | |||
5761 | * time 'round when curr_resync == 2 | 5761 | * time 'round when curr_resync == 2 |
5762 | */ | 5762 | */ |
5763 | continue; | 5763 | continue; |
5764 | prepare_to_wait(&resync_wait, &wq, TASK_UNINTERRUPTIBLE); | 5764 | /* We need to wait 'interruptible' so as not to |
5765 | * contribute to the load average, and not to | ||
5766 | * be caught by 'softlockup' | ||
5767 | */ | ||
5768 | prepare_to_wait(&resync_wait, &wq, TASK_INTERRUPTIBLE); | ||
5765 | if (!kthread_should_stop() && | 5769 | if (!kthread_should_stop() && |
5766 | mddev2->curr_resync >= mddev->curr_resync) { | 5770 | mddev2->curr_resync >= mddev->curr_resync) { |
5767 | printk(KERN_INFO "md: delaying %s of %s" | 5771 | printk(KERN_INFO "md: delaying %s of %s" |
@@ -5769,6 +5773,8 @@ void md_do_sync(mddev_t *mddev) | |||
5769 | " share one or more physical units)\n", | 5773 | " share one or more physical units)\n", |
5770 | desc, mdname(mddev), mdname(mddev2)); | 5774 | desc, mdname(mddev), mdname(mddev2)); |
5771 | mddev_put(mddev2); | 5775 | mddev_put(mddev2); |
5776 | if (signal_pending(current)) | ||
5777 | flush_signals(current); | ||
5772 | schedule(); | 5778 | schedule(); |
5773 | finish_wait(&resync_wait, &wq); | 5779 | finish_wait(&resync_wait, &wq); |
5774 | goto try_again; | 5780 | goto try_again; |
diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h index c3c579f98ed0..dfacd31f7ed0 100644 --- a/drivers/net/bnx2.h +++ b/drivers/net/bnx2.h | |||
@@ -6597,7 +6597,7 @@ struct flash_spec { | |||
6597 | 6597 | ||
6598 | struct bnx2_irq { | 6598 | struct bnx2_irq { |
6599 | irq_handler_t handler; | 6599 | irq_handler_t handler; |
6600 | u16 vector; | 6600 | unsigned int vector; |
6601 | u8 requested; | 6601 | u8 requested; |
6602 | char name[16]; | 6602 | char name[16]; |
6603 | }; | 6603 | }; |
diff --git a/drivers/net/e100.c b/drivers/net/e100.c index 453115acaad2..5cf78d612c45 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c | |||
@@ -2738,9 +2738,7 @@ static int __devinit e100_probe(struct pci_dev *pdev, | |||
2738 | nic->flags |= wol_magic; | 2738 | nic->flags |= wol_magic; |
2739 | 2739 | ||
2740 | /* ack any pending wake events, disable PME */ | 2740 | /* ack any pending wake events, disable PME */ |
2741 | err = pci_enable_wake(pdev, 0, 0); | 2741 | pci_pme_active(pdev, false); |
2742 | if (err) | ||
2743 | DPRINTK(PROBE, ERR, "Error clearing wake event\n"); | ||
2744 | 2742 | ||
2745 | strcpy(netdev->name, "eth%d"); | 2743 | strcpy(netdev->name, "eth%d"); |
2746 | if((err = register_netdev(netdev))) { | 2744 | if((err = register_netdev(netdev))) { |
diff --git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c index 9d6edf3e73f9..d04eef53571e 100644 --- a/drivers/net/e1000/e1000_hw.c +++ b/drivers/net/e1000/e1000_hw.c | |||
@@ -144,6 +144,8 @@ static s32 e1000_host_if_read_cookie(struct e1000_hw *hw, u8 *buffer); | |||
144 | static u8 e1000_calculate_mng_checksum(char *buffer, u32 length); | 144 | static u8 e1000_calculate_mng_checksum(char *buffer, u32 length); |
145 | static s32 e1000_configure_kmrn_for_10_100(struct e1000_hw *hw, u16 duplex); | 145 | static s32 e1000_configure_kmrn_for_10_100(struct e1000_hw *hw, u16 duplex); |
146 | static s32 e1000_configure_kmrn_for_1000(struct e1000_hw *hw); | 146 | static s32 e1000_configure_kmrn_for_1000(struct e1000_hw *hw); |
147 | static s32 e1000_do_read_eeprom(struct e1000_hw *hw, u16 offset, u16 words, u16 *data); | ||
148 | static s32 e1000_do_write_eeprom(struct e1000_hw *hw, u16 offset, u16 words, u16 *data); | ||
147 | 149 | ||
148 | /* IGP cable length table */ | 150 | /* IGP cable length table */ |
149 | static const | 151 | static const |
@@ -168,6 +170,8 @@ u16 e1000_igp_2_cable_length_table[IGP02E1000_AGC_LENGTH_TABLE_SIZE] = | |||
168 | 83, 89, 95, 100, 105, 109, 113, 116, 119, 122, 124, | 170 | 83, 89, 95, 100, 105, 109, 113, 116, 119, 122, 124, |
169 | 104, 109, 114, 118, 121, 124}; | 171 | 104, 109, 114, 118, 121, 124}; |
170 | 172 | ||
173 | static DEFINE_SPINLOCK(e1000_eeprom_lock); | ||
174 | |||
171 | /****************************************************************************** | 175 | /****************************************************************************** |
172 | * Set the phy type member in the hw struct. | 176 | * Set the phy type member in the hw struct. |
173 | * | 177 | * |
@@ -4904,6 +4908,15 @@ static s32 e1000_spi_eeprom_ready(struct e1000_hw *hw) | |||
4904 | *****************************************************************************/ | 4908 | *****************************************************************************/ |
4905 | s32 e1000_read_eeprom(struct e1000_hw *hw, u16 offset, u16 words, u16 *data) | 4909 | s32 e1000_read_eeprom(struct e1000_hw *hw, u16 offset, u16 words, u16 *data) |
4906 | { | 4910 | { |
4911 | s32 ret; | ||
4912 | spin_lock(&e1000_eeprom_lock); | ||
4913 | ret = e1000_do_read_eeprom(hw, offset, words, data); | ||
4914 | spin_unlock(&e1000_eeprom_lock); | ||
4915 | return ret; | ||
4916 | } | ||
4917 | |||
4918 | static s32 e1000_do_read_eeprom(struct e1000_hw *hw, u16 offset, u16 words, u16 *data) | ||
4919 | { | ||
4907 | struct e1000_eeprom_info *eeprom = &hw->eeprom; | 4920 | struct e1000_eeprom_info *eeprom = &hw->eeprom; |
4908 | u32 i = 0; | 4921 | u32 i = 0; |
4909 | 4922 | ||
@@ -5236,6 +5249,16 @@ s32 e1000_update_eeprom_checksum(struct e1000_hw *hw) | |||
5236 | *****************************************************************************/ | 5249 | *****************************************************************************/ |
5237 | s32 e1000_write_eeprom(struct e1000_hw *hw, u16 offset, u16 words, u16 *data) | 5250 | s32 e1000_write_eeprom(struct e1000_hw *hw, u16 offset, u16 words, u16 *data) |
5238 | { | 5251 | { |
5252 | s32 ret; | ||
5253 | spin_lock(&e1000_eeprom_lock); | ||
5254 | ret = e1000_do_write_eeprom(hw, offset, words, data); | ||
5255 | spin_unlock(&e1000_eeprom_lock); | ||
5256 | return ret; | ||
5257 | } | ||
5258 | |||
5259 | |||
5260 | static s32 e1000_do_write_eeprom(struct e1000_hw *hw, u16 offset, u16 words, u16 *data) | ||
5261 | { | ||
5239 | struct e1000_eeprom_info *eeprom = &hw->eeprom; | 5262 | struct e1000_eeprom_info *eeprom = &hw->eeprom; |
5240 | s32 status = 0; | 5263 | s32 status = 0; |
5241 | 5264 | ||
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 0b6ecef9a849..eeb55ed2152d 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
@@ -5643,6 +5643,7 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i | |||
5643 | dev->dev_addr[4] = (np->orig_mac[0] >> 8) & 0xff; | 5643 | dev->dev_addr[4] = (np->orig_mac[0] >> 8) & 0xff; |
5644 | dev->dev_addr[5] = (np->orig_mac[0] >> 0) & 0xff; | 5644 | dev->dev_addr[5] = (np->orig_mac[0] >> 0) & 0xff; |
5645 | writel(txreg|NVREG_TRANSMITPOLL_MAC_ADDR_REV, base + NvRegTransmitPoll); | 5645 | writel(txreg|NVREG_TRANSMITPOLL_MAC_ADDR_REV, base + NvRegTransmitPoll); |
5646 | printk(KERN_DEBUG "nv_probe: set workaround bit for reversed mac addr\n"); | ||
5646 | } | 5647 | } |
5647 | memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len); | 5648 | memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len); |
5648 | 5649 | ||
@@ -5890,14 +5891,12 @@ static void nv_restore_phy(struct net_device *dev) | |||
5890 | } | 5891 | } |
5891 | } | 5892 | } |
5892 | 5893 | ||
5893 | static void __devexit nv_remove(struct pci_dev *pci_dev) | 5894 | static void nv_restore_mac_addr(struct pci_dev *pci_dev) |
5894 | { | 5895 | { |
5895 | struct net_device *dev = pci_get_drvdata(pci_dev); | 5896 | struct net_device *dev = pci_get_drvdata(pci_dev); |
5896 | struct fe_priv *np = netdev_priv(dev); | 5897 | struct fe_priv *np = netdev_priv(dev); |
5897 | u8 __iomem *base = get_hwbase(dev); | 5898 | u8 __iomem *base = get_hwbase(dev); |
5898 | 5899 | ||
5899 | unregister_netdev(dev); | ||
5900 | |||
5901 | /* special op: write back the misordered MAC address - otherwise | 5900 | /* special op: write back the misordered MAC address - otherwise |
5902 | * the next nv_probe would see a wrong address. | 5901 | * the next nv_probe would see a wrong address. |
5903 | */ | 5902 | */ |
@@ -5905,6 +5904,15 @@ static void __devexit nv_remove(struct pci_dev *pci_dev) | |||
5905 | writel(np->orig_mac[1], base + NvRegMacAddrB); | 5904 | writel(np->orig_mac[1], base + NvRegMacAddrB); |
5906 | writel(readl(base + NvRegTransmitPoll) & ~NVREG_TRANSMITPOLL_MAC_ADDR_REV, | 5905 | writel(readl(base + NvRegTransmitPoll) & ~NVREG_TRANSMITPOLL_MAC_ADDR_REV, |
5907 | base + NvRegTransmitPoll); | 5906 | base + NvRegTransmitPoll); |
5907 | } | ||
5908 | |||
5909 | static void __devexit nv_remove(struct pci_dev *pci_dev) | ||
5910 | { | ||
5911 | struct net_device *dev = pci_get_drvdata(pci_dev); | ||
5912 | |||
5913 | unregister_netdev(dev); | ||
5914 | |||
5915 | nv_restore_mac_addr(pci_dev); | ||
5908 | 5916 | ||
5909 | /* restore any phy related changes */ | 5917 | /* restore any phy related changes */ |
5910 | nv_restore_phy(dev); | 5918 | nv_restore_phy(dev); |
@@ -5975,6 +5983,8 @@ static void nv_shutdown(struct pci_dev *pdev) | |||
5975 | if (netif_running(dev)) | 5983 | if (netif_running(dev)) |
5976 | nv_close(dev); | 5984 | nv_close(dev); |
5977 | 5985 | ||
5986 | nv_restore_mac_addr(pdev); | ||
5987 | |||
5978 | pci_disable_device(pdev); | 5988 | pci_disable_device(pdev); |
5979 | if (system_state == SYSTEM_POWER_OFF) { | 5989 | if (system_state == SYSTEM_POWER_OFF) { |
5980 | if (pci_enable_wake(pdev, PCI_D3cold, np->wolenabled)) | 5990 | if (pci_enable_wake(pdev, PCI_D3cold, np->wolenabled)) |
diff --git a/drivers/net/hp-plus.c b/drivers/net/hp-plus.c index 8239939554bc..fbbd3e660c27 100644 --- a/drivers/net/hp-plus.c +++ b/drivers/net/hp-plus.c | |||
@@ -139,7 +139,7 @@ static int __init do_hpp_probe(struct net_device *dev) | |||
139 | #ifndef MODULE | 139 | #ifndef MODULE |
140 | struct net_device * __init hp_plus_probe(int unit) | 140 | struct net_device * __init hp_plus_probe(int unit) |
141 | { | 141 | { |
142 | struct net_device *dev = alloc_ei_netdev(); | 142 | struct net_device *dev = alloc_eip_netdev(); |
143 | int err; | 143 | int err; |
144 | 144 | ||
145 | if (!dev) | 145 | if (!dev) |
@@ -284,7 +284,7 @@ hpp_open(struct net_device *dev) | |||
284 | int option_reg; | 284 | int option_reg; |
285 | int retval; | 285 | int retval; |
286 | 286 | ||
287 | if ((retval = request_irq(dev->irq, ei_interrupt, 0, dev->name, dev))) { | 287 | if ((retval = request_irq(dev->irq, eip_interrupt, 0, dev->name, dev))) { |
288 | return retval; | 288 | return retval; |
289 | } | 289 | } |
290 | 290 | ||
@@ -302,7 +302,7 @@ hpp_open(struct net_device *dev) | |||
302 | /* Select the operational page. */ | 302 | /* Select the operational page. */ |
303 | outw(Perf_Page, ioaddr + HP_PAGING); | 303 | outw(Perf_Page, ioaddr + HP_PAGING); |
304 | 304 | ||
305 | ei_open(dev); | 305 | eip_open(dev); |
306 | return 0; | 306 | return 0; |
307 | } | 307 | } |
308 | 308 | ||
@@ -313,7 +313,7 @@ hpp_close(struct net_device *dev) | |||
313 | int option_reg = inw(ioaddr + HPP_OPTION); | 313 | int option_reg = inw(ioaddr + HPP_OPTION); |
314 | 314 | ||
315 | free_irq(dev->irq, dev); | 315 | free_irq(dev->irq, dev); |
316 | ei_close(dev); | 316 | eip_close(dev); |
317 | outw((option_reg & ~EnableIRQ) | MemDisable | NICReset | ChipReset, | 317 | outw((option_reg & ~EnableIRQ) | MemDisable | NICReset | ChipReset, |
318 | ioaddr + HPP_OPTION); | 318 | ioaddr + HPP_OPTION); |
319 | 319 | ||
diff --git a/drivers/net/wireless/b43/rfkill.c b/drivers/net/wireless/b43/rfkill.c index fec5645944a4..34ae125d5384 100644 --- a/drivers/net/wireless/b43/rfkill.c +++ b/drivers/net/wireless/b43/rfkill.c | |||
@@ -43,23 +43,6 @@ static bool b43_is_hw_radio_enabled(struct b43_wldev *dev) | |||
43 | return 0; | 43 | return 0; |
44 | } | 44 | } |
45 | 45 | ||
46 | /* Update the rfkill state */ | ||
47 | static void b43_rfkill_update_state(struct b43_wldev *dev) | ||
48 | { | ||
49 | struct b43_rfkill *rfk = &(dev->wl->rfkill); | ||
50 | |||
51 | if (!dev->radio_hw_enable) { | ||
52 | rfk->rfkill->state = RFKILL_STATE_HARD_BLOCKED; | ||
53 | return; | ||
54 | } | ||
55 | |||
56 | if (!dev->phy.radio_on) | ||
57 | rfk->rfkill->state = RFKILL_STATE_SOFT_BLOCKED; | ||
58 | else | ||
59 | rfk->rfkill->state = RFKILL_STATE_UNBLOCKED; | ||
60 | |||
61 | } | ||
62 | |||
63 | /* The poll callback for the hardware button. */ | 46 | /* The poll callback for the hardware button. */ |
64 | static void b43_rfkill_poll(struct input_polled_dev *poll_dev) | 47 | static void b43_rfkill_poll(struct input_polled_dev *poll_dev) |
65 | { | 48 | { |
@@ -77,7 +60,6 @@ static void b43_rfkill_poll(struct input_polled_dev *poll_dev) | |||
77 | if (unlikely(enabled != dev->radio_hw_enable)) { | 60 | if (unlikely(enabled != dev->radio_hw_enable)) { |
78 | dev->radio_hw_enable = enabled; | 61 | dev->radio_hw_enable = enabled; |
79 | report_change = 1; | 62 | report_change = 1; |
80 | b43_rfkill_update_state(dev); | ||
81 | b43info(wl, "Radio hardware status changed to %s\n", | 63 | b43info(wl, "Radio hardware status changed to %s\n", |
82 | enabled ? "ENABLED" : "DISABLED"); | 64 | enabled ? "ENABLED" : "DISABLED"); |
83 | } | 65 | } |
diff --git a/drivers/net/wireless/b43legacy/rfkill.c b/drivers/net/wireless/b43legacy/rfkill.c index 476add97e974..b32bf6a94f19 100644 --- a/drivers/net/wireless/b43legacy/rfkill.c +++ b/drivers/net/wireless/b43legacy/rfkill.c | |||
@@ -44,23 +44,6 @@ static bool b43legacy_is_hw_radio_enabled(struct b43legacy_wldev *dev) | |||
44 | return 0; | 44 | return 0; |
45 | } | 45 | } |
46 | 46 | ||
47 | /* Update the rfkill state */ | ||
48 | static void b43legacy_rfkill_update_state(struct b43legacy_wldev *dev) | ||
49 | { | ||
50 | struct b43legacy_rfkill *rfk = &(dev->wl->rfkill); | ||
51 | |||
52 | if (!dev->radio_hw_enable) { | ||
53 | rfk->rfkill->state = RFKILL_STATE_HARD_BLOCKED; | ||
54 | return; | ||
55 | } | ||
56 | |||
57 | if (!dev->phy.radio_on) | ||
58 | rfk->rfkill->state = RFKILL_STATE_SOFT_BLOCKED; | ||
59 | else | ||
60 | rfk->rfkill->state = RFKILL_STATE_UNBLOCKED; | ||
61 | |||
62 | } | ||
63 | |||
64 | /* The poll callback for the hardware button. */ | 47 | /* The poll callback for the hardware button. */ |
65 | static void b43legacy_rfkill_poll(struct input_polled_dev *poll_dev) | 48 | static void b43legacy_rfkill_poll(struct input_polled_dev *poll_dev) |
66 | { | 49 | { |
@@ -78,7 +61,6 @@ static void b43legacy_rfkill_poll(struct input_polled_dev *poll_dev) | |||
78 | if (unlikely(enabled != dev->radio_hw_enable)) { | 61 | if (unlikely(enabled != dev->radio_hw_enable)) { |
79 | dev->radio_hw_enable = enabled; | 62 | dev->radio_hw_enable = enabled; |
80 | report_change = 1; | 63 | report_change = 1; |
81 | b43legacy_rfkill_update_state(dev); | ||
82 | b43legacyinfo(wl, "Radio hardware status changed to %s\n", | 64 | b43legacyinfo(wl, "Radio hardware status changed to %s\n", |
83 | enabled ? "ENABLED" : "DISABLED"); | 65 | enabled ? "ENABLED" : "DISABLED"); |
84 | } | 66 | } |
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index a3f738cffdb6..edc6ba82e090 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h | |||
@@ -97,6 +97,16 @@ extern void warn_slowpath(const char *file, const int line, | |||
97 | unlikely(__ret_warn_once); \ | 97 | unlikely(__ret_warn_once); \ |
98 | }) | 98 | }) |
99 | 99 | ||
100 | #define WARN_ONCE(condition, format...) ({ \ | ||
101 | static int __warned; \ | ||
102 | int __ret_warn_once = !!(condition); \ | ||
103 | \ | ||
104 | if (unlikely(__ret_warn_once)) \ | ||
105 | if (WARN(!__warned, format)) \ | ||
106 | __warned = 1; \ | ||
107 | unlikely(__ret_warn_once); \ | ||
108 | }) | ||
109 | |||
100 | #define WARN_ON_RATELIMIT(condition, state) \ | 110 | #define WARN_ON_RATELIMIT(condition, state) \ |
101 | WARN_ON((condition) && __ratelimit(state)) | 111 | WARN_ON((condition) && __ratelimit(state)) |
102 | 112 | ||
diff --git a/include/linux/pnp.h b/include/linux/pnp.h index 1ce54b63085d..be764e514e35 100644 --- a/include/linux/pnp.h +++ b/include/linux/pnp.h | |||
@@ -21,7 +21,14 @@ struct pnp_dev; | |||
21 | /* | 21 | /* |
22 | * Resource Management | 22 | * Resource Management |
23 | */ | 23 | */ |
24 | #ifdef CONFIG_PNP | ||
24 | struct resource *pnp_get_resource(struct pnp_dev *, unsigned int, unsigned int); | 25 | struct resource *pnp_get_resource(struct pnp_dev *, unsigned int, unsigned int); |
26 | #else | ||
27 | static inline struct resource *pnp_get_resource(struct pnp_dev *dev, unsigned int type, unsigned int num) | ||
28 | { | ||
29 | return NULL; | ||
30 | } | ||
31 | #endif | ||
25 | 32 | ||
26 | static inline int pnp_resource_valid(struct resource *res) | 33 | static inline int pnp_resource_valid(struct resource *res) |
27 | { | 34 | { |
@@ -1932,6 +1932,7 @@ init_kmem_cache_node(struct kmem_cache_node *n, struct kmem_cache *s) | |||
1932 | INIT_LIST_HEAD(&n->partial); | 1932 | INIT_LIST_HEAD(&n->partial); |
1933 | #ifdef CONFIG_SLUB_DEBUG | 1933 | #ifdef CONFIG_SLUB_DEBUG |
1934 | atomic_long_set(&n->nr_slabs, 0); | 1934 | atomic_long_set(&n->nr_slabs, 0); |
1935 | atomic_long_set(&n->total_objects, 0); | ||
1935 | INIT_LIST_HEAD(&n->full); | 1936 | INIT_LIST_HEAD(&n->full); |
1936 | #endif | 1937 | #endif |
1937 | } | 1938 | } |
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 8e42fbbd5761..57e26fa66185 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -951,6 +951,27 @@ int udp_disconnect(struct sock *sk, int flags) | |||
951 | return 0; | 951 | return 0; |
952 | } | 952 | } |
953 | 953 | ||
954 | static int __udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) | ||
955 | { | ||
956 | int is_udplite = IS_UDPLITE(sk); | ||
957 | int rc; | ||
958 | |||
959 | if ((rc = sock_queue_rcv_skb(sk, skb)) < 0) { | ||
960 | /* Note that an ENOMEM error is charged twice */ | ||
961 | if (rc == -ENOMEM) | ||
962 | UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_RCVBUFERRORS, | ||
963 | is_udplite); | ||
964 | goto drop; | ||
965 | } | ||
966 | |||
967 | return 0; | ||
968 | |||
969 | drop: | ||
970 | UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS, is_udplite); | ||
971 | kfree_skb(skb); | ||
972 | return -1; | ||
973 | } | ||
974 | |||
954 | /* returns: | 975 | /* returns: |
955 | * -1: error | 976 | * -1: error |
956 | * 0: success | 977 | * 0: success |
@@ -989,9 +1010,7 @@ int udp_queue_rcv_skb(struct sock * sk, struct sk_buff *skb) | |||
989 | up->encap_rcv != NULL) { | 1010 | up->encap_rcv != NULL) { |
990 | int ret; | 1011 | int ret; |
991 | 1012 | ||
992 | bh_unlock_sock(sk); | ||
993 | ret = (*up->encap_rcv)(sk, skb); | 1013 | ret = (*up->encap_rcv)(sk, skb); |
994 | bh_lock_sock(sk); | ||
995 | if (ret <= 0) { | 1014 | if (ret <= 0) { |
996 | UDP_INC_STATS_BH(sock_net(sk), | 1015 | UDP_INC_STATS_BH(sock_net(sk), |
997 | UDP_MIB_INDATAGRAMS, | 1016 | UDP_MIB_INDATAGRAMS, |
@@ -1044,17 +1063,16 @@ int udp_queue_rcv_skb(struct sock * sk, struct sk_buff *skb) | |||
1044 | goto drop; | 1063 | goto drop; |
1045 | } | 1064 | } |
1046 | 1065 | ||
1047 | if ((rc = sock_queue_rcv_skb(sk,skb)) < 0) { | 1066 | rc = 0; |
1048 | /* Note that an ENOMEM error is charged twice */ | ||
1049 | if (rc == -ENOMEM) { | ||
1050 | UDP_INC_STATS_BH(sock_net(sk), | ||
1051 | UDP_MIB_RCVBUFERRORS, is_udplite); | ||
1052 | atomic_inc(&sk->sk_drops); | ||
1053 | } | ||
1054 | goto drop; | ||
1055 | } | ||
1056 | 1067 | ||
1057 | return 0; | 1068 | bh_lock_sock(sk); |
1069 | if (!sock_owned_by_user(sk)) | ||
1070 | rc = __udp_queue_rcv_skb(sk, skb); | ||
1071 | else | ||
1072 | sk_add_backlog(sk, skb); | ||
1073 | bh_unlock_sock(sk); | ||
1074 | |||
1075 | return rc; | ||
1058 | 1076 | ||
1059 | drop: | 1077 | drop: |
1060 | UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS, is_udplite); | 1078 | UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS, is_udplite); |
@@ -1092,15 +1110,7 @@ static int __udp4_lib_mcast_deliver(struct net *net, struct sk_buff *skb, | |||
1092 | skb1 = skb_clone(skb, GFP_ATOMIC); | 1110 | skb1 = skb_clone(skb, GFP_ATOMIC); |
1093 | 1111 | ||
1094 | if (skb1) { | 1112 | if (skb1) { |
1095 | int ret = 0; | 1113 | int ret = udp_queue_rcv_skb(sk, skb1); |
1096 | |||
1097 | bh_lock_sock(sk); | ||
1098 | if (!sock_owned_by_user(sk)) | ||
1099 | ret = udp_queue_rcv_skb(sk, skb1); | ||
1100 | else | ||
1101 | sk_add_backlog(sk, skb1); | ||
1102 | bh_unlock_sock(sk); | ||
1103 | |||
1104 | if (ret > 0) | 1114 | if (ret > 0) |
1105 | /* we should probably re-process instead | 1115 | /* we should probably re-process instead |
1106 | * of dropping packets here. */ | 1116 | * of dropping packets here. */ |
@@ -1195,13 +1205,7 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct hlist_head udptable[], | |||
1195 | uh->dest, inet_iif(skb), udptable); | 1205 | uh->dest, inet_iif(skb), udptable); |
1196 | 1206 | ||
1197 | if (sk != NULL) { | 1207 | if (sk != NULL) { |
1198 | int ret = 0; | 1208 | int ret = udp_queue_rcv_skb(sk, skb); |
1199 | bh_lock_sock(sk); | ||
1200 | if (!sock_owned_by_user(sk)) | ||
1201 | ret = udp_queue_rcv_skb(sk, skb); | ||
1202 | else | ||
1203 | sk_add_backlog(sk, skb); | ||
1204 | bh_unlock_sock(sk); | ||
1205 | sock_put(sk); | 1209 | sock_put(sk); |
1206 | 1210 | ||
1207 | /* a return value > 0 means to resubmit the input, but | 1211 | /* a return value > 0 means to resubmit the input, but |
@@ -1494,7 +1498,7 @@ struct proto udp_prot = { | |||
1494 | .sendmsg = udp_sendmsg, | 1498 | .sendmsg = udp_sendmsg, |
1495 | .recvmsg = udp_recvmsg, | 1499 | .recvmsg = udp_recvmsg, |
1496 | .sendpage = udp_sendpage, | 1500 | .sendpage = udp_sendpage, |
1497 | .backlog_rcv = udp_queue_rcv_skb, | 1501 | .backlog_rcv = __udp_queue_rcv_skb, |
1498 | .hash = udp_lib_hash, | 1502 | .hash = udp_lib_hash, |
1499 | .unhash = udp_lib_unhash, | 1503 | .unhash = udp_lib_unhash, |
1500 | .get_port = udp_v4_get_port, | 1504 | .get_port = udp_v4_get_port, |
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index 9634091ee2f0..ec0a0839ce51 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c | |||
@@ -215,10 +215,9 @@ static void dev_watchdog(unsigned long arg) | |||
215 | time_after(jiffies, (dev->trans_start + | 215 | time_after(jiffies, (dev->trans_start + |
216 | dev->watchdog_timeo))) { | 216 | dev->watchdog_timeo))) { |
217 | char drivername[64]; | 217 | char drivername[64]; |
218 | printk(KERN_INFO "NETDEV WATCHDOG: %s (%s): transmit timed out\n", | 218 | WARN_ONCE(1, KERN_INFO "NETDEV WATCHDOG: %s (%s): transmit timed out\n", |
219 | dev->name, netdev_drivername(dev, drivername, 64)); | 219 | dev->name, netdev_drivername(dev, drivername, 64)); |
220 | dev->tx_timeout(dev); | 220 | dev->tx_timeout(dev); |
221 | WARN_ON_ONCE(1); | ||
222 | } | 221 | } |
223 | if (!mod_timer(&dev->watchdog_timer, | 222 | if (!mod_timer(&dev->watchdog_timer, |
224 | round_jiffies(jiffies + | 223 | round_jiffies(jiffies + |
diff --git a/net/sctp/associola.c b/net/sctp/associola.c index 8472b8b349c4..abd51cef2413 100644 --- a/net/sctp/associola.c +++ b/net/sctp/associola.c | |||
@@ -599,11 +599,12 @@ struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *asoc, | |||
599 | /* Check to see if this is a duplicate. */ | 599 | /* Check to see if this is a duplicate. */ |
600 | peer = sctp_assoc_lookup_paddr(asoc, addr); | 600 | peer = sctp_assoc_lookup_paddr(asoc, addr); |
601 | if (peer) { | 601 | if (peer) { |
602 | /* An UNKNOWN state is only set on transports added by | ||
603 | * user in sctp_connectx() call. Such transports should be | ||
604 | * considered CONFIRMED per RFC 4960, Section 5.4. | ||
605 | */ | ||
602 | if (peer->state == SCTP_UNKNOWN) { | 606 | if (peer->state == SCTP_UNKNOWN) { |
603 | if (peer_state == SCTP_ACTIVE) | 607 | peer->state = SCTP_ACTIVE; |
604 | peer->state = SCTP_ACTIVE; | ||
605 | if (peer_state == SCTP_UNCONFIRMED) | ||
606 | peer->state = SCTP_UNCONFIRMED; | ||
607 | } | 608 | } |
608 | return peer; | 609 | return peer; |
609 | } | 610 | } |
diff --git a/net/sctp/output.c b/net/sctp/output.c index 0dc4a7dfb234..225c7123c41f 100644 --- a/net/sctp/output.c +++ b/net/sctp/output.c | |||
@@ -533,7 +533,8 @@ int sctp_packet_transmit(struct sctp_packet *packet) | |||
533 | if (!(dst->dev->features & NETIF_F_NO_CSUM)) { | 533 | if (!(dst->dev->features & NETIF_F_NO_CSUM)) { |
534 | crc32 = sctp_start_cksum((__u8 *)sh, cksum_buf_len); | 534 | crc32 = sctp_start_cksum((__u8 *)sh, cksum_buf_len); |
535 | crc32 = sctp_end_cksum(crc32); | 535 | crc32 = sctp_end_cksum(crc32); |
536 | } | 536 | } else |
537 | nskb->ip_summed = CHECKSUM_UNNECESSARY; | ||
537 | 538 | ||
538 | /* 3) Put the resultant value into the checksum field in the | 539 | /* 3) Put the resultant value into the checksum field in the |
539 | * common header, and leave the rest of the bits unchanged. | 540 | * common header, and leave the rest of the bits unchanged. |
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index e8ca4e54981f..b599cbba4fbe 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c | |||
@@ -1886,11 +1886,13 @@ static void sctp_process_ext_param(struct sctp_association *asoc, | |||
1886 | /* if the peer reports AUTH, assume that he | 1886 | /* if the peer reports AUTH, assume that he |
1887 | * supports AUTH. | 1887 | * supports AUTH. |
1888 | */ | 1888 | */ |
1889 | asoc->peer.auth_capable = 1; | 1889 | if (sctp_auth_enable) |
1890 | asoc->peer.auth_capable = 1; | ||
1890 | break; | 1891 | break; |
1891 | case SCTP_CID_ASCONF: | 1892 | case SCTP_CID_ASCONF: |
1892 | case SCTP_CID_ASCONF_ACK: | 1893 | case SCTP_CID_ASCONF_ACK: |
1893 | asoc->peer.asconf_capable = 1; | 1894 | if (sctp_addip_enable) |
1895 | asoc->peer.asconf_capable = 1; | ||
1894 | break; | 1896 | break; |
1895 | default: | 1897 | default: |
1896 | break; | 1898 | break; |
@@ -2319,12 +2321,10 @@ clean_up: | |||
2319 | /* Release the transport structures. */ | 2321 | /* Release the transport structures. */ |
2320 | list_for_each_safe(pos, temp, &asoc->peer.transport_addr_list) { | 2322 | list_for_each_safe(pos, temp, &asoc->peer.transport_addr_list) { |
2321 | transport = list_entry(pos, struct sctp_transport, transports); | 2323 | transport = list_entry(pos, struct sctp_transport, transports); |
2322 | list_del_init(pos); | 2324 | if (transport->state != SCTP_ACTIVE) |
2323 | sctp_transport_free(transport); | 2325 | sctp_assoc_rm_peer(asoc, transport); |
2324 | } | 2326 | } |
2325 | 2327 | ||
2326 | asoc->peer.transport_count = 0; | ||
2327 | |||
2328 | nomem: | 2328 | nomem: |
2329 | return 0; | 2329 | return 0; |
2330 | } | 2330 | } |
@@ -2460,6 +2460,9 @@ do_addr_param: | |||
2460 | break; | 2460 | break; |
2461 | 2461 | ||
2462 | case SCTP_PARAM_SET_PRIMARY: | 2462 | case SCTP_PARAM_SET_PRIMARY: |
2463 | if (!sctp_addip_enable) | ||
2464 | goto fall_through; | ||
2465 | |||
2463 | addr_param = param.v + sizeof(sctp_addip_param_t); | 2466 | addr_param = param.v + sizeof(sctp_addip_param_t); |
2464 | 2467 | ||
2465 | af = sctp_get_af_specific(param_type2af(param.p->type)); | 2468 | af = sctp_get_af_specific(param_type2af(param.p->type)); |