Magellan Linux

Contents of /trunk/kernel-lts/patches-3.4/0116-3.4.17-all-fixes.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1939 - (show annotations) (download)
Tue Nov 6 08:49:03 2012 UTC (11 years, 5 months ago) by niro
File size: 67916 byte(s)
3.4.18-lts-r1
1 diff --git a/Documentation/devicetree/bindings/arm/atmel-at91.txt b/Documentation/devicetree/bindings/arm/atmel-at91.txt
2 index ecc81e3..d187e9f 100644
3 --- a/Documentation/devicetree/bindings/arm/atmel-at91.txt
4 +++ b/Documentation/devicetree/bindings/arm/atmel-at91.txt
5 @@ -8,7 +8,7 @@ PIT Timer required properties:
6 shared across all System Controller members.
7
8 TC/TCLIB Timer required properties:
9 -- compatible: Should be "atmel,<chip>-pit".
10 +- compatible: Should be "atmel,<chip>-tcb".
11 <chip> can be "at91rm9200" or "at91sam9x5"
12 - reg: Should contain registers location and length
13 - interrupts: Should contain all interrupts for the TC block
14 diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
15 index 7babc3f..8f14a1b 100644
16 --- a/arch/arm/kernel/smp.c
17 +++ b/arch/arm/kernel/smp.c
18 @@ -249,18 +249,24 @@ static void percpu_timer_setup(void);
19 asmlinkage void __cpuinit secondary_start_kernel(void)
20 {
21 struct mm_struct *mm = &init_mm;
22 - unsigned int cpu = smp_processor_id();
23 + unsigned int cpu;
24 +
25 + /*
26 + * The identity mapping is uncached (strongly ordered), so
27 + * switch away from it before attempting any exclusive accesses.
28 + */
29 + cpu_switch_mm(mm->pgd, mm);
30 + enter_lazy_tlb(mm, current);
31 + local_flush_tlb_all();
32
33 /*
34 * All kernel threads share the same mm context; grab a
35 * reference and switch to it.
36 */
37 + cpu = smp_processor_id();
38 atomic_inc(&mm->mm_count);
39 current->active_mm = mm;
40 cpumask_set_cpu(cpu, mm_cpumask(mm));
41 - cpu_switch_mm(mm->pgd, mm);
42 - enter_lazy_tlb(mm, current);
43 - local_flush_tlb_all();
44
45 printk("CPU%u: Booted secondary processor\n", cpu);
46
47 diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c
48 index 05774e5..3b0c719 100644
49 --- a/arch/arm/mach-at91/at91rm9200_devices.c
50 +++ b/arch/arm/mach-at91/at91rm9200_devices.c
51 @@ -463,7 +463,7 @@ static struct i2c_gpio_platform_data pdata = {
52
53 static struct platform_device at91rm9200_twi_device = {
54 .name = "i2c-gpio",
55 - .id = -1,
56 + .id = 0,
57 .dev.platform_data = &pdata,
58 };
59
60 diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c
61 index 5652dde..151fec4 100644
62 --- a/arch/arm/mach-at91/at91sam9260_devices.c
63 +++ b/arch/arm/mach-at91/at91sam9260_devices.c
64 @@ -468,7 +468,7 @@ static struct i2c_gpio_platform_data pdata = {
65
66 static struct platform_device at91sam9260_twi_device = {
67 .name = "i2c-gpio",
68 - .id = -1,
69 + .id = 0,
70 .dev.platform_data = &pdata,
71 };
72
73 diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c
74 index 4db961a..8a29c6c 100644
75 --- a/arch/arm/mach-at91/at91sam9261_devices.c
76 +++ b/arch/arm/mach-at91/at91sam9261_devices.c
77 @@ -285,7 +285,7 @@ static struct i2c_gpio_platform_data pdata = {
78
79 static struct platform_device at91sam9261_twi_device = {
80 .name = "i2c-gpio",
81 - .id = -1,
82 + .id = 0,
83 .dev.platform_data = &pdata,
84 };
85
86 diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
87 index fe99206..8d44322 100644
88 --- a/arch/arm/mach-at91/at91sam9263_devices.c
89 +++ b/arch/arm/mach-at91/at91sam9263_devices.c
90 @@ -542,7 +542,7 @@ static struct i2c_gpio_platform_data pdata = {
91
92 static struct platform_device at91sam9263_twi_device = {
93 .name = "i2c-gpio",
94 - .id = -1,
95 + .id = 0,
96 .dev.platform_data = &pdata,
97 };
98
99 diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c
100 index fe4ae22..b8d4114 100644
101 --- a/arch/arm/mach-at91/at91sam9rl_devices.c
102 +++ b/arch/arm/mach-at91/at91sam9rl_devices.c
103 @@ -314,7 +314,7 @@ static struct i2c_gpio_platform_data pdata = {
104
105 static struct platform_device at91sam9rl_twi_device = {
106 .name = "i2c-gpio",
107 - .id = -1,
108 + .id = 0,
109 .dev.platform_data = &pdata,
110 };
111
112 diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c
113 index f44a2e7..582142e 100644
114 --- a/arch/arm/mach-at91/setup.c
115 +++ b/arch/arm/mach-at91/setup.c
116 @@ -146,7 +146,7 @@ static void __init soc_detect(u32 dbgu_base)
117 }
118
119 /* at91sam9g10 */
120 - if ((cidr & ~AT91_CIDR_EXT) == ARCH_ID_AT91SAM9G10) {
121 + if ((socid & ~AT91_CIDR_EXT) == ARCH_ID_AT91SAM9G10) {
122 at91_soc_initdata.type = AT91_SOC_SAM9G10;
123 at91_boot_soc = at91sam9261_soc;
124 }
125 diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c
126 index 5ccd6e8..c2b77e5 100644
127 --- a/arch/arm/mach-exynos/common.c
128 +++ b/arch/arm/mach-exynos/common.c
129 @@ -44,6 +44,7 @@
130 #include <plat/fimc-core.h>
131 #include <plat/iic-core.h>
132 #include <plat/tv-core.h>
133 +#include <plat/spi-core.h>
134 #include <plat/regs-serial.h>
135
136 #include "common.h"
137 @@ -338,6 +339,8 @@ static void __init exynos4_map_io(void)
138
139 s5p_fb_setname(0, "exynos4-fb");
140 s5p_hdmi_setname("exynos4-hdmi");
141 +
142 + s3c64xx_spi_setname("exynos4210-spi");
143 }
144
145 static void __init exynos5_map_io(void)
146 @@ -358,6 +361,8 @@ static void __init exynos5_map_io(void)
147 s3c_i2c0_setname("s3c2440-i2c");
148 s3c_i2c1_setname("s3c2440-i2c");
149 s3c_i2c2_setname("s3c2440-i2c");
150 +
151 + s3c64xx_spi_setname("exynos4210-spi");
152 }
153
154 static void __init exynos4_init_clocks(int xtal)
155 diff --git a/arch/arm/mach-s3c24xx/s3c2416.c b/arch/arm/mach-s3c24xx/s3c2416.c
156 index 7743fad..f74818d 100644
157 --- a/arch/arm/mach-s3c24xx/s3c2416.c
158 +++ b/arch/arm/mach-s3c24xx/s3c2416.c
159 @@ -61,6 +61,7 @@
160 #include <plat/nand-core.h>
161 #include <plat/adc-core.h>
162 #include <plat/rtc-core.h>
163 +#include <plat/spi-core.h>
164
165 static struct map_desc s3c2416_iodesc[] __initdata = {
166 IODESC_ENT(WATCHDOG),
167 @@ -131,6 +132,7 @@ void __init s3c2416_map_io(void)
168 /* initialize device information early */
169 s3c2416_default_sdhci0();
170 s3c2416_default_sdhci1();
171 + s3c64xx_spi_setname("s3c2443-spi");
172
173 iotable_init(s3c2416_iodesc, ARRAY_SIZE(s3c2416_iodesc));
174 }
175 diff --git a/arch/arm/mach-s3c24xx/s3c2443.c b/arch/arm/mach-s3c24xx/s3c2443.c
176 index ab648ad..165b6a6 100644
177 --- a/arch/arm/mach-s3c24xx/s3c2443.c
178 +++ b/arch/arm/mach-s3c24xx/s3c2443.c
179 @@ -43,6 +43,7 @@
180 #include <plat/nand-core.h>
181 #include <plat/adc-core.h>
182 #include <plat/rtc-core.h>
183 +#include <plat/spi-core.h>
184
185 static struct map_desc s3c2443_iodesc[] __initdata = {
186 IODESC_ENT(WATCHDOG),
187 @@ -100,6 +101,9 @@ void __init s3c2443_map_io(void)
188 s3c24xx_gpiocfg_default.set_pull = s3c2443_gpio_setpull;
189 s3c24xx_gpiocfg_default.get_pull = s3c2443_gpio_getpull;
190
191 + /* initialize device information early */
192 + s3c64xx_spi_setname("s3c2443-spi");
193 +
194 iotable_init(s3c2443_iodesc, ARRAY_SIZE(s3c2443_iodesc));
195 }
196
197 diff --git a/arch/arm/mach-s5p64x0/common.c b/arch/arm/mach-s5p64x0/common.c
198 index 6e6a0a9..111e404 100644
199 --- a/arch/arm/mach-s5p64x0/common.c
200 +++ b/arch/arm/mach-s5p64x0/common.c
201 @@ -44,6 +44,7 @@
202 #include <plat/sdhci.h>
203 #include <plat/adc-core.h>
204 #include <plat/fb-core.h>
205 +#include <plat/spi-core.h>
206 #include <plat/gpio-cfg.h>
207 #include <plat/regs-irqtype.h>
208 #include <plat/regs-serial.h>
209 @@ -179,6 +180,7 @@ void __init s5p6440_map_io(void)
210 /* initialize any device information early */
211 s3c_adc_setname("s3c64xx-adc");
212 s3c_fb_setname("s5p64x0-fb");
213 + s3c64xx_spi_setname("s5p64x0-spi");
214
215 s5p64x0_default_sdhci0();
216 s5p64x0_default_sdhci1();
217 @@ -193,6 +195,7 @@ void __init s5p6450_map_io(void)
218 /* initialize any device information early */
219 s3c_adc_setname("s3c64xx-adc");
220 s3c_fb_setname("s5p64x0-fb");
221 + s3c64xx_spi_setname("s5p64x0-spi");
222
223 s5p64x0_default_sdhci0();
224 s5p64x0_default_sdhci1();
225 diff --git a/arch/arm/mach-s5pc100/common.c b/arch/arm/mach-s5pc100/common.c
226 index 6219086..cc6e561 100644
227 --- a/arch/arm/mach-s5pc100/common.c
228 +++ b/arch/arm/mach-s5pc100/common.c
229 @@ -45,6 +45,7 @@
230 #include <plat/fb-core.h>
231 #include <plat/iic-core.h>
232 #include <plat/onenand-core.h>
233 +#include <plat/spi-core.h>
234 #include <plat/regs-serial.h>
235 #include <plat/watchdog-reset.h>
236
237 @@ -165,6 +166,8 @@ void __init s5pc100_map_io(void)
238 s3c_onenand_setname("s5pc100-onenand");
239 s3c_fb_setname("s5pc100-fb");
240 s3c_cfcon_setname("s5pc100-pata");
241 +
242 + s3c64xx_spi_setname("s5pc100-spi");
243 }
244
245 void __init s5pc100_init_clocks(int xtal)
246 diff --git a/arch/arm/mach-s5pv210/common.c b/arch/arm/mach-s5pv210/common.c
247 index 4c9e902..a0c50ef 100644
248 --- a/arch/arm/mach-s5pv210/common.c
249 +++ b/arch/arm/mach-s5pv210/common.c
250 @@ -43,6 +43,7 @@
251 #include <plat/iic-core.h>
252 #include <plat/keypad-core.h>
253 #include <plat/tv-core.h>
254 +#include <plat/spi-core.h>
255 #include <plat/regs-serial.h>
256
257 #include "common.h"
258 @@ -196,6 +197,8 @@ void __init s5pv210_map_io(void)
259
260 /* setup TV devices */
261 s5p_hdmi_setname("s5pv210-hdmi");
262 +
263 + s3c64xx_spi_setname("s5pv210-spi");
264 }
265
266 void __init s5pv210_init_clocks(int xtal)
267 diff --git a/arch/arm/plat-samsung/include/plat/spi-core.h b/arch/arm/plat-samsung/include/plat/spi-core.h
268 new file mode 100644
269 index 0000000..0b9428a
270 --- /dev/null
271 +++ b/arch/arm/plat-samsung/include/plat/spi-core.h
272 @@ -0,0 +1,30 @@
273 +/*
274 + * Copyright (C) 2012 Heiko Stuebner <heiko@sntech.de>
275 + *
276 + * This program is free software; you can redistribute it and/or modify
277 + * it under the terms of the GNU General Public License version 2 as
278 + * published by the Free Software Foundation.
279 + */
280 +
281 +#ifndef __PLAT_S3C_SPI_CORE_H
282 +#define __PLAT_S3C_SPI_CORE_H
283 +
284 +/* These functions are only for use with the core support code, such as
285 + * the cpu specific initialisation code
286 + */
287 +
288 +/* re-define device name depending on support. */
289 +static inline void s3c64xx_spi_setname(char *name)
290 +{
291 +#ifdef CONFIG_S3C64XX_DEV_SPI0
292 + s3c64xx_device_spi0.name = name;
293 +#endif
294 +#ifdef CONFIG_S3C64XX_DEV_SPI1
295 + s3c64xx_device_spi1.name = name;
296 +#endif
297 +#ifdef CONFIG_S3C64XX_DEV_SPI2
298 + s3c64xx_device_spi2.name = name;
299 +#endif
300 +}
301 +
302 +#endif /* __PLAT_S3C_SPI_CORE_H */
303 diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h
304 index c9dcc18..029189d 100644
305 --- a/arch/x86/include/asm/efi.h
306 +++ b/arch/x86/include/asm/efi.h
307 @@ -98,6 +98,7 @@ extern void efi_set_executable(efi_memory_desc_t *md, bool executable);
308 extern int efi_memblock_x86_reserve_range(void);
309 extern void efi_call_phys_prelog(void);
310 extern void efi_call_phys_epilog(void);
311 +extern void efi_unmap_memmap(void);
312
313 #ifndef CONFIG_EFI
314 /*
315 diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
316 index 62d61e9..298dc00 100644
317 --- a/arch/x86/kernel/e820.c
318 +++ b/arch/x86/kernel/e820.c
319 @@ -1076,6 +1076,9 @@ void __init memblock_x86_fill(void)
320 memblock_add(ei->addr, ei->size);
321 }
322
323 + /* throw away partial pages */
324 + memblock_trim_memory(PAGE_SIZE);
325 +
326 memblock_dump_all();
327 }
328
329 diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
330 index fbbd1eb..ae98dbb 100644
331 --- a/arch/x86/kernel/setup.c
332 +++ b/arch/x86/kernel/setup.c
333 @@ -928,18 +928,19 @@ void __init setup_arch(char **cmdline_p)
334 #ifdef CONFIG_X86_64
335 if (max_pfn > max_low_pfn) {
336 int i;
337 - for (i = 0; i < e820.nr_map; i++) {
338 - struct e820entry *ei = &e820.map[i];
339 + unsigned long start, end;
340 + unsigned long start_pfn, end_pfn;
341
342 - if (ei->addr + ei->size <= 1UL << 32)
343 - continue;
344 + for_each_mem_pfn_range(i, MAX_NUMNODES, &start_pfn, &end_pfn,
345 + NULL) {
346
347 - if (ei->type == E820_RESERVED)
348 + end = PFN_PHYS(end_pfn);
349 + if (end <= (1UL<<32))
350 continue;
351
352 + start = PFN_PHYS(start_pfn);
353 max_pfn_mapped = init_memory_mapping(
354 - ei->addr < 1UL << 32 ? 1UL << 32 : ei->addr,
355 - ei->addr + ei->size);
356 + max((1UL<<32), start), end);
357 }
358
359 /* can we preseve max_low_pfn ?*/
360 @@ -1053,6 +1054,18 @@ void __init setup_arch(char **cmdline_p)
361 mcheck_init();
362
363 arch_init_ideal_nops();
364 +
365 +#ifdef CONFIG_EFI
366 + /* Once setup is done above, disable efi_enabled on mismatched
367 + * firmware/kernel archtectures since there is no support for
368 + * runtime services.
369 + */
370 + if (efi_enabled && IS_ENABLED(CONFIG_X86_64) != efi_64bit) {
371 + pr_info("efi: Setup done, disabling due to 32/64-bit mismatch\n");
372 + efi_unmap_memmap();
373 + efi_enabled = 0;
374 + }
375 +#endif
376 }
377
378 #ifdef CONFIG_X86_32
379 diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
380 index 4f0cec7..fae7090 100644
381 --- a/arch/x86/mm/init.c
382 +++ b/arch/x86/mm/init.c
383 @@ -29,36 +29,50 @@ int direct_gbpages
384 #endif
385 ;
386
387 -static void __init find_early_table_space(unsigned long end, int use_pse,
388 - int use_gbpages)
389 +struct map_range {
390 + unsigned long start;
391 + unsigned long end;
392 + unsigned page_size_mask;
393 +};
394 +
395 +/*
396 + * First calculate space needed for kernel direct mapping page tables to cover
397 + * mr[0].start to mr[nr_range - 1].end, while accounting for possible 2M and 1GB
398 + * pages. Then find enough contiguous space for those page tables.
399 + */
400 +static void __init find_early_table_space(struct map_range *mr, int nr_range)
401 {
402 - unsigned long puds, pmds, ptes, tables, start = 0, good_end = end;
403 + int i;
404 + unsigned long puds = 0, pmds = 0, ptes = 0, tables;
405 + unsigned long start = 0, good_end;
406 phys_addr_t base;
407
408 - puds = (end + PUD_SIZE - 1) >> PUD_SHIFT;
409 - tables = roundup(puds * sizeof(pud_t), PAGE_SIZE);
410 + for (i = 0; i < nr_range; i++) {
411 + unsigned long range, extra;
412
413 - if (use_gbpages) {
414 - unsigned long extra;
415 + range = mr[i].end - mr[i].start;
416 + puds += (range + PUD_SIZE - 1) >> PUD_SHIFT;
417
418 - extra = end - ((end>>PUD_SHIFT) << PUD_SHIFT);
419 - pmds = (extra + PMD_SIZE - 1) >> PMD_SHIFT;
420 - } else
421 - pmds = (end + PMD_SIZE - 1) >> PMD_SHIFT;
422 -
423 - tables += roundup(pmds * sizeof(pmd_t), PAGE_SIZE);
424 + if (mr[i].page_size_mask & (1 << PG_LEVEL_1G)) {
425 + extra = range - ((range >> PUD_SHIFT) << PUD_SHIFT);
426 + pmds += (extra + PMD_SIZE - 1) >> PMD_SHIFT;
427 + } else {
428 + pmds += (range + PMD_SIZE - 1) >> PMD_SHIFT;
429 + }
430
431 - if (use_pse) {
432 - unsigned long extra;
433 -
434 - extra = end - ((end>>PMD_SHIFT) << PMD_SHIFT);
435 + if (mr[i].page_size_mask & (1 << PG_LEVEL_2M)) {
436 + extra = range - ((range >> PMD_SHIFT) << PMD_SHIFT);
437 #ifdef CONFIG_X86_32
438 - extra += PMD_SIZE;
439 + extra += PMD_SIZE;
440 #endif
441 - ptes = (extra + PAGE_SIZE - 1) >> PAGE_SHIFT;
442 - } else
443 - ptes = (end + PAGE_SIZE - 1) >> PAGE_SHIFT;
444 + ptes += (extra + PAGE_SIZE - 1) >> PAGE_SHIFT;
445 + } else {
446 + ptes += (range + PAGE_SIZE - 1) >> PAGE_SHIFT;
447 + }
448 + }
449
450 + tables = roundup(puds * sizeof(pud_t), PAGE_SIZE);
451 + tables += roundup(pmds * sizeof(pmd_t), PAGE_SIZE);
452 tables += roundup(ptes * sizeof(pte_t), PAGE_SIZE);
453
454 #ifdef CONFIG_X86_32
455 @@ -75,8 +89,9 @@ static void __init find_early_table_space(unsigned long end, int use_pse,
456 pgt_buf_end = pgt_buf_start;
457 pgt_buf_top = pgt_buf_start + (tables >> PAGE_SHIFT);
458
459 - printk(KERN_DEBUG "kernel direct mapping tables up to %lx @ %lx-%lx\n",
460 - end, pgt_buf_start << PAGE_SHIFT, pgt_buf_top << PAGE_SHIFT);
461 + printk(KERN_DEBUG "kernel direct mapping tables up to %#lx @ [mem %#010lx-%#010lx]\n",
462 + mr[nr_range - 1].end - 1, pgt_buf_start << PAGE_SHIFT,
463 + (pgt_buf_top << PAGE_SHIFT) - 1);
464 }
465
466 void __init native_pagetable_reserve(u64 start, u64 end)
467 @@ -84,12 +99,6 @@ void __init native_pagetable_reserve(u64 start, u64 end)
468 memblock_reserve(start, end - start);
469 }
470
471 -struct map_range {
472 - unsigned long start;
473 - unsigned long end;
474 - unsigned page_size_mask;
475 -};
476 -
477 #ifdef CONFIG_X86_32
478 #define NR_RANGE_MR 3
479 #else /* CONFIG_X86_64 */
480 @@ -261,7 +270,7 @@ unsigned long __init_refok init_memory_mapping(unsigned long start,
481 * nodes are discovered.
482 */
483 if (!after_bootmem)
484 - find_early_table_space(end, use_pse, use_gbpages);
485 + find_early_table_space(mr, nr_range);
486
487 for (i = 0; i < nr_range; i++)
488 ret = kernel_physical_mapping_init(mr[i].start, mr[i].end,
489 diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
490 index f55a4ce..72d8899 100644
491 --- a/arch/x86/platform/efi/efi.c
492 +++ b/arch/x86/platform/efi/efi.c
493 @@ -69,11 +69,15 @@ EXPORT_SYMBOL(efi);
494 struct efi_memory_map memmap;
495
496 bool efi_64bit;
497 -static bool efi_native;
498
499 static struct efi efi_phys __initdata;
500 static efi_system_table_t efi_systab __initdata;
501
502 +static inline bool efi_is_native(void)
503 +{
504 + return IS_ENABLED(CONFIG_X86_64) == efi_64bit;
505 +}
506 +
507 static int __init setup_noefi(char *arg)
508 {
509 efi_enabled = 0;
510 @@ -419,10 +423,21 @@ void __init efi_reserve_boot_services(void)
511 }
512 }
513
514 -static void __init efi_free_boot_services(void)
515 +void __init efi_unmap_memmap(void)
516 +{
517 + if (memmap.map) {
518 + early_iounmap(memmap.map, memmap.nr_map * memmap.desc_size);
519 + memmap.map = NULL;
520 + }
521 +}
522 +
523 +void __init efi_free_boot_services(void)
524 {
525 void *p;
526
527 + if (!efi_is_native())
528 + return;
529 +
530 for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) {
531 efi_memory_desc_t *md = p;
532 unsigned long long start = md->phys_addr;
533 @@ -438,6 +453,8 @@ static void __init efi_free_boot_services(void)
534
535 free_bootmem_late(start, size);
536 }
537 +
538 + efi_unmap_memmap();
539 }
540
541 static int __init efi_systab_init(void *phys)
542 @@ -670,12 +687,10 @@ void __init efi_init(void)
543 return;
544 }
545 efi_phys.systab = (efi_system_table_t *)boot_params.efi_info.efi_systab;
546 - efi_native = !efi_64bit;
547 #else
548 efi_phys.systab = (efi_system_table_t *)
549 (boot_params.efi_info.efi_systab |
550 ((__u64)boot_params.efi_info.efi_systab_hi<<32));
551 - efi_native = efi_64bit;
552 #endif
553
554 if (efi_systab_init(efi_phys.systab)) {
555 @@ -709,7 +724,7 @@ void __init efi_init(void)
556 * that doesn't match the kernel 32/64-bit mode.
557 */
558
559 - if (!efi_native)
560 + if (!efi_is_native())
561 pr_info("No EFI runtime due to 32/64-bit mismatch with kernel\n");
562 else if (efi_runtime_init()) {
563 efi_enabled = 0;
564 @@ -721,7 +736,7 @@ void __init efi_init(void)
565 return;
566 }
567 #ifdef CONFIG_X86_32
568 - if (efi_native) {
569 + if (efi_is_native()) {
570 x86_platform.get_wallclock = efi_get_time;
571 x86_platform.set_wallclock = efi_set_rtc_mmss;
572 }
573 @@ -787,8 +802,10 @@ void __init efi_enter_virtual_mode(void)
574 * non-native EFI
575 */
576
577 - if (!efi_native)
578 - goto out;
579 + if (!efi_is_native()) {
580 + efi_unmap_memmap();
581 + return;
582 + }
583
584 /* Merge contiguous regions of the same type and attribute */
585 for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) {
586 @@ -878,13 +895,6 @@ void __init efi_enter_virtual_mode(void)
587 }
588
589 /*
590 - * Thankfully, it does seem that no runtime services other than
591 - * SetVirtualAddressMap() will touch boot services code, so we can
592 - * get rid of it all at this point
593 - */
594 - efi_free_boot_services();
595 -
596 - /*
597 * Now that EFI is in virtual mode, update the function
598 * pointers in the runtime service table to the new virtual addresses.
599 *
600 @@ -907,9 +917,6 @@ void __init efi_enter_virtual_mode(void)
601 if (__supported_pte_mask & _PAGE_NX)
602 runtime_code_page_mkexec();
603
604 -out:
605 - early_iounmap(memmap.map, memmap.nr_map * memmap.desc_size);
606 - memmap.map = NULL;
607 kfree(new_memmap);
608 }
609
610 diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c
611 index 7e138ec..edb9233 100644
612 --- a/drivers/bcma/main.c
613 +++ b/drivers/bcma/main.c
614 @@ -131,9 +131,10 @@ static int bcma_register_cores(struct bcma_bus *bus)
615
616 static void bcma_unregister_cores(struct bcma_bus *bus)
617 {
618 - struct bcma_device *core;
619 + struct bcma_device *core, *tmp;
620
621 - list_for_each_entry(core, &bus->cores, list) {
622 + list_for_each_entry_safe(core, tmp, &bus->cores, list) {
623 + list_del(&core->list);
624 if (core->dev_registered)
625 device_unregister(&core->dev);
626 }
627 diff --git a/drivers/cpufreq/powernow-k8.c b/drivers/cpufreq/powernow-k8.c
628 index 1a40935..c671369 100644
629 --- a/drivers/cpufreq/powernow-k8.c
630 +++ b/drivers/cpufreq/powernow-k8.c
631 @@ -1223,14 +1223,7 @@ static int powernowk8_target(struct cpufreq_policy *pol,
632 struct powernowk8_target_arg pta = { .pol = pol, .targfreq = targfreq,
633 .relation = relation };
634
635 - /*
636 - * Must run on @pol->cpu. cpufreq core is responsible for ensuring
637 - * that we're bound to the current CPU and pol->cpu stays online.
638 - */
639 - if (smp_processor_id() == pol->cpu)
640 - return powernowk8_target_fn(&pta);
641 - else
642 - return work_on_cpu(pol->cpu, powernowk8_target_fn, &pta);
643 + return work_on_cpu(pol->cpu, powernowk8_target_fn, &pta);
644 }
645
646 /* Driver entry point to verify the policy and range of frequencies */
647 diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c
648 index bb787d8..180f523 100644
649 --- a/drivers/dma/imx-dma.c
650 +++ b/drivers/dma/imx-dma.c
651 @@ -473,8 +473,10 @@ static int imxdma_xfer_desc(struct imxdma_desc *d)
652 slot = i;
653 break;
654 }
655 - if (slot < 0)
656 + if (slot < 0) {
657 + spin_unlock_irqrestore(&imxdma->lock, flags);
658 return -EBUSY;
659 + }
660
661 imxdma->slots_2d[slot].xsr = d->x;
662 imxdma->slots_2d[slot].ysr = d->y;
663 diff --git a/drivers/dma/sirf-dma.c b/drivers/dma/sirf-dma.c
664 index 434ad31..c439489 100644
665 --- a/drivers/dma/sirf-dma.c
666 +++ b/drivers/dma/sirf-dma.c
667 @@ -109,7 +109,7 @@ static void sirfsoc_dma_execute(struct sirfsoc_dma_chan *schan)
668 sdesc = list_first_entry(&schan->queued, struct sirfsoc_dma_desc,
669 node);
670 /* Move the first queued descriptor to active list */
671 - list_move_tail(&schan->queued, &schan->active);
672 + list_move_tail(&sdesc->node, &schan->active);
673
674 /* Start the DMA transfer */
675 writel_relaxed(sdesc->width, sdma->base + SIRFSOC_DMA_WIDTH_0 +
676 @@ -428,7 +428,7 @@ static struct dma_async_tx_descriptor *sirfsoc_dma_prep_interleaved(
677 unsigned long iflags;
678 int ret;
679
680 - if ((xt->dir != DMA_MEM_TO_DEV) || (xt->dir != DMA_DEV_TO_MEM)) {
681 + if ((xt->dir != DMA_MEM_TO_DEV) && (xt->dir != DMA_DEV_TO_MEM)) {
682 ret = -EINVAL;
683 goto err_dir;
684 }
685 diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
686 index 9fadd64..4ff7d5f 100644
687 --- a/drivers/gpu/drm/i915/intel_lvds.c
688 +++ b/drivers/gpu/drm/i915/intel_lvds.c
689 @@ -777,6 +777,14 @@ static const struct dmi_system_id intel_no_lvds[] = {
690 DMI_MATCH(DMI_BOARD_NAME, "MS-7469"),
691 },
692 },
693 + {
694 + .callback = intel_no_lvds_dmi_callback,
695 + .ident = "ZOTAC ZBOXSD-ID12/ID13",
696 + .matches = {
697 + DMI_MATCH(DMI_BOARD_VENDOR, "ZOTAC"),
698 + DMI_MATCH(DMI_BOARD_NAME, "ZBOXSD-ID12/ID13"),
699 + },
700 + },
701
702 { } /* terminating entry */
703 };
704 diff --git a/drivers/gpu/drm/radeon/evergreen_cs.c b/drivers/gpu/drm/radeon/evergreen_cs.c
705 index ea69dae..977b22d 100644
706 --- a/drivers/gpu/drm/radeon/evergreen_cs.c
707 +++ b/drivers/gpu/drm/radeon/evergreen_cs.c
708 @@ -2775,6 +2775,7 @@ static bool evergreen_vm_reg_valid(u32 reg)
709 case CAYMAN_SQ_EX_ALLOC_TABLE_SLOTS:
710 return true;
711 default:
712 + DRM_ERROR("Invalid register 0x%x in CS\n", reg);
713 return false;
714 }
715 }
716 diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
717 index 4065374..f4c3d28 100644
718 --- a/drivers/hv/channel.c
719 +++ b/drivers/hv/channel.c
720 @@ -146,14 +146,14 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size,
721
722 if (ret != 0) {
723 err = ret;
724 - goto errorout;
725 + goto error0;
726 }
727
728 ret = hv_ringbuffer_init(
729 &newchannel->inbound, in, recv_ringbuffer_size);
730 if (ret != 0) {
731 err = ret;
732 - goto errorout;
733 + goto error0;
734 }
735
736
737 @@ -168,7 +168,7 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size,
738
739 if (ret != 0) {
740 err = ret;
741 - goto errorout;
742 + goto error0;
743 }
744
745 /* Create and init the channel open message */
746 @@ -177,7 +177,7 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size,
747 GFP_KERNEL);
748 if (!open_info) {
749 err = -ENOMEM;
750 - goto errorout;
751 + goto error0;
752 }
753
754 init_completion(&open_info->waitevent);
755 @@ -193,7 +193,7 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size,
756
757 if (userdatalen > MAX_USER_DEFINED_BYTES) {
758 err = -EINVAL;
759 - goto errorout;
760 + goto error0;
761 }
762
763 if (userdatalen)
764 @@ -208,19 +208,18 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size,
765 sizeof(struct vmbus_channel_open_channel));
766
767 if (ret != 0)
768 - goto cleanup;
769 + goto error1;
770
771 t = wait_for_completion_timeout(&open_info->waitevent, 5*HZ);
772 if (t == 0) {
773 err = -ETIMEDOUT;
774 - goto errorout;
775 + goto error1;
776 }
777
778
779 if (open_info->response.open_result.status)
780 err = open_info->response.open_result.status;
781
782 -cleanup:
783 spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags);
784 list_del(&open_info->msglistentry);
785 spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, flags);
786 @@ -228,9 +227,12 @@ cleanup:
787 kfree(open_info);
788 return err;
789
790 -errorout:
791 - hv_ringbuffer_cleanup(&newchannel->outbound);
792 - hv_ringbuffer_cleanup(&newchannel->inbound);
793 +error1:
794 + spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags);
795 + list_del(&open_info->msglistentry);
796 + spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, flags);
797 +
798 +error0:
799 free_pages((unsigned long)out,
800 get_order(send_ringbuffer_size + recv_ringbuffer_size));
801 kfree(open_info);
802 diff --git a/drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h b/drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h
803 index 46c79a3..2b4b633 100644
804 --- a/drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h
805 +++ b/drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h
806 @@ -533,107 +533,107 @@ static const u32 ar9300_2p2_baseband_core[][2] = {
807
808 static const u32 ar9300Modes_high_power_tx_gain_table_2p2[][5] = {
809 /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
810 - {0x0000a2dc, 0x000cfff0, 0x000cfff0, 0x03aaa352, 0x03aaa352},
811 - {0x0000a2e0, 0x000f0000, 0x000f0000, 0x03ccc584, 0x03ccc584},
812 - {0x0000a2e4, 0x03f00000, 0x03f00000, 0x03f0f800, 0x03f0f800},
813 + {0x0000a2dc, 0x00033800, 0x00033800, 0x03aaa352, 0x03aaa352},
814 + {0x0000a2e0, 0x0003c000, 0x0003c000, 0x03ccc584, 0x03ccc584},
815 + {0x0000a2e4, 0x03fc0000, 0x03fc0000, 0x03f0f800, 0x03f0f800},
816 {0x0000a2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
817 {0x0000a410, 0x000050d9, 0x000050d9, 0x000050d9, 0x000050d9},
818 {0x0000a500, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
819 {0x0000a504, 0x06000003, 0x06000003, 0x04000002, 0x04000002},
820 {0x0000a508, 0x0a000020, 0x0a000020, 0x08000004, 0x08000004},
821 {0x0000a50c, 0x10000023, 0x10000023, 0x0b000200, 0x0b000200},
822 - {0x0000a510, 0x15000028, 0x15000028, 0x0f000202, 0x0f000202},
823 - {0x0000a514, 0x1b00002b, 0x1b00002b, 0x12000400, 0x12000400},
824 - {0x0000a518, 0x1f020028, 0x1f020028, 0x16000402, 0x16000402},
825 - {0x0000a51c, 0x2502002b, 0x2502002b, 0x19000404, 0x19000404},
826 - {0x0000a520, 0x2a04002a, 0x2a04002a, 0x1c000603, 0x1c000603},
827 - {0x0000a524, 0x2e06002a, 0x2e06002a, 0x21000a02, 0x21000a02},
828 - {0x0000a528, 0x3302202d, 0x3302202d, 0x25000a04, 0x25000a04},
829 - {0x0000a52c, 0x3804202c, 0x3804202c, 0x28000a20, 0x28000a20},
830 - {0x0000a530, 0x3c06202c, 0x3c06202c, 0x2c000e20, 0x2c000e20},
831 - {0x0000a534, 0x4108202d, 0x4108202d, 0x30000e22, 0x30000e22},
832 - {0x0000a538, 0x4506402d, 0x4506402d, 0x34000e24, 0x34000e24},
833 - {0x0000a53c, 0x4906222d, 0x4906222d, 0x38001640, 0x38001640},
834 - {0x0000a540, 0x4d062231, 0x4d062231, 0x3c001660, 0x3c001660},
835 - {0x0000a544, 0x50082231, 0x50082231, 0x3f001861, 0x3f001861},
836 - {0x0000a548, 0x5608422e, 0x5608422e, 0x43001a81, 0x43001a81},
837 - {0x0000a54c, 0x5a08442e, 0x5a08442e, 0x47001a83, 0x47001a83},
838 - {0x0000a550, 0x5e0a4431, 0x5e0a4431, 0x4a001c84, 0x4a001c84},
839 - {0x0000a554, 0x640a4432, 0x640a4432, 0x4e001ce3, 0x4e001ce3},
840 - {0x0000a558, 0x680a4434, 0x680a4434, 0x52001ce5, 0x52001ce5},
841 - {0x0000a55c, 0x6c0a6434, 0x6c0a6434, 0x56001ce9, 0x56001ce9},
842 - {0x0000a560, 0x6f0a6633, 0x6f0a6633, 0x5a001ceb, 0x5a001ceb},
843 - {0x0000a564, 0x730c6634, 0x730c6634, 0x5d001eec, 0x5d001eec},
844 - {0x0000a568, 0x730c6634, 0x730c6634, 0x5d001eec, 0x5d001eec},
845 - {0x0000a56c, 0x730c6634, 0x730c6634, 0x5d001eec, 0x5d001eec},
846 - {0x0000a570, 0x730c6634, 0x730c6634, 0x5d001eec, 0x5d001eec},
847 - {0x0000a574, 0x730c6634, 0x730c6634, 0x5d001eec, 0x5d001eec},
848 - {0x0000a578, 0x730c6634, 0x730c6634, 0x5d001eec, 0x5d001eec},
849 - {0x0000a57c, 0x730c6634, 0x730c6634, 0x5d001eec, 0x5d001eec},
850 + {0x0000a510, 0x16000220, 0x16000220, 0x0f000202, 0x0f000202},
851 + {0x0000a514, 0x1c000223, 0x1c000223, 0x12000400, 0x12000400},
852 + {0x0000a518, 0x21002220, 0x21002220, 0x16000402, 0x16000402},
853 + {0x0000a51c, 0x27002223, 0x27002223, 0x19000404, 0x19000404},
854 + {0x0000a520, 0x2b022220, 0x2b022220, 0x1c000603, 0x1c000603},
855 + {0x0000a524, 0x2f022222, 0x2f022222, 0x21000a02, 0x21000a02},
856 + {0x0000a528, 0x34022225, 0x34022225, 0x25000a04, 0x25000a04},
857 + {0x0000a52c, 0x3a02222a, 0x3a02222a, 0x28000a20, 0x28000a20},
858 + {0x0000a530, 0x3e02222c, 0x3e02222c, 0x2c000e20, 0x2c000e20},
859 + {0x0000a534, 0x4202242a, 0x4202242a, 0x30000e22, 0x30000e22},
860 + {0x0000a538, 0x4702244a, 0x4702244a, 0x34000e24, 0x34000e24},
861 + {0x0000a53c, 0x4b02244c, 0x4b02244c, 0x38001640, 0x38001640},
862 + {0x0000a540, 0x4e02246c, 0x4e02246c, 0x3c001660, 0x3c001660},
863 + {0x0000a544, 0x52022470, 0x52022470, 0x3f001861, 0x3f001861},
864 + {0x0000a548, 0x55022490, 0x55022490, 0x43001a81, 0x43001a81},
865 + {0x0000a54c, 0x59022492, 0x59022492, 0x47001a83, 0x47001a83},
866 + {0x0000a550, 0x5d022692, 0x5d022692, 0x4a001c84, 0x4a001c84},
867 + {0x0000a554, 0x61022892, 0x61022892, 0x4e001ce3, 0x4e001ce3},
868 + {0x0000a558, 0x65024890, 0x65024890, 0x52001ce5, 0x52001ce5},
869 + {0x0000a55c, 0x69024892, 0x69024892, 0x56001ce9, 0x56001ce9},
870 + {0x0000a560, 0x6e024c92, 0x6e024c92, 0x5a001ceb, 0x5a001ceb},
871 + {0x0000a564, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec},
872 + {0x0000a568, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec},
873 + {0x0000a56c, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec},
874 + {0x0000a570, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec},
875 + {0x0000a574, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec},
876 + {0x0000a578, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec},
877 + {0x0000a57c, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec},
878 {0x0000a580, 0x00800000, 0x00800000, 0x00800000, 0x00800000},
879 {0x0000a584, 0x06800003, 0x06800003, 0x04800002, 0x04800002},
880 {0x0000a588, 0x0a800020, 0x0a800020, 0x08800004, 0x08800004},
881 {0x0000a58c, 0x10800023, 0x10800023, 0x0b800200, 0x0b800200},
882 - {0x0000a590, 0x15800028, 0x15800028, 0x0f800202, 0x0f800202},
883 - {0x0000a594, 0x1b80002b, 0x1b80002b, 0x12800400, 0x12800400},
884 - {0x0000a598, 0x1f820028, 0x1f820028, 0x16800402, 0x16800402},
885 - {0x0000a59c, 0x2582002b, 0x2582002b, 0x19800404, 0x19800404},
886 - {0x0000a5a0, 0x2a84002a, 0x2a84002a, 0x1c800603, 0x1c800603},
887 - {0x0000a5a4, 0x2e86002a, 0x2e86002a, 0x21800a02, 0x21800a02},
888 - {0x0000a5a8, 0x3382202d, 0x3382202d, 0x25800a04, 0x25800a04},
889 - {0x0000a5ac, 0x3884202c, 0x3884202c, 0x28800a20, 0x28800a20},
890 - {0x0000a5b0, 0x3c86202c, 0x3c86202c, 0x2c800e20, 0x2c800e20},
891 - {0x0000a5b4, 0x4188202d, 0x4188202d, 0x30800e22, 0x30800e22},
892 - {0x0000a5b8, 0x4586402d, 0x4586402d, 0x34800e24, 0x34800e24},
893 - {0x0000a5bc, 0x4986222d, 0x4986222d, 0x38801640, 0x38801640},
894 - {0x0000a5c0, 0x4d862231, 0x4d862231, 0x3c801660, 0x3c801660},
895 - {0x0000a5c4, 0x50882231, 0x50882231, 0x3f801861, 0x3f801861},
896 - {0x0000a5c8, 0x5688422e, 0x5688422e, 0x43801a81, 0x43801a81},
897 - {0x0000a5cc, 0x5a88442e, 0x5a88442e, 0x47801a83, 0x47801a83},
898 - {0x0000a5d0, 0x5e8a4431, 0x5e8a4431, 0x4a801c84, 0x4a801c84},
899 - {0x0000a5d4, 0x648a4432, 0x648a4432, 0x4e801ce3, 0x4e801ce3},
900 - {0x0000a5d8, 0x688a4434, 0x688a4434, 0x52801ce5, 0x52801ce5},
901 - {0x0000a5dc, 0x6c8a6434, 0x6c8a6434, 0x56801ce9, 0x56801ce9},
902 - {0x0000a5e0, 0x6f8a6633, 0x6f8a6633, 0x5a801ceb, 0x5a801ceb},
903 - {0x0000a5e4, 0x738c6634, 0x738c6634, 0x5d801eec, 0x5d801eec},
904 - {0x0000a5e8, 0x738c6634, 0x738c6634, 0x5d801eec, 0x5d801eec},
905 - {0x0000a5ec, 0x738c6634, 0x738c6634, 0x5d801eec, 0x5d801eec},
906 - {0x0000a5f0, 0x738c6634, 0x738c6634, 0x5d801eec, 0x5d801eec},
907 - {0x0000a5f4, 0x738c6634, 0x738c6634, 0x5d801eec, 0x5d801eec},
908 - {0x0000a5f8, 0x738c6634, 0x738c6634, 0x5d801eec, 0x5d801eec},
909 - {0x0000a5fc, 0x738c6634, 0x738c6634, 0x5d801eec, 0x5d801eec},
910 + {0x0000a590, 0x16800220, 0x16800220, 0x0f800202, 0x0f800202},
911 + {0x0000a594, 0x1c800223, 0x1c800223, 0x12800400, 0x12800400},
912 + {0x0000a598, 0x21802220, 0x21802220, 0x16800402, 0x16800402},
913 + {0x0000a59c, 0x27802223, 0x27802223, 0x19800404, 0x19800404},
914 + {0x0000a5a0, 0x2b822220, 0x2b822220, 0x1c800603, 0x1c800603},
915 + {0x0000a5a4, 0x2f822222, 0x2f822222, 0x21800a02, 0x21800a02},
916 + {0x0000a5a8, 0x34822225, 0x34822225, 0x25800a04, 0x25800a04},
917 + {0x0000a5ac, 0x3a82222a, 0x3a82222a, 0x28800a20, 0x28800a20},
918 + {0x0000a5b0, 0x3e82222c, 0x3e82222c, 0x2c800e20, 0x2c800e20},
919 + {0x0000a5b4, 0x4282242a, 0x4282242a, 0x30800e22, 0x30800e22},
920 + {0x0000a5b8, 0x4782244a, 0x4782244a, 0x34800e24, 0x34800e24},
921 + {0x0000a5bc, 0x4b82244c, 0x4b82244c, 0x38801640, 0x38801640},
922 + {0x0000a5c0, 0x4e82246c, 0x4e82246c, 0x3c801660, 0x3c801660},
923 + {0x0000a5c4, 0x52822470, 0x52822470, 0x3f801861, 0x3f801861},
924 + {0x0000a5c8, 0x55822490, 0x55822490, 0x43801a81, 0x43801a81},
925 + {0x0000a5cc, 0x59822492, 0x59822492, 0x47801a83, 0x47801a83},
926 + {0x0000a5d0, 0x5d822692, 0x5d822692, 0x4a801c84, 0x4a801c84},
927 + {0x0000a5d4, 0x61822892, 0x61822892, 0x4e801ce3, 0x4e801ce3},
928 + {0x0000a5d8, 0x65824890, 0x65824890, 0x52801ce5, 0x52801ce5},
929 + {0x0000a5dc, 0x69824892, 0x69824892, 0x56801ce9, 0x56801ce9},
930 + {0x0000a5e0, 0x6e824c92, 0x6e824c92, 0x5a801ceb, 0x5a801ceb},
931 + {0x0000a5e4, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec},
932 + {0x0000a5e8, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec},
933 + {0x0000a5ec, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec},
934 + {0x0000a5f0, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec},
935 + {0x0000a5f4, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec},
936 + {0x0000a5f8, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec},
937 + {0x0000a5fc, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec},
938 {0x0000a600, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
939 {0x0000a604, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
940 - {0x0000a608, 0x01804601, 0x01804601, 0x00000000, 0x00000000},
941 - {0x0000a60c, 0x01804601, 0x01804601, 0x00000000, 0x00000000},
942 - {0x0000a610, 0x01804601, 0x01804601, 0x00000000, 0x00000000},
943 - {0x0000a614, 0x01804601, 0x01804601, 0x01404000, 0x01404000},
944 - {0x0000a618, 0x01804601, 0x01804601, 0x01404501, 0x01404501},
945 - {0x0000a61c, 0x01804601, 0x01804601, 0x02008501, 0x02008501},
946 - {0x0000a620, 0x03408d02, 0x03408d02, 0x0280ca03, 0x0280ca03},
947 - {0x0000a624, 0x0300cc03, 0x0300cc03, 0x03010c04, 0x03010c04},
948 - {0x0000a628, 0x03410d04, 0x03410d04, 0x04014c04, 0x04014c04},
949 - {0x0000a62c, 0x03410d04, 0x03410d04, 0x04015005, 0x04015005},
950 - {0x0000a630, 0x03410d04, 0x03410d04, 0x04015005, 0x04015005},
951 - {0x0000a634, 0x03410d04, 0x03410d04, 0x04015005, 0x04015005},
952 - {0x0000a638, 0x03410d04, 0x03410d04, 0x04015005, 0x04015005},
953 - {0x0000a63c, 0x03410d04, 0x03410d04, 0x04015005, 0x04015005},
954 - {0x0000b2dc, 0x000cfff0, 0x000cfff0, 0x03aaa352, 0x03aaa352},
955 - {0x0000b2e0, 0x000f0000, 0x000f0000, 0x03ccc584, 0x03ccc584},
956 - {0x0000b2e4, 0x03f00000, 0x03f00000, 0x03f0f800, 0x03f0f800},
957 + {0x0000a608, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
958 + {0x0000a60c, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
959 + {0x0000a610, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
960 + {0x0000a614, 0x02004000, 0x02004000, 0x01404000, 0x01404000},
961 + {0x0000a618, 0x02004801, 0x02004801, 0x01404501, 0x01404501},
962 + {0x0000a61c, 0x02808a02, 0x02808a02, 0x02008501, 0x02008501},
963 + {0x0000a620, 0x0380ce03, 0x0380ce03, 0x0280ca03, 0x0280ca03},
964 + {0x0000a624, 0x04411104, 0x04411104, 0x03010c04, 0x03010c04},
965 + {0x0000a628, 0x04411104, 0x04411104, 0x04014c04, 0x04014c04},
966 + {0x0000a62c, 0x04411104, 0x04411104, 0x04015005, 0x04015005},
967 + {0x0000a630, 0x04411104, 0x04411104, 0x04015005, 0x04015005},
968 + {0x0000a634, 0x04411104, 0x04411104, 0x04015005, 0x04015005},
969 + {0x0000a638, 0x04411104, 0x04411104, 0x04015005, 0x04015005},
970 + {0x0000a63c, 0x04411104, 0x04411104, 0x04015005, 0x04015005},
971 + {0x0000b2dc, 0x00033800, 0x00033800, 0x03aaa352, 0x03aaa352},
972 + {0x0000b2e0, 0x0003c000, 0x0003c000, 0x03ccc584, 0x03ccc584},
973 + {0x0000b2e4, 0x03fc0000, 0x03fc0000, 0x03f0f800, 0x03f0f800},
974 {0x0000b2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
975 - {0x0000c2dc, 0x000cfff0, 0x000cfff0, 0x03aaa352, 0x03aaa352},
976 - {0x0000c2e0, 0x000f0000, 0x000f0000, 0x03ccc584, 0x03ccc584},
977 - {0x0000c2e4, 0x03f00000, 0x03f00000, 0x03f0f800, 0x03f0f800},
978 + {0x0000c2dc, 0x00033800, 0x00033800, 0x03aaa352, 0x03aaa352},
979 + {0x0000c2e0, 0x0003c000, 0x0003c000, 0x03ccc584, 0x03ccc584},
980 + {0x0000c2e4, 0x03fc0000, 0x03fc0000, 0x03f0f800, 0x03f0f800},
981 {0x0000c2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
982 {0x00016044, 0x012492d4, 0x012492d4, 0x012492d4, 0x012492d4},
983 - {0x00016048, 0x61200001, 0x61200001, 0x66480001, 0x66480001},
984 + {0x00016048, 0x66480001, 0x66480001, 0x66480001, 0x66480001},
985 {0x00016068, 0x6db6db6c, 0x6db6db6c, 0x6db6db6c, 0x6db6db6c},
986 {0x00016444, 0x012492d4, 0x012492d4, 0x012492d4, 0x012492d4},
987 - {0x00016448, 0x61200001, 0x61200001, 0x66480001, 0x66480001},
988 + {0x00016448, 0x66480001, 0x66480001, 0x66480001, 0x66480001},
989 {0x00016468, 0x6db6db6c, 0x6db6db6c, 0x6db6db6c, 0x6db6db6c},
990 {0x00016844, 0x012492d4, 0x012492d4, 0x012492d4, 0x012492d4},
991 - {0x00016848, 0x61200001, 0x61200001, 0x66480001, 0x66480001},
992 + {0x00016848, 0x66480001, 0x66480001, 0x66480001, 0x66480001},
993 {0x00016868, 0x6db6db6c, 0x6db6db6c, 0x6db6db6c, 0x6db6db6c},
994 };
995
996 diff --git a/drivers/rtc/rtc-imxdi.c b/drivers/rtc/rtc-imxdi.c
997 index d93a960..bc744b4 100644
998 --- a/drivers/rtc/rtc-imxdi.c
999 +++ b/drivers/rtc/rtc-imxdi.c
1000 @@ -392,6 +392,8 @@ static int dryice_rtc_probe(struct platform_device *pdev)
1001 if (imxdi->ioaddr == NULL)
1002 return -ENOMEM;
1003
1004 + spin_lock_init(&imxdi->irq_lock);
1005 +
1006 imxdi->irq = platform_get_irq(pdev, 0);
1007 if (imxdi->irq < 0)
1008 return imxdi->irq;
1009 diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
1010 index c283212..223639a 100644
1011 --- a/drivers/staging/android/binder.c
1012 +++ b/drivers/staging/android/binder.c
1013 @@ -655,7 +655,7 @@ static int binder_update_page_range(struct binder_proc *proc, int allocate,
1014 page = &proc->pages[(page_addr - proc->buffer) / PAGE_SIZE];
1015
1016 BUG_ON(*page);
1017 - *page = alloc_page(GFP_KERNEL | __GFP_ZERO);
1018 + *page = alloc_page(GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO);
1019 if (*page == NULL) {
1020 printk(KERN_ERR "binder: %d: binder_alloc_buf failed "
1021 "for page at %p\n", proc->pid, page_addr);
1022 @@ -2507,14 +2507,38 @@ static void binder_release_work(struct list_head *list)
1023 struct binder_transaction *t;
1024
1025 t = container_of(w, struct binder_transaction, work);
1026 - if (t->buffer->target_node && !(t->flags & TF_ONE_WAY))
1027 + if (t->buffer->target_node &&
1028 + !(t->flags & TF_ONE_WAY)) {
1029 binder_send_failed_reply(t, BR_DEAD_REPLY);
1030 + } else {
1031 + binder_debug(BINDER_DEBUG_DEAD_TRANSACTION,
1032 + "binder: undelivered transaction %d\n",
1033 + t->debug_id);
1034 + t->buffer->transaction = NULL;
1035 + kfree(t);
1036 + binder_stats_deleted(BINDER_STAT_TRANSACTION);
1037 + }
1038 } break;
1039 case BINDER_WORK_TRANSACTION_COMPLETE: {
1040 + binder_debug(BINDER_DEBUG_DEAD_TRANSACTION,
1041 + "binder: undelivered TRANSACTION_COMPLETE\n");
1042 kfree(w);
1043 binder_stats_deleted(BINDER_STAT_TRANSACTION_COMPLETE);
1044 } break;
1045 + case BINDER_WORK_DEAD_BINDER_AND_CLEAR:
1046 + case BINDER_WORK_CLEAR_DEATH_NOTIFICATION: {
1047 + struct binder_ref_death *death;
1048 +
1049 + death = container_of(w, struct binder_ref_death, work);
1050 + binder_debug(BINDER_DEBUG_DEAD_TRANSACTION,
1051 + "binder: undelivered death notification, %p\n",
1052 + death->cookie);
1053 + kfree(death);
1054 + binder_stats_deleted(BINDER_STAT_DEATH);
1055 + } break;
1056 default:
1057 + pr_err("binder: unexpected work type, %d, not freed\n",
1058 + w->type);
1059 break;
1060 }
1061 }
1062 @@ -2984,6 +3008,7 @@ static void binder_deferred_release(struct binder_proc *proc)
1063 nodes++;
1064 rb_erase(&node->rb_node, &proc->nodes);
1065 list_del_init(&node->work.entry);
1066 + binder_release_work(&node->async_todo);
1067 if (hlist_empty(&node->refs)) {
1068 kfree(node);
1069 binder_stats_deleted(BINDER_STAT_NODE);
1070 @@ -3022,6 +3047,7 @@ static void binder_deferred_release(struct binder_proc *proc)
1071 binder_delete_ref(ref);
1072 }
1073 binder_release_work(&proc->todo);
1074 + binder_release_work(&proc->delivered_death);
1075 buffers = 0;
1076
1077 while ((n = rb_first(&proc->allocated_buffers))) {
1078 diff --git a/drivers/staging/comedi/drivers/amplc_pc236.c b/drivers/staging/comedi/drivers/amplc_pc236.c
1079 index 7972cad..9a23d20 100644
1080 --- a/drivers/staging/comedi/drivers/amplc_pc236.c
1081 +++ b/drivers/staging/comedi/drivers/amplc_pc236.c
1082 @@ -468,7 +468,7 @@ static int pc236_detach(struct comedi_device *dev)
1083 {
1084 printk(KERN_DEBUG "comedi%d: %s: detach\n", dev->minor,
1085 PC236_DRIVER_NAME);
1086 - if (devpriv)
1087 + if (dev->iobase)
1088 pc236_intr_disable(dev);
1089
1090 if (dev->irq)
1091 diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
1092 index e727b87..11344bc 100644
1093 --- a/drivers/usb/core/hub.c
1094 +++ b/drivers/usb/core/hub.c
1095 @@ -507,13 +507,16 @@ static void hub_tt_work(struct work_struct *work)
1096 int limit = 100;
1097
1098 spin_lock_irqsave (&hub->tt.lock, flags);
1099 - while (--limit && !list_empty (&hub->tt.clear_list)) {
1100 + while (!list_empty(&hub->tt.clear_list)) {
1101 struct list_head *next;
1102 struct usb_tt_clear *clear;
1103 struct usb_device *hdev = hub->hdev;
1104 const struct hc_driver *drv;
1105 int status;
1106
1107 + if (!hub->quiescing && --limit < 0)
1108 + break;
1109 +
1110 next = hub->tt.clear_list.next;
1111 clear = list_entry (next, struct usb_tt_clear, clear_list);
1112 list_del (&clear->clear_list);
1113 @@ -978,7 +981,7 @@ static void hub_quiesce(struct usb_hub *hub, enum hub_quiescing_type type)
1114 if (hub->has_indicators)
1115 cancel_delayed_work_sync(&hub->leds);
1116 if (hub->tt.hub)
1117 - cancel_work_sync(&hub->tt.clear_work);
1118 + flush_work_sync(&hub->tt.clear_work);
1119 }
1120
1121 /* caller has locked the hub device */
1122 diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
1123 index 966d148..39f9e4a 100644
1124 --- a/drivers/usb/host/pci-quirks.c
1125 +++ b/drivers/usb/host/pci-quirks.c
1126 @@ -545,7 +545,14 @@ static const struct dmi_system_id __devinitconst ehci_dmi_nohandoff_table[] = {
1127 /* Pegatron Lucid (Ordissimo AIRIS) */
1128 .matches = {
1129 DMI_MATCH(DMI_BOARD_NAME, "M11JB"),
1130 - DMI_MATCH(DMI_BIOS_VERSION, "Lucid-GE-133"),
1131 + DMI_MATCH(DMI_BIOS_VERSION, "Lucid-"),
1132 + },
1133 + },
1134 + {
1135 + /* Pegatron Lucid (Ordissimo) */
1136 + .matches = {
1137 + DMI_MATCH(DMI_BOARD_NAME, "Ordissimo"),
1138 + DMI_MATCH(DMI_BIOS_VERSION, "Lucid-"),
1139 },
1140 },
1141 { }
1142 diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
1143 index a23d71b..23aebcb 100644
1144 --- a/drivers/usb/host/xhci-ring.c
1145 +++ b/drivers/usb/host/xhci-ring.c
1146 @@ -1228,6 +1228,17 @@ static void xhci_cmd_to_noop(struct xhci_hcd *xhci, struct xhci_cd *cur_cd)
1147 cur_seg = find_trb_seg(xhci->cmd_ring->first_seg,
1148 xhci->cmd_ring->dequeue, &cycle_state);
1149
1150 + if (!cur_seg) {
1151 + xhci_warn(xhci, "Command ring mismatch, dequeue = %p %llx (dma)\n",
1152 + xhci->cmd_ring->dequeue,
1153 + (unsigned long long)
1154 + xhci_trb_virt_to_dma(xhci->cmd_ring->deq_seg,
1155 + xhci->cmd_ring->dequeue));
1156 + xhci_debug_ring(xhci, xhci->cmd_ring);
1157 + xhci_dbg_ring_ptrs(xhci, xhci->cmd_ring);
1158 + return;
1159 + }
1160 +
1161 /* find the command trb matched by cd from command ring */
1162 for (cmd_trb = xhci->cmd_ring->dequeue;
1163 cmd_trb != xhci->cmd_ring->enqueue;
1164 diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
1165 index c1505c3..0179d34 100644
1166 --- a/drivers/usb/serial/mos7840.c
1167 +++ b/drivers/usb/serial/mos7840.c
1168 @@ -235,12 +235,10 @@ struct moschip_port {
1169 int port_num; /*Actual port number in the device(1,2,etc) */
1170 struct urb *write_urb; /* write URB for this port */
1171 struct urb *read_urb; /* read URB for this port */
1172 - struct urb *int_urb;
1173 __u8 shadowLCR; /* last LCR value received */
1174 __u8 shadowMCR; /* last MCR value received */
1175 char open;
1176 char open_ports;
1177 - char zombie;
1178 wait_queue_head_t wait_chase; /* for handling sleeping while waiting for chase to finish */
1179 wait_queue_head_t delta_msr_wait; /* for handling sleeping while waiting for msr change to happen */
1180 int delta_msr_cond;
1181 @@ -505,7 +503,6 @@ static void mos7840_control_callback(struct urb *urb)
1182 unsigned char *data;
1183 struct moschip_port *mos7840_port;
1184 __u8 regval = 0x0;
1185 - int result = 0;
1186 int status = urb->status;
1187
1188 mos7840_port = urb->context;
1189 @@ -524,7 +521,7 @@ static void mos7840_control_callback(struct urb *urb)
1190 default:
1191 dbg("%s - nonzero urb status received: %d", __func__,
1192 status);
1193 - goto exit;
1194 + return;
1195 }
1196
1197 dbg("%s urb buffer size is %d", __func__, urb->actual_length);
1198 @@ -537,17 +534,6 @@ static void mos7840_control_callback(struct urb *urb)
1199 mos7840_handle_new_msr(mos7840_port, regval);
1200 else if (mos7840_port->MsrLsr == 1)
1201 mos7840_handle_new_lsr(mos7840_port, regval);
1202 -
1203 -exit:
1204 - spin_lock(&mos7840_port->pool_lock);
1205 - if (!mos7840_port->zombie)
1206 - result = usb_submit_urb(mos7840_port->int_urb, GFP_ATOMIC);
1207 - spin_unlock(&mos7840_port->pool_lock);
1208 - if (result) {
1209 - dev_err(&urb->dev->dev,
1210 - "%s - Error %d submitting interrupt urb\n",
1211 - __func__, result);
1212 - }
1213 }
1214
1215 static int mos7840_get_reg(struct moschip_port *mcs, __u16 Wval, __u16 reg,
1216 @@ -655,14 +641,7 @@ static void mos7840_interrupt_callback(struct urb *urb)
1217 wreg = MODEM_STATUS_REGISTER;
1218 break;
1219 }
1220 - spin_lock(&mos7840_port->pool_lock);
1221 - if (!mos7840_port->zombie) {
1222 - rv = mos7840_get_reg(mos7840_port, wval, wreg, &Data);
1223 - } else {
1224 - spin_unlock(&mos7840_port->pool_lock);
1225 - return;
1226 - }
1227 - spin_unlock(&mos7840_port->pool_lock);
1228 + rv = mos7840_get_reg(mos7840_port, wval, wreg, &Data);
1229 }
1230 }
1231 }
1232 @@ -2590,7 +2569,6 @@ error:
1233 kfree(mos7840_port->ctrl_buf);
1234 usb_free_urb(mos7840_port->control_urb);
1235 kfree(mos7840_port);
1236 - serial->port[i] = NULL;
1237 }
1238 return status;
1239 }
1240 @@ -2621,9 +2599,6 @@ static void mos7840_disconnect(struct usb_serial *serial)
1241 mos7840_port = mos7840_get_port_private(serial->port[i]);
1242 dbg ("mos7840_port %d = %p", i, mos7840_port);
1243 if (mos7840_port) {
1244 - spin_lock_irqsave(&mos7840_port->pool_lock, flags);
1245 - mos7840_port->zombie = 1;
1246 - spin_unlock_irqrestore(&mos7840_port->pool_lock, flags);
1247 usb_kill_urb(mos7840_port->control_urb);
1248 }
1249 }
1250 @@ -2657,6 +2632,7 @@ static void mos7840_release(struct usb_serial *serial)
1251 mos7840_port = mos7840_get_port_private(serial->port[i]);
1252 dbg("mos7840_port %d = %p", i, mos7840_port);
1253 if (mos7840_port) {
1254 + usb_free_urb(mos7840_port->control_urb);
1255 kfree(mos7840_port->ctrl_buf);
1256 kfree(mos7840_port->dr);
1257 kfree(mos7840_port);
1258 diff --git a/drivers/usb/serial/opticon.c b/drivers/usb/serial/opticon.c
1259 index 82cc9d2..1f85006 100644
1260 --- a/drivers/usb/serial/opticon.c
1261 +++ b/drivers/usb/serial/opticon.c
1262 @@ -160,7 +160,11 @@ static int send_control_msg(struct usb_serial_port *port, u8 requesttype,
1263 {
1264 struct usb_serial *serial = port->serial;
1265 int retval;
1266 - u8 buffer[2];
1267 + u8 *buffer;
1268 +
1269 + buffer = kzalloc(1, GFP_KERNEL);
1270 + if (!buffer)
1271 + return -ENOMEM;
1272
1273 buffer[0] = val;
1274 /* Send the message to the vendor control endpoint
1275 @@ -169,6 +173,7 @@ static int send_control_msg(struct usb_serial_port *port, u8 requesttype,
1276 requesttype,
1277 USB_DIR_OUT|USB_TYPE_VENDOR|USB_RECIP_INTERFACE,
1278 0, 0, buffer, 1, 0);
1279 + kfree(buffer);
1280
1281 return retval;
1282 }
1283 @@ -292,7 +297,7 @@ static int opticon_write(struct tty_struct *tty, struct usb_serial_port *port,
1284 if (!dr) {
1285 dev_err(&port->dev, "out of memory\n");
1286 count = -ENOMEM;
1287 - goto error;
1288 + goto error_no_dr;
1289 }
1290
1291 dr->bRequestType = USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT;
1292 @@ -322,6 +327,8 @@ static int opticon_write(struct tty_struct *tty, struct usb_serial_port *port,
1293
1294 return count;
1295 error:
1296 + kfree(dr);
1297 +error_no_dr:
1298 usb_free_urb(urb);
1299 error_no_urb:
1300 kfree(buffer);
1301 diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
1302 index 449bf6d..b622d69 100644
1303 --- a/drivers/usb/serial/sierra.c
1304 +++ b/drivers/usb/serial/sierra.c
1305 @@ -171,7 +171,6 @@ static int sierra_probe(struct usb_serial *serial,
1306 {
1307 int result = 0;
1308 struct usb_device *udev;
1309 - struct sierra_intf_private *data;
1310 u8 ifnum;
1311
1312 udev = serial->dev;
1313 @@ -199,11 +198,6 @@ static int sierra_probe(struct usb_serial *serial,
1314 return -ENODEV;
1315 }
1316
1317 - data = serial->private = kzalloc(sizeof(struct sierra_intf_private), GFP_KERNEL);
1318 - if (!data)
1319 - return -ENOMEM;
1320 - spin_lock_init(&data->susp_lock);
1321 -
1322 return result;
1323 }
1324
1325 @@ -914,6 +908,7 @@ static void sierra_dtr_rts(struct usb_serial_port *port, int on)
1326 static int sierra_startup(struct usb_serial *serial)
1327 {
1328 struct usb_serial_port *port;
1329 + struct sierra_intf_private *intfdata;
1330 struct sierra_port_private *portdata;
1331 struct sierra_iface_info *himemoryp = NULL;
1332 int i;
1333 @@ -921,6 +916,14 @@ static int sierra_startup(struct usb_serial *serial)
1334
1335 dev_dbg(&serial->dev->dev, "%s\n", __func__);
1336
1337 + intfdata = kzalloc(sizeof(*intfdata), GFP_KERNEL);
1338 + if (!intfdata)
1339 + return -ENOMEM;
1340 +
1341 + spin_lock_init(&intfdata->susp_lock);
1342 +
1343 + usb_set_serial_data(serial, intfdata);
1344 +
1345 /* Set Device mode to D0 */
1346 sierra_set_power_state(serial->dev, 0x0000);
1347
1348 @@ -936,7 +939,7 @@ static int sierra_startup(struct usb_serial *serial)
1349 dev_dbg(&port->dev, "%s: kmalloc for "
1350 "sierra_port_private (%d) failed!\n",
1351 __func__, i);
1352 - return -ENOMEM;
1353 + goto err;
1354 }
1355 spin_lock_init(&portdata->lock);
1356 init_usb_anchor(&portdata->active);
1357 @@ -973,6 +976,14 @@ static int sierra_startup(struct usb_serial *serial)
1358 }
1359
1360 return 0;
1361 +err:
1362 + for (--i; i >= 0; --i) {
1363 + portdata = usb_get_serial_port_data(serial->port[i]);
1364 + kfree(portdata);
1365 + }
1366 + kfree(intfdata);
1367 +
1368 + return -ENOMEM;
1369 }
1370
1371 static void sierra_release(struct usb_serial *serial)
1372 @@ -992,6 +1003,7 @@ static void sierra_release(struct usb_serial *serial)
1373 continue;
1374 kfree(portdata);
1375 }
1376 + kfree(serial->private);
1377 }
1378
1379 #ifdef CONFIG_PM
1380 diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c
1381 index 407e23c..171226a 100644
1382 --- a/drivers/usb/serial/whiteheat.c
1383 +++ b/drivers/usb/serial/whiteheat.c
1384 @@ -525,6 +525,7 @@ no_firmware:
1385 "%s: please contact support@connecttech.com\n",
1386 serial->type->description);
1387 kfree(result);
1388 + kfree(command);
1389 return -ENODEV;
1390
1391 no_command_private:
1392 diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
1393 index 8f3cbb8..5ffa116 100644
1394 --- a/drivers/usb/storage/unusual_devs.h
1395 +++ b/drivers/usb/storage/unusual_devs.h
1396 @@ -1004,6 +1004,12 @@ UNUSUAL_DEV( 0x07cf, 0x1001, 0x1000, 0x9999,
1397 USB_SC_8070, USB_PR_CB, NULL,
1398 US_FL_NEED_OVERRIDE | US_FL_FIX_INQUIRY ),
1399
1400 +/* Submitted by Oleksandr Chumachenko <ledest@gmail.com> */
1401 +UNUSUAL_DEV( 0x07cf, 0x1167, 0x0100, 0x0100,
1402 + "Casio",
1403 + "EX-N1 DigitalCamera",
1404 + USB_SC_8070, USB_PR_DEVICE, NULL, 0),
1405 +
1406 /* Submitted by Hartmut Wahl <hwahl@hwahl.de>*/
1407 UNUSUAL_DEV( 0x0839, 0x000a, 0x0001, 0x0001,
1408 "Samsung",
1409 diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
1410 index 5c17010..4134e53 100644
1411 --- a/drivers/vhost/net.c
1412 +++ b/drivers/vhost/net.c
1413 @@ -376,7 +376,8 @@ static void handle_rx(struct vhost_net *net)
1414 .hdr.gso_type = VIRTIO_NET_HDR_GSO_NONE
1415 };
1416 size_t total_len = 0;
1417 - int err, headcount, mergeable;
1418 + int err, mergeable;
1419 + s16 headcount;
1420 size_t vhost_hlen, sock_hlen;
1421 size_t vhost_len, sock_len;
1422 /* TODO: check that we are running from vhost_worker? */
1423 diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
1424 index debdfe0..5d2069f 100644
1425 --- a/fs/compat_ioctl.c
1426 +++ b/fs/compat_ioctl.c
1427 @@ -210,6 +210,8 @@ static int do_video_set_spu_palette(unsigned int fd, unsigned int cmd,
1428
1429 err = get_user(palp, &up->palette);
1430 err |= get_user(length, &up->length);
1431 + if (err)
1432 + return -EFAULT;
1433
1434 up_native = compat_alloc_user_space(sizeof(struct video_spu_palette));
1435 err = put_user(compat_ptr(palp), &up_native->palette);
1436 diff --git a/fs/exec.c b/fs/exec.c
1437 index 126e01c..6c4791d 100644
1438 --- a/fs/exec.c
1439 +++ b/fs/exec.c
1440 @@ -1114,7 +1114,8 @@ int flush_old_exec(struct linux_binprm * bprm)
1441 bprm->mm = NULL; /* We're using it now */
1442
1443 set_fs(USER_DS);
1444 - current->flags &= ~(PF_RANDOMIZE | PF_FORKNOEXEC | PF_KTHREAD);
1445 + current->flags &=
1446 + ~(PF_RANDOMIZE | PF_FORKNOEXEC | PF_KTHREAD | PF_NOFREEZE);
1447 flush_thread();
1448 current->personality &= ~bprm->per_clear;
1449
1450 diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
1451 index 35a36d3..a545d81 100644
1452 --- a/fs/sysfs/dir.c
1453 +++ b/fs/sysfs/dir.c
1454 @@ -457,20 +457,18 @@ int __sysfs_add_one(struct sysfs_addrm_cxt *acxt, struct sysfs_dirent *sd)
1455 /**
1456 * sysfs_pathname - return full path to sysfs dirent
1457 * @sd: sysfs_dirent whose path we want
1458 - * @path: caller allocated buffer
1459 + * @path: caller allocated buffer of size PATH_MAX
1460 *
1461 * Gives the name "/" to the sysfs_root entry; any path returned
1462 * is relative to wherever sysfs is mounted.
1463 - *
1464 - * XXX: does no error checking on @path size
1465 */
1466 static char *sysfs_pathname(struct sysfs_dirent *sd, char *path)
1467 {
1468 if (sd->s_parent) {
1469 sysfs_pathname(sd->s_parent, path);
1470 - strcat(path, "/");
1471 + strlcat(path, "/", PATH_MAX);
1472 }
1473 - strcat(path, sd->s_name);
1474 + strlcat(path, sd->s_name, PATH_MAX);
1475 return path;
1476 }
1477
1478 @@ -503,9 +501,11 @@ int sysfs_add_one(struct sysfs_addrm_cxt *acxt, struct sysfs_dirent *sd)
1479 char *path = kzalloc(PATH_MAX, GFP_KERNEL);
1480 WARN(1, KERN_WARNING
1481 "sysfs: cannot create duplicate filename '%s'\n",
1482 - (path == NULL) ? sd->s_name :
1483 - strcat(strcat(sysfs_pathname(acxt->parent_sd, path), "/"),
1484 - sd->s_name));
1485 + (path == NULL) ? sd->s_name
1486 + : (sysfs_pathname(acxt->parent_sd, path),
1487 + strlcat(path, "/", PATH_MAX),
1488 + strlcat(path, sd->s_name, PATH_MAX),
1489 + path));
1490 kfree(path);
1491 }
1492
1493 diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h
1494 index 53392e8..efc66f2 100644
1495 --- a/include/drm/drm_pciids.h
1496 +++ b/include/drm/drm_pciids.h
1497 @@ -209,6 +209,8 @@
1498 {0x1002, 0x6788, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TAHITI|RADEON_NEW_MEMMAP}, \
1499 {0x1002, 0x678A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TAHITI|RADEON_NEW_MEMMAP}, \
1500 {0x1002, 0x6790, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TAHITI|RADEON_NEW_MEMMAP}, \
1501 + {0x1002, 0x6791, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TAHITI|RADEON_NEW_MEMMAP}, \
1502 + {0x1002, 0x6792, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TAHITI|RADEON_NEW_MEMMAP}, \
1503 {0x1002, 0x6798, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TAHITI|RADEON_NEW_MEMMAP}, \
1504 {0x1002, 0x6799, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TAHITI|RADEON_NEW_MEMMAP}, \
1505 {0x1002, 0x679A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TAHITI|RADEON_NEW_MEMMAP}, \
1506 @@ -221,6 +223,7 @@
1507 {0x1002, 0x6808, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \
1508 {0x1002, 0x6809, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \
1509 {0x1002, 0x6810, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \
1510 + {0x1002, 0x6811, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \
1511 {0x1002, 0x6816, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \
1512 {0x1002, 0x6817, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \
1513 {0x1002, 0x6818, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \
1514 diff --git a/include/linux/efi.h b/include/linux/efi.h
1515 index ec45ccd..5782114 100644
1516 --- a/include/linux/efi.h
1517 +++ b/include/linux/efi.h
1518 @@ -496,6 +496,11 @@ extern void efi_map_pal_code (void);
1519 extern void efi_memmap_walk (efi_freemem_callback_t callback, void *arg);
1520 extern void efi_gettimeofday (struct timespec *ts);
1521 extern void efi_enter_virtual_mode (void); /* switch EFI to virtual mode, if possible */
1522 +#ifdef CONFIG_X86
1523 +extern void efi_free_boot_services(void);
1524 +#else
1525 +static inline void efi_free_boot_services(void) {}
1526 +#endif
1527 extern u64 efi_get_iobase (void);
1528 extern u32 efi_mem_type (unsigned long phys_addr);
1529 extern u64 efi_mem_attributes (unsigned long phys_addr);
1530 diff --git a/include/linux/memblock.h b/include/linux/memblock.h
1531 index 19dc455..c948c44 100644
1532 --- a/include/linux/memblock.h
1533 +++ b/include/linux/memblock.h
1534 @@ -57,6 +57,7 @@ int memblock_add(phys_addr_t base, phys_addr_t size);
1535 int memblock_remove(phys_addr_t base, phys_addr_t size);
1536 int memblock_free(phys_addr_t base, phys_addr_t size);
1537 int memblock_reserve(phys_addr_t base, phys_addr_t size);
1538 +void memblock_trim_memory(phys_addr_t align);
1539
1540 #ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP
1541 void __next_mem_pfn_range(int *idx, int nid, unsigned long *out_start_pfn,
1542 diff --git a/init/main.c b/init/main.c
1543 index b08c5f7..c2178d2 100644
1544 --- a/init/main.c
1545 +++ b/init/main.c
1546 @@ -630,6 +630,9 @@ asmlinkage void __init start_kernel(void)
1547 acpi_early_init(); /* before LAPIC and SMP init */
1548 sfi_init_late();
1549
1550 + if (efi_enabled)
1551 + efi_free_boot_services();
1552 +
1553 ftrace_init();
1554
1555 /* Do the rest non-__init'ed, we're now alive */
1556 diff --git a/lib/genalloc.c b/lib/genalloc.c
1557 index 6bc04aa..7cb7a5d 100644
1558 --- a/lib/genalloc.c
1559 +++ b/lib/genalloc.c
1560 @@ -176,7 +176,7 @@ int gen_pool_add_virt(struct gen_pool *pool, unsigned long virt, phys_addr_t phy
1561 struct gen_pool_chunk *chunk;
1562 int nbits = size >> pool->min_alloc_order;
1563 int nbytes = sizeof(struct gen_pool_chunk) +
1564 - (nbits + BITS_PER_BYTE - 1) / BITS_PER_BYTE;
1565 + BITS_TO_LONGS(nbits) * sizeof(long);
1566
1567 chunk = kmalloc_node(nbytes, GFP_KERNEL | __GFP_ZERO, nid);
1568 if (unlikely(chunk == NULL))
1569 diff --git a/mm/memblock.c b/mm/memblock.c
1570 index 280d3d7..11e5bd1 100644
1571 --- a/mm/memblock.c
1572 +++ b/mm/memblock.c
1573 @@ -908,6 +908,30 @@ int __init_memblock memblock_is_region_reserved(phys_addr_t base, phys_addr_t si
1574 return memblock_overlaps_region(&memblock.reserved, base, size) >= 0;
1575 }
1576
1577 +void __init_memblock memblock_trim_memory(phys_addr_t align)
1578 +{
1579 + int i;
1580 + phys_addr_t start, end, orig_start, orig_end;
1581 + struct memblock_type *mem = &memblock.memory;
1582 +
1583 + for (i = 0; i < mem->cnt; i++) {
1584 + orig_start = mem->regions[i].base;
1585 + orig_end = mem->regions[i].base + mem->regions[i].size;
1586 + start = round_up(orig_start, align);
1587 + end = round_down(orig_end, align);
1588 +
1589 + if (start == orig_start && end == orig_end)
1590 + continue;
1591 +
1592 + if (start < end) {
1593 + mem->regions[i].base = start;
1594 + mem->regions[i].size = end - start;
1595 + } else {
1596 + memblock_remove_region(mem, i);
1597 + i--;
1598 + }
1599 + }
1600 +}
1601
1602 void __init_memblock memblock_set_current_limit(phys_addr_t limit)
1603 {
1604 diff --git a/mm/rmap.c b/mm/rmap.c
1605 index 5b5ad58..bfca52c 100644
1606 --- a/mm/rmap.c
1607 +++ b/mm/rmap.c
1608 @@ -56,6 +56,7 @@
1609 #include <linux/mmu_notifier.h>
1610 #include <linux/migrate.h>
1611 #include <linux/hugetlb.h>
1612 +#include <linux/backing-dev.h>
1613
1614 #include <asm/tlbflush.h>
1615
1616 @@ -977,11 +978,8 @@ int page_mkclean(struct page *page)
1617
1618 if (page_mapped(page)) {
1619 struct address_space *mapping = page_mapping(page);
1620 - if (mapping) {
1621 + if (mapping)
1622 ret = page_mkclean_file(mapping, page);
1623 - if (page_test_and_clear_dirty(page_to_pfn(page), 1))
1624 - ret = 1;
1625 - }
1626 }
1627
1628 return ret;
1629 @@ -1167,6 +1165,7 @@ void page_add_file_rmap(struct page *page)
1630 */
1631 void page_remove_rmap(struct page *page)
1632 {
1633 + struct address_space *mapping = page_mapping(page);
1634 bool anon = PageAnon(page);
1635 bool locked;
1636 unsigned long flags;
1637 @@ -1189,8 +1188,19 @@ void page_remove_rmap(struct page *page)
1638 * this if the page is anon, so about to be freed; but perhaps
1639 * not if it's in swapcache - there might be another pte slot
1640 * containing the swap entry, but page not yet written to swap.
1641 + *
1642 + * And we can skip it on file pages, so long as the filesystem
1643 + * participates in dirty tracking; but need to catch shm and tmpfs
1644 + * and ramfs pages which have been modified since creation by read
1645 + * fault.
1646 + *
1647 + * Note that mapping must be decided above, before decrementing
1648 + * mapcount (which luckily provides a barrier): once page is unmapped,
1649 + * it could be truncated and page->mapping reset to NULL at any moment.
1650 + * Note also that we are relying on page_mapping(page) to set mapping
1651 + * to &swapper_space when PageSwapCache(page).
1652 */
1653 - if ((!anon || PageSwapCache(page)) &&
1654 + if (mapping && !mapping_cap_account_dirty(mapping) &&
1655 page_test_and_clear_dirty(page_to_pfn(page), 1))
1656 set_page_dirty(page);
1657 /*
1658 diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
1659 index 1f6cb1f..208edc0 100644
1660 --- a/net/bluetooth/smp.c
1661 +++ b/net/bluetooth/smp.c
1662 @@ -31,6 +31,8 @@
1663
1664 #define SMP_TIMEOUT msecs_to_jiffies(30000)
1665
1666 +#define AUTH_REQ_MASK 0x07
1667 +
1668 static inline void swap128(u8 src[16], u8 dst[16])
1669 {
1670 int i;
1671 @@ -229,7 +231,7 @@ static void build_pairing_cmd(struct l2cap_conn *conn,
1672 req->max_key_size = SMP_MAX_ENC_KEY_SIZE;
1673 req->init_key_dist = 0;
1674 req->resp_key_dist = dist_keys;
1675 - req->auth_req = authreq;
1676 + req->auth_req = (authreq & AUTH_REQ_MASK);
1677 return;
1678 }
1679
1680 @@ -238,7 +240,7 @@ static void build_pairing_cmd(struct l2cap_conn *conn,
1681 rsp->max_key_size = SMP_MAX_ENC_KEY_SIZE;
1682 rsp->init_key_dist = 0;
1683 rsp->resp_key_dist = req->resp_key_dist & dist_keys;
1684 - rsp->auth_req = authreq;
1685 + rsp->auth_req = (authreq & AUTH_REQ_MASK);
1686 }
1687
1688 static u8 check_enc_key_size(struct l2cap_conn *conn, __u8 max_key_size)
1689 diff --git a/net/mac80211/wpa.c b/net/mac80211/wpa.c
1690 index 0ae23c6..ea6d03b 100644
1691 --- a/net/mac80211/wpa.c
1692 +++ b/net/mac80211/wpa.c
1693 @@ -106,7 +106,8 @@ ieee80211_rx_h_michael_mic_verify(struct ieee80211_rx_data *rx)
1694 if (status->flag & RX_FLAG_MMIC_ERROR)
1695 goto mic_fail;
1696
1697 - if (!(status->flag & RX_FLAG_IV_STRIPPED) && rx->key)
1698 + if (!(status->flag & RX_FLAG_IV_STRIPPED) && rx->key &&
1699 + rx->key->conf.cipher == WLAN_CIPHER_SUITE_TKIP)
1700 goto update_iv;
1701
1702 return RX_CONTINUE;
1703 diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
1704 index a4a6586..79064471 100644
1705 --- a/net/sunrpc/xprtsock.c
1706 +++ b/net/sunrpc/xprtsock.c
1707 @@ -254,7 +254,6 @@ struct sock_xprt {
1708 void (*old_data_ready)(struct sock *, int);
1709 void (*old_state_change)(struct sock *);
1710 void (*old_write_space)(struct sock *);
1711 - void (*old_error_report)(struct sock *);
1712 };
1713
1714 /*
1715 @@ -737,10 +736,10 @@ static int xs_tcp_send_request(struct rpc_task *task)
1716 dprintk("RPC: sendmsg returned unrecognized error %d\n",
1717 -status);
1718 case -ECONNRESET:
1719 - case -EPIPE:
1720 xs_tcp_shutdown(xprt);
1721 case -ECONNREFUSED:
1722 case -ENOTCONN:
1723 + case -EPIPE:
1724 clear_bit(SOCK_ASYNC_NOSPACE, &transport->sock->flags);
1725 }
1726
1727 @@ -781,7 +780,6 @@ static void xs_save_old_callbacks(struct sock_xprt *transport, struct sock *sk)
1728 transport->old_data_ready = sk->sk_data_ready;
1729 transport->old_state_change = sk->sk_state_change;
1730 transport->old_write_space = sk->sk_write_space;
1731 - transport->old_error_report = sk->sk_error_report;
1732 }
1733
1734 static void xs_restore_old_callbacks(struct sock_xprt *transport, struct sock *sk)
1735 @@ -789,7 +787,6 @@ static void xs_restore_old_callbacks(struct sock_xprt *transport, struct sock *s
1736 sk->sk_data_ready = transport->old_data_ready;
1737 sk->sk_state_change = transport->old_state_change;
1738 sk->sk_write_space = transport->old_write_space;
1739 - sk->sk_error_report = transport->old_error_report;
1740 }
1741
1742 static void xs_reset_transport(struct sock_xprt *transport)
1743 @@ -1465,7 +1462,7 @@ static void xs_tcp_cancel_linger_timeout(struct rpc_xprt *xprt)
1744 xprt_clear_connecting(xprt);
1745 }
1746
1747 -static void xs_sock_mark_closed(struct rpc_xprt *xprt)
1748 +static void xs_sock_reset_connection_flags(struct rpc_xprt *xprt)
1749 {
1750 smp_mb__before_clear_bit();
1751 clear_bit(XPRT_CONNECTION_ABORT, &xprt->state);
1752 @@ -1473,6 +1470,11 @@ static void xs_sock_mark_closed(struct rpc_xprt *xprt)
1753 clear_bit(XPRT_CLOSE_WAIT, &xprt->state);
1754 clear_bit(XPRT_CLOSING, &xprt->state);
1755 smp_mb__after_clear_bit();
1756 +}
1757 +
1758 +static void xs_sock_mark_closed(struct rpc_xprt *xprt)
1759 +{
1760 + xs_sock_reset_connection_flags(xprt);
1761 /* Mark transport as closed and wake up all pending tasks */
1762 xprt_disconnect_done(xprt);
1763 }
1764 @@ -1528,6 +1530,7 @@ static void xs_tcp_state_change(struct sock *sk)
1765 case TCP_CLOSE_WAIT:
1766 /* The server initiated a shutdown of the socket */
1767 xprt->connect_cookie++;
1768 + clear_bit(XPRT_CONNECTED, &xprt->state);
1769 xs_tcp_force_close(xprt);
1770 case TCP_CLOSING:
1771 /*
1772 @@ -1552,25 +1555,6 @@ static void xs_tcp_state_change(struct sock *sk)
1773 read_unlock_bh(&sk->sk_callback_lock);
1774 }
1775
1776 -/**
1777 - * xs_error_report - callback mainly for catching socket errors
1778 - * @sk: socket
1779 - */
1780 -static void xs_error_report(struct sock *sk)
1781 -{
1782 - struct rpc_xprt *xprt;
1783 -
1784 - read_lock_bh(&sk->sk_callback_lock);
1785 - if (!(xprt = xprt_from_sock(sk)))
1786 - goto out;
1787 - dprintk("RPC: %s client %p...\n"
1788 - "RPC: error %d\n",
1789 - __func__, xprt, sk->sk_err);
1790 - xprt_wake_pending_tasks(xprt, -EAGAIN);
1791 -out:
1792 - read_unlock_bh(&sk->sk_callback_lock);
1793 -}
1794 -
1795 static void xs_write_space(struct sock *sk)
1796 {
1797 struct socket *sock;
1798 @@ -1870,7 +1854,6 @@ static int xs_local_finish_connecting(struct rpc_xprt *xprt,
1799 sk->sk_user_data = xprt;
1800 sk->sk_data_ready = xs_local_data_ready;
1801 sk->sk_write_space = xs_udp_write_space;
1802 - sk->sk_error_report = xs_error_report;
1803 sk->sk_allocation = GFP_ATOMIC;
1804
1805 xprt_clear_connected(xprt);
1806 @@ -1959,7 +1942,6 @@ static void xs_udp_finish_connecting(struct rpc_xprt *xprt, struct socket *sock)
1807 sk->sk_user_data = xprt;
1808 sk->sk_data_ready = xs_udp_data_ready;
1809 sk->sk_write_space = xs_udp_write_space;
1810 - sk->sk_error_report = xs_error_report;
1811 sk->sk_no_check = UDP_CSUM_NORCV;
1812 sk->sk_allocation = GFP_ATOMIC;
1813
1814 @@ -2027,10 +2009,8 @@ static void xs_abort_connection(struct sock_xprt *transport)
1815 any.sa_family = AF_UNSPEC;
1816 result = kernel_connect(transport->sock, &any, sizeof(any), 0);
1817 if (!result)
1818 - xs_sock_mark_closed(&transport->xprt);
1819 - else
1820 - dprintk("RPC: AF_UNSPEC connect return code %d\n",
1821 - result);
1822 + xs_sock_reset_connection_flags(&transport->xprt);
1823 + dprintk("RPC: AF_UNSPEC connect return code %d\n", result);
1824 }
1825
1826 static void xs_tcp_reuse_connection(struct sock_xprt *transport)
1827 @@ -2075,7 +2055,6 @@ static int xs_tcp_finish_connecting(struct rpc_xprt *xprt, struct socket *sock)
1828 sk->sk_data_ready = xs_tcp_data_ready;
1829 sk->sk_state_change = xs_tcp_state_change;
1830 sk->sk_write_space = xs_tcp_write_space;
1831 - sk->sk_error_report = xs_error_report;
1832 sk->sk_allocation = GFP_ATOMIC;
1833
1834 /* socket options */
1835 diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
1836 index 94b765b..6ecf1d4 100644
1837 --- a/sound/pci/hda/patch_realtek.c
1838 +++ b/sound/pci/hda/patch_realtek.c
1839 @@ -6184,6 +6184,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
1840 SND_PCI_QUIRK(0x17aa, 0x21e9, "Thinkpad Edge 15", ALC269_FIXUP_SKU_IGNORE),
1841 SND_PCI_QUIRK(0x17aa, 0x21f6, "Thinkpad T530", ALC269_FIXUP_LENOVO_DOCK),
1842 SND_PCI_QUIRK(0x17aa, 0x21fa, "Thinkpad X230", ALC269_FIXUP_LENOVO_DOCK),
1843 + SND_PCI_QUIRK(0x17aa, 0x21f3, "Thinkpad T430", ALC269_FIXUP_LENOVO_DOCK),
1844 SND_PCI_QUIRK(0x17aa, 0x21fb, "Thinkpad T430s", ALC269_FIXUP_LENOVO_DOCK),
1845 SND_PCI_QUIRK(0x17aa, 0x2203, "Thinkpad X230 Tablet", ALC269_FIXUP_LENOVO_DOCK),
1846 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K),
1847 diff --git a/usr/gen_init_cpio.c b/usr/gen_init_cpio.c
1848 index af0f22f..aca6edc 100644
1849 --- a/usr/gen_init_cpio.c
1850 +++ b/usr/gen_init_cpio.c
1851 @@ -303,7 +303,7 @@ static int cpio_mkfile(const char *name, const char *location,
1852 int retval;
1853 int rc = -1;
1854 int namesize;
1855 - int i;
1856 + unsigned int i;
1857
1858 mode |= S_IFREG;
1859
1860 @@ -381,25 +381,28 @@ error:
1861
1862 static char *cpio_replace_env(char *new_location)
1863 {
1864 - char expanded[PATH_MAX + 1];
1865 - char env_var[PATH_MAX + 1];
1866 - char *start;
1867 - char *end;
1868 -
1869 - for (start = NULL; (start = strstr(new_location, "${")); ) {
1870 - end = strchr(start, '}');
1871 - if (start < end) {
1872 - *env_var = *expanded = '\0';
1873 - strncat(env_var, start + 2, end - start - 2);
1874 - strncat(expanded, new_location, start - new_location);
1875 - strncat(expanded, getenv(env_var), PATH_MAX);
1876 - strncat(expanded, end + 1, PATH_MAX);
1877 - strncpy(new_location, expanded, PATH_MAX);
1878 - } else
1879 - break;
1880 - }
1881 -
1882 - return new_location;
1883 + char expanded[PATH_MAX + 1];
1884 + char env_var[PATH_MAX + 1];
1885 + char *start;
1886 + char *end;
1887 +
1888 + for (start = NULL; (start = strstr(new_location, "${")); ) {
1889 + end = strchr(start, '}');
1890 + if (start < end) {
1891 + *env_var = *expanded = '\0';
1892 + strncat(env_var, start + 2, end - start - 2);
1893 + strncat(expanded, new_location, start - new_location);
1894 + strncat(expanded, getenv(env_var),
1895 + PATH_MAX - strlen(expanded));
1896 + strncat(expanded, end + 1,
1897 + PATH_MAX - strlen(expanded));
1898 + strncpy(new_location, expanded, PATH_MAX);
1899 + new_location[PATH_MAX] = 0;
1900 + } else
1901 + break;
1902 + }
1903 +
1904 + return new_location;
1905 }
1906
1907