diff options
73 files changed, 459 insertions, 537 deletions
diff --git a/Documentation/RCU/checklist.txt b/Documentation/RCU/checklist.txt index 6e253407b3dc..accfe2f5247d 100644 --- a/Documentation/RCU/checklist.txt +++ b/Documentation/RCU/checklist.txt | |||
@@ -298,3 +298,15 @@ over a rather long period of time, but improvements are always welcome! | |||
298 | 298 | ||
299 | Note that, rcu_assign_pointer() and rcu_dereference() relate to | 299 | Note that, rcu_assign_pointer() and rcu_dereference() relate to |
300 | SRCU just as they do to other forms of RCU. | 300 | SRCU just as they do to other forms of RCU. |
301 | |||
302 | 15. The whole point of call_rcu(), synchronize_rcu(), and friends | ||
303 | is to wait until all pre-existing readers have finished before | ||
304 | carrying out some otherwise-destructive operation. It is | ||
305 | therefore critically important to -first- remove any path | ||
306 | that readers can follow that could be affected by the | ||
307 | destructive operation, and -only- -then- invoke call_rcu(), | ||
308 | synchronize_rcu(), or friends. | ||
309 | |||
310 | Because these primitives only wait for pre-existing readers, | ||
311 | it is the caller's responsibility to guarantee safety to | ||
312 | any subsequent readers. | ||
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index 5ddbe350487a..20d3b94703a4 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
@@ -335,3 +335,12 @@ Why: In 2.6.18 the Secmark concept was introduced to replace the "compat_net" | |||
335 | Secmark, it is time to deprecate the older mechanism and start the | 335 | Secmark, it is time to deprecate the older mechanism and start the |
336 | process of removing the old code. | 336 | process of removing the old code. |
337 | Who: Paul Moore <paul.moore@hp.com> | 337 | Who: Paul Moore <paul.moore@hp.com> |
338 | --------------------------- | ||
339 | |||
340 | What: sysfs ui for changing p4-clockmod parameters | ||
341 | When: September 2009 | ||
342 | Why: See commits 129f8ae9b1b5be94517da76009ea956e89104ce8 and | ||
343 | e088e4c9cdb618675874becb91b2fd581ee707e6. | ||
344 | Removal is subject to fixing any remaining bugs in ACPI which may | ||
345 | cause the thermal throttling not to happen at the right time. | ||
346 | Who: Dave Jones <davej@redhat.com>, Matthew Garrett <mjg@redhat.com> | ||
diff --git a/Documentation/networking/ipv6.txt b/Documentation/networking/ipv6.txt new file mode 100644 index 000000000000..268e5c103dd8 --- /dev/null +++ b/Documentation/networking/ipv6.txt | |||
@@ -0,0 +1,35 @@ | |||
1 | |||
2 | Options for the ipv6 module are supplied as parameters at load time. | ||
3 | |||
4 | Module options may be given as command line arguments to the insmod | ||
5 | or modprobe command, but are usually specified in either the | ||
6 | /etc/modules.conf or /etc/modprobe.conf configuration file, or in a | ||
7 | distro-specific configuration file. | ||
8 | |||
9 | The available ipv6 module parameters are listed below. If a parameter | ||
10 | is not specified the default value is used. | ||
11 | |||
12 | The parameters are as follows: | ||
13 | |||
14 | disable | ||
15 | |||
16 | Specifies whether to load the IPv6 module, but disable all | ||
17 | its functionality. This might be used when another module | ||
18 | has a dependency on the IPv6 module being loaded, but no | ||
19 | IPv6 addresses or operations are desired. | ||
20 | |||
21 | The possible values and their effects are: | ||
22 | |||
23 | 0 | ||
24 | IPv6 is enabled. | ||
25 | |||
26 | This is the default value. | ||
27 | |||
28 | 1 | ||
29 | IPv6 is disabled. | ||
30 | |||
31 | No IPv6 addresses will be added to interfaces, and | ||
32 | it will not be possible to open an IPv6 socket. | ||
33 | |||
34 | A reboot is required to enable IPv6. | ||
35 | |||
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c index f6a13451d1fd..6031e179926b 100644 --- a/arch/arm/mach-omap2/board-ldp.c +++ b/arch/arm/mach-omap2/board-ldp.c | |||
@@ -81,7 +81,7 @@ static inline void __init ldp_init_smc911x(void) | |||
81 | } | 81 | } |
82 | 82 | ||
83 | ldp_smc911x_resources[0].start = cs_mem_base + 0x0; | 83 | ldp_smc911x_resources[0].start = cs_mem_base + 0x0; |
84 | ldp_smc911x_resources[0].end = cs_mem_base + 0xf; | 84 | ldp_smc911x_resources[0].end = cs_mem_base + 0xff; |
85 | udelay(100); | 85 | udelay(100); |
86 | 86 | ||
87 | eth_gpio = LDP_SMC911X_GPIO; | 87 | eth_gpio = LDP_SMC911X_GPIO; |
diff --git a/arch/m68knommu/platform/5206e/config.c b/arch/m68knommu/platform/5206e/config.c index d01a5d2b7557..db902540bf2c 100644 --- a/arch/m68knommu/platform/5206e/config.c +++ b/arch/m68knommu/platform/5206e/config.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <asm/coldfire.h> | 17 | #include <asm/coldfire.h> |
18 | #include <asm/mcfsim.h> | 18 | #include <asm/mcfsim.h> |
19 | #include <asm/mcfdma.h> | 19 | #include <asm/mcfdma.h> |
20 | #include <asm/mcfuart.h> | ||
20 | 21 | ||
21 | /***************************************************************************/ | 22 | /***************************************************************************/ |
22 | 23 | ||
diff --git a/arch/m68knommu/platform/528x/config.c b/arch/m68knommu/platform/528x/config.c index dfdb5c2ed8e6..44baeb225dc7 100644 --- a/arch/m68knommu/platform/528x/config.c +++ b/arch/m68knommu/platform/528x/config.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <asm/coldfire.h> | 24 | #include <asm/coldfire.h> |
25 | #include <asm/mcfsim.h> | 25 | #include <asm/mcfsim.h> |
26 | #include <asm/mcfuart.h> | 26 | #include <asm/mcfuart.h> |
27 | #include <asm/mcfqspi.h> | ||
28 | 27 | ||
29 | #ifdef CONFIG_MTD_PARTITIONS | 28 | #ifdef CONFIG_MTD_PARTITIONS |
30 | #include <linux/mtd/partitions.h> | 29 | #include <linux/mtd/partitions.h> |
@@ -33,233 +32,6 @@ | |||
33 | /***************************************************************************/ | 32 | /***************************************************************************/ |
34 | 33 | ||
35 | void coldfire_reset(void); | 34 | void coldfire_reset(void); |
36 | static void coldfire_qspi_cs_control(u8 cs, u8 command); | ||
37 | |||
38 | /***************************************************************************/ | ||
39 | |||
40 | #if defined(CONFIG_SPI) | ||
41 | |||
42 | #if defined(CONFIG_WILDFIRE) | ||
43 | #define SPI_NUM_CHIPSELECTS 0x02 | ||
44 | #define SPI_PAR_VAL 0x07 /* Enable DIN, DOUT, CLK */ | ||
45 | #define SPI_CS_MASK 0x18 | ||
46 | |||
47 | #define FLASH_BLOCKSIZE (1024*64) | ||
48 | #define FLASH_NUMBLOCKS 16 | ||
49 | #define FLASH_TYPE "m25p80" | ||
50 | |||
51 | #define M25P80_CS 0 | ||
52 | #define MMC_CS 1 | ||
53 | |||
54 | #ifdef CONFIG_MTD_PARTITIONS | ||
55 | static struct mtd_partition stm25p_partitions[] = { | ||
56 | /* sflash */ | ||
57 | [0] = { | ||
58 | .name = "stm25p80", | ||
59 | .offset = 0x00000000, | ||
60 | .size = FLASH_BLOCKSIZE * FLASH_NUMBLOCKS, | ||
61 | .mask_flags = 0 | ||
62 | } | ||
63 | }; | ||
64 | |||
65 | #endif | ||
66 | |||
67 | #elif defined(CONFIG_WILDFIREMOD) | ||
68 | |||
69 | #define SPI_NUM_CHIPSELECTS 0x08 | ||
70 | #define SPI_PAR_VAL 0x07 /* Enable DIN, DOUT, CLK */ | ||
71 | #define SPI_CS_MASK 0x78 | ||
72 | |||
73 | #define FLASH_BLOCKSIZE (1024*64) | ||
74 | #define FLASH_NUMBLOCKS 64 | ||
75 | #define FLASH_TYPE "m25p32" | ||
76 | /* Reserve 1M for the kernel parition */ | ||
77 | #define FLASH_KERNEL_SIZE (1024 * 1024) | ||
78 | |||
79 | #define M25P80_CS 5 | ||
80 | #define MMC_CS 6 | ||
81 | |||
82 | #ifdef CONFIG_MTD_PARTITIONS | ||
83 | static struct mtd_partition stm25p_partitions[] = { | ||
84 | /* sflash */ | ||
85 | [0] = { | ||
86 | .name = "kernel", | ||
87 | .offset = FLASH_BLOCKSIZE * FLASH_NUMBLOCKS - FLASH_KERNEL_SIZE, | ||
88 | .size = FLASH_KERNEL_SIZE, | ||
89 | .mask_flags = 0 | ||
90 | }, | ||
91 | [1] = { | ||
92 | .name = "image", | ||
93 | .offset = 0x00000000, | ||
94 | .size = FLASH_BLOCKSIZE * FLASH_NUMBLOCKS - FLASH_KERNEL_SIZE, | ||
95 | .mask_flags = 0 | ||
96 | }, | ||
97 | [2] = { | ||
98 | .name = "all", | ||
99 | .offset = 0x00000000, | ||
100 | .size = FLASH_BLOCKSIZE * FLASH_NUMBLOCKS, | ||
101 | .mask_flags = 0 | ||
102 | } | ||
103 | }; | ||
104 | #endif | ||
105 | |||
106 | #else | ||
107 | #define SPI_NUM_CHIPSELECTS 0x04 | ||
108 | #define SPI_PAR_VAL 0x7F /* Enable DIN, DOUT, CLK, CS0 - CS4 */ | ||
109 | #endif | ||
110 | |||
111 | #ifdef MMC_CS | ||
112 | static struct coldfire_spi_chip flash_chip_info = { | ||
113 | .mode = SPI_MODE_0, | ||
114 | .bits_per_word = 16, | ||
115 | .del_cs_to_clk = 17, | ||
116 | .del_after_trans = 1, | ||
117 | .void_write_data = 0 | ||
118 | }; | ||
119 | |||
120 | static struct coldfire_spi_chip mmc_chip_info = { | ||
121 | .mode = SPI_MODE_0, | ||
122 | .bits_per_word = 16, | ||
123 | .del_cs_to_clk = 17, | ||
124 | .del_after_trans = 1, | ||
125 | .void_write_data = 0xFFFF | ||
126 | }; | ||
127 | #endif | ||
128 | |||
129 | #ifdef M25P80_CS | ||
130 | static struct flash_platform_data stm25p80_platform_data = { | ||
131 | .name = "ST M25P80 SPI Flash chip", | ||
132 | #ifdef CONFIG_MTD_PARTITIONS | ||
133 | .parts = stm25p_partitions, | ||
134 | .nr_parts = sizeof(stm25p_partitions) / sizeof(*stm25p_partitions), | ||
135 | #endif | ||
136 | .type = FLASH_TYPE | ||
137 | }; | ||
138 | #endif | ||
139 | |||
140 | static struct spi_board_info spi_board_info[] __initdata = { | ||
141 | #ifdef M25P80_CS | ||
142 | { | ||
143 | .modalias = "m25p80", | ||
144 | .max_speed_hz = 16000000, | ||
145 | .bus_num = 1, | ||
146 | .chip_select = M25P80_CS, | ||
147 | .platform_data = &stm25p80_platform_data, | ||
148 | .controller_data = &flash_chip_info | ||
149 | }, | ||
150 | #endif | ||
151 | #ifdef MMC_CS | ||
152 | { | ||
153 | .modalias = "mmc_spi", | ||
154 | .max_speed_hz = 16000000, | ||
155 | .bus_num = 1, | ||
156 | .chip_select = MMC_CS, | ||
157 | .controller_data = &mmc_chip_info | ||
158 | } | ||
159 | #endif | ||
160 | }; | ||
161 | |||
162 | static struct coldfire_spi_master coldfire_master_info = { | ||
163 | .bus_num = 1, | ||
164 | .num_chipselect = SPI_NUM_CHIPSELECTS, | ||
165 | .irq_source = MCF5282_QSPI_IRQ_SOURCE, | ||
166 | .irq_vector = MCF5282_QSPI_IRQ_VECTOR, | ||
167 | .irq_mask = ((0x01 << MCF5282_QSPI_IRQ_SOURCE) | 0x01), | ||
168 | .irq_lp = 0x2B, /* Level 5 and Priority 3 */ | ||
169 | .par_val = SPI_PAR_VAL, | ||
170 | .cs_control = coldfire_qspi_cs_control, | ||
171 | }; | ||
172 | |||
173 | static struct resource coldfire_spi_resources[] = { | ||
174 | [0] = { | ||
175 | .name = "qspi-par", | ||
176 | .start = MCF5282_QSPI_PAR, | ||
177 | .end = MCF5282_QSPI_PAR, | ||
178 | .flags = IORESOURCE_MEM | ||
179 | }, | ||
180 | |||
181 | [1] = { | ||
182 | .name = "qspi-module", | ||
183 | .start = MCF5282_QSPI_QMR, | ||
184 | .end = MCF5282_QSPI_QMR + 0x18, | ||
185 | .flags = IORESOURCE_MEM | ||
186 | }, | ||
187 | |||
188 | [2] = { | ||
189 | .name = "qspi-int-level", | ||
190 | .start = MCF5282_INTC0 + MCFINTC_ICR0 + MCF5282_QSPI_IRQ_SOURCE, | ||
191 | .end = MCF5282_INTC0 + MCFINTC_ICR0 + MCF5282_QSPI_IRQ_SOURCE, | ||
192 | .flags = IORESOURCE_MEM | ||
193 | }, | ||
194 | |||
195 | [3] = { | ||
196 | .name = "qspi-int-mask", | ||
197 | .start = MCF5282_INTC0 + MCFINTC_IMRL, | ||
198 | .end = MCF5282_INTC0 + MCFINTC_IMRL, | ||
199 | .flags = IORESOURCE_MEM | ||
200 | } | ||
201 | }; | ||
202 | |||
203 | static struct platform_device coldfire_spi = { | ||
204 | .name = "spi_coldfire", | ||
205 | .id = -1, | ||
206 | .resource = coldfire_spi_resources, | ||
207 | .num_resources = ARRAY_SIZE(coldfire_spi_resources), | ||
208 | .dev = { | ||
209 | .platform_data = &coldfire_master_info, | ||
210 | } | ||
211 | }; | ||
212 | |||
213 | static void coldfire_qspi_cs_control(u8 cs, u8 command) | ||
214 | { | ||
215 | u8 cs_bit = ((0x01 << cs) << 3) & SPI_CS_MASK; | ||
216 | |||
217 | #if defined(CONFIG_WILDFIRE) | ||
218 | u8 cs_mask = ~(((0x01 << cs) << 3) & SPI_CS_MASK); | ||
219 | #endif | ||
220 | #if defined(CONFIG_WILDFIREMOD) | ||
221 | u8 cs_mask = (cs << 3) & SPI_CS_MASK; | ||
222 | #endif | ||
223 | |||
224 | /* | ||
225 | * Don't do anything if the chip select is not | ||
226 | * one of the port qs pins. | ||
227 | */ | ||
228 | if (command & QSPI_CS_INIT) { | ||
229 | #if defined(CONFIG_WILDFIRE) | ||
230 | MCF5282_GPIO_DDRQS |= cs_bit; | ||
231 | MCF5282_GPIO_PQSPAR &= ~cs_bit; | ||
232 | #endif | ||
233 | |||
234 | #if defined(CONFIG_WILDFIREMOD) | ||
235 | MCF5282_GPIO_DDRQS |= SPI_CS_MASK; | ||
236 | MCF5282_GPIO_PQSPAR &= ~SPI_CS_MASK; | ||
237 | #endif | ||
238 | } | ||
239 | |||
240 | if (command & QSPI_CS_ASSERT) { | ||
241 | MCF5282_GPIO_PORTQS &= ~SPI_CS_MASK; | ||
242 | MCF5282_GPIO_PORTQS |= cs_mask; | ||
243 | } else if (command & QSPI_CS_DROP) { | ||
244 | MCF5282_GPIO_PORTQS |= SPI_CS_MASK; | ||
245 | } | ||
246 | } | ||
247 | |||
248 | static int __init spi_dev_init(void) | ||
249 | { | ||
250 | int retval; | ||
251 | |||
252 | retval = platform_device_register(&coldfire_spi); | ||
253 | if (retval < 0) | ||
254 | return retval; | ||
255 | |||
256 | if (ARRAY_SIZE(spi_board_info)) | ||
257 | retval = spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); | ||
258 | |||
259 | return retval; | ||
260 | } | ||
261 | |||
262 | #endif /* CONFIG_SPI */ | ||
263 | 35 | ||
264 | /***************************************************************************/ | 36 | /***************************************************************************/ |
265 | 37 | ||
diff --git a/arch/sh/boards/board-ap325rxa.c b/arch/sh/boards/board-ap325rxa.c index 72da416f6162..15b6d450fbf0 100644 --- a/arch/sh/boards/board-ap325rxa.c +++ b/arch/sh/boards/board-ap325rxa.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/gpio.h> | 22 | #include <linux/gpio.h> |
23 | #include <linux/spi/spi.h> | 23 | #include <linux/spi/spi.h> |
24 | #include <linux/spi/spi_gpio.h> | 24 | #include <linux/spi/spi_gpio.h> |
25 | #include <media/soc_camera.h> | ||
25 | #include <media/soc_camera_platform.h> | 26 | #include <media/soc_camera_platform.h> |
26 | #include <media/sh_mobile_ceu.h> | 27 | #include <media/sh_mobile_ceu.h> |
27 | #include <video/sh_mobile_lcdc.h> | 28 | #include <video/sh_mobile_lcdc.h> |
diff --git a/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c b/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c index b585e04cbc9e..3178c3acd97e 100644 --- a/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c +++ b/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c | |||
@@ -277,7 +277,6 @@ static struct cpufreq_driver p4clockmod_driver = { | |||
277 | .name = "p4-clockmod", | 277 | .name = "p4-clockmod", |
278 | .owner = THIS_MODULE, | 278 | .owner = THIS_MODULE, |
279 | .attr = p4clockmod_attr, | 279 | .attr = p4clockmod_attr, |
280 | .hide_interface = 1, | ||
281 | }; | 280 | }; |
282 | 281 | ||
283 | 282 | ||
diff --git a/arch/x86/kernel/cpu/mcheck/mce_64.c b/arch/x86/kernel/cpu/mcheck/mce_64.c index bfbd5323a635..ca14604611ec 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_64.c +++ b/arch/x86/kernel/cpu/mcheck/mce_64.c | |||
@@ -639,7 +639,7 @@ static void mce_init_timer(void) | |||
639 | if (!next_interval) | 639 | if (!next_interval) |
640 | return; | 640 | return; |
641 | setup_timer(t, mcheck_timer, smp_processor_id()); | 641 | setup_timer(t, mcheck_timer, smp_processor_id()); |
642 | t->expires = round_jiffies_relative(jiffies + next_interval); | 642 | t->expires = round_jiffies(jiffies + next_interval); |
643 | add_timer(t); | 643 | add_timer(t); |
644 | } | 644 | } |
645 | 645 | ||
@@ -1110,7 +1110,7 @@ static int __cpuinit mce_cpu_callback(struct notifier_block *nfb, | |||
1110 | break; | 1110 | break; |
1111 | case CPU_DOWN_FAILED: | 1111 | case CPU_DOWN_FAILED: |
1112 | case CPU_DOWN_FAILED_FROZEN: | 1112 | case CPU_DOWN_FAILED_FROZEN: |
1113 | t->expires = round_jiffies_relative(jiffies + next_interval); | 1113 | t->expires = round_jiffies(jiffies + next_interval); |
1114 | add_timer_on(t, cpu); | 1114 | add_timer_on(t, cpu); |
1115 | smp_call_function_single(cpu, mce_reenable_cpu, &action, 1); | 1115 | smp_call_function_single(cpu, mce_reenable_cpu, &action, 1); |
1116 | break; | 1116 | break; |
diff --git a/arch/x86/kernel/visws_quirks.c b/arch/x86/kernel/visws_quirks.c index 191a876e9e87..31ffc24eec4d 100644 --- a/arch/x86/kernel/visws_quirks.c +++ b/arch/x86/kernel/visws_quirks.c | |||
@@ -578,7 +578,7 @@ static struct irq_chip piix4_virtual_irq_type = { | |||
578 | static irqreturn_t piix4_master_intr(int irq, void *dev_id) | 578 | static irqreturn_t piix4_master_intr(int irq, void *dev_id) |
579 | { | 579 | { |
580 | int realirq; | 580 | int realirq; |
581 | irq_desc_t *desc; | 581 | struct irq_desc *desc; |
582 | unsigned long flags; | 582 | unsigned long flags; |
583 | 583 | ||
584 | spin_lock_irqsave(&i8259A_lock, flags); | 584 | spin_lock_irqsave(&i8259A_lock, flags); |
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c index f3a5305b8adf..9fe4ddaa8f6f 100644 --- a/arch/x86/lguest/boot.c +++ b/arch/x86/lguest/boot.c | |||
@@ -348,6 +348,11 @@ static void lguest_cpuid(unsigned int *ax, unsigned int *bx, | |||
348 | * flush_tlb_user() for both user and kernel mappings unless | 348 | * flush_tlb_user() for both user and kernel mappings unless |
349 | * the Page Global Enable (PGE) feature bit is set. */ | 349 | * the Page Global Enable (PGE) feature bit is set. */ |
350 | *dx |= 0x00002000; | 350 | *dx |= 0x00002000; |
351 | /* We also lie, and say we're family id 5. 6 or greater | ||
352 | * leads to a rdmsr in early_init_intel which we can't handle. | ||
353 | * Family ID is returned as bits 8-12 in ax. */ | ||
354 | *ax &= 0xFFFFF0FF; | ||
355 | *ax |= 0x00000500; | ||
351 | break; | 356 | break; |
352 | case 0x80000000: | 357 | case 0x80000000: |
353 | /* Futureproof this a little: if they ask how much extended | 358 | /* Futureproof this a little: if they ask how much extended |
@@ -594,19 +599,21 @@ static void __init lguest_init_IRQ(void) | |||
594 | /* Some systems map "vectors" to interrupts weirdly. Lguest has | 599 | /* Some systems map "vectors" to interrupts weirdly. Lguest has |
595 | * a straightforward 1 to 1 mapping, so force that here. */ | 600 | * a straightforward 1 to 1 mapping, so force that here. */ |
596 | __get_cpu_var(vector_irq)[vector] = i; | 601 | __get_cpu_var(vector_irq)[vector] = i; |
597 | if (vector != SYSCALL_VECTOR) { | 602 | if (vector != SYSCALL_VECTOR) |
598 | set_intr_gate(vector, | 603 | set_intr_gate(vector, interrupt[i]); |
599 | interrupt[vector-FIRST_EXTERNAL_VECTOR]); | ||
600 | set_irq_chip_and_handler_name(i, &lguest_irq_controller, | ||
601 | handle_level_irq, | ||
602 | "level"); | ||
603 | } | ||
604 | } | 604 | } |
605 | /* This call is required to set up for 4k stacks, where we have | 605 | /* This call is required to set up for 4k stacks, where we have |
606 | * separate stacks for hard and soft interrupts. */ | 606 | * separate stacks for hard and soft interrupts. */ |
607 | irq_ctx_init(smp_processor_id()); | 607 | irq_ctx_init(smp_processor_id()); |
608 | } | 608 | } |
609 | 609 | ||
610 | void lguest_setup_irq(unsigned int irq) | ||
611 | { | ||
612 | irq_to_desc_alloc_cpu(irq, 0); | ||
613 | set_irq_chip_and_handler_name(irq, &lguest_irq_controller, | ||
614 | handle_level_irq, "level"); | ||
615 | } | ||
616 | |||
610 | /* | 617 | /* |
611 | * Time. | 618 | * Time. |
612 | * | 619 | * |
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig index 6c873dceb177..981200830432 100644 --- a/arch/xtensa/Kconfig +++ b/arch/xtensa/Kconfig | |||
@@ -103,9 +103,6 @@ config MATH_EMULATION | |||
103 | help | 103 | help |
104 | Can we use information of configuration file? | 104 | Can we use information of configuration file? |
105 | 105 | ||
106 | config HIGHMEM | ||
107 | bool "High memory support" | ||
108 | |||
109 | endmenu | 106 | endmenu |
110 | 107 | ||
111 | menu "Platform options" | 108 | menu "Platform options" |
diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c index 9606d2bd1dd9..4ec1633c2941 100644 --- a/arch/xtensa/kernel/setup.c +++ b/arch/xtensa/kernel/setup.c | |||
@@ -44,6 +44,8 @@ | |||
44 | #include <asm/setup.h> | 44 | #include <asm/setup.h> |
45 | #include <asm/param.h> | 45 | #include <asm/param.h> |
46 | 46 | ||
47 | #include <platform/hardware.h> | ||
48 | |||
47 | #if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE) | 49 | #if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE) |
48 | struct screen_info screen_info = { 0, 24, 0, 0, 0, 80, 0, 0, 0, 24, 1, 16}; | 50 | struct screen_info screen_info = { 0, 24, 0, 0, 0, 80, 0, 0, 0, 24, 1, 16}; |
49 | #endif | 51 | #endif |
diff --git a/arch/xtensa/kernel/traps.c b/arch/xtensa/kernel/traps.c index c7a021d9f696..c44f830b6c7a 100644 --- a/arch/xtensa/kernel/traps.c +++ b/arch/xtensa/kernel/traps.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/stringify.h> | 30 | #include <linux/stringify.h> |
31 | #include <linux/kallsyms.h> | 31 | #include <linux/kallsyms.h> |
32 | #include <linux/delay.h> | 32 | #include <linux/delay.h> |
33 | #include <linux/hardirq.h> | ||
33 | 34 | ||
34 | #include <asm/ptrace.h> | 35 | #include <asm/ptrace.h> |
35 | #include <asm/timex.h> | 36 | #include <asm/timex.h> |
diff --git a/arch/xtensa/mm/fault.c b/arch/xtensa/mm/fault.c index 33f366be323f..bdd860d93f72 100644 --- a/arch/xtensa/mm/fault.c +++ b/arch/xtensa/mm/fault.c | |||
@@ -14,6 +14,7 @@ | |||
14 | 14 | ||
15 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/hardirq.h> | ||
17 | #include <asm/mmu_context.h> | 18 | #include <asm/mmu_context.h> |
18 | #include <asm/cacheflush.h> | 19 | #include <asm/cacheflush.h> |
19 | #include <asm/hardirq.h> | 20 | #include <asm/hardirq.h> |
diff --git a/arch/xtensa/platforms/iss/console.c b/arch/xtensa/platforms/iss/console.c index efed8897bef3..25d46c84eb08 100644 --- a/arch/xtensa/platforms/iss/console.c +++ b/arch/xtensa/platforms/iss/console.c | |||
@@ -140,16 +140,14 @@ static void rs_poll(unsigned long priv) | |||
140 | } | 140 | } |
141 | 141 | ||
142 | 142 | ||
143 | static void rs_put_char(struct tty_struct *tty, unsigned char ch) | 143 | static int rs_put_char(struct tty_struct *tty, unsigned char ch) |
144 | { | 144 | { |
145 | char buf[2]; | 145 | char buf[2]; |
146 | 146 | ||
147 | if (!tty) | ||
148 | return; | ||
149 | |||
150 | buf[0] = ch; | 147 | buf[0] = ch; |
151 | buf[1] = '\0'; /* Is this NULL necessary? */ | 148 | buf[1] = '\0'; /* Is this NULL necessary? */ |
152 | __simc (SYS_write, 1, (unsigned long) buf, 1, 0, 0); | 149 | __simc (SYS_write, 1, (unsigned long) buf, 1, 0, 0); |
150 | return 1; | ||
153 | } | 151 | } |
154 | 152 | ||
155 | static void rs_flush_chars(struct tty_struct *tty) | 153 | static void rs_flush_chars(struct tty_struct *tty) |
diff --git a/drivers/base/node.c b/drivers/base/node.c index 43fa90b837ee..f8f578a71b25 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c | |||
@@ -303,7 +303,7 @@ int unregister_mem_sect_under_nodes(struct memory_block *mem_blk) | |||
303 | sect_start_pfn = section_nr_to_pfn(mem_blk->phys_index); | 303 | sect_start_pfn = section_nr_to_pfn(mem_blk->phys_index); |
304 | sect_end_pfn = sect_start_pfn + PAGES_PER_SECTION - 1; | 304 | sect_end_pfn = sect_start_pfn + PAGES_PER_SECTION - 1; |
305 | for (pfn = sect_start_pfn; pfn <= sect_end_pfn; pfn++) { | 305 | for (pfn = sect_start_pfn; pfn <= sect_end_pfn; pfn++) { |
306 | unsigned int nid; | 306 | int nid; |
307 | 307 | ||
308 | nid = get_nid_for_pfn(pfn); | 308 | nid = get_nid_for_pfn(pfn); |
309 | if (nid < 0) | 309 | if (nid < 0) |
diff --git a/drivers/block/aoe/aoedev.c b/drivers/block/aoe/aoedev.c index cc250577d405..eeea477d9601 100644 --- a/drivers/block/aoe/aoedev.c +++ b/drivers/block/aoe/aoedev.c | |||
@@ -173,7 +173,7 @@ skbfree(struct sk_buff *skb) | |||
173 | return; | 173 | return; |
174 | while (atomic_read(&skb_shinfo(skb)->dataref) != 1 && i-- > 0) | 174 | while (atomic_read(&skb_shinfo(skb)->dataref) != 1 && i-- > 0) |
175 | msleep(Sms); | 175 | msleep(Sms); |
176 | if (i <= 0) { | 176 | if (i < 0) { |
177 | printk(KERN_ERR | 177 | printk(KERN_ERR |
178 | "aoe: %s holds ref: %s\n", | 178 | "aoe: %s holds ref: %s\n", |
179 | skb->dev ? skb->dev->name : "netif", | 179 | skb->dev ? skb->dev->name : "netif", |
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c index 52f4361eb6e4..d765afda9c2a 100644 --- a/drivers/char/agp/amd64-agp.c +++ b/drivers/char/agp/amd64-agp.c | |||
@@ -271,15 +271,15 @@ static __devinit int fix_northbridge(struct pci_dev *nb, struct pci_dev *agp, | |||
271 | nb_order = (nb_order >> 1) & 7; | 271 | nb_order = (nb_order >> 1) & 7; |
272 | pci_read_config_dword(nb, AMD64_GARTAPERTUREBASE, &nb_base); | 272 | pci_read_config_dword(nb, AMD64_GARTAPERTUREBASE, &nb_base); |
273 | nb_aper = nb_base << 25; | 273 | nb_aper = nb_base << 25; |
274 | if (agp_aperture_valid(nb_aper, (32*1024*1024)<<nb_order)) { | ||
275 | return 0; | ||
276 | } | ||
277 | 274 | ||
278 | /* Northbridge seems to contain crap. Try the AGP bridge. */ | 275 | /* Northbridge seems to contain crap. Try the AGP bridge. */ |
279 | 276 | ||
280 | pci_read_config_word(agp, cap+0x14, &apsize); | 277 | pci_read_config_word(agp, cap+0x14, &apsize); |
281 | if (apsize == 0xffff) | 278 | if (apsize == 0xffff) { |
279 | if (agp_aperture_valid(nb_aper, (32*1024*1024)<<nb_order)) | ||
280 | return 0; | ||
282 | return -1; | 281 | return -1; |
282 | } | ||
283 | 283 | ||
284 | apsize &= 0xfff; | 284 | apsize &= 0xfff; |
285 | /* Some BIOS use weird encodings not in the AGPv3 table. */ | 285 | /* Some BIOS use weird encodings not in the AGPv3 table. */ |
@@ -301,6 +301,11 @@ static __devinit int fix_northbridge(struct pci_dev *nb, struct pci_dev *agp, | |||
301 | order = nb_order; | 301 | order = nb_order; |
302 | } | 302 | } |
303 | 303 | ||
304 | if (nb_order >= order) { | ||
305 | if (agp_aperture_valid(nb_aper, (32*1024*1024)<<nb_order)) | ||
306 | return 0; | ||
307 | } | ||
308 | |||
304 | dev_info(&agp->dev, "aperture from AGP @ %Lx size %u MB\n", | 309 | dev_info(&agp->dev, "aperture from AGP @ %Lx size %u MB\n", |
305 | aper, 32 << order); | 310 | aper, 32 << order); |
306 | if (order < 0 || !agp_aperture_valid(aper, (32*1024*1024)<<order)) | 311 | if (order < 0 || !agp_aperture_valid(aper, (32*1024*1024)<<order)) |
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c index c7714185f831..4373adb2119a 100644 --- a/drivers/char/agp/intel-agp.c +++ b/drivers/char/agp/intel-agp.c | |||
@@ -633,13 +633,15 @@ static void intel_i830_init_gtt_entries(void) | |||
633 | break; | 633 | break; |
634 | } | 634 | } |
635 | } | 635 | } |
636 | if (gtt_entries > 0) | 636 | if (gtt_entries > 0) { |
637 | dev_info(&agp_bridge->dev->dev, "detected %dK %s memory\n", | 637 | dev_info(&agp_bridge->dev->dev, "detected %dK %s memory\n", |
638 | gtt_entries / KB(1), local ? "local" : "stolen"); | 638 | gtt_entries / KB(1), local ? "local" : "stolen"); |
639 | else | 639 | gtt_entries /= KB(4); |
640 | } else { | ||
640 | dev_info(&agp_bridge->dev->dev, | 641 | dev_info(&agp_bridge->dev->dev, |
641 | "no pre-allocated video memory detected\n"); | 642 | "no pre-allocated video memory detected\n"); |
642 | gtt_entries /= KB(4); | 643 | gtt_entries = 0; |
644 | } | ||
643 | 645 | ||
644 | intel_private.gtt_entries = gtt_entries; | 646 | intel_private.gtt_entries = gtt_entries; |
645 | } | 647 | } |
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index b55cb67435bd..d6daf3c507d3 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -754,11 +754,6 @@ static struct kobj_type ktype_cpufreq = { | |||
754 | .release = cpufreq_sysfs_release, | 754 | .release = cpufreq_sysfs_release, |
755 | }; | 755 | }; |
756 | 756 | ||
757 | static struct kobj_type ktype_empty_cpufreq = { | ||
758 | .sysfs_ops = &sysfs_ops, | ||
759 | .release = cpufreq_sysfs_release, | ||
760 | }; | ||
761 | |||
762 | 757 | ||
763 | /** | 758 | /** |
764 | * cpufreq_add_dev - add a CPU device | 759 | * cpufreq_add_dev - add a CPU device |
@@ -892,36 +887,26 @@ static int cpufreq_add_dev(struct sys_device *sys_dev) | |||
892 | memcpy(&new_policy, policy, sizeof(struct cpufreq_policy)); | 887 | memcpy(&new_policy, policy, sizeof(struct cpufreq_policy)); |
893 | 888 | ||
894 | /* prepare interface data */ | 889 | /* prepare interface data */ |
895 | if (!cpufreq_driver->hide_interface) { | 890 | ret = kobject_init_and_add(&policy->kobj, &ktype_cpufreq, &sys_dev->kobj, |
896 | ret = kobject_init_and_add(&policy->kobj, &ktype_cpufreq, | 891 | "cpufreq"); |
897 | &sys_dev->kobj, "cpufreq"); | 892 | if (ret) |
893 | goto err_out_driver_exit; | ||
894 | |||
895 | /* set up files for this cpu device */ | ||
896 | drv_attr = cpufreq_driver->attr; | ||
897 | while ((drv_attr) && (*drv_attr)) { | ||
898 | ret = sysfs_create_file(&policy->kobj, &((*drv_attr)->attr)); | ||
898 | if (ret) | 899 | if (ret) |
899 | goto err_out_driver_exit; | 900 | goto err_out_driver_exit; |
900 | 901 | drv_attr++; | |
901 | /* set up files for this cpu device */ | 902 | } |
902 | drv_attr = cpufreq_driver->attr; | 903 | if (cpufreq_driver->get) { |
903 | while ((drv_attr) && (*drv_attr)) { | 904 | ret = sysfs_create_file(&policy->kobj, &cpuinfo_cur_freq.attr); |
904 | ret = sysfs_create_file(&policy->kobj, | 905 | if (ret) |
905 | &((*drv_attr)->attr)); | 906 | goto err_out_driver_exit; |
906 | if (ret) | 907 | } |
907 | goto err_out_driver_exit; | 908 | if (cpufreq_driver->target) { |
908 | drv_attr++; | 909 | ret = sysfs_create_file(&policy->kobj, &scaling_cur_freq.attr); |
909 | } | ||
910 | if (cpufreq_driver->get) { | ||
911 | ret = sysfs_create_file(&policy->kobj, | ||
912 | &cpuinfo_cur_freq.attr); | ||
913 | if (ret) | ||
914 | goto err_out_driver_exit; | ||
915 | } | ||
916 | if (cpufreq_driver->target) { | ||
917 | ret = sysfs_create_file(&policy->kobj, | ||
918 | &scaling_cur_freq.attr); | ||
919 | if (ret) | ||
920 | goto err_out_driver_exit; | ||
921 | } | ||
922 | } else { | ||
923 | ret = kobject_init_and_add(&policy->kobj, &ktype_empty_cpufreq, | ||
924 | &sys_dev->kobj, "cpufreq"); | ||
925 | if (ret) | 910 | if (ret) |
926 | goto err_out_driver_exit; | 911 | goto err_out_driver_exit; |
927 | } | 912 | } |
diff --git a/drivers/hwmon/lm85.c b/drivers/hwmon/lm85.c index cfc1ee90f5a3..b251d8674b41 100644 --- a/drivers/hwmon/lm85.c +++ b/drivers/hwmon/lm85.c | |||
@@ -72,6 +72,7 @@ I2C_CLIENT_INSMOD_7(lm85b, lm85c, adm1027, adt7463, adt7468, emc6d100, | |||
72 | #define LM85_COMPANY_SMSC 0x5c | 72 | #define LM85_COMPANY_SMSC 0x5c |
73 | #define LM85_VERSTEP_VMASK 0xf0 | 73 | #define LM85_VERSTEP_VMASK 0xf0 |
74 | #define LM85_VERSTEP_GENERIC 0x60 | 74 | #define LM85_VERSTEP_GENERIC 0x60 |
75 | #define LM85_VERSTEP_GENERIC2 0x70 | ||
75 | #define LM85_VERSTEP_LM85C 0x60 | 76 | #define LM85_VERSTEP_LM85C 0x60 |
76 | #define LM85_VERSTEP_LM85B 0x62 | 77 | #define LM85_VERSTEP_LM85B 0x62 |
77 | #define LM85_VERSTEP_ADM1027 0x60 | 78 | #define LM85_VERSTEP_ADM1027 0x60 |
@@ -334,6 +335,7 @@ static struct lm85_data *lm85_update_device(struct device *dev); | |||
334 | static const struct i2c_device_id lm85_id[] = { | 335 | static const struct i2c_device_id lm85_id[] = { |
335 | { "adm1027", adm1027 }, | 336 | { "adm1027", adm1027 }, |
336 | { "adt7463", adt7463 }, | 337 | { "adt7463", adt7463 }, |
338 | { "adt7468", adt7468 }, | ||
337 | { "lm85", any_chip }, | 339 | { "lm85", any_chip }, |
338 | { "lm85b", lm85b }, | 340 | { "lm85b", lm85b }, |
339 | { "lm85c", lm85c }, | 341 | { "lm85c", lm85c }, |
@@ -408,7 +410,8 @@ static ssize_t show_vid_reg(struct device *dev, struct device_attribute *attr, | |||
408 | struct lm85_data *data = lm85_update_device(dev); | 410 | struct lm85_data *data = lm85_update_device(dev); |
409 | int vid; | 411 | int vid; |
410 | 412 | ||
411 | if (data->type == adt7463 && (data->vid & 0x80)) { | 413 | if ((data->type == adt7463 || data->type == adt7468) && |
414 | (data->vid & 0x80)) { | ||
412 | /* 6-pin VID (VRM 10) */ | 415 | /* 6-pin VID (VRM 10) */ |
413 | vid = vid_from_reg(data->vid & 0x3f, data->vrm); | 416 | vid = vid_from_reg(data->vid & 0x3f, data->vrm); |
414 | } else { | 417 | } else { |
@@ -1153,7 +1156,8 @@ static int lm85_detect(struct i2c_client *client, int kind, | |||
1153 | address, company, verstep); | 1156 | address, company, verstep); |
1154 | 1157 | ||
1155 | /* All supported chips have the version in common */ | 1158 | /* All supported chips have the version in common */ |
1156 | if ((verstep & LM85_VERSTEP_VMASK) != LM85_VERSTEP_GENERIC) { | 1159 | if ((verstep & LM85_VERSTEP_VMASK) != LM85_VERSTEP_GENERIC && |
1160 | (verstep & LM85_VERSTEP_VMASK) != LM85_VERSTEP_GENERIC2) { | ||
1157 | dev_dbg(&adapter->dev, "Autodetection failed: " | 1161 | dev_dbg(&adapter->dev, "Autodetection failed: " |
1158 | "unsupported version\n"); | 1162 | "unsupported version\n"); |
1159 | return -ENODEV; | 1163 | return -ENODEV; |
diff --git a/drivers/lguest/lguest_device.c b/drivers/lguest/lguest_device.c index b4d44e571d76..8132533d71f9 100644 --- a/drivers/lguest/lguest_device.c +++ b/drivers/lguest/lguest_device.c | |||
@@ -212,6 +212,9 @@ static void lg_notify(struct virtqueue *vq) | |||
212 | hcall(LHCALL_NOTIFY, lvq->config.pfn << PAGE_SHIFT, 0, 0); | 212 | hcall(LHCALL_NOTIFY, lvq->config.pfn << PAGE_SHIFT, 0, 0); |
213 | } | 213 | } |
214 | 214 | ||
215 | /* An extern declaration inside a C file is bad form. Don't do it. */ | ||
216 | extern void lguest_setup_irq(unsigned int irq); | ||
217 | |||
215 | /* This routine finds the first virtqueue described in the configuration of | 218 | /* This routine finds the first virtqueue described in the configuration of |
216 | * this device and sets it up. | 219 | * this device and sets it up. |
217 | * | 220 | * |
@@ -266,6 +269,9 @@ static struct virtqueue *lg_find_vq(struct virtio_device *vdev, | |||
266 | goto unmap; | 269 | goto unmap; |
267 | } | 270 | } |
268 | 271 | ||
272 | /* Make sure the interrupt is allocated. */ | ||
273 | lguest_setup_irq(lvq->config.irq); | ||
274 | |||
269 | /* Tell the interrupt for this virtqueue to go to the virtio_ring | 275 | /* Tell the interrupt for this virtqueue to go to the virtio_ring |
270 | * interrupt handler. */ | 276 | * interrupt handler. */ |
271 | /* FIXME: We used to have a flag for the Host to tell us we could use | 277 | /* FIXME: We used to have a flag for the Host to tell us we could use |
diff --git a/drivers/md/md.c b/drivers/md/md.c index 03b4cd0a6344..a307f87eb90e 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -214,12 +214,7 @@ static inline mddev_t *mddev_get(mddev_t *mddev) | |||
214 | return mddev; | 214 | return mddev; |
215 | } | 215 | } |
216 | 216 | ||
217 | static void mddev_delayed_delete(struct work_struct *ws) | 217 | static void mddev_delayed_delete(struct work_struct *ws); |
218 | { | ||
219 | mddev_t *mddev = container_of(ws, mddev_t, del_work); | ||
220 | kobject_del(&mddev->kobj); | ||
221 | kobject_put(&mddev->kobj); | ||
222 | } | ||
223 | 218 | ||
224 | static void mddev_put(mddev_t *mddev) | 219 | static void mddev_put(mddev_t *mddev) |
225 | { | 220 | { |
@@ -3542,6 +3537,21 @@ static struct kobj_type md_ktype = { | |||
3542 | 3537 | ||
3543 | int mdp_major = 0; | 3538 | int mdp_major = 0; |
3544 | 3539 | ||
3540 | static void mddev_delayed_delete(struct work_struct *ws) | ||
3541 | { | ||
3542 | mddev_t *mddev = container_of(ws, mddev_t, del_work); | ||
3543 | |||
3544 | if (mddev->private == &md_redundancy_group) { | ||
3545 | sysfs_remove_group(&mddev->kobj, &md_redundancy_group); | ||
3546 | if (mddev->sysfs_action) | ||
3547 | sysfs_put(mddev->sysfs_action); | ||
3548 | mddev->sysfs_action = NULL; | ||
3549 | mddev->private = NULL; | ||
3550 | } | ||
3551 | kobject_del(&mddev->kobj); | ||
3552 | kobject_put(&mddev->kobj); | ||
3553 | } | ||
3554 | |||
3545 | static int md_alloc(dev_t dev, char *name) | 3555 | static int md_alloc(dev_t dev, char *name) |
3546 | { | 3556 | { |
3547 | static DEFINE_MUTEX(disks_mutex); | 3557 | static DEFINE_MUTEX(disks_mutex); |
@@ -4033,13 +4043,9 @@ static int do_md_stop(mddev_t * mddev, int mode, int is_open) | |||
4033 | mddev->queue->merge_bvec_fn = NULL; | 4043 | mddev->queue->merge_bvec_fn = NULL; |
4034 | mddev->queue->unplug_fn = NULL; | 4044 | mddev->queue->unplug_fn = NULL; |
4035 | mddev->queue->backing_dev_info.congested_fn = NULL; | 4045 | mddev->queue->backing_dev_info.congested_fn = NULL; |
4036 | if (mddev->pers->sync_request) { | ||
4037 | sysfs_remove_group(&mddev->kobj, &md_redundancy_group); | ||
4038 | if (mddev->sysfs_action) | ||
4039 | sysfs_put(mddev->sysfs_action); | ||
4040 | mddev->sysfs_action = NULL; | ||
4041 | } | ||
4042 | module_put(mddev->pers->owner); | 4046 | module_put(mddev->pers->owner); |
4047 | if (mddev->pers->sync_request) | ||
4048 | mddev->private = &md_redundancy_group; | ||
4043 | mddev->pers = NULL; | 4049 | mddev->pers = NULL; |
4044 | /* tell userspace to handle 'inactive' */ | 4050 | /* tell userspace to handle 'inactive' */ |
4045 | sysfs_notify_dirent(mddev->sysfs_state); | 4051 | sysfs_notify_dirent(mddev->sysfs_state); |
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c index d44f741ae229..6d9f810565c8 100644 --- a/drivers/mtd/devices/mtd_dataflash.c +++ b/drivers/mtd/devices/mtd_dataflash.c | |||
@@ -821,7 +821,8 @@ static struct flash_info *__devinit jedec_probe(struct spi_device *spi) | |||
821 | if (!(info->flags & IS_POW2PS)) | 821 | if (!(info->flags & IS_POW2PS)) |
822 | return info; | 822 | return info; |
823 | } | 823 | } |
824 | } | 824 | } else |
825 | return info; | ||
825 | } | 826 | } |
826 | } | 827 | } |
827 | 828 | ||
diff --git a/drivers/mtd/maps/physmap.c b/drivers/mtd/maps/physmap.c index 4b122e7ab4b3..229718222db7 100644 --- a/drivers/mtd/maps/physmap.c +++ b/drivers/mtd/maps/physmap.c | |||
@@ -46,16 +46,19 @@ static int physmap_flash_remove(struct platform_device *dev) | |||
46 | 46 | ||
47 | physmap_data = dev->dev.platform_data; | 47 | physmap_data = dev->dev.platform_data; |
48 | 48 | ||
49 | if (info->cmtd) { | ||
49 | #ifdef CONFIG_MTD_PARTITIONS | 50 | #ifdef CONFIG_MTD_PARTITIONS |
50 | if (info->nr_parts) { | 51 | if (info->nr_parts || physmap_data->nr_parts) |
51 | del_mtd_partitions(info->cmtd); | 52 | del_mtd_partitions(info->cmtd); |
52 | kfree(info->parts); | 53 | else |
53 | } else if (physmap_data->nr_parts) | 54 | del_mtd_device(info->cmtd); |
54 | del_mtd_partitions(info->cmtd); | ||
55 | else | ||
56 | del_mtd_device(info->cmtd); | ||
57 | #else | 55 | #else |
58 | del_mtd_device(info->cmtd); | 56 | del_mtd_device(info->cmtd); |
57 | #endif | ||
58 | } | ||
59 | #ifdef CONFIG_MTD_PARTITIONS | ||
60 | if (info->nr_parts) | ||
61 | kfree(info->parts); | ||
59 | #endif | 62 | #endif |
60 | 63 | ||
61 | #ifdef CONFIG_MTD_CONCAT | 64 | #ifdef CONFIG_MTD_CONCAT |
diff --git a/drivers/net/arm/ks8695net.c b/drivers/net/arm/ks8695net.c index 1cf2f949c0b4..f3a127434897 100644 --- a/drivers/net/arm/ks8695net.c +++ b/drivers/net/arm/ks8695net.c | |||
@@ -560,7 +560,7 @@ ks8695_reset(struct ks8695_priv *ksp) | |||
560 | msleep(1); | 560 | msleep(1); |
561 | } | 561 | } |
562 | 562 | ||
563 | if (reset_timeout == 0) { | 563 | if (reset_timeout < 0) { |
564 | dev_crit(ksp->dev, | 564 | dev_crit(ksp->dev, |
565 | "Timeout waiting for DMA engines to reset\n"); | 565 | "Timeout waiting for DMA engines to reset\n"); |
566 | /* And blithely carry on */ | 566 | /* And blithely carry on */ |
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 9fb388388fb7..e0578fe8c0db 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -4113,7 +4113,7 @@ static int bond_neigh_setup(struct net_device *dev, struct neigh_parms *parms) | |||
4113 | const struct net_device_ops *slave_ops | 4113 | const struct net_device_ops *slave_ops |
4114 | = slave->dev->netdev_ops; | 4114 | = slave->dev->netdev_ops; |
4115 | if (slave_ops->ndo_neigh_setup) | 4115 | if (slave_ops->ndo_neigh_setup) |
4116 | return slave_ops->ndo_neigh_setup(dev, parms); | 4116 | return slave_ops->ndo_neigh_setup(slave->dev, parms); |
4117 | } | 4117 | } |
4118 | return 0; | 4118 | return 0; |
4119 | } | 4119 | } |
diff --git a/drivers/net/jme.c b/drivers/net/jme.c index 08b34051c646..a6e1a35a13cb 100644 --- a/drivers/net/jme.c +++ b/drivers/net/jme.c | |||
@@ -957,13 +957,14 @@ jme_process_receive(struct jme_adapter *jme, int limit) | |||
957 | goto out_inc; | 957 | goto out_inc; |
958 | 958 | ||
959 | i = atomic_read(&rxring->next_to_clean); | 959 | i = atomic_read(&rxring->next_to_clean); |
960 | while (limit-- > 0) { | 960 | while (limit > 0) { |
961 | rxdesc = rxring->desc; | 961 | rxdesc = rxring->desc; |
962 | rxdesc += i; | 962 | rxdesc += i; |
963 | 963 | ||
964 | if ((rxdesc->descwb.flags & cpu_to_le16(RXWBFLAG_OWN)) || | 964 | if ((rxdesc->descwb.flags & cpu_to_le16(RXWBFLAG_OWN)) || |
965 | !(rxdesc->descwb.desccnt & RXWBDCNT_WBCPL)) | 965 | !(rxdesc->descwb.desccnt & RXWBDCNT_WBCPL)) |
966 | goto out; | 966 | goto out; |
967 | --limit; | ||
967 | 968 | ||
968 | desccnt = rxdesc->descwb.desccnt & RXWBDCNT_DCNT; | 969 | desccnt = rxdesc->descwb.desccnt & RXWBDCNT_DCNT; |
969 | 970 | ||
diff --git a/drivers/net/pcmcia/3c574_cs.c b/drivers/net/pcmcia/3c574_cs.c index e5cb6b1f0ebd..2404a838b1fe 100644 --- a/drivers/net/pcmcia/3c574_cs.c +++ b/drivers/net/pcmcia/3c574_cs.c | |||
@@ -1035,7 +1035,8 @@ static int el3_rx(struct net_device *dev, int worklimit) | |||
1035 | DEBUG(3, "%s: in rx_packet(), status %4.4x, rx_status %4.4x.\n", | 1035 | DEBUG(3, "%s: in rx_packet(), status %4.4x, rx_status %4.4x.\n", |
1036 | dev->name, inw(ioaddr+EL3_STATUS), inw(ioaddr+RxStatus)); | 1036 | dev->name, inw(ioaddr+EL3_STATUS), inw(ioaddr+RxStatus)); |
1037 | while (!((rx_status = inw(ioaddr + RxStatus)) & 0x8000) && | 1037 | while (!((rx_status = inw(ioaddr + RxStatus)) & 0x8000) && |
1038 | (--worklimit >= 0)) { | 1038 | worklimit > 0) { |
1039 | worklimit--; | ||
1039 | if (rx_status & 0x4000) { /* Error, update stats. */ | 1040 | if (rx_status & 0x4000) { /* Error, update stats. */ |
1040 | short error = rx_status & 0x3800; | 1041 | short error = rx_status & 0x3800; |
1041 | dev->stats.rx_errors++; | 1042 | dev->stats.rx_errors++; |
diff --git a/drivers/net/pcmcia/3c589_cs.c b/drivers/net/pcmcia/3c589_cs.c index 73ecc657999d..1e01b8a6dbf3 100644 --- a/drivers/net/pcmcia/3c589_cs.c +++ b/drivers/net/pcmcia/3c589_cs.c | |||
@@ -857,7 +857,8 @@ static int el3_rx(struct net_device *dev) | |||
857 | DEBUG(3, "%s: in rx_packet(), status %4.4x, rx_status %4.4x.\n", | 857 | DEBUG(3, "%s: in rx_packet(), status %4.4x, rx_status %4.4x.\n", |
858 | dev->name, inw(ioaddr+EL3_STATUS), inw(ioaddr+RX_STATUS)); | 858 | dev->name, inw(ioaddr+EL3_STATUS), inw(ioaddr+RX_STATUS)); |
859 | while (!((rx_status = inw(ioaddr + RX_STATUS)) & 0x8000) && | 859 | while (!((rx_status = inw(ioaddr + RX_STATUS)) & 0x8000) && |
860 | (--worklimit >= 0)) { | 860 | worklimit > 0) { |
861 | worklimit--; | ||
861 | if (rx_status & 0x4000) { /* Error, update stats. */ | 862 | if (rx_status & 0x4000) { /* Error, update stats. */ |
862 | short error = rx_status & 0x3800; | 863 | short error = rx_status & 0x3800; |
863 | dev->stats.rx_errors++; | 864 | dev->stats.rx_errors++; |
diff --git a/drivers/net/smc911x.h b/drivers/net/smc911x.h index 870b4c33f108..a45952e72018 100644 --- a/drivers/net/smc911x.h +++ b/drivers/net/smc911x.h | |||
@@ -42,6 +42,16 @@ | |||
42 | #define SMC_USE_16BIT 0 | 42 | #define SMC_USE_16BIT 0 |
43 | #define SMC_USE_32BIT 1 | 43 | #define SMC_USE_32BIT 1 |
44 | #define SMC_IRQ_SENSE IRQF_TRIGGER_LOW | 44 | #define SMC_IRQ_SENSE IRQF_TRIGGER_LOW |
45 | #elif defined(CONFIG_ARCH_OMAP34XX) | ||
46 | #define SMC_USE_16BIT 0 | ||
47 | #define SMC_USE_32BIT 1 | ||
48 | #define SMC_IRQ_SENSE IRQF_TRIGGER_LOW | ||
49 | #define SMC_MEM_RESERVED 1 | ||
50 | #elif defined(CONFIG_ARCH_OMAP24XX) | ||
51 | #define SMC_USE_16BIT 0 | ||
52 | #define SMC_USE_32BIT 1 | ||
53 | #define SMC_IRQ_SENSE IRQF_TRIGGER_LOW | ||
54 | #define SMC_MEM_RESERVED 1 | ||
45 | #else | 55 | #else |
46 | /* | 56 | /* |
47 | * Default configuration | 57 | * Default configuration |
@@ -675,6 +685,7 @@ smc_pxa_dma_outsl(struct smc911x_local *lp, u_long physaddr, | |||
675 | #define CHIP_9116 0x0116 | 685 | #define CHIP_9116 0x0116 |
676 | #define CHIP_9117 0x0117 | 686 | #define CHIP_9117 0x0117 |
677 | #define CHIP_9118 0x0118 | 687 | #define CHIP_9118 0x0118 |
688 | #define CHIP_9211 0x9211 | ||
678 | #define CHIP_9215 0x115A | 689 | #define CHIP_9215 0x115A |
679 | #define CHIP_9217 0x117A | 690 | #define CHIP_9217 0x117A |
680 | #define CHIP_9218 0x118A | 691 | #define CHIP_9218 0x118A |
@@ -689,6 +700,7 @@ static const struct chip_id chip_ids[] = { | |||
689 | { CHIP_9116, "LAN9116" }, | 700 | { CHIP_9116, "LAN9116" }, |
690 | { CHIP_9117, "LAN9117" }, | 701 | { CHIP_9117, "LAN9117" }, |
691 | { CHIP_9118, "LAN9118" }, | 702 | { CHIP_9118, "LAN9118" }, |
703 | { CHIP_9211, "LAN9211" }, | ||
692 | { CHIP_9215, "LAN9215" }, | 704 | { CHIP_9215, "LAN9215" }, |
693 | { CHIP_9217, "LAN9217" }, | 705 | { CHIP_9217, "LAN9217" }, |
694 | { CHIP_9218, "LAN9218" }, | 706 | { CHIP_9218, "LAN9218" }, |
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c index 8d64b1da0465..0fcb7503363d 100644 --- a/drivers/net/sungem.c +++ b/drivers/net/sungem.c | |||
@@ -1229,7 +1229,7 @@ static void gem_reset(struct gem *gp) | |||
1229 | break; | 1229 | break; |
1230 | } while (val & (GREG_SWRST_TXRST | GREG_SWRST_RXRST)); | 1230 | } while (val & (GREG_SWRST_TXRST | GREG_SWRST_RXRST)); |
1231 | 1231 | ||
1232 | if (limit <= 0) | 1232 | if (limit < 0) |
1233 | printk(KERN_ERR "%s: SW reset is ghetto.\n", gp->dev->name); | 1233 | printk(KERN_ERR "%s: SW reset is ghetto.\n", gp->dev->name); |
1234 | 1234 | ||
1235 | if (gp->phy_type == phy_serialink || gp->phy_type == phy_serdes) | 1235 | if (gp->phy_type == phy_serialink || gp->phy_type == phy_serdes) |
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index b080f9493d83..dabdf59f8016 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -1473,7 +1473,8 @@ static void tg3_phy_toggle_apd(struct tg3 *tp, bool enable) | |||
1473 | { | 1473 | { |
1474 | u32 reg; | 1474 | u32 reg; |
1475 | 1475 | ||
1476 | if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) | 1476 | if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS) || |
1477 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) | ||
1477 | return; | 1478 | return; |
1478 | 1479 | ||
1479 | reg = MII_TG3_MISC_SHDW_WREN | | 1480 | reg = MII_TG3_MISC_SHDW_WREN | |
diff --git a/drivers/net/tokenring/tmspci.c b/drivers/net/tokenring/tmspci.c index 5f601773c260..e2150b3c83d9 100644 --- a/drivers/net/tokenring/tmspci.c +++ b/drivers/net/tokenring/tmspci.c | |||
@@ -121,11 +121,6 @@ static int __devinit tms_pci_attach(struct pci_dev *pdev, const struct pci_devic | |||
121 | goto err_out_trdev; | 121 | goto err_out_trdev; |
122 | } | 122 | } |
123 | 123 | ||
124 | ret = request_irq(pdev->irq, tms380tr_interrupt, IRQF_SHARED, | ||
125 | dev->name, dev); | ||
126 | if (ret) | ||
127 | goto err_out_region; | ||
128 | |||
129 | dev->base_addr = pci_ioaddr; | 124 | dev->base_addr = pci_ioaddr; |
130 | dev->irq = pci_irq_line; | 125 | dev->irq = pci_irq_line; |
131 | dev->dma = 0; | 126 | dev->dma = 0; |
@@ -142,7 +137,7 @@ static int __devinit tms_pci_attach(struct pci_dev *pdev, const struct pci_devic | |||
142 | ret = tmsdev_init(dev, &pdev->dev); | 137 | ret = tmsdev_init(dev, &pdev->dev); |
143 | if (ret) { | 138 | if (ret) { |
144 | printk("%s: unable to get memory for dev->priv.\n", dev->name); | 139 | printk("%s: unable to get memory for dev->priv.\n", dev->name); |
145 | goto err_out_irq; | 140 | goto err_out_region; |
146 | } | 141 | } |
147 | 142 | ||
148 | tp = netdev_priv(dev); | 143 | tp = netdev_priv(dev); |
@@ -157,6 +152,11 @@ static int __devinit tms_pci_attach(struct pci_dev *pdev, const struct pci_devic | |||
157 | 152 | ||
158 | tp->tmspriv = cardinfo; | 153 | tp->tmspriv = cardinfo; |
159 | 154 | ||
155 | ret = request_irq(pdev->irq, tms380tr_interrupt, IRQF_SHARED, | ||
156 | dev->name, dev); | ||
157 | if (ret) | ||
158 | goto err_out_tmsdev; | ||
159 | |||
160 | dev->open = tms380tr_open; | 160 | dev->open = tms380tr_open; |
161 | dev->stop = tms380tr_close; | 161 | dev->stop = tms380tr_close; |
162 | pci_set_drvdata(pdev, dev); | 162 | pci_set_drvdata(pdev, dev); |
@@ -164,15 +164,15 @@ static int __devinit tms_pci_attach(struct pci_dev *pdev, const struct pci_devic | |||
164 | 164 | ||
165 | ret = register_netdev(dev); | 165 | ret = register_netdev(dev); |
166 | if (ret) | 166 | if (ret) |
167 | goto err_out_tmsdev; | 167 | goto err_out_irq; |
168 | 168 | ||
169 | return 0; | 169 | return 0; |
170 | 170 | ||
171 | err_out_irq: | ||
172 | free_irq(pdev->irq, dev); | ||
171 | err_out_tmsdev: | 173 | err_out_tmsdev: |
172 | pci_set_drvdata(pdev, NULL); | 174 | pci_set_drvdata(pdev, NULL); |
173 | tmsdev_term(dev); | 175 | tmsdev_term(dev); |
174 | err_out_irq: | ||
175 | free_irq(pdev->irq, dev); | ||
176 | err_out_region: | 176 | err_out_region: |
177 | release_region(pci_ioaddr, TMS_PCI_IO_EXTENT); | 177 | release_region(pci_ioaddr, TMS_PCI_IO_EXTENT); |
178 | err_out_trdev: | 178 | err_out_trdev: |
diff --git a/drivers/net/ucc_geth_mii.c b/drivers/net/ucc_geth_mii.c index 54635911305c..0ada4edd56eb 100644 --- a/drivers/net/ucc_geth_mii.c +++ b/drivers/net/ucc_geth_mii.c | |||
@@ -107,7 +107,7 @@ int uec_mdio_read(struct mii_bus *bus, int mii_id, int regnum) | |||
107 | static int uec_mdio_reset(struct mii_bus *bus) | 107 | static int uec_mdio_reset(struct mii_bus *bus) |
108 | { | 108 | { |
109 | struct ucc_mii_mng __iomem *regs = (void __iomem *)bus->priv; | 109 | struct ucc_mii_mng __iomem *regs = (void __iomem *)bus->priv; |
110 | unsigned int timeout = PHY_INIT_TIMEOUT; | 110 | int timeout = PHY_INIT_TIMEOUT; |
111 | 111 | ||
112 | mutex_lock(&bus->mdio_lock); | 112 | mutex_lock(&bus->mdio_lock); |
113 | 113 | ||
@@ -123,7 +123,7 @@ static int uec_mdio_reset(struct mii_bus *bus) | |||
123 | 123 | ||
124 | mutex_unlock(&bus->mdio_lock); | 124 | mutex_unlock(&bus->mdio_lock); |
125 | 125 | ||
126 | if (timeout <= 0) { | 126 | if (timeout < 0) { |
127 | printk(KERN_ERR "%s: The MII Bus is stuck!\n", bus->name); | 127 | printk(KERN_ERR "%s: The MII Bus is stuck!\n", bus->name); |
128 | return -EBUSY; | 128 | return -EBUSY; |
129 | } | 129 | } |
diff --git a/drivers/net/usb/dm9601.c b/drivers/net/usb/dm9601.c index 5b67bbf1987e..81682c6defa0 100644 --- a/drivers/net/usb/dm9601.c +++ b/drivers/net/usb/dm9601.c | |||
@@ -635,6 +635,10 @@ static const struct usb_device_id products[] = { | |||
635 | USB_DEVICE(0x0a47, 0x9601), /* Hirose USB-100 */ | 635 | USB_DEVICE(0x0a47, 0x9601), /* Hirose USB-100 */ |
636 | .driver_info = (unsigned long)&dm9601_info, | 636 | .driver_info = (unsigned long)&dm9601_info, |
637 | }, | 637 | }, |
638 | { | ||
639 | USB_DEVICE(0x0fe6, 0x8101), /* DM9601 USB to Fast Ethernet Adapter */ | ||
640 | .driver_info = (unsigned long)&dm9601_info, | ||
641 | }, | ||
638 | {}, // END | 642 | {}, // END |
639 | }; | 643 | }; |
640 | 644 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 36bafeb353ce..129e2d330abb 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -3868,7 +3868,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
3868 | } | 3868 | } |
3869 | err = iwl_eeprom_check_version(priv); | 3869 | err = iwl_eeprom_check_version(priv); |
3870 | if (err) | 3870 | if (err) |
3871 | goto out_iounmap; | 3871 | goto out_free_eeprom; |
3872 | 3872 | ||
3873 | /* extract MAC Address */ | 3873 | /* extract MAC Address */ |
3874 | iwl_eeprom_get_mac(priv, priv->mac_addr); | 3874 | iwl_eeprom_get_mac(priv, priv->mac_addr); |
@@ -3945,6 +3945,8 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
3945 | return 0; | 3945 | return 0; |
3946 | 3946 | ||
3947 | out_remove_sysfs: | 3947 | out_remove_sysfs: |
3948 | destroy_workqueue(priv->workqueue); | ||
3949 | priv->workqueue = NULL; | ||
3948 | sysfs_remove_group(&pdev->dev.kobj, &iwl_attribute_group); | 3950 | sysfs_remove_group(&pdev->dev.kobj, &iwl_attribute_group); |
3949 | out_uninit_drv: | 3951 | out_uninit_drv: |
3950 | iwl_uninit_drv(priv); | 3952 | iwl_uninit_drv(priv); |
@@ -3953,8 +3955,8 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
3953 | out_iounmap: | 3955 | out_iounmap: |
3954 | pci_iounmap(pdev, priv->hw_base); | 3956 | pci_iounmap(pdev, priv->hw_base); |
3955 | out_pci_release_regions: | 3957 | out_pci_release_regions: |
3956 | pci_release_regions(pdev); | ||
3957 | pci_set_drvdata(pdev, NULL); | 3958 | pci_set_drvdata(pdev, NULL); |
3959 | pci_release_regions(pdev); | ||
3958 | out_pci_disable_device: | 3960 | out_pci_disable_device: |
3959 | pci_disable_device(pdev); | 3961 | pci_disable_device(pdev); |
3960 | out_ieee80211_free_hw: | 3962 | out_ieee80211_free_hw: |
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 93be74a1f139..57dd34e256d8 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -7911,7 +7911,7 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
7911 | CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000); | 7911 | CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000); |
7912 | if (err < 0) { | 7912 | if (err < 0) { |
7913 | IWL_DEBUG_INFO("Failed to init the card\n"); | 7913 | IWL_DEBUG_INFO("Failed to init the card\n"); |
7914 | goto out_remove_sysfs; | 7914 | goto out_iounmap; |
7915 | } | 7915 | } |
7916 | 7916 | ||
7917 | /*********************** | 7917 | /*********************** |
@@ -7921,7 +7921,7 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
7921 | err = iwl3945_eeprom_init(priv); | 7921 | err = iwl3945_eeprom_init(priv); |
7922 | if (err) { | 7922 | if (err) { |
7923 | IWL_ERROR("Unable to init EEPROM\n"); | 7923 | IWL_ERROR("Unable to init EEPROM\n"); |
7924 | goto out_remove_sysfs; | 7924 | goto out_iounmap; |
7925 | } | 7925 | } |
7926 | /* MAC Address location in EEPROM same for 3945/4965 */ | 7926 | /* MAC Address location in EEPROM same for 3945/4965 */ |
7927 | get_eeprom_mac(priv, priv->mac_addr); | 7927 | get_eeprom_mac(priv, priv->mac_addr); |
@@ -7975,7 +7975,7 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
7975 | err = iwl3945_init_channel_map(priv); | 7975 | err = iwl3945_init_channel_map(priv); |
7976 | if (err) { | 7976 | if (err) { |
7977 | IWL_ERROR("initializing regulatory failed: %d\n", err); | 7977 | IWL_ERROR("initializing regulatory failed: %d\n", err); |
7978 | goto out_release_irq; | 7978 | goto out_unset_hw_setting; |
7979 | } | 7979 | } |
7980 | 7980 | ||
7981 | err = iwl3945_init_geos(priv); | 7981 | err = iwl3945_init_geos(priv); |
@@ -8045,25 +8045,22 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
8045 | return 0; | 8045 | return 0; |
8046 | 8046 | ||
8047 | out_remove_sysfs: | 8047 | out_remove_sysfs: |
8048 | destroy_workqueue(priv->workqueue); | ||
8049 | priv->workqueue = NULL; | ||
8048 | sysfs_remove_group(&pdev->dev.kobj, &iwl3945_attribute_group); | 8050 | sysfs_remove_group(&pdev->dev.kobj, &iwl3945_attribute_group); |
8049 | out_free_geos: | 8051 | out_free_geos: |
8050 | iwl3945_free_geos(priv); | 8052 | iwl3945_free_geos(priv); |
8051 | out_free_channel_map: | 8053 | out_free_channel_map: |
8052 | iwl3945_free_channel_map(priv); | 8054 | iwl3945_free_channel_map(priv); |
8053 | 8055 | out_unset_hw_setting: | |
8054 | |||
8055 | out_release_irq: | ||
8056 | destroy_workqueue(priv->workqueue); | ||
8057 | priv->workqueue = NULL; | ||
8058 | iwl3945_unset_hw_setting(priv); | 8056 | iwl3945_unset_hw_setting(priv); |
8059 | |||
8060 | out_iounmap: | 8057 | out_iounmap: |
8061 | pci_iounmap(pdev, priv->hw_base); | 8058 | pci_iounmap(pdev, priv->hw_base); |
8062 | out_pci_release_regions: | 8059 | out_pci_release_regions: |
8063 | pci_release_regions(pdev); | 8060 | pci_release_regions(pdev); |
8064 | out_pci_disable_device: | 8061 | out_pci_disable_device: |
8065 | pci_disable_device(pdev); | ||
8066 | pci_set_drvdata(pdev, NULL); | 8062 | pci_set_drvdata(pdev, NULL); |
8063 | pci_disable_device(pdev); | ||
8067 | out_ieee80211_free_hw: | 8064 | out_ieee80211_free_hw: |
8068 | ieee80211_free_hw(priv->hw); | 8065 | ieee80211_free_hw(priv->hw); |
8069 | out: | 8066 | out: |
diff --git a/drivers/net/wireless/p54/p54common.c b/drivers/net/wireless/p54/p54common.c index 34561e6e816b..f170106bf0ae 100644 --- a/drivers/net/wireless/p54/p54common.c +++ b/drivers/net/wireless/p54/p54common.c | |||
@@ -710,10 +710,11 @@ static struct sk_buff *p54_find_tx_entry(struct ieee80211_hw *dev, | |||
710 | __le32 req_id) | 710 | __le32 req_id) |
711 | { | 711 | { |
712 | struct p54_common *priv = dev->priv; | 712 | struct p54_common *priv = dev->priv; |
713 | struct sk_buff *entry = priv->tx_queue.next; | 713 | struct sk_buff *entry; |
714 | unsigned long flags; | 714 | unsigned long flags; |
715 | 715 | ||
716 | spin_lock_irqsave(&priv->tx_queue.lock, flags); | 716 | spin_lock_irqsave(&priv->tx_queue.lock, flags); |
717 | entry = priv->tx_queue.next; | ||
717 | while (entry != (struct sk_buff *)&priv->tx_queue) { | 718 | while (entry != (struct sk_buff *)&priv->tx_queue) { |
718 | struct p54_hdr *hdr = (struct p54_hdr *) entry->data; | 719 | struct p54_hdr *hdr = (struct p54_hdr *) entry->data; |
719 | 720 | ||
@@ -732,7 +733,7 @@ static void p54_rx_frame_sent(struct ieee80211_hw *dev, struct sk_buff *skb) | |||
732 | struct p54_common *priv = dev->priv; | 733 | struct p54_common *priv = dev->priv; |
733 | struct p54_hdr *hdr = (struct p54_hdr *) skb->data; | 734 | struct p54_hdr *hdr = (struct p54_hdr *) skb->data; |
734 | struct p54_frame_sent *payload = (struct p54_frame_sent *) hdr->data; | 735 | struct p54_frame_sent *payload = (struct p54_frame_sent *) hdr->data; |
735 | struct sk_buff *entry = (struct sk_buff *) priv->tx_queue.next; | 736 | struct sk_buff *entry; |
736 | u32 addr = le32_to_cpu(hdr->req_id) - priv->headroom; | 737 | u32 addr = le32_to_cpu(hdr->req_id) - priv->headroom; |
737 | struct memrecord *range = NULL; | 738 | struct memrecord *range = NULL; |
738 | u32 freed = 0; | 739 | u32 freed = 0; |
@@ -741,6 +742,7 @@ static void p54_rx_frame_sent(struct ieee80211_hw *dev, struct sk_buff *skb) | |||
741 | int count, idx; | 742 | int count, idx; |
742 | 743 | ||
743 | spin_lock_irqsave(&priv->tx_queue.lock, flags); | 744 | spin_lock_irqsave(&priv->tx_queue.lock, flags); |
745 | entry = (struct sk_buff *) priv->tx_queue.next; | ||
744 | while (entry != (struct sk_buff *)&priv->tx_queue) { | 746 | while (entry != (struct sk_buff *)&priv->tx_queue) { |
745 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(entry); | 747 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(entry); |
746 | struct p54_hdr *entry_hdr; | 748 | struct p54_hdr *entry_hdr; |
@@ -976,7 +978,7 @@ static int p54_assign_address(struct ieee80211_hw *dev, struct sk_buff *skb, | |||
976 | struct p54_hdr *data, u32 len) | 978 | struct p54_hdr *data, u32 len) |
977 | { | 979 | { |
978 | struct p54_common *priv = dev->priv; | 980 | struct p54_common *priv = dev->priv; |
979 | struct sk_buff *entry = priv->tx_queue.next; | 981 | struct sk_buff *entry; |
980 | struct sk_buff *target_skb = NULL; | 982 | struct sk_buff *target_skb = NULL; |
981 | struct ieee80211_tx_info *info; | 983 | struct ieee80211_tx_info *info; |
982 | struct memrecord *range; | 984 | struct memrecord *range; |
@@ -1014,6 +1016,7 @@ static int p54_assign_address(struct ieee80211_hw *dev, struct sk_buff *skb, | |||
1014 | } | 1016 | } |
1015 | } | 1017 | } |
1016 | 1018 | ||
1019 | entry = priv->tx_queue.next; | ||
1017 | while (left--) { | 1020 | while (left--) { |
1018 | u32 hole_size; | 1021 | u32 hole_size; |
1019 | info = IEEE80211_SKB_CB(entry); | 1022 | info = IEEE80211_SKB_CB(entry); |
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c index af6b5847be5c..3e2ac2bbb12f 100644 --- a/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/rt2x00/rt2500usb.c | |||
@@ -1952,6 +1952,8 @@ static struct usb_device_id rt2500usb_device_table[] = { | |||
1952 | { USB_DEVICE(0x13b1, 0x000d), USB_DEVICE_DATA(&rt2500usb_ops) }, | 1952 | { USB_DEVICE(0x13b1, 0x000d), USB_DEVICE_DATA(&rt2500usb_ops) }, |
1953 | { USB_DEVICE(0x13b1, 0x0011), USB_DEVICE_DATA(&rt2500usb_ops) }, | 1953 | { USB_DEVICE(0x13b1, 0x0011), USB_DEVICE_DATA(&rt2500usb_ops) }, |
1954 | { USB_DEVICE(0x13b1, 0x001a), USB_DEVICE_DATA(&rt2500usb_ops) }, | 1954 | { USB_DEVICE(0x13b1, 0x001a), USB_DEVICE_DATA(&rt2500usb_ops) }, |
1955 | /* CNet */ | ||
1956 | { USB_DEVICE(0x1371, 0x9022), USB_DEVICE_DATA(&rt2500usb_ops) }, | ||
1955 | /* Conceptronic */ | 1957 | /* Conceptronic */ |
1956 | { USB_DEVICE(0x14b2, 0x3c02), USB_DEVICE_DATA(&rt2500usb_ops) }, | 1958 | { USB_DEVICE(0x14b2, 0x3c02), USB_DEVICE_DATA(&rt2500usb_ops) }, |
1957 | /* D-LINK */ | 1959 | /* D-LINK */ |
@@ -1976,14 +1978,20 @@ static struct usb_device_id rt2500usb_device_table[] = { | |||
1976 | { USB_DEVICE(0x148f, 0x2570), USB_DEVICE_DATA(&rt2500usb_ops) }, | 1978 | { USB_DEVICE(0x148f, 0x2570), USB_DEVICE_DATA(&rt2500usb_ops) }, |
1977 | { USB_DEVICE(0x148f, 0x2573), USB_DEVICE_DATA(&rt2500usb_ops) }, | 1979 | { USB_DEVICE(0x148f, 0x2573), USB_DEVICE_DATA(&rt2500usb_ops) }, |
1978 | { USB_DEVICE(0x148f, 0x9020), USB_DEVICE_DATA(&rt2500usb_ops) }, | 1980 | { USB_DEVICE(0x148f, 0x9020), USB_DEVICE_DATA(&rt2500usb_ops) }, |
1981 | /* Sagem */ | ||
1982 | { USB_DEVICE(0x079b, 0x004b), USB_DEVICE_DATA(&rt2500usb_ops) }, | ||
1979 | /* Siemens */ | 1983 | /* Siemens */ |
1980 | { USB_DEVICE(0x0681, 0x3c06), USB_DEVICE_DATA(&rt2500usb_ops) }, | 1984 | { USB_DEVICE(0x0681, 0x3c06), USB_DEVICE_DATA(&rt2500usb_ops) }, |
1981 | /* SMC */ | 1985 | /* SMC */ |
1982 | { USB_DEVICE(0x0707, 0xee13), USB_DEVICE_DATA(&rt2500usb_ops) }, | 1986 | { USB_DEVICE(0x0707, 0xee13), USB_DEVICE_DATA(&rt2500usb_ops) }, |
1983 | /* Spairon */ | 1987 | /* Spairon */ |
1984 | { USB_DEVICE(0x114b, 0x0110), USB_DEVICE_DATA(&rt2500usb_ops) }, | 1988 | { USB_DEVICE(0x114b, 0x0110), USB_DEVICE_DATA(&rt2500usb_ops) }, |
1989 | /* SURECOM */ | ||
1990 | { USB_DEVICE(0x0769, 0x11f3), USB_DEVICE_DATA(&rt2500usb_ops) }, | ||
1985 | /* Trust */ | 1991 | /* Trust */ |
1986 | { USB_DEVICE(0x0eb0, 0x9020), USB_DEVICE_DATA(&rt2500usb_ops) }, | 1992 | { USB_DEVICE(0x0eb0, 0x9020), USB_DEVICE_DATA(&rt2500usb_ops) }, |
1993 | /* VTech */ | ||
1994 | { USB_DEVICE(0x0f88, 0x3012), USB_DEVICE_DATA(&rt2500usb_ops) }, | ||
1987 | /* Zinwell */ | 1995 | /* Zinwell */ |
1988 | { USB_DEVICE(0x5a57, 0x0260), USB_DEVICE_DATA(&rt2500usb_ops) }, | 1996 | { USB_DEVICE(0x5a57, 0x0260), USB_DEVICE_DATA(&rt2500usb_ops) }, |
1989 | { 0, } | 1997 | { 0, } |
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index 96a8d69f8790..cefee1b26cd8 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c | |||
@@ -2281,7 +2281,18 @@ static const struct rt2x00_ops rt73usb_ops = { | |||
2281 | */ | 2281 | */ |
2282 | static struct usb_device_id rt73usb_device_table[] = { | 2282 | static struct usb_device_id rt73usb_device_table[] = { |
2283 | /* AboCom */ | 2283 | /* AboCom */ |
2284 | { USB_DEVICE(0x07b8, 0xb21b), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2285 | { USB_DEVICE(0x07b8, 0xb21c), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2284 | { USB_DEVICE(0x07b8, 0xb21d), USB_DEVICE_DATA(&rt73usb_ops) }, | 2286 | { USB_DEVICE(0x07b8, 0xb21d), USB_DEVICE_DATA(&rt73usb_ops) }, |
2287 | { USB_DEVICE(0x07b8, 0xb21e), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2288 | { USB_DEVICE(0x07b8, 0xb21f), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2289 | /* AL */ | ||
2290 | { USB_DEVICE(0x14b2, 0x3c10), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2291 | /* Amigo */ | ||
2292 | { USB_DEVICE(0x148f, 0x9021), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2293 | { USB_DEVICE(0x0eb0, 0x9021), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2294 | /* AMIT */ | ||
2295 | { USB_DEVICE(0x18c5, 0x0002), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2285 | /* Askey */ | 2296 | /* Askey */ |
2286 | { USB_DEVICE(0x1690, 0x0722), USB_DEVICE_DATA(&rt73usb_ops) }, | 2297 | { USB_DEVICE(0x1690, 0x0722), USB_DEVICE_DATA(&rt73usb_ops) }, |
2287 | /* ASUS */ | 2298 | /* ASUS */ |
@@ -2294,7 +2305,9 @@ static struct usb_device_id rt73usb_device_table[] = { | |||
2294 | { USB_DEVICE(0x050d, 0x905c), USB_DEVICE_DATA(&rt73usb_ops) }, | 2305 | { USB_DEVICE(0x050d, 0x905c), USB_DEVICE_DATA(&rt73usb_ops) }, |
2295 | /* Billionton */ | 2306 | /* Billionton */ |
2296 | { USB_DEVICE(0x1631, 0xc019), USB_DEVICE_DATA(&rt73usb_ops) }, | 2307 | { USB_DEVICE(0x1631, 0xc019), USB_DEVICE_DATA(&rt73usb_ops) }, |
2308 | { USB_DEVICE(0x08dd, 0x0120), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2297 | /* Buffalo */ | 2309 | /* Buffalo */ |
2310 | { USB_DEVICE(0x0411, 0x00d8), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2298 | { USB_DEVICE(0x0411, 0x00f4), USB_DEVICE_DATA(&rt73usb_ops) }, | 2311 | { USB_DEVICE(0x0411, 0x00f4), USB_DEVICE_DATA(&rt73usb_ops) }, |
2299 | /* CNet */ | 2312 | /* CNet */ |
2300 | { USB_DEVICE(0x1371, 0x9022), USB_DEVICE_DATA(&rt73usb_ops) }, | 2313 | { USB_DEVICE(0x1371, 0x9022), USB_DEVICE_DATA(&rt73usb_ops) }, |
@@ -2308,6 +2321,11 @@ static struct usb_device_id rt73usb_device_table[] = { | |||
2308 | { USB_DEVICE(0x07d1, 0x3c04), USB_DEVICE_DATA(&rt73usb_ops) }, | 2321 | { USB_DEVICE(0x07d1, 0x3c04), USB_DEVICE_DATA(&rt73usb_ops) }, |
2309 | { USB_DEVICE(0x07d1, 0x3c06), USB_DEVICE_DATA(&rt73usb_ops) }, | 2322 | { USB_DEVICE(0x07d1, 0x3c06), USB_DEVICE_DATA(&rt73usb_ops) }, |
2310 | { USB_DEVICE(0x07d1, 0x3c07), USB_DEVICE_DATA(&rt73usb_ops) }, | 2323 | { USB_DEVICE(0x07d1, 0x3c07), USB_DEVICE_DATA(&rt73usb_ops) }, |
2324 | /* Edimax */ | ||
2325 | { USB_DEVICE(0x7392, 0x7318), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2326 | { USB_DEVICE(0x7392, 0x7618), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2327 | /* EnGenius */ | ||
2328 | { USB_DEVICE(0x1740, 0x3701), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2311 | /* Gemtek */ | 2329 | /* Gemtek */ |
2312 | { USB_DEVICE(0x15a9, 0x0004), USB_DEVICE_DATA(&rt73usb_ops) }, | 2330 | { USB_DEVICE(0x15a9, 0x0004), USB_DEVICE_DATA(&rt73usb_ops) }, |
2313 | /* Gigabyte */ | 2331 | /* Gigabyte */ |
@@ -2328,22 +2346,34 @@ static struct usb_device_id rt73usb_device_table[] = { | |||
2328 | { USB_DEVICE(0x0db0, 0xa861), USB_DEVICE_DATA(&rt73usb_ops) }, | 2346 | { USB_DEVICE(0x0db0, 0xa861), USB_DEVICE_DATA(&rt73usb_ops) }, |
2329 | { USB_DEVICE(0x0db0, 0xa874), USB_DEVICE_DATA(&rt73usb_ops) }, | 2347 | { USB_DEVICE(0x0db0, 0xa874), USB_DEVICE_DATA(&rt73usb_ops) }, |
2330 | /* Ralink */ | 2348 | /* Ralink */ |
2349 | { USB_DEVICE(0x04bb, 0x093d), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2331 | { USB_DEVICE(0x148f, 0x2573), USB_DEVICE_DATA(&rt73usb_ops) }, | 2350 | { USB_DEVICE(0x148f, 0x2573), USB_DEVICE_DATA(&rt73usb_ops) }, |
2332 | { USB_DEVICE(0x148f, 0x2671), USB_DEVICE_DATA(&rt73usb_ops) }, | 2351 | { USB_DEVICE(0x148f, 0x2671), USB_DEVICE_DATA(&rt73usb_ops) }, |
2333 | /* Qcom */ | 2352 | /* Qcom */ |
2334 | { USB_DEVICE(0x18e8, 0x6196), USB_DEVICE_DATA(&rt73usb_ops) }, | 2353 | { USB_DEVICE(0x18e8, 0x6196), USB_DEVICE_DATA(&rt73usb_ops) }, |
2335 | { USB_DEVICE(0x18e8, 0x6229), USB_DEVICE_DATA(&rt73usb_ops) }, | 2354 | { USB_DEVICE(0x18e8, 0x6229), USB_DEVICE_DATA(&rt73usb_ops) }, |
2336 | { USB_DEVICE(0x18e8, 0x6238), USB_DEVICE_DATA(&rt73usb_ops) }, | 2355 | { USB_DEVICE(0x18e8, 0x6238), USB_DEVICE_DATA(&rt73usb_ops) }, |
2356 | /* Samsung */ | ||
2357 | { USB_DEVICE(0x04e8, 0x4471), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2337 | /* Senao */ | 2358 | /* Senao */ |
2338 | { USB_DEVICE(0x1740, 0x7100), USB_DEVICE_DATA(&rt73usb_ops) }, | 2359 | { USB_DEVICE(0x1740, 0x7100), USB_DEVICE_DATA(&rt73usb_ops) }, |
2339 | /* Sitecom */ | 2360 | /* Sitecom */ |
2340 | { USB_DEVICE(0x0df6, 0x9712), USB_DEVICE_DATA(&rt73usb_ops) }, | 2361 | { USB_DEVICE(0x0df6, 0x0024), USB_DEVICE_DATA(&rt73usb_ops) }, |
2362 | { USB_DEVICE(0x0df6, 0x0027), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2363 | { USB_DEVICE(0x0df6, 0x002f), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2341 | { USB_DEVICE(0x0df6, 0x90ac), USB_DEVICE_DATA(&rt73usb_ops) }, | 2364 | { USB_DEVICE(0x0df6, 0x90ac), USB_DEVICE_DATA(&rt73usb_ops) }, |
2365 | { USB_DEVICE(0x0df6, 0x9712), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2342 | /* Surecom */ | 2366 | /* Surecom */ |
2343 | { USB_DEVICE(0x0769, 0x31f3), USB_DEVICE_DATA(&rt73usb_ops) }, | 2367 | { USB_DEVICE(0x0769, 0x31f3), USB_DEVICE_DATA(&rt73usb_ops) }, |
2368 | /* Philips */ | ||
2369 | { USB_DEVICE(0x0471, 0x200a), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2344 | /* Planex */ | 2370 | /* Planex */ |
2345 | { USB_DEVICE(0x2019, 0xab01), USB_DEVICE_DATA(&rt73usb_ops) }, | 2371 | { USB_DEVICE(0x2019, 0xab01), USB_DEVICE_DATA(&rt73usb_ops) }, |
2346 | { USB_DEVICE(0x2019, 0xab50), USB_DEVICE_DATA(&rt73usb_ops) }, | 2372 | { USB_DEVICE(0x2019, 0xab50), USB_DEVICE_DATA(&rt73usb_ops) }, |
2373 | /* Zcom */ | ||
2374 | { USB_DEVICE(0x0cde, 0x001c), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2375 | /* ZyXEL */ | ||
2376 | { USB_DEVICE(0x0586, 0x3415), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2347 | { 0, } | 2377 | { 0, } |
2348 | }; | 2378 | }; |
2349 | 2379 | ||
diff --git a/drivers/video/i810/i810_main.c b/drivers/video/i810/i810_main.c index a24e680d2b9c..2e940199fc89 100644 --- a/drivers/video/i810/i810_main.c +++ b/drivers/video/i810/i810_main.c | |||
@@ -993,6 +993,7 @@ static int i810_check_params(struct fb_var_screeninfo *var, | |||
993 | struct i810fb_par *par = info->par; | 993 | struct i810fb_par *par = info->par; |
994 | int line_length, vidmem, mode_valid = 0, retval = 0; | 994 | int line_length, vidmem, mode_valid = 0, retval = 0; |
995 | u32 vyres = var->yres_virtual, vxres = var->xres_virtual; | 995 | u32 vyres = var->yres_virtual, vxres = var->xres_virtual; |
996 | |||
996 | /* | 997 | /* |
997 | * Memory limit | 998 | * Memory limit |
998 | */ | 999 | */ |
@@ -1002,12 +1003,12 @@ static int i810_check_params(struct fb_var_screeninfo *var, | |||
1002 | if (vidmem > par->fb.size) { | 1003 | if (vidmem > par->fb.size) { |
1003 | vyres = par->fb.size/line_length; | 1004 | vyres = par->fb.size/line_length; |
1004 | if (vyres < var->yres) { | 1005 | if (vyres < var->yres) { |
1005 | vyres = yres; | 1006 | vyres = info->var.yres; |
1006 | vxres = par->fb.size/vyres; | 1007 | vxres = par->fb.size/vyres; |
1007 | vxres /= var->bits_per_pixel >> 3; | 1008 | vxres /= var->bits_per_pixel >> 3; |
1008 | line_length = get_line_length(par, vxres, | 1009 | line_length = get_line_length(par, vxres, |
1009 | var->bits_per_pixel); | 1010 | var->bits_per_pixel); |
1010 | vidmem = line_length * yres; | 1011 | vidmem = line_length * info->var.yres; |
1011 | if (vxres < var->xres) { | 1012 | if (vxres < var->xres) { |
1012 | printk("i810fb: required video memory, " | 1013 | printk("i810fb: required video memory, " |
1013 | "%d bytes, for %dx%d-%d (virtual) " | 1014 | "%d bytes, for %dx%d-%d (virtual) " |
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c index 0e2b8fd24df1..2c5d069e5f06 100644 --- a/drivers/video/sh_mobile_lcdcfb.c +++ b/drivers/video/sh_mobile_lcdcfb.c | |||
@@ -446,7 +446,6 @@ static void sh_mobile_lcdc_stop(struct sh_mobile_lcdc_priv *priv) | |||
446 | { | 446 | { |
447 | struct sh_mobile_lcdc_chan *ch; | 447 | struct sh_mobile_lcdc_chan *ch; |
448 | struct sh_mobile_lcdc_board_cfg *board_cfg; | 448 | struct sh_mobile_lcdc_board_cfg *board_cfg; |
449 | unsigned long tmp; | ||
450 | int k; | 449 | int k; |
451 | 450 | ||
452 | /* tell the board code to disable the panel */ | 451 | /* tell the board code to disable the panel */ |
@@ -456,9 +455,8 @@ static void sh_mobile_lcdc_stop(struct sh_mobile_lcdc_priv *priv) | |||
456 | if (board_cfg->display_off) | 455 | if (board_cfg->display_off) |
457 | board_cfg->display_off(board_cfg->board_data); | 456 | board_cfg->display_off(board_cfg->board_data); |
458 | 457 | ||
459 | /* cleanup deferred io if SYS bus */ | 458 | /* cleanup deferred io if enabled */ |
460 | tmp = ch->cfg.sys_bus_cfg.deferred_io_msec; | 459 | if (ch->info.fbdefio) { |
461 | if (ch->ldmt1r_value & (1 << 12) && tmp) { | ||
462 | fb_deferred_io_cleanup(&ch->info); | 460 | fb_deferred_io_cleanup(&ch->info); |
463 | ch->info.fbdefio = NULL; | 461 | ch->info.fbdefio = NULL; |
464 | } | 462 | } |
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 42491d728e99..37f31b5529aa 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c | |||
@@ -277,7 +277,7 @@ static noinline int __btrfs_cow_block(struct btrfs_trans_handle *trans, | |||
277 | if (*cow_ret == buf) | 277 | if (*cow_ret == buf) |
278 | unlock_orig = 1; | 278 | unlock_orig = 1; |
279 | 279 | ||
280 | WARN_ON(!btrfs_tree_locked(buf)); | 280 | btrfs_assert_tree_locked(buf); |
281 | 281 | ||
282 | if (parent) | 282 | if (parent) |
283 | parent_start = parent->start; | 283 | parent_start = parent->start; |
@@ -2365,7 +2365,7 @@ static int push_leaf_right(struct btrfs_trans_handle *trans, struct btrfs_root | |||
2365 | if (slot >= btrfs_header_nritems(upper) - 1) | 2365 | if (slot >= btrfs_header_nritems(upper) - 1) |
2366 | return 1; | 2366 | return 1; |
2367 | 2367 | ||
2368 | WARN_ON(!btrfs_tree_locked(path->nodes[1])); | 2368 | btrfs_assert_tree_locked(path->nodes[1]); |
2369 | 2369 | ||
2370 | right = read_node_slot(root, upper, slot + 1); | 2370 | right = read_node_slot(root, upper, slot + 1); |
2371 | btrfs_tree_lock(right); | 2371 | btrfs_tree_lock(right); |
@@ -2562,7 +2562,7 @@ static int push_leaf_left(struct btrfs_trans_handle *trans, struct btrfs_root | |||
2562 | if (right_nritems == 0) | 2562 | if (right_nritems == 0) |
2563 | return 1; | 2563 | return 1; |
2564 | 2564 | ||
2565 | WARN_ON(!btrfs_tree_locked(path->nodes[1])); | 2565 | btrfs_assert_tree_locked(path->nodes[1]); |
2566 | 2566 | ||
2567 | left = read_node_slot(root, path->nodes[1], slot - 1); | 2567 | left = read_node_slot(root, path->nodes[1], slot - 1); |
2568 | btrfs_tree_lock(left); | 2568 | btrfs_tree_lock(left); |
@@ -4101,7 +4101,7 @@ int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path) | |||
4101 | 4101 | ||
4102 | next = read_node_slot(root, c, slot); | 4102 | next = read_node_slot(root, c, slot); |
4103 | if (!path->skip_locking) { | 4103 | if (!path->skip_locking) { |
4104 | WARN_ON(!btrfs_tree_locked(c)); | 4104 | btrfs_assert_tree_locked(c); |
4105 | btrfs_tree_lock(next); | 4105 | btrfs_tree_lock(next); |
4106 | btrfs_set_lock_blocking(next); | 4106 | btrfs_set_lock_blocking(next); |
4107 | } | 4107 | } |
@@ -4126,7 +4126,7 @@ int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path) | |||
4126 | reada_for_search(root, path, level, slot, 0); | 4126 | reada_for_search(root, path, level, slot, 0); |
4127 | next = read_node_slot(root, next, 0); | 4127 | next = read_node_slot(root, next, 0); |
4128 | if (!path->skip_locking) { | 4128 | if (!path->skip_locking) { |
4129 | WARN_ON(!btrfs_tree_locked(path->nodes[level])); | 4129 | btrfs_assert_tree_locked(path->nodes[level]); |
4130 | btrfs_tree_lock(next); | 4130 | btrfs_tree_lock(next); |
4131 | btrfs_set_lock_blocking(next); | 4131 | btrfs_set_lock_blocking(next); |
4132 | } | 4132 | } |
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index adda739a0215..3e18175248e0 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -857,7 +857,7 @@ int clean_tree_block(struct btrfs_trans_handle *trans, struct btrfs_root *root, | |||
857 | struct inode *btree_inode = root->fs_info->btree_inode; | 857 | struct inode *btree_inode = root->fs_info->btree_inode; |
858 | if (btrfs_header_generation(buf) == | 858 | if (btrfs_header_generation(buf) == |
859 | root->fs_info->running_transaction->transid) { | 859 | root->fs_info->running_transaction->transid) { |
860 | WARN_ON(!btrfs_tree_locked(buf)); | 860 | btrfs_assert_tree_locked(buf); |
861 | 861 | ||
862 | /* ugh, clear_extent_buffer_dirty can be expensive */ | 862 | /* ugh, clear_extent_buffer_dirty can be expensive */ |
863 | btrfs_set_lock_blocking(buf); | 863 | btrfs_set_lock_blocking(buf); |
@@ -2361,7 +2361,7 @@ void btrfs_mark_buffer_dirty(struct extent_buffer *buf) | |||
2361 | 2361 | ||
2362 | btrfs_set_lock_blocking(buf); | 2362 | btrfs_set_lock_blocking(buf); |
2363 | 2363 | ||
2364 | WARN_ON(!btrfs_tree_locked(buf)); | 2364 | btrfs_assert_tree_locked(buf); |
2365 | if (transid != root->fs_info->generation) { | 2365 | if (transid != root->fs_info->generation) { |
2366 | printk(KERN_CRIT "btrfs transid mismatch buffer %llu, " | 2366 | printk(KERN_CRIT "btrfs transid mismatch buffer %llu, " |
2367 | "found %llu running %llu\n", | 2367 | "found %llu running %llu\n", |
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 6b5966aacf44..9abf81f71c46 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -4418,13 +4418,13 @@ int btrfs_drop_subtree(struct btrfs_trans_handle *trans, | |||
4418 | path = btrfs_alloc_path(); | 4418 | path = btrfs_alloc_path(); |
4419 | BUG_ON(!path); | 4419 | BUG_ON(!path); |
4420 | 4420 | ||
4421 | BUG_ON(!btrfs_tree_locked(parent)); | 4421 | btrfs_assert_tree_locked(parent); |
4422 | parent_level = btrfs_header_level(parent); | 4422 | parent_level = btrfs_header_level(parent); |
4423 | extent_buffer_get(parent); | 4423 | extent_buffer_get(parent); |
4424 | path->nodes[parent_level] = parent; | 4424 | path->nodes[parent_level] = parent; |
4425 | path->slots[parent_level] = btrfs_header_nritems(parent); | 4425 | path->slots[parent_level] = btrfs_header_nritems(parent); |
4426 | 4426 | ||
4427 | BUG_ON(!btrfs_tree_locked(node)); | 4427 | btrfs_assert_tree_locked(node); |
4428 | level = btrfs_header_level(node); | 4428 | level = btrfs_header_level(node); |
4429 | extent_buffer_get(node); | 4429 | extent_buffer_get(node); |
4430 | path->nodes[level] = node; | 4430 | path->nodes[level] = node; |
diff --git a/fs/btrfs/locking.c b/fs/btrfs/locking.c index 85506c4a3af7..47b0a88c12a2 100644 --- a/fs/btrfs/locking.c +++ b/fs/btrfs/locking.c | |||
@@ -220,8 +220,8 @@ int btrfs_tree_unlock(struct extent_buffer *eb) | |||
220 | return 0; | 220 | return 0; |
221 | } | 221 | } |
222 | 222 | ||
223 | int btrfs_tree_locked(struct extent_buffer *eb) | 223 | void btrfs_assert_tree_locked(struct extent_buffer *eb) |
224 | { | 224 | { |
225 | return test_bit(EXTENT_BUFFER_BLOCKING, &eb->bflags) || | 225 | if (!test_bit(EXTENT_BUFFER_BLOCKING, &eb->bflags)) |
226 | spin_is_locked(&eb->lock); | 226 | assert_spin_locked(&eb->lock); |
227 | } | 227 | } |
diff --git a/fs/btrfs/locking.h b/fs/btrfs/locking.h index 6bb0afbff928..6c4ce457168c 100644 --- a/fs/btrfs/locking.h +++ b/fs/btrfs/locking.h | |||
@@ -21,11 +21,11 @@ | |||
21 | 21 | ||
22 | int btrfs_tree_lock(struct extent_buffer *eb); | 22 | int btrfs_tree_lock(struct extent_buffer *eb); |
23 | int btrfs_tree_unlock(struct extent_buffer *eb); | 23 | int btrfs_tree_unlock(struct extent_buffer *eb); |
24 | int btrfs_tree_locked(struct extent_buffer *eb); | ||
25 | 24 | ||
26 | int btrfs_try_tree_lock(struct extent_buffer *eb); | 25 | int btrfs_try_tree_lock(struct extent_buffer *eb); |
27 | int btrfs_try_spin_lock(struct extent_buffer *eb); | 26 | int btrfs_try_spin_lock(struct extent_buffer *eb); |
28 | 27 | ||
29 | void btrfs_set_lock_blocking(struct extent_buffer *eb); | 28 | void btrfs_set_lock_blocking(struct extent_buffer *eb); |
30 | void btrfs_clear_lock_blocking(struct extent_buffer *eb); | 29 | void btrfs_clear_lock_blocking(struct extent_buffer *eb); |
30 | void btrfs_assert_tree_locked(struct extent_buffer *eb); | ||
31 | #endif | 31 | #endif |
diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c index 5f3231b9633f..bff4052b05e7 100644 --- a/fs/devpts/inode.c +++ b/fs/devpts/inode.c | |||
@@ -198,9 +198,6 @@ static int mknod_ptmx(struct super_block *sb) | |||
198 | 198 | ||
199 | fsi->ptmx_dentry = dentry; | 199 | fsi->ptmx_dentry = dentry; |
200 | rc = 0; | 200 | rc = 0; |
201 | |||
202 | printk(KERN_DEBUG "Created ptmx node in devpts ino %lu\n", | ||
203 | inode->i_ino); | ||
204 | out: | 201 | out: |
205 | mutex_unlock(&root->d_inode->i_mutex); | 202 | mutex_unlock(&root->d_inode->i_mutex); |
206 | return rc; | 203 | return rc; |
@@ -369,8 +366,6 @@ static int new_pts_mount(struct file_system_type *fs_type, int flags, | |||
369 | struct pts_fs_info *fsi; | 366 | struct pts_fs_info *fsi; |
370 | struct pts_mount_opts *opts; | 367 | struct pts_mount_opts *opts; |
371 | 368 | ||
372 | printk(KERN_NOTICE "devpts: newinstance mount\n"); | ||
373 | |||
374 | err = get_sb_nodev(fs_type, flags, data, devpts_fill_super, mnt); | 369 | err = get_sb_nodev(fs_type, flags, data, devpts_fill_super, mnt); |
375 | if (err) | 370 | if (err) |
376 | return err; | 371 | return err; |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 384b38d3e8e2..161042746afc 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
@@ -234,7 +234,6 @@ struct cpufreq_driver { | |||
234 | int (*suspend) (struct cpufreq_policy *policy, pm_message_t pmsg); | 234 | int (*suspend) (struct cpufreq_policy *policy, pm_message_t pmsg); |
235 | int (*resume) (struct cpufreq_policy *policy); | 235 | int (*resume) (struct cpufreq_policy *policy); |
236 | struct freq_attr **attr; | 236 | struct freq_attr **attr; |
237 | bool hide_interface; | ||
238 | }; | 237 | }; |
239 | 238 | ||
240 | /* flags */ | 239 | /* flags */ |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index ec54785d34f9..659366734f3f 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -1079,6 +1079,7 @@ extern void synchronize_net(void); | |||
1079 | extern int register_netdevice_notifier(struct notifier_block *nb); | 1079 | extern int register_netdevice_notifier(struct notifier_block *nb); |
1080 | extern int unregister_netdevice_notifier(struct notifier_block *nb); | 1080 | extern int unregister_netdevice_notifier(struct notifier_block *nb); |
1081 | extern int init_dummy_netdev(struct net_device *dev); | 1081 | extern int init_dummy_netdev(struct net_device *dev); |
1082 | extern void netdev_resync_ops(struct net_device *dev); | ||
1082 | 1083 | ||
1083 | extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev); | 1084 | extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev); |
1084 | extern struct net_device *dev_get_by_index(struct net *net, int ifindex); | 1085 | extern struct net_device *dev_get_by_index(struct net *net, int ifindex); |
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index 6fc13d905c5f..ded434b032a4 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h | |||
@@ -109,11 +109,6 @@ extern struct list_head net_namespace_list; | |||
109 | #ifdef CONFIG_NET_NS | 109 | #ifdef CONFIG_NET_NS |
110 | extern void __put_net(struct net *net); | 110 | extern void __put_net(struct net *net); |
111 | 111 | ||
112 | static inline int net_alive(struct net *net) | ||
113 | { | ||
114 | return net && atomic_read(&net->count); | ||
115 | } | ||
116 | |||
117 | static inline struct net *get_net(struct net *net) | 112 | static inline struct net *get_net(struct net *net) |
118 | { | 113 | { |
119 | atomic_inc(&net->count); | 114 | atomic_inc(&net->count); |
@@ -145,11 +140,6 @@ int net_eq(const struct net *net1, const struct net *net2) | |||
145 | } | 140 | } |
146 | #else | 141 | #else |
147 | 142 | ||
148 | static inline int net_alive(struct net *net) | ||
149 | { | ||
150 | return 1; | ||
151 | } | ||
152 | |||
153 | static inline struct net *get_net(struct net *net) | 143 | static inline struct net *get_net(struct net *net) |
154 | { | 144 | { |
155 | return net; | 145 | return net; |
@@ -234,6 +224,23 @@ struct pernet_operations { | |||
234 | void (*exit)(struct net *net); | 224 | void (*exit)(struct net *net); |
235 | }; | 225 | }; |
236 | 226 | ||
227 | /* | ||
228 | * Use these carefully. If you implement a network device and it | ||
229 | * needs per network namespace operations use device pernet operations, | ||
230 | * otherwise use pernet subsys operations. | ||
231 | * | ||
232 | * This is critically important. Most of the network code cleanup | ||
233 | * runs with the assumption that dev_remove_pack has been called so no | ||
234 | * new packets will arrive during and after the cleanup functions have | ||
235 | * been called. dev_remove_pack is not per namespace so instead the | ||
236 | * guarantee of no more packets arriving in a network namespace is | ||
237 | * provided by ensuring that all network devices and all sockets have | ||
238 | * left the network namespace before the cleanup methods are called. | ||
239 | * | ||
240 | * For the longest time the ipv4 icmp code was registered as a pernet | ||
241 | * device which caused kernel oops, and panics during network | ||
242 | * namespace cleanup. So please don't get this wrong. | ||
243 | */ | ||
237 | extern int register_pernet_subsys(struct pernet_operations *); | 244 | extern int register_pernet_subsys(struct pernet_operations *); |
238 | extern void unregister_pernet_subsys(struct pernet_operations *); | 245 | extern void unregister_pernet_subsys(struct pernet_operations *); |
239 | extern int register_pernet_gen_subsys(int *id, struct pernet_operations *); | 246 | extern int register_pernet_gen_subsys(int *id, struct pernet_operations *); |
diff --git a/init/Kconfig b/init/Kconfig index 95a66131403a..38396ec7ee36 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -735,6 +735,9 @@ config CC_OPTIMIZE_FOR_SIZE | |||
735 | config SYSCTL | 735 | config SYSCTL |
736 | bool | 736 | bool |
737 | 737 | ||
738 | config ANON_INODES | ||
739 | bool | ||
740 | |||
738 | menuconfig EMBEDDED | 741 | menuconfig EMBEDDED |
739 | bool "Configure standard kernel features (for small systems)" | 742 | bool "Configure standard kernel features (for small systems)" |
740 | help | 743 | help |
@@ -840,18 +843,6 @@ config PCSPKR_PLATFORM | |||
840 | This option allows to disable the internal PC-Speaker | 843 | This option allows to disable the internal PC-Speaker |
841 | support, saving some memory. | 844 | support, saving some memory. |
842 | 845 | ||
843 | config COMPAT_BRK | ||
844 | bool "Disable heap randomization" | ||
845 | default y | ||
846 | help | ||
847 | Randomizing heap placement makes heap exploits harder, but it | ||
848 | also breaks ancient binaries (including anything libc5 based). | ||
849 | This option changes the bootup default to heap randomization | ||
850 | disabled, and can be overriden runtime by setting | ||
851 | /proc/sys/kernel/randomize_va_space to 2. | ||
852 | |||
853 | On non-ancient distros (post-2000 ones) N is usually a safe choice. | ||
854 | |||
855 | config BASE_FULL | 846 | config BASE_FULL |
856 | default y | 847 | default y |
857 | bool "Enable full-sized data structures for core" if EMBEDDED | 848 | bool "Enable full-sized data structures for core" if EMBEDDED |
@@ -869,9 +860,6 @@ config FUTEX | |||
869 | support for "fast userspace mutexes". The resulting kernel may not | 860 | support for "fast userspace mutexes". The resulting kernel may not |
870 | run glibc-based applications correctly. | 861 | run glibc-based applications correctly. |
871 | 862 | ||
872 | config ANON_INODES | ||
873 | bool | ||
874 | |||
875 | config EPOLL | 863 | config EPOLL |
876 | bool "Enable eventpoll support" if EMBEDDED | 864 | bool "Enable eventpoll support" if EMBEDDED |
877 | default y | 865 | default y |
@@ -957,6 +945,18 @@ config SLUB_DEBUG | |||
957 | SLUB sysfs support. /sys/slab will not exist and there will be | 945 | SLUB sysfs support. /sys/slab will not exist and there will be |
958 | no support for cache validation etc. | 946 | no support for cache validation etc. |
959 | 947 | ||
948 | config COMPAT_BRK | ||
949 | bool "Disable heap randomization" | ||
950 | default y | ||
951 | help | ||
952 | Randomizing heap placement makes heap exploits harder, but it | ||
953 | also breaks ancient binaries (including anything libc5 based). | ||
954 | This option changes the bootup default to heap randomization | ||
955 | disabled, and can be overriden runtime by setting | ||
956 | /proc/sys/kernel/randomize_va_space to 2. | ||
957 | |||
958 | On non-ancient distros (post-2000 ones) N is usually a safe choice. | ||
959 | |||
960 | choice | 960 | choice |
961 | prompt "Choose SLAB allocator" | 961 | prompt "Choose SLAB allocator" |
962 | default SLUB | 962 | default SLUB |
diff --git a/kernel/fork.c b/kernel/fork.c index 8de303bdd4e5..6715ebc3761d 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -1184,10 +1184,6 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1184 | #endif | 1184 | #endif |
1185 | clear_all_latency_tracing(p); | 1185 | clear_all_latency_tracing(p); |
1186 | 1186 | ||
1187 | /* Our parent execution domain becomes current domain | ||
1188 | These must match for thread signalling to apply */ | ||
1189 | p->parent_exec_id = p->self_exec_id; | ||
1190 | |||
1191 | /* ok, now we should be set up.. */ | 1187 | /* ok, now we should be set up.. */ |
1192 | p->exit_signal = (clone_flags & CLONE_THREAD) ? -1 : (clone_flags & CSIGNAL); | 1188 | p->exit_signal = (clone_flags & CLONE_THREAD) ? -1 : (clone_flags & CSIGNAL); |
1193 | p->pdeath_signal = 0; | 1189 | p->pdeath_signal = 0; |
@@ -1225,10 +1221,13 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1225 | set_task_cpu(p, smp_processor_id()); | 1221 | set_task_cpu(p, smp_processor_id()); |
1226 | 1222 | ||
1227 | /* CLONE_PARENT re-uses the old parent */ | 1223 | /* CLONE_PARENT re-uses the old parent */ |
1228 | if (clone_flags & (CLONE_PARENT|CLONE_THREAD)) | 1224 | if (clone_flags & (CLONE_PARENT|CLONE_THREAD)) { |
1229 | p->real_parent = current->real_parent; | 1225 | p->real_parent = current->real_parent; |
1230 | else | 1226 | p->parent_exec_id = current->parent_exec_id; |
1227 | } else { | ||
1231 | p->real_parent = current; | 1228 | p->real_parent = current; |
1229 | p->parent_exec_id = current->self_exec_id; | ||
1230 | } | ||
1232 | 1231 | ||
1233 | spin_lock(¤t->sighand->siglock); | 1232 | spin_lock(¤t->sighand->siglock); |
1234 | 1233 | ||
diff --git a/kernel/tsacct.c b/kernel/tsacct.c index 43f891b05a4b..00d59d048edf 100644 --- a/kernel/tsacct.c +++ b/kernel/tsacct.c | |||
@@ -122,8 +122,10 @@ void acct_update_integrals(struct task_struct *tsk) | |||
122 | if (likely(tsk->mm)) { | 122 | if (likely(tsk->mm)) { |
123 | cputime_t time, dtime; | 123 | cputime_t time, dtime; |
124 | struct timeval value; | 124 | struct timeval value; |
125 | unsigned long flags; | ||
125 | u64 delta; | 126 | u64 delta; |
126 | 127 | ||
128 | local_irq_save(flags); | ||
127 | time = tsk->stime + tsk->utime; | 129 | time = tsk->stime + tsk->utime; |
128 | dtime = cputime_sub(time, tsk->acct_timexpd); | 130 | dtime = cputime_sub(time, tsk->acct_timexpd); |
129 | jiffies_to_timeval(cputime_to_jiffies(dtime), &value); | 131 | jiffies_to_timeval(cputime_to_jiffies(dtime), &value); |
@@ -131,10 +133,12 @@ void acct_update_integrals(struct task_struct *tsk) | |||
131 | delta = delta * USEC_PER_SEC + value.tv_usec; | 133 | delta = delta * USEC_PER_SEC + value.tv_usec; |
132 | 134 | ||
133 | if (delta == 0) | 135 | if (delta == 0) |
134 | return; | 136 | goto out; |
135 | tsk->acct_timexpd = time; | 137 | tsk->acct_timexpd = time; |
136 | tsk->acct_rss_mem1 += delta * get_mm_rss(tsk->mm); | 138 | tsk->acct_rss_mem1 += delta * get_mm_rss(tsk->mm); |
137 | tsk->acct_vm_mem1 += delta * tsk->mm->total_vm; | 139 | tsk->acct_vm_mem1 += delta * tsk->mm->total_vm; |
140 | out: | ||
141 | local_irq_restore(flags); | ||
138 | } | 142 | } |
139 | } | 143 | } |
140 | 144 | ||
diff --git a/kernel/user.c b/kernel/user.c index 6a9b696128c8..fbb300e6191f 100644 --- a/kernel/user.c +++ b/kernel/user.c | |||
@@ -286,14 +286,12 @@ int __init uids_sysfs_init(void) | |||
286 | /* work function to remove sysfs directory for a user and free up | 286 | /* work function to remove sysfs directory for a user and free up |
287 | * corresponding structures. | 287 | * corresponding structures. |
288 | */ | 288 | */ |
289 | static void remove_user_sysfs_dir(struct work_struct *w) | 289 | static void cleanup_user_struct(struct work_struct *w) |
290 | { | 290 | { |
291 | struct user_struct *up = container_of(w, struct user_struct, work); | 291 | struct user_struct *up = container_of(w, struct user_struct, work); |
292 | unsigned long flags; | 292 | unsigned long flags; |
293 | int remove_user = 0; | 293 | int remove_user = 0; |
294 | 294 | ||
295 | if (up->user_ns != &init_user_ns) | ||
296 | return; | ||
297 | /* Make uid_hash_remove() + sysfs_remove_file() + kobject_del() | 295 | /* Make uid_hash_remove() + sysfs_remove_file() + kobject_del() |
298 | * atomic. | 296 | * atomic. |
299 | */ | 297 | */ |
@@ -312,9 +310,11 @@ static void remove_user_sysfs_dir(struct work_struct *w) | |||
312 | if (!remove_user) | 310 | if (!remove_user) |
313 | goto done; | 311 | goto done; |
314 | 312 | ||
315 | kobject_uevent(&up->kobj, KOBJ_REMOVE); | 313 | if (up->user_ns == &init_user_ns) { |
316 | kobject_del(&up->kobj); | 314 | kobject_uevent(&up->kobj, KOBJ_REMOVE); |
317 | kobject_put(&up->kobj); | 315 | kobject_del(&up->kobj); |
316 | kobject_put(&up->kobj); | ||
317 | } | ||
318 | 318 | ||
319 | sched_destroy_user(up); | 319 | sched_destroy_user(up); |
320 | key_put(up->uid_keyring); | 320 | key_put(up->uid_keyring); |
@@ -335,7 +335,7 @@ static void free_user(struct user_struct *up, unsigned long flags) | |||
335 | atomic_inc(&up->__count); | 335 | atomic_inc(&up->__count); |
336 | spin_unlock_irqrestore(&uidhash_lock, flags); | 336 | spin_unlock_irqrestore(&uidhash_lock, flags); |
337 | 337 | ||
338 | INIT_WORK(&up->work, remove_user_sysfs_dir); | 338 | INIT_WORK(&up->work, cleanup_user_struct); |
339 | schedule_work(&up->work); | 339 | schedule_work(&up->work); |
340 | } | 340 | } |
341 | 341 | ||
@@ -449,6 +449,7 @@ void idr_remove_all(struct idr *idp) | |||
449 | 449 | ||
450 | n = idp->layers * IDR_BITS; | 450 | n = idp->layers * IDR_BITS; |
451 | p = idp->top; | 451 | p = idp->top; |
452 | rcu_assign_pointer(idp->top, NULL); | ||
452 | max = 1 << n; | 453 | max = 1 << n; |
453 | 454 | ||
454 | id = 0; | 455 | id = 0; |
@@ -467,7 +468,6 @@ void idr_remove_all(struct idr *idp) | |||
467 | p = *--paa; | 468 | p = *--paa; |
468 | } | 469 | } |
469 | } | 470 | } |
470 | rcu_assign_pointer(idp->top, NULL); | ||
471 | idp->layers = 0; | 471 | idp->layers = 0; |
472 | } | 472 | } |
473 | EXPORT_SYMBOL(idr_remove_all); | 473 | EXPORT_SYMBOL(idr_remove_all); |
diff --git a/net/802/tr.c b/net/802/tr.c index 158150fee462..f47ae289d83b 100644 --- a/net/802/tr.c +++ b/net/802/tr.c | |||
@@ -668,3 +668,5 @@ module_init(rif_init); | |||
668 | 668 | ||
669 | EXPORT_SYMBOL(tr_type_trans); | 669 | EXPORT_SYMBOL(tr_type_trans); |
670 | EXPORT_SYMBOL(alloc_trdev); | 670 | EXPORT_SYMBOL(alloc_trdev); |
671 | |||
672 | MODULE_LICENSE("GPL"); | ||
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index 4a19acd3a32b..1b34135cf990 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c | |||
@@ -553,7 +553,7 @@ static int vlan_dev_neigh_setup(struct net_device *dev, struct neigh_parms *pa) | |||
553 | int err = 0; | 553 | int err = 0; |
554 | 554 | ||
555 | if (netif_device_present(real_dev) && ops->ndo_neigh_setup) | 555 | if (netif_device_present(real_dev) && ops->ndo_neigh_setup) |
556 | err = ops->ndo_neigh_setup(dev, pa); | 556 | err = ops->ndo_neigh_setup(real_dev, pa); |
557 | 557 | ||
558 | return err; | 558 | return err; |
559 | } | 559 | } |
@@ -639,6 +639,7 @@ static int vlan_dev_init(struct net_device *dev) | |||
639 | dev->hard_header_len = real_dev->hard_header_len + VLAN_HLEN; | 639 | dev->hard_header_len = real_dev->hard_header_len + VLAN_HLEN; |
640 | dev->netdev_ops = &vlan_netdev_ops; | 640 | dev->netdev_ops = &vlan_netdev_ops; |
641 | } | 641 | } |
642 | netdev_resync_ops(dev); | ||
642 | 643 | ||
643 | if (is_vlan_dev(real_dev)) | 644 | if (is_vlan_dev(real_dev)) |
644 | subclass = 1; | 645 | subclass = 1; |
diff --git a/net/core/dev.c b/net/core/dev.c index 72b0d26fd46d..f1129706ce7b 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -2267,12 +2267,6 @@ int netif_receive_skb(struct sk_buff *skb) | |||
2267 | 2267 | ||
2268 | rcu_read_lock(); | 2268 | rcu_read_lock(); |
2269 | 2269 | ||
2270 | /* Don't receive packets in an exiting network namespace */ | ||
2271 | if (!net_alive(dev_net(skb->dev))) { | ||
2272 | kfree_skb(skb); | ||
2273 | goto out; | ||
2274 | } | ||
2275 | |||
2276 | #ifdef CONFIG_NET_CLS_ACT | 2270 | #ifdef CONFIG_NET_CLS_ACT |
2277 | if (skb->tc_verd & TC_NCLS) { | 2271 | if (skb->tc_verd & TC_NCLS) { |
2278 | skb->tc_verd = CLR_TC_NCLS(skb->tc_verd); | 2272 | skb->tc_verd = CLR_TC_NCLS(skb->tc_verd); |
@@ -4288,6 +4282,39 @@ unsigned long netdev_fix_features(unsigned long features, const char *name) | |||
4288 | } | 4282 | } |
4289 | EXPORT_SYMBOL(netdev_fix_features); | 4283 | EXPORT_SYMBOL(netdev_fix_features); |
4290 | 4284 | ||
4285 | /* Some devices need to (re-)set their netdev_ops inside | ||
4286 | * ->init() or similar. If that happens, we have to setup | ||
4287 | * the compat pointers again. | ||
4288 | */ | ||
4289 | void netdev_resync_ops(struct net_device *dev) | ||
4290 | { | ||
4291 | #ifdef CONFIG_COMPAT_NET_DEV_OPS | ||
4292 | const struct net_device_ops *ops = dev->netdev_ops; | ||
4293 | |||
4294 | dev->init = ops->ndo_init; | ||
4295 | dev->uninit = ops->ndo_uninit; | ||
4296 | dev->open = ops->ndo_open; | ||
4297 | dev->change_rx_flags = ops->ndo_change_rx_flags; | ||
4298 | dev->set_rx_mode = ops->ndo_set_rx_mode; | ||
4299 | dev->set_multicast_list = ops->ndo_set_multicast_list; | ||
4300 | dev->set_mac_address = ops->ndo_set_mac_address; | ||
4301 | dev->validate_addr = ops->ndo_validate_addr; | ||
4302 | dev->do_ioctl = ops->ndo_do_ioctl; | ||
4303 | dev->set_config = ops->ndo_set_config; | ||
4304 | dev->change_mtu = ops->ndo_change_mtu; | ||
4305 | dev->neigh_setup = ops->ndo_neigh_setup; | ||
4306 | dev->tx_timeout = ops->ndo_tx_timeout; | ||
4307 | dev->get_stats = ops->ndo_get_stats; | ||
4308 | dev->vlan_rx_register = ops->ndo_vlan_rx_register; | ||
4309 | dev->vlan_rx_add_vid = ops->ndo_vlan_rx_add_vid; | ||
4310 | dev->vlan_rx_kill_vid = ops->ndo_vlan_rx_kill_vid; | ||
4311 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
4312 | dev->poll_controller = ops->ndo_poll_controller; | ||
4313 | #endif | ||
4314 | #endif | ||
4315 | } | ||
4316 | EXPORT_SYMBOL(netdev_resync_ops); | ||
4317 | |||
4291 | /** | 4318 | /** |
4292 | * register_netdevice - register a network device | 4319 | * register_netdevice - register a network device |
4293 | * @dev: device to register | 4320 | * @dev: device to register |
@@ -4332,27 +4359,7 @@ int register_netdevice(struct net_device *dev) | |||
4332 | * This is temporary until all network devices are converted. | 4359 | * This is temporary until all network devices are converted. |
4333 | */ | 4360 | */ |
4334 | if (dev->netdev_ops) { | 4361 | if (dev->netdev_ops) { |
4335 | const struct net_device_ops *ops = dev->netdev_ops; | 4362 | netdev_resync_ops(dev); |
4336 | |||
4337 | dev->init = ops->ndo_init; | ||
4338 | dev->uninit = ops->ndo_uninit; | ||
4339 | dev->open = ops->ndo_open; | ||
4340 | dev->change_rx_flags = ops->ndo_change_rx_flags; | ||
4341 | dev->set_rx_mode = ops->ndo_set_rx_mode; | ||
4342 | dev->set_multicast_list = ops->ndo_set_multicast_list; | ||
4343 | dev->set_mac_address = ops->ndo_set_mac_address; | ||
4344 | dev->validate_addr = ops->ndo_validate_addr; | ||
4345 | dev->do_ioctl = ops->ndo_do_ioctl; | ||
4346 | dev->set_config = ops->ndo_set_config; | ||
4347 | dev->change_mtu = ops->ndo_change_mtu; | ||
4348 | dev->tx_timeout = ops->ndo_tx_timeout; | ||
4349 | dev->get_stats = ops->ndo_get_stats; | ||
4350 | dev->vlan_rx_register = ops->ndo_vlan_rx_register; | ||
4351 | dev->vlan_rx_add_vid = ops->ndo_vlan_rx_add_vid; | ||
4352 | dev->vlan_rx_kill_vid = ops->ndo_vlan_rx_kill_vid; | ||
4353 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
4354 | dev->poll_controller = ops->ndo_poll_controller; | ||
4355 | #endif | ||
4356 | } else { | 4363 | } else { |
4357 | char drivername[64]; | 4364 | char drivername[64]; |
4358 | pr_info("%s (%s): not using net_device_ops yet\n", | 4365 | pr_info("%s (%s): not using net_device_ops yet\n", |
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 6ac29a46e23e..484f58750eba 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c | |||
@@ -77,7 +77,9 @@ static ssize_t netdev_store(struct device *dev, struct device_attribute *attr, | |||
77 | if (endp == buf) | 77 | if (endp == buf) |
78 | goto err; | 78 | goto err; |
79 | 79 | ||
80 | rtnl_lock(); | 80 | if (!rtnl_trylock()) |
81 | return -ERESTARTSYS; | ||
82 | |||
81 | if (dev_isalive(net)) { | 83 | if (dev_isalive(net)) { |
82 | if ((ret = (*set)(net, new)) == 0) | 84 | if ((ret = (*set)(net, new)) == 0) |
83 | ret = len; | 85 | ret = len; |
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index 2adb1a7d361f..e3bebd36f053 100644 --- a/net/core/net_namespace.c +++ b/net/core/net_namespace.c | |||
@@ -157,9 +157,6 @@ static void cleanup_net(struct work_struct *work) | |||
157 | struct pernet_operations *ops; | 157 | struct pernet_operations *ops; |
158 | struct net *net; | 158 | struct net *net; |
159 | 159 | ||
160 | /* Be very certain incoming network packets will not find us */ | ||
161 | rcu_barrier(); | ||
162 | |||
163 | net = container_of(work, struct net, work); | 160 | net = container_of(work, struct net, work); |
164 | 161 | ||
165 | mutex_lock(&net_mutex); | 162 | mutex_lock(&net_mutex); |
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index 705b33b184a3..fc562d29cc46 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c | |||
@@ -1205,7 +1205,7 @@ static struct pernet_operations __net_initdata icmp_sk_ops = { | |||
1205 | 1205 | ||
1206 | int __init icmp_init(void) | 1206 | int __init icmp_init(void) |
1207 | { | 1207 | { |
1208 | return register_pernet_device(&icmp_sk_ops); | 1208 | return register_pernet_subsys(&icmp_sk_ops); |
1209 | } | 1209 | } |
1210 | 1210 | ||
1211 | EXPORT_SYMBOL(icmp_err_convert); | 1211 | EXPORT_SYMBOL(icmp_err_convert); |
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 19d7b429a262..cf74c416831a 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -2443,7 +2443,7 @@ static struct pernet_operations __net_initdata tcp_sk_ops = { | |||
2443 | void __init tcp_v4_init(void) | 2443 | void __init tcp_v4_init(void) |
2444 | { | 2444 | { |
2445 | inet_hashinfo_init(&tcp_hashinfo); | 2445 | inet_hashinfo_init(&tcp_hashinfo); |
2446 | if (register_pernet_device(&tcp_sk_ops)) | 2446 | if (register_pernet_subsys(&tcp_sk_ops)) |
2447 | panic("Failed to create the TCP control socket.\n"); | 2447 | panic("Failed to create the TCP control socket.\n"); |
2448 | } | 2448 | } |
2449 | 2449 | ||
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index f9afb452249c..1220e2c7831e 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -493,15 +493,17 @@ static void addrconf_forward_change(struct net *net, __s32 newf) | |||
493 | read_unlock(&dev_base_lock); | 493 | read_unlock(&dev_base_lock); |
494 | } | 494 | } |
495 | 495 | ||
496 | static void addrconf_fixup_forwarding(struct ctl_table *table, int *p, int old) | 496 | static int addrconf_fixup_forwarding(struct ctl_table *table, int *p, int old) |
497 | { | 497 | { |
498 | struct net *net; | 498 | struct net *net; |
499 | 499 | ||
500 | net = (struct net *)table->extra2; | 500 | net = (struct net *)table->extra2; |
501 | if (p == &net->ipv6.devconf_dflt->forwarding) | 501 | if (p == &net->ipv6.devconf_dflt->forwarding) |
502 | return; | 502 | return 0; |
503 | |||
504 | if (!rtnl_trylock()) | ||
505 | return -ERESTARTSYS; | ||
503 | 506 | ||
504 | rtnl_lock(); | ||
505 | if (p == &net->ipv6.devconf_all->forwarding) { | 507 | if (p == &net->ipv6.devconf_all->forwarding) { |
506 | __s32 newf = net->ipv6.devconf_all->forwarding; | 508 | __s32 newf = net->ipv6.devconf_all->forwarding; |
507 | net->ipv6.devconf_dflt->forwarding = newf; | 509 | net->ipv6.devconf_dflt->forwarding = newf; |
@@ -512,6 +514,7 @@ static void addrconf_fixup_forwarding(struct ctl_table *table, int *p, int old) | |||
512 | 514 | ||
513 | if (*p) | 515 | if (*p) |
514 | rt6_purge_dflt_routers(net); | 516 | rt6_purge_dflt_routers(net); |
517 | return 1; | ||
515 | } | 518 | } |
516 | #endif | 519 | #endif |
517 | 520 | ||
@@ -2608,9 +2611,6 @@ static int addrconf_ifdown(struct net_device *dev, int how) | |||
2608 | 2611 | ||
2609 | ASSERT_RTNL(); | 2612 | ASSERT_RTNL(); |
2610 | 2613 | ||
2611 | if ((dev->flags & IFF_LOOPBACK) && how == 1) | ||
2612 | how = 0; | ||
2613 | |||
2614 | rt6_ifdown(net, dev); | 2614 | rt6_ifdown(net, dev); |
2615 | neigh_ifdown(&nd_tbl, dev); | 2615 | neigh_ifdown(&nd_tbl, dev); |
2616 | 2616 | ||
@@ -3983,7 +3983,7 @@ int addrconf_sysctl_forward(ctl_table *ctl, int write, struct file * filp, | |||
3983 | ret = proc_dointvec(ctl, write, filp, buffer, lenp, ppos); | 3983 | ret = proc_dointvec(ctl, write, filp, buffer, lenp, ppos); |
3984 | 3984 | ||
3985 | if (write) | 3985 | if (write) |
3986 | addrconf_fixup_forwarding(ctl, valp, val); | 3986 | ret = addrconf_fixup_forwarding(ctl, valp, val); |
3987 | return ret; | 3987 | return ret; |
3988 | } | 3988 | } |
3989 | 3989 | ||
@@ -4019,8 +4019,7 @@ static int addrconf_sysctl_forward_strategy(ctl_table *table, | |||
4019 | } | 4019 | } |
4020 | 4020 | ||
4021 | *valp = new; | 4021 | *valp = new; |
4022 | addrconf_fixup_forwarding(table, valp, val); | 4022 | return addrconf_fixup_forwarding(table, valp, val); |
4023 | return 1; | ||
4024 | } | 4023 | } |
4025 | 4024 | ||
4026 | static struct addrconf_sysctl_table | 4025 | static struct addrconf_sysctl_table |
@@ -4446,25 +4445,6 @@ int unregister_inet6addr_notifier(struct notifier_block *nb) | |||
4446 | 4445 | ||
4447 | EXPORT_SYMBOL(unregister_inet6addr_notifier); | 4446 | EXPORT_SYMBOL(unregister_inet6addr_notifier); |
4448 | 4447 | ||
4449 | static void addrconf_net_exit(struct net *net) | ||
4450 | { | ||
4451 | struct net_device *dev; | ||
4452 | |||
4453 | rtnl_lock(); | ||
4454 | /* clean dev list */ | ||
4455 | for_each_netdev(net, dev) { | ||
4456 | if (__in6_dev_get(dev) == NULL) | ||
4457 | continue; | ||
4458 | addrconf_ifdown(dev, 1); | ||
4459 | } | ||
4460 | addrconf_ifdown(net->loopback_dev, 2); | ||
4461 | rtnl_unlock(); | ||
4462 | } | ||
4463 | |||
4464 | static struct pernet_operations addrconf_net_ops = { | ||
4465 | .exit = addrconf_net_exit, | ||
4466 | }; | ||
4467 | |||
4468 | /* | 4448 | /* |
4469 | * Init / cleanup code | 4449 | * Init / cleanup code |
4470 | */ | 4450 | */ |
@@ -4506,10 +4486,6 @@ int __init addrconf_init(void) | |||
4506 | if (err) | 4486 | if (err) |
4507 | goto errlo; | 4487 | goto errlo; |
4508 | 4488 | ||
4509 | err = register_pernet_device(&addrconf_net_ops); | ||
4510 | if (err) | ||
4511 | return err; | ||
4512 | |||
4513 | register_netdevice_notifier(&ipv6_dev_notf); | 4489 | register_netdevice_notifier(&ipv6_dev_notf); |
4514 | 4490 | ||
4515 | addrconf_verify(0); | 4491 | addrconf_verify(0); |
@@ -4539,15 +4515,22 @@ errlo: | |||
4539 | void addrconf_cleanup(void) | 4515 | void addrconf_cleanup(void) |
4540 | { | 4516 | { |
4541 | struct inet6_ifaddr *ifa; | 4517 | struct inet6_ifaddr *ifa; |
4518 | struct net_device *dev; | ||
4542 | int i; | 4519 | int i; |
4543 | 4520 | ||
4544 | unregister_netdevice_notifier(&ipv6_dev_notf); | 4521 | unregister_netdevice_notifier(&ipv6_dev_notf); |
4545 | unregister_pernet_device(&addrconf_net_ops); | ||
4546 | |||
4547 | unregister_pernet_subsys(&addrconf_ops); | 4522 | unregister_pernet_subsys(&addrconf_ops); |
4548 | 4523 | ||
4549 | rtnl_lock(); | 4524 | rtnl_lock(); |
4550 | 4525 | ||
4526 | /* clean dev list */ | ||
4527 | for_each_netdev(&init_net, dev) { | ||
4528 | if (__in6_dev_get(dev) == NULL) | ||
4529 | continue; | ||
4530 | addrconf_ifdown(dev, 1); | ||
4531 | } | ||
4532 | addrconf_ifdown(init_net.loopback_dev, 2); | ||
4533 | |||
4551 | /* | 4534 | /* |
4552 | * Check hash table. | 4535 | * Check hash table. |
4553 | */ | 4536 | */ |
@@ -4568,6 +4551,4 @@ void addrconf_cleanup(void) | |||
4568 | 4551 | ||
4569 | del_timer(&addr_chk_timer); | 4552 | del_timer(&addr_chk_timer); |
4570 | rtnl_unlock(); | 4553 | rtnl_unlock(); |
4571 | |||
4572 | unregister_pernet_subsys(&addrconf_net_ops); | ||
4573 | } | 4554 | } |
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index c802bc1658a8..da944eca2ca6 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
@@ -72,6 +72,10 @@ MODULE_LICENSE("GPL"); | |||
72 | static struct list_head inetsw6[SOCK_MAX]; | 72 | static struct list_head inetsw6[SOCK_MAX]; |
73 | static DEFINE_SPINLOCK(inetsw6_lock); | 73 | static DEFINE_SPINLOCK(inetsw6_lock); |
74 | 74 | ||
75 | static int disable_ipv6 = 0; | ||
76 | module_param_named(disable, disable_ipv6, int, 0); | ||
77 | MODULE_PARM_DESC(disable, "Disable IPv6 such that it is non-functional"); | ||
78 | |||
75 | static __inline__ struct ipv6_pinfo *inet6_sk_generic(struct sock *sk) | 79 | static __inline__ struct ipv6_pinfo *inet6_sk_generic(struct sock *sk) |
76 | { | 80 | { |
77 | const int offset = sk->sk_prot->obj_size - sizeof(struct ipv6_pinfo); | 81 | const int offset = sk->sk_prot->obj_size - sizeof(struct ipv6_pinfo); |
@@ -991,10 +995,21 @@ static int __init inet6_init(void) | |||
991 | { | 995 | { |
992 | struct sk_buff *dummy_skb; | 996 | struct sk_buff *dummy_skb; |
993 | struct list_head *r; | 997 | struct list_head *r; |
994 | int err; | 998 | int err = 0; |
995 | 999 | ||
996 | BUILD_BUG_ON(sizeof(struct inet6_skb_parm) > sizeof(dummy_skb->cb)); | 1000 | BUILD_BUG_ON(sizeof(struct inet6_skb_parm) > sizeof(dummy_skb->cb)); |
997 | 1001 | ||
1002 | /* Register the socket-side information for inet6_create. */ | ||
1003 | for(r = &inetsw6[0]; r < &inetsw6[SOCK_MAX]; ++r) | ||
1004 | INIT_LIST_HEAD(r); | ||
1005 | |||
1006 | if (disable_ipv6) { | ||
1007 | printk(KERN_INFO | ||
1008 | "IPv6: Loaded, but administratively disabled, " | ||
1009 | "reboot required to enable\n"); | ||
1010 | goto out; | ||
1011 | } | ||
1012 | |||
998 | err = proto_register(&tcpv6_prot, 1); | 1013 | err = proto_register(&tcpv6_prot, 1); |
999 | if (err) | 1014 | if (err) |
1000 | goto out; | 1015 | goto out; |
@@ -1012,10 +1027,6 @@ static int __init inet6_init(void) | |||
1012 | goto out_unregister_udplite_proto; | 1027 | goto out_unregister_udplite_proto; |
1013 | 1028 | ||
1014 | 1029 | ||
1015 | /* Register the socket-side information for inet6_create. */ | ||
1016 | for(r = &inetsw6[0]; r < &inetsw6[SOCK_MAX]; ++r) | ||
1017 | INIT_LIST_HEAD(r); | ||
1018 | |||
1019 | /* We MUST register RAW sockets before we create the ICMP6, | 1030 | /* We MUST register RAW sockets before we create the ICMP6, |
1020 | * IGMP6, or NDISC control sockets. | 1031 | * IGMP6, or NDISC control sockets. |
1021 | */ | 1032 | */ |
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 9eb895c7a2a9..3ae3cb816563 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c | |||
@@ -1084,6 +1084,13 @@ out: | |||
1084 | return 0; | 1084 | return 0; |
1085 | } | 1085 | } |
1086 | 1086 | ||
1087 | /** | ||
1088 | * netlink_set_err - report error to broadcast listeners | ||
1089 | * @ssk: the kernel netlink socket, as returned by netlink_kernel_create() | ||
1090 | * @pid: the PID of a process that we want to skip (if any) | ||
1091 | * @groups: the broadcast group that will notice the error | ||
1092 | * @code: error code, must be negative (as usual in kernelspace) | ||
1093 | */ | ||
1087 | void netlink_set_err(struct sock *ssk, u32 pid, u32 group, int code) | 1094 | void netlink_set_err(struct sock *ssk, u32 pid, u32 group, int code) |
1088 | { | 1095 | { |
1089 | struct netlink_set_err_data info; | 1096 | struct netlink_set_err_data info; |
@@ -1093,7 +1100,8 @@ void netlink_set_err(struct sock *ssk, u32 pid, u32 group, int code) | |||
1093 | info.exclude_sk = ssk; | 1100 | info.exclude_sk = ssk; |
1094 | info.pid = pid; | 1101 | info.pid = pid; |
1095 | info.group = group; | 1102 | info.group = group; |
1096 | info.code = code; | 1103 | /* sk->sk_err wants a positive error value */ |
1104 | info.code = -code; | ||
1097 | 1105 | ||
1098 | read_lock(&nl_table_lock); | 1106 | read_lock(&nl_table_lock); |
1099 | 1107 | ||
diff --git a/net/sched/act_police.c b/net/sched/act_police.c index 5c72a116b1a4..f8f047b61245 100644 --- a/net/sched/act_police.c +++ b/net/sched/act_police.c | |||
@@ -183,13 +183,6 @@ override: | |||
183 | if (R_tab == NULL) | 183 | if (R_tab == NULL) |
184 | goto failure; | 184 | goto failure; |
185 | 185 | ||
186 | if (!est && (ret == ACT_P_CREATED || | ||
187 | !gen_estimator_active(&police->tcf_bstats, | ||
188 | &police->tcf_rate_est))) { | ||
189 | err = -EINVAL; | ||
190 | goto failure; | ||
191 | } | ||
192 | |||
193 | if (parm->peakrate.rate) { | 186 | if (parm->peakrate.rate) { |
194 | P_tab = qdisc_get_rtab(&parm->peakrate, | 187 | P_tab = qdisc_get_rtab(&parm->peakrate, |
195 | tb[TCA_POLICE_PEAKRATE]); | 188 | tb[TCA_POLICE_PEAKRATE]); |
@@ -205,6 +198,12 @@ override: | |||
205 | &police->tcf_lock, est); | 198 | &police->tcf_lock, est); |
206 | if (err) | 199 | if (err) |
207 | goto failure_unlock; | 200 | goto failure_unlock; |
201 | } else if (tb[TCA_POLICE_AVRATE] && | ||
202 | (ret == ACT_P_CREATED || | ||
203 | !gen_estimator_active(&police->tcf_bstats, | ||
204 | &police->tcf_rate_est))) { | ||
205 | err = -EINVAL; | ||
206 | goto failure_unlock; | ||
208 | } | 207 | } |
209 | 208 | ||
210 | /* No failure allowed after this point */ | 209 | /* No failure allowed after this point */ |
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index b78e3be69013..c4986d0f7419 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c | |||
@@ -717,15 +717,20 @@ static int sctp_inetaddr_event(struct notifier_block *this, unsigned long ev, | |||
717 | static int sctp_ctl_sock_init(void) | 717 | static int sctp_ctl_sock_init(void) |
718 | { | 718 | { |
719 | int err; | 719 | int err; |
720 | sa_family_t family; | 720 | sa_family_t family = PF_INET; |
721 | 721 | ||
722 | if (sctp_get_pf_specific(PF_INET6)) | 722 | if (sctp_get_pf_specific(PF_INET6)) |
723 | family = PF_INET6; | 723 | family = PF_INET6; |
724 | else | ||
725 | family = PF_INET; | ||
726 | 724 | ||
727 | err = inet_ctl_sock_create(&sctp_ctl_sock, family, | 725 | err = inet_ctl_sock_create(&sctp_ctl_sock, family, |
728 | SOCK_SEQPACKET, IPPROTO_SCTP, &init_net); | 726 | SOCK_SEQPACKET, IPPROTO_SCTP, &init_net); |
727 | |||
728 | /* If IPv6 socket could not be created, try the IPv4 socket */ | ||
729 | if (err < 0 && family == PF_INET6) | ||
730 | err = inet_ctl_sock_create(&sctp_ctl_sock, AF_INET, | ||
731 | SOCK_SEQPACKET, IPPROTO_SCTP, | ||
732 | &init_net); | ||
733 | |||
729 | if (err < 0) { | 734 | if (err < 0) { |
730 | printk(KERN_ERR | 735 | printk(KERN_ERR |
731 | "SCTP: Failed to create the SCTP control socket.\n"); | 736 | "SCTP: Failed to create the SCTP control socket.\n"); |
@@ -1322,9 +1327,8 @@ SCTP_STATIC __init int sctp_init(void) | |||
1322 | out: | 1327 | out: |
1323 | return status; | 1328 | return status; |
1324 | err_v6_add_protocol: | 1329 | err_v6_add_protocol: |
1325 | sctp_v6_del_protocol(); | ||
1326 | err_add_protocol: | ||
1327 | sctp_v4_del_protocol(); | 1330 | sctp_v4_del_protocol(); |
1331 | err_add_protocol: | ||
1328 | inet_ctl_sock_destroy(sctp_ctl_sock); | 1332 | inet_ctl_sock_destroy(sctp_ctl_sock); |
1329 | err_ctl_sock_init: | 1333 | err_ctl_sock_init: |
1330 | sctp_v6_protosw_exit(); | 1334 | sctp_v6_protosw_exit(); |
@@ -1335,7 +1339,6 @@ err_protosw_init: | |||
1335 | sctp_v4_pf_exit(); | 1339 | sctp_v4_pf_exit(); |
1336 | sctp_v6_pf_exit(); | 1340 | sctp_v6_pf_exit(); |
1337 | sctp_sysctl_unregister(); | 1341 | sctp_sysctl_unregister(); |
1338 | list_del(&sctp_af_inet.list); | ||
1339 | free_pages((unsigned long)sctp_port_hashtable, | 1342 | free_pages((unsigned long)sctp_port_hashtable, |
1340 | get_order(sctp_port_hashsize * | 1343 | get_order(sctp_port_hashsize * |
1341 | sizeof(struct sctp_bind_hashbucket))); | 1344 | sizeof(struct sctp_bind_hashbucket))); |
@@ -1383,7 +1386,6 @@ SCTP_STATIC __exit void sctp_exit(void) | |||
1383 | sctp_v4_pf_exit(); | 1386 | sctp_v4_pf_exit(); |
1384 | 1387 | ||
1385 | sctp_sysctl_unregister(); | 1388 | sctp_sysctl_unregister(); |
1386 | list_del(&sctp_af_inet.list); | ||
1387 | 1389 | ||
1388 | free_pages((unsigned long)sctp_assoc_hashtable, | 1390 | free_pages((unsigned long)sctp_assoc_hashtable, |
1389 | get_order(sctp_assoc_hashsize * | 1391 | get_order(sctp_assoc_hashsize * |
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c index e1d6076b4f59..b5495aecab60 100644 --- a/net/sctp/sm_sideeffect.c +++ b/net/sctp/sm_sideeffect.c | |||
@@ -787,36 +787,48 @@ static void sctp_cmd_process_operr(sctp_cmd_seq_t *cmds, | |||
787 | struct sctp_association *asoc, | 787 | struct sctp_association *asoc, |
788 | struct sctp_chunk *chunk) | 788 | struct sctp_chunk *chunk) |
789 | { | 789 | { |
790 | struct sctp_operr_chunk *operr_chunk; | ||
791 | struct sctp_errhdr *err_hdr; | 790 | struct sctp_errhdr *err_hdr; |
791 | struct sctp_ulpevent *ev; | ||
792 | 792 | ||
793 | operr_chunk = (struct sctp_operr_chunk *)chunk->chunk_hdr; | 793 | while (chunk->chunk_end > chunk->skb->data) { |
794 | err_hdr = &operr_chunk->err_hdr; | 794 | err_hdr = (struct sctp_errhdr *)(chunk->skb->data); |
795 | 795 | ||
796 | switch (err_hdr->cause) { | 796 | ev = sctp_ulpevent_make_remote_error(asoc, chunk, 0, |
797 | case SCTP_ERROR_UNKNOWN_CHUNK: | 797 | GFP_ATOMIC); |
798 | { | 798 | if (!ev) |
799 | struct sctp_chunkhdr *unk_chunk_hdr; | 799 | return; |
800 | 800 | ||
801 | unk_chunk_hdr = (struct sctp_chunkhdr *)err_hdr->variable; | 801 | sctp_ulpq_tail_event(&asoc->ulpq, ev); |
802 | switch (unk_chunk_hdr->type) { | 802 | |
803 | /* ADDIP 4.1 A9) If the peer responds to an ASCONF with an | 803 | switch (err_hdr->cause) { |
804 | * ERROR chunk reporting that it did not recognized the ASCONF | 804 | case SCTP_ERROR_UNKNOWN_CHUNK: |
805 | * chunk type, the sender of the ASCONF MUST NOT send any | 805 | { |
806 | * further ASCONF chunks and MUST stop its T-4 timer. | 806 | sctp_chunkhdr_t *unk_chunk_hdr; |
807 | */ | 807 | |
808 | case SCTP_CID_ASCONF: | 808 | unk_chunk_hdr = (sctp_chunkhdr_t *)err_hdr->variable; |
809 | asoc->peer.asconf_capable = 0; | 809 | switch (unk_chunk_hdr->type) { |
810 | sctp_add_cmd_sf(cmds, SCTP_CMD_TIMER_STOP, | 810 | /* ADDIP 4.1 A9) If the peer responds to an ASCONF with |
811 | * an ERROR chunk reporting that it did not recognized | ||
812 | * the ASCONF chunk type, the sender of the ASCONF MUST | ||
813 | * NOT send any further ASCONF chunks and MUST stop its | ||
814 | * T-4 timer. | ||
815 | */ | ||
816 | case SCTP_CID_ASCONF: | ||
817 | if (asoc->peer.asconf_capable == 0) | ||
818 | break; | ||
819 | |||
820 | asoc->peer.asconf_capable = 0; | ||
821 | sctp_add_cmd_sf(cmds, SCTP_CMD_TIMER_STOP, | ||
811 | SCTP_TO(SCTP_EVENT_TIMEOUT_T4_RTO)); | 822 | SCTP_TO(SCTP_EVENT_TIMEOUT_T4_RTO)); |
823 | break; | ||
824 | default: | ||
825 | break; | ||
826 | } | ||
812 | break; | 827 | break; |
828 | } | ||
813 | default: | 829 | default: |
814 | break; | 830 | break; |
815 | } | 831 | } |
816 | break; | ||
817 | } | ||
818 | default: | ||
819 | break; | ||
820 | } | 832 | } |
821 | } | 833 | } |
822 | 834 | ||
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index 3a0cd075914f..f88dfded0e3a 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c | |||
@@ -3163,7 +3163,6 @@ sctp_disposition_t sctp_sf_operr_notify(const struct sctp_endpoint *ep, | |||
3163 | sctp_cmd_seq_t *commands) | 3163 | sctp_cmd_seq_t *commands) |
3164 | { | 3164 | { |
3165 | struct sctp_chunk *chunk = arg; | 3165 | struct sctp_chunk *chunk = arg; |
3166 | struct sctp_ulpevent *ev; | ||
3167 | 3166 | ||
3168 | if (!sctp_vtag_verify(chunk, asoc)) | 3167 | if (!sctp_vtag_verify(chunk, asoc)) |
3169 | return sctp_sf_pdiscard(ep, asoc, type, arg, commands); | 3168 | return sctp_sf_pdiscard(ep, asoc, type, arg, commands); |
@@ -3173,21 +3172,10 @@ sctp_disposition_t sctp_sf_operr_notify(const struct sctp_endpoint *ep, | |||
3173 | return sctp_sf_violation_chunklen(ep, asoc, type, arg, | 3172 | return sctp_sf_violation_chunklen(ep, asoc, type, arg, |
3174 | commands); | 3173 | commands); |
3175 | 3174 | ||
3176 | while (chunk->chunk_end > chunk->skb->data) { | 3175 | sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_OPERR, |
3177 | ev = sctp_ulpevent_make_remote_error(asoc, chunk, 0, | 3176 | SCTP_CHUNK(chunk)); |
3178 | GFP_ATOMIC); | ||
3179 | if (!ev) | ||
3180 | goto nomem; | ||
3181 | 3177 | ||
3182 | sctp_add_cmd_sf(commands, SCTP_CMD_EVENT_ULP, | ||
3183 | SCTP_ULPEVENT(ev)); | ||
3184 | sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_OPERR, | ||
3185 | SCTP_CHUNK(chunk)); | ||
3186 | } | ||
3187 | return SCTP_DISPOSITION_CONSUME; | 3178 | return SCTP_DISPOSITION_CONSUME; |
3188 | |||
3189 | nomem: | ||
3190 | return SCTP_DISPOSITION_NOMEM; | ||
3191 | } | 3179 | } |
3192 | 3180 | ||
3193 | /* | 3181 | /* |
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 85c9034c59b2..bd0a16c3de5e 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -380,7 +380,8 @@ static bool is_valid_reg_rule(const struct ieee80211_reg_rule *rule) | |||
380 | 380 | ||
381 | freq_diff = freq_range->end_freq_khz - freq_range->start_freq_khz; | 381 | freq_diff = freq_range->end_freq_khz - freq_range->start_freq_khz; |
382 | 382 | ||
383 | if (freq_diff <= 0 || freq_range->max_bandwidth_khz > freq_diff) | 383 | if (freq_range->end_freq_khz <= freq_range->start_freq_khz || |
384 | freq_range->max_bandwidth_khz > freq_diff) | ||
384 | return false; | 385 | return false; |
385 | 386 | ||
386 | return true; | 387 | return true; |