/[linux-patches]/genpatches-2.6/tags/3.0-30/1036_linux-3.0.37.patch
Gentoo

Contents of /genpatches-2.6/tags/3.0-30/1036_linux-3.0.37.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2206 - (show annotations) (download)
Mon Sep 17 18:58:14 2012 UTC (2 years, 3 months ago) by mpagano
File size: 67374 byte(s)
3.0-30 release
1 diff --git a/Documentation/stable_kernel_rules.txt b/Documentation/stable_kernel_rules.txt
2 index 21fd05c..e1f856b 100644
3 --- a/Documentation/stable_kernel_rules.txt
4 +++ b/Documentation/stable_kernel_rules.txt
5 @@ -12,6 +12,12 @@ Rules on what kind of patches are accepted, and which ones are not, into the
6 marked CONFIG_BROKEN), an oops, a hang, data corruption, a real
7 security issue, or some "oh, that's not good" issue. In short, something
8 critical.
9 + - Serious issues as reported by a user of a distribution kernel may also
10 + be considered if they fix a notable performance or interactivity issue.
11 + As these fixes are not as obvious and have a higher risk of a subtle
12 + regression they should only be submitted by a distribution kernel
13 + maintainer and include an addendum linking to a bugzilla entry if it
14 + exists and additional information on the user-visible impact.
15 - New device IDs and quirks are also accepted.
16 - No "theoretical race condition" issues, unless an explanation of how the
17 race can be exploited is also provided.
18 diff --git a/Makefile b/Makefile
19 index cc34921..009160e 100644
20 --- a/Makefile
21 +++ b/Makefile
22 @@ -1,6 +1,6 @@
23 VERSION = 3
24 PATCHLEVEL = 0
25 -SUBLEVEL = 36
26 +SUBLEVEL = 37
27 EXTRAVERSION =
28 NAME = Sneaky Weasel
29
30 diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
31 index fea97f6..4469924 100644
32 --- a/arch/arm/kernel/smp.c
33 +++ b/arch/arm/kernel/smp.c
34 @@ -445,9 +445,7 @@ static DEFINE_PER_CPU(struct clock_event_device, percpu_clockevent);
35 static void ipi_timer(void)
36 {
37 struct clock_event_device *evt = &__get_cpu_var(percpu_clockevent);
38 - irq_enter();
39 evt->event_handler(evt);
40 - irq_exit();
41 }
42
43 #ifdef CONFIG_LOCAL_TIMERS
44 @@ -458,7 +456,9 @@ asmlinkage void __exception_irq_entry do_local_timer(struct pt_regs *regs)
45
46 if (local_timer_ack()) {
47 __inc_irq_stat(cpu, local_timer_irqs);
48 + irq_enter();
49 ipi_timer();
50 + irq_exit();
51 }
52
53 set_irq_regs(old_regs);
54 @@ -568,7 +568,9 @@ asmlinkage void __exception_irq_entry do_IPI(int ipinr, struct pt_regs *regs)
55
56 switch (ipinr) {
57 case IPI_TIMER:
58 + irq_enter();
59 ipi_timer();
60 + irq_exit();
61 break;
62
63 case IPI_RESCHEDULE:
64 @@ -576,15 +578,21 @@ asmlinkage void __exception_irq_entry do_IPI(int ipinr, struct pt_regs *regs)
65 break;
66
67 case IPI_CALL_FUNC:
68 + irq_enter();
69 generic_smp_call_function_interrupt();
70 + irq_exit();
71 break;
72
73 case IPI_CALL_FUNC_SINGLE:
74 + irq_enter();
75 generic_smp_call_function_single_interrupt();
76 + irq_exit();
77 break;
78
79 case IPI_CPU_STOP:
80 + irq_enter();
81 ipi_cpu_stop(cpu);
82 + irq_exit();
83 break;
84
85 default:
86 diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
87 index 42541bb..ace1784 100644
88 --- a/arch/powerpc/xmon/xmon.c
89 +++ b/arch/powerpc/xmon/xmon.c
90 @@ -975,7 +975,7 @@ static int cpu_cmd(void)
91 /* print cpus waiting or in xmon */
92 printf("cpus stopped:");
93 count = 0;
94 - for (cpu = 0; cpu < NR_CPUS; ++cpu) {
95 + for_each_possible_cpu(cpu) {
96 if (cpumask_test_cpu(cpu, &cpus_in_xmon)) {
97 if (count == 0)
98 printf(" %x", cpu);
99 diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h
100 index 71cc380..c5d941f 100644
101 --- a/arch/x86/include/asm/cpufeature.h
102 +++ b/arch/x86/include/asm/cpufeature.h
103 @@ -173,7 +173,7 @@
104 #define X86_FEATURE_XSAVEOPT (7*32+ 4) /* Optimized Xsave */
105 #define X86_FEATURE_PLN (7*32+ 5) /* Intel Power Limit Notification */
106 #define X86_FEATURE_PTS (7*32+ 6) /* Intel Package Thermal Status */
107 -#define X86_FEATURE_DTS (7*32+ 7) /* Digital Thermal Sensor */
108 +#define X86_FEATURE_DTHERM (7*32+ 7) /* Digital Thermal Sensor */
109
110 /* Virtualization flags: Linux defined, word 8 */
111 #define X86_FEATURE_TPR_SHADOW (8*32+ 0) /* Intel TPR Shadow */
112 diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
113 index 4558f0d..479d03c 100644
114 --- a/arch/x86/kernel/acpi/boot.c
115 +++ b/arch/x86/kernel/acpi/boot.c
116 @@ -416,12 +416,14 @@ acpi_parse_int_src_ovr(struct acpi_subtable_header * header,
117 return 0;
118 }
119
120 - if (intsrc->source_irq == 0 && intsrc->global_irq == 2) {
121 + if (intsrc->source_irq == 0) {
122 if (acpi_skip_timer_override) {
123 - printk(PREFIX "BIOS IRQ0 pin2 override ignored.\n");
124 + printk(PREFIX "BIOS IRQ0 override ignored.\n");
125 return 0;
126 }
127 - if (acpi_fix_pin2_polarity && (intsrc->inti_flags & ACPI_MADT_POLARITY_MASK)) {
128 +
129 + if ((intsrc->global_irq == 2) && acpi_fix_pin2_polarity
130 + && (intsrc->inti_flags & ACPI_MADT_POLARITY_MASK)) {
131 intsrc->inti_flags &= ~ACPI_MADT_POLARITY_MASK;
132 printk(PREFIX "BIOS IRQ0 pin2 override: forcing polarity to high active.\n");
133 }
134 @@ -1327,17 +1329,12 @@ static int __init dmi_disable_acpi(const struct dmi_system_id *d)
135 }
136
137 /*
138 - * Force ignoring BIOS IRQ0 pin2 override
139 + * Force ignoring BIOS IRQ0 override
140 */
141 static int __init dmi_ignore_irq0_timer_override(const struct dmi_system_id *d)
142 {
143 - /*
144 - * The ati_ixp4x0_rev() early PCI quirk should have set
145 - * the acpi_skip_timer_override flag already:
146 - */
147 if (!acpi_skip_timer_override) {
148 - WARN(1, KERN_ERR "ati_ixp4x0 quirk not complete.\n");
149 - pr_notice("%s detected: Ignoring BIOS IRQ0 pin2 override\n",
150 + pr_notice("%s detected: Ignoring BIOS IRQ0 override\n",
151 d->ident);
152 acpi_skip_timer_override = 1;
153 }
154 @@ -1431,7 +1428,7 @@ static struct dmi_system_id __initdata acpi_dmi_table_late[] = {
155 * is enabled. This input is incorrectly designated the
156 * ISA IRQ 0 via an interrupt source override even though
157 * it is wired to the output of the master 8259A and INTIN0
158 - * is not connected at all. Force ignoring BIOS IRQ0 pin2
159 + * is not connected at all. Force ignoring BIOS IRQ0
160 * override in that cases.
161 */
162 {
163 @@ -1466,6 +1463,14 @@ static struct dmi_system_id __initdata acpi_dmi_table_late[] = {
164 DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq 6715b"),
165 },
166 },
167 + {
168 + .callback = dmi_ignore_irq0_timer_override,
169 + .ident = "FUJITSU SIEMENS",
170 + .matches = {
171 + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
172 + DMI_MATCH(DMI_PRODUCT_NAME, "AMILO PRO V2030"),
173 + },
174 + },
175 {}
176 };
177
178 diff --git a/arch/x86/kernel/cpu/scattered.c b/arch/x86/kernel/cpu/scattered.c
179 index c7f64e6..ea6106c 100644
180 --- a/arch/x86/kernel/cpu/scattered.c
181 +++ b/arch/x86/kernel/cpu/scattered.c
182 @@ -31,7 +31,7 @@ void __cpuinit init_scattered_cpuid_features(struct cpuinfo_x86 *c)
183 const struct cpuid_bit *cb;
184
185 static const struct cpuid_bit __cpuinitconst cpuid_bits[] = {
186 - { X86_FEATURE_DTS, CR_EAX, 0, 0x00000006, 0 },
187 + { X86_FEATURE_DTHERM, CR_EAX, 0, 0x00000006, 0 },
188 { X86_FEATURE_IDA, CR_EAX, 1, 0x00000006, 0 },
189 { X86_FEATURE_ARAT, CR_EAX, 2, 0x00000006, 0 },
190 { X86_FEATURE_PLN, CR_EAX, 4, 0x00000006, 0 },
191 diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
192 index d4a705f..89d6877 100644
193 --- a/arch/x86/kernel/reboot.c
194 +++ b/arch/x86/kernel/reboot.c
195 @@ -452,6 +452,14 @@ static struct dmi_system_id __initdata pci_reboot_dmi_table[] = {
196 DMI_MATCH(DMI_PRODUCT_NAME, "Latitude E6420"),
197 },
198 },
199 + { /* Handle problems with rebooting on the Precision M6600. */
200 + .callback = set_pci_reboot,
201 + .ident = "Dell OptiPlex 990",
202 + .matches = {
203 + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
204 + DMI_MATCH(DMI_PRODUCT_NAME, "Precision M6600"),
205 + },
206 + },
207 { }
208 };
209
210 diff --git a/drivers/acpi/acpi_pad.c b/drivers/acpi/acpi_pad.c
211 index a43fa1a..1502c502 100644
212 --- a/drivers/acpi/acpi_pad.c
213 +++ b/drivers/acpi/acpi_pad.c
214 @@ -36,6 +36,7 @@
215 #define ACPI_PROCESSOR_AGGREGATOR_DEVICE_NAME "Processor Aggregator"
216 #define ACPI_PROCESSOR_AGGREGATOR_NOTIFY 0x80
217 static DEFINE_MUTEX(isolated_cpus_lock);
218 +static DEFINE_MUTEX(round_robin_lock);
219
220 static unsigned long power_saving_mwait_eax;
221
222 @@ -107,7 +108,7 @@ static void round_robin_cpu(unsigned int tsk_index)
223 if (!alloc_cpumask_var(&tmp, GFP_KERNEL))
224 return;
225
226 - mutex_lock(&isolated_cpus_lock);
227 + mutex_lock(&round_robin_lock);
228 cpumask_clear(tmp);
229 for_each_cpu(cpu, pad_busy_cpus)
230 cpumask_or(tmp, tmp, topology_thread_cpumask(cpu));
231 @@ -116,7 +117,7 @@ static void round_robin_cpu(unsigned int tsk_index)
232 if (cpumask_empty(tmp))
233 cpumask_andnot(tmp, cpu_online_mask, pad_busy_cpus);
234 if (cpumask_empty(tmp)) {
235 - mutex_unlock(&isolated_cpus_lock);
236 + mutex_unlock(&round_robin_lock);
237 return;
238 }
239 for_each_cpu(cpu, tmp) {
240 @@ -131,7 +132,7 @@ static void round_robin_cpu(unsigned int tsk_index)
241 tsk_in_cpu[tsk_index] = preferred_cpu;
242 cpumask_set_cpu(preferred_cpu, pad_busy_cpus);
243 cpu_weight[preferred_cpu]++;
244 - mutex_unlock(&isolated_cpus_lock);
245 + mutex_unlock(&round_robin_lock);
246
247 set_cpus_allowed_ptr(current, cpumask_of(preferred_cpu));
248 }
249 diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c
250 index 77255f2..0364b05 100644
251 --- a/drivers/acpi/sysfs.c
252 +++ b/drivers/acpi/sysfs.c
253 @@ -173,7 +173,7 @@ static int param_set_trace_state(const char *val, struct kernel_param *kp)
254 {
255 int result = 0;
256
257 - if (!strncmp(val, "enable", strlen("enable") - 1)) {
258 + if (!strncmp(val, "enable", strlen("enable"))) {
259 result = acpi_debug_trace(trace_method_name, trace_debug_level,
260 trace_debug_layer, 0);
261 if (result)
262 @@ -181,7 +181,7 @@ static int param_set_trace_state(const char *val, struct kernel_param *kp)
263 goto exit;
264 }
265
266 - if (!strncmp(val, "disable", strlen("disable") - 1)) {
267 + if (!strncmp(val, "disable", strlen("disable"))) {
268 int name = 0;
269 result = acpi_debug_trace((char *)&name, trace_debug_level,
270 trace_debug_layer, 0);
271 diff --git a/drivers/block/umem.c b/drivers/block/umem.c
272 index 031ca72..afa8463 100644
273 --- a/drivers/block/umem.c
274 +++ b/drivers/block/umem.c
275 @@ -513,6 +513,44 @@ static void process_page(unsigned long data)
276 }
277 }
278
279 +struct mm_plug_cb {
280 + struct blk_plug_cb cb;
281 + struct cardinfo *card;
282 +};
283 +
284 +static void mm_unplug(struct blk_plug_cb *cb)
285 +{
286 + struct mm_plug_cb *mmcb = container_of(cb, struct mm_plug_cb, cb);
287 +
288 + spin_lock_irq(&mmcb->card->lock);
289 + activate(mmcb->card);
290 + spin_unlock_irq(&mmcb->card->lock);
291 + kfree(mmcb);
292 +}
293 +
294 +static int mm_check_plugged(struct cardinfo *card)
295 +{
296 + struct blk_plug *plug = current->plug;
297 + struct mm_plug_cb *mmcb;
298 +
299 + if (!plug)
300 + return 0;
301 +
302 + list_for_each_entry(mmcb, &plug->cb_list, cb.list) {
303 + if (mmcb->cb.callback == mm_unplug && mmcb->card == card)
304 + return 1;
305 + }
306 + /* Not currently on the callback list */
307 + mmcb = kmalloc(sizeof(*mmcb), GFP_ATOMIC);
308 + if (!mmcb)
309 + return 0;
310 +
311 + mmcb->card = card;
312 + mmcb->cb.callback = mm_unplug;
313 + list_add(&mmcb->cb.list, &plug->cb_list);
314 + return 1;
315 +}
316 +
317 static int mm_make_request(struct request_queue *q, struct bio *bio)
318 {
319 struct cardinfo *card = q->queuedata;
320 @@ -523,6 +561,8 @@ static int mm_make_request(struct request_queue *q, struct bio *bio)
321 *card->biotail = bio;
322 bio->bi_next = NULL;
323 card->biotail = &bio->bi_next;
324 + if (bio->bi_rw & REQ_SYNC || !mm_check_plugged(card))
325 + activate(card);
326 spin_unlock_irq(&card->lock);
327
328 return 0;
329 diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
330 index 1bbb85b..a303b61 100644
331 --- a/drivers/gpu/drm/drm_edid.c
332 +++ b/drivers/gpu/drm/drm_edid.c
333 @@ -584,7 +584,7 @@ static bool
334 drm_monitor_supports_rb(struct edid *edid)
335 {
336 if (edid->revision >= 4) {
337 - bool ret;
338 + bool ret = false;
339 drm_for_each_detailed_block((u8 *)edid, is_rb, &ret);
340 return ret;
341 }
342 diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c
343 index bc7dcaa..5ad0b51 100644
344 --- a/drivers/gpu/drm/i915/i915_suspend.c
345 +++ b/drivers/gpu/drm/i915/i915_suspend.c
346 @@ -739,8 +739,11 @@ static void i915_restore_display(struct drm_device *dev)
347 if (HAS_PCH_SPLIT(dev)) {
348 I915_WRITE(BLC_PWM_PCH_CTL1, dev_priv->saveBLC_PWM_CTL);
349 I915_WRITE(BLC_PWM_PCH_CTL2, dev_priv->saveBLC_PWM_CTL2);
350 - I915_WRITE(BLC_PWM_CPU_CTL, dev_priv->saveBLC_CPU_PWM_CTL);
351 + /* NOTE: BLC_PWM_CPU_CTL must be written after BLC_PWM_CPU_CTL2;
352 + * otherwise we get blank eDP screen after S3 on some machines
353 + */
354 I915_WRITE(BLC_PWM_CPU_CTL2, dev_priv->saveBLC_CPU_PWM_CTL2);
355 + I915_WRITE(BLC_PWM_CPU_CTL, dev_priv->saveBLC_CPU_PWM_CTL);
356 I915_WRITE(PCH_PP_ON_DELAYS, dev_priv->savePP_ON_DELAYS);
357 I915_WRITE(PCH_PP_OFF_DELAYS, dev_priv->savePP_OFF_DELAYS);
358 I915_WRITE(PCH_PP_DIVISOR, dev_priv->savePP_DIVISOR);
359 diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
360 index 39aee6d..ea71f78 100644
361 --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
362 +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
363 @@ -487,7 +487,7 @@ int nouveau_fbcon_init(struct drm_device *dev)
364 nfbdev->helper.funcs = &nouveau_fbcon_helper_funcs;
365
366 ret = drm_fb_helper_init(dev, &nfbdev->helper,
367 - nv_two_heads(dev) ? 2 : 1, 4);
368 + dev->mode_config.num_crtc, 4);
369 if (ret) {
370 kfree(nfbdev);
371 return ret;
372 diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c
373 index 4c07436..d99aa84 100644
374 --- a/drivers/hwmon/applesmc.c
375 +++ b/drivers/hwmon/applesmc.c
376 @@ -215,7 +215,7 @@ static int read_smc(u8 cmd, const char *key, u8 *buffer, u8 len)
377 int i;
378
379 if (send_command(cmd) || send_argument(key)) {
380 - pr_warn("%s: read arg fail\n", key);
381 + pr_warn("%.4s: read arg fail\n", key);
382 return -EIO;
383 }
384
385 @@ -223,7 +223,7 @@ static int read_smc(u8 cmd, const char *key, u8 *buffer, u8 len)
386
387 for (i = 0; i < len; i++) {
388 if (__wait_status(0x05)) {
389 - pr_warn("%s: read data fail\n", key);
390 + pr_warn("%.4s: read data fail\n", key);
391 return -EIO;
392 }
393 buffer[i] = inb(APPLESMC_DATA_PORT);
394 diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
395 index 3cf2353..252defd 100644
396 --- a/drivers/hwmon/coretemp.c
397 +++ b/drivers/hwmon/coretemp.c
398 @@ -709,7 +709,7 @@ static void __cpuinit get_core_online(unsigned int cpu)
399 * sensors. We check this bit only, all the early CPUs
400 * without thermal sensors will be filtered out.
401 */
402 - if (!cpu_has(c, X86_FEATURE_DTS))
403 + if (!cpu_has(c, X86_FEATURE_DTHERM))
404 return;
405
406 if (!pdev) {
407 diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
408 index 0d6c42f..b65a7c5 100644
409 --- a/drivers/md/raid10.c
410 +++ b/drivers/md/raid10.c
411 @@ -1858,6 +1858,12 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr,
412 /* want to reconstruct this device */
413 rb2 = r10_bio;
414 sect = raid10_find_virt(conf, sector_nr, i);
415 + if (sect >= mddev->resync_max_sectors) {
416 + /* last stripe is not complete - don't
417 + * try to recover this sector.
418 + */
419 + continue;
420 + }
421 /* Unless we are doing a full sync, we only need
422 * to recover the block if it is set in the bitmap
423 */
424 diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
425 index 1f6c68d..cff955a 100644
426 --- a/drivers/md/raid5.c
427 +++ b/drivers/md/raid5.c
428 @@ -199,12 +199,14 @@ static void __release_stripe(raid5_conf_t *conf, struct stripe_head *sh)
429 BUG_ON(!list_empty(&sh->lru));
430 BUG_ON(atomic_read(&conf->active_stripes)==0);
431 if (test_bit(STRIPE_HANDLE, &sh->state)) {
432 - if (test_bit(STRIPE_DELAYED, &sh->state))
433 + if (test_bit(STRIPE_DELAYED, &sh->state) &&
434 + !test_bit(STRIPE_PREREAD_ACTIVE, &sh->state))
435 list_add_tail(&sh->lru, &conf->delayed_list);
436 else if (test_bit(STRIPE_BIT_DELAY, &sh->state) &&
437 sh->bm_seq - conf->seq_write > 0)
438 list_add_tail(&sh->lru, &conf->bitmap_list);
439 else {
440 + clear_bit(STRIPE_DELAYED, &sh->state);
441 clear_bit(STRIPE_BIT_DELAY, &sh->state);
442 list_add_tail(&sh->lru, &conf->handle_list);
443 }
444 @@ -3846,7 +3848,6 @@ static int chunk_aligned_read(mddev_t *mddev, struct bio * raid_bio)
445 raid_bio->bi_next = (void*)rdev;
446 align_bi->bi_bdev = rdev->bdev;
447 align_bi->bi_flags &= ~(1 << BIO_SEG_VALID);
448 - align_bi->bi_sector += rdev->data_offset;
449
450 if (!bio_fits_rdev(align_bi)) {
451 /* too big in some way */
452 @@ -3855,6 +3856,9 @@ static int chunk_aligned_read(mddev_t *mddev, struct bio * raid_bio)
453 return 0;
454 }
455
456 + /* No reshape active, so we can trust rdev->data_offset */
457 + align_bi->bi_sector += rdev->data_offset;
458 +
459 spin_lock_irq(&conf->device_lock);
460 wait_event_lock_irq(conf->wait_for_stripe,
461 conf->quiesce == 0,
462 diff --git a/drivers/media/dvb/siano/smsusb.c b/drivers/media/dvb/siano/smsusb.c
463 index d755407..4e5719e 100644
464 --- a/drivers/media/dvb/siano/smsusb.c
465 +++ b/drivers/media/dvb/siano/smsusb.c
466 @@ -543,6 +543,8 @@ static const struct usb_device_id smsusb_id_table[] __devinitconst = {
467 .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
468 { USB_DEVICE(0x2040, 0xc0a0),
469 .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
470 + { USB_DEVICE(0x2040, 0xf5a0),
471 + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
472 { } /* Terminating entry */
473 };
474
475 diff --git a/drivers/mtd/nand/cafe_nand.c b/drivers/mtd/nand/cafe_nand.c
476 index 87ebb4e..f5cdc56 100644
477 --- a/drivers/mtd/nand/cafe_nand.c
478 +++ b/drivers/mtd/nand/cafe_nand.c
479 @@ -102,7 +102,7 @@ static const char *part_probes[] = { "cmdlinepart", "RedBoot", NULL };
480 static int cafe_device_ready(struct mtd_info *mtd)
481 {
482 struct cafe_priv *cafe = mtd->priv;
483 - int result = !!(cafe_readl(cafe, NAND_STATUS) | 0x40000000);
484 + int result = !!(cafe_readl(cafe, NAND_STATUS) & 0x40000000);
485 uint32_t irqs = cafe_readl(cafe, NAND_IRQ);
486
487 cafe_writel(cafe, irqs, NAND_IRQ);
488 diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
489 index a485f7f..2ce5db5 100644
490 --- a/drivers/net/benet/be_main.c
491 +++ b/drivers/net/benet/be_main.c
492 @@ -763,6 +763,8 @@ static netdev_tx_t be_xmit(struct sk_buff *skb,
493
494 copied = make_tx_wrbs(adapter, skb, wrb_cnt, dummy_wrb);
495 if (copied) {
496 + int gso_segs = skb_shinfo(skb)->gso_segs;
497 +
498 /* record the sent skb in the sent_skb table */
499 BUG_ON(tx_obj->sent_skb_list[start]);
500 tx_obj->sent_skb_list[start] = skb;
501 @@ -780,8 +782,7 @@ static netdev_tx_t be_xmit(struct sk_buff *skb,
502
503 be_txq_notify(adapter, txq->id, wrb_cnt);
504
505 - be_tx_stats_update(adapter, wrb_cnt, copied,
506 - skb_shinfo(skb)->gso_segs, stopped);
507 + be_tx_stats_update(adapter, wrb_cnt, copied, gso_segs, stopped);
508 } else {
509 txq->head = start;
510 dev_kfree_skb_any(skb);
511 diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
512 index e6da842..504e201 100644
513 --- a/drivers/net/bonding/bond_main.c
514 +++ b/drivers/net/bonding/bond_main.c
515 @@ -77,6 +77,7 @@
516 #include <net/route.h>
517 #include <net/net_namespace.h>
518 #include <net/netns/generic.h>
519 +#include <net/pkt_sched.h>
520 #include "bonding.h"
521 #include "bond_3ad.h"
522 #include "bond_alb.h"
523 @@ -388,8 +389,6 @@ struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr)
524 return next;
525 }
526
527 -#define bond_queue_mapping(skb) (*(u16 *)((skb)->cb))
528 -
529 /**
530 * bond_dev_queue_xmit - Prepare skb for xmit.
531 *
532 @@ -403,7 +402,9 @@ int bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb,
533 skb->dev = slave_dev;
534 skb->priority = 1;
535
536 - skb->queue_mapping = bond_queue_mapping(skb);
537 + BUILD_BUG_ON(sizeof(skb->queue_mapping) !=
538 + sizeof(qdisc_skb_cb(skb)->bond_queue_mapping));
539 + skb->queue_mapping = qdisc_skb_cb(skb)->bond_queue_mapping;
540
541 if (unlikely(netpoll_tx_running(slave_dev)))
542 bond_netpoll_send_skb(bond_get_slave_by_dev(bond, slave_dev), skb);
543 @@ -4240,7 +4241,7 @@ static u16 bond_select_queue(struct net_device *dev, struct sk_buff *skb)
544 /*
545 * Save the original txq to restore before passing to the driver
546 */
547 - bond_queue_mapping(skb) = skb->queue_mapping;
548 + qdisc_skb_cb(skb)->bond_queue_mapping = skb->queue_mapping;
549
550 if (unlikely(txq >= dev->real_num_tx_queues)) {
551 do {
552 diff --git a/drivers/net/can/c_can/c_can.c b/drivers/net/can/c_can/c_can.c
553 index 1f8a824..1bf8032 100644
554 --- a/drivers/net/can/c_can/c_can.c
555 +++ b/drivers/net/can/c_can/c_can.c
556 @@ -592,8 +592,8 @@ static void c_can_chip_config(struct net_device *dev)
557 priv->write_reg(priv, &priv->regs->control,
558 CONTROL_ENABLE_AR);
559
560 - if (priv->can.ctrlmode & (CAN_CTRLMODE_LISTENONLY &
561 - CAN_CTRLMODE_LOOPBACK)) {
562 + if ((priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY) &&
563 + (priv->can.ctrlmode & CAN_CTRLMODE_LOOPBACK)) {
564 /* loopback + silent mode : useful for hot self-test */
565 priv->write_reg(priv, &priv->regs->control, CONTROL_EIE |
566 CONTROL_SIE | CONTROL_IE | CONTROL_TEST);
567 diff --git a/drivers/net/dummy.c b/drivers/net/dummy.c
568 index 3fa19c1..098ff31 100644
569 --- a/drivers/net/dummy.c
570 +++ b/drivers/net/dummy.c
571 @@ -37,6 +37,7 @@
572 #include <linux/rtnetlink.h>
573 #include <net/rtnetlink.h>
574 #include <linux/u64_stats_sync.h>
575 +#include <linux/sched.h>
576
577 static int numdummies = 1;
578
579 @@ -186,8 +187,10 @@ static int __init dummy_init_module(void)
580 rtnl_lock();
581 err = __rtnl_link_register(&dummy_link_ops);
582
583 - for (i = 0; i < numdummies && !err; i++)
584 + for (i = 0; i < numdummies && !err; i++) {
585 err = dummy_init_one();
586 + cond_resched();
587 + }
588 if (err < 0)
589 __rtnl_link_unregister(&dummy_link_ops);
590 rtnl_unlock();
591 diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
592 index f2e31c8..9d4a2a3 100644
593 --- a/drivers/net/sky2.c
594 +++ b/drivers/net/sky2.c
595 @@ -4206,10 +4206,12 @@ static int sky2_set_features(struct net_device *dev, u32 features)
596 struct sky2_port *sky2 = netdev_priv(dev);
597 u32 changed = dev->features ^ features;
598
599 - if (changed & NETIF_F_RXCSUM) {
600 - u32 on = features & NETIF_F_RXCSUM;
601 - sky2_write32(sky2->hw, Q_ADDR(rxqaddr[sky2->port], Q_CSR),
602 - on ? BMU_ENA_RX_CHKSUM : BMU_DIS_RX_CHKSUM);
603 + if ((changed & NETIF_F_RXCSUM) &&
604 + !(sky2->hw->flags & SKY2_HW_NEW_LE)) {
605 + sky2_write32(sky2->hw,
606 + Q_ADDR(rxqaddr[sky2->port], Q_CSR),
607 + (features & NETIF_F_RXCSUM)
608 + ? BMU_ENA_RX_CHKSUM : BMU_DIS_RX_CHKSUM);
609 }
610
611 if (changed & NETIF_F_RXHASH)
612 diff --git a/drivers/net/usb/ipheth.c b/drivers/net/usb/ipheth.c
613 index 9cf4e47..db9b212 100644
614 --- a/drivers/net/usb/ipheth.c
615 +++ b/drivers/net/usb/ipheth.c
616 @@ -59,6 +59,7 @@
617 #define USB_PRODUCT_IPHONE_3G 0x1292
618 #define USB_PRODUCT_IPHONE_3GS 0x1294
619 #define USB_PRODUCT_IPHONE_4 0x1297
620 +#define USB_PRODUCT_IPAD 0x129a
621 #define USB_PRODUCT_IPHONE_4_VZW 0x129c
622 #define USB_PRODUCT_IPHONE_4S 0x12a0
623
624 @@ -101,6 +102,10 @@ static struct usb_device_id ipheth_table[] = {
625 IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS,
626 IPHETH_USBINTF_PROTO) },
627 { USB_DEVICE_AND_INTERFACE_INFO(
628 + USB_VENDOR_APPLE, USB_PRODUCT_IPAD,
629 + IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS,
630 + IPHETH_USBINTF_PROTO) },
631 + { USB_DEVICE_AND_INTERFACE_INFO(
632 USB_VENDOR_APPLE, USB_PRODUCT_IPHONE_4_VZW,
633 IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS,
634 IPHETH_USBINTF_PROTO) },
635 diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
636 index 7c2f06e..9130a5a 100644
637 --- a/drivers/net/wireless/ath/ath9k/hw.c
638 +++ b/drivers/net/wireless/ath/ath9k/hw.c
639 @@ -530,7 +530,7 @@ static int __ath9k_hw_init(struct ath_hw *ah)
640
641 if (ah->config.serialize_regmode == SER_REG_MODE_AUTO) {
642 if (ah->hw_version.macVersion == AR_SREV_VERSION_5416_PCI ||
643 - ((AR_SREV_9160(ah) || AR_SREV_9280(ah)) &&
644 + ((AR_SREV_9160(ah) || AR_SREV_9280(ah) || AR_SREV_9287(ah)) &&
645 !ah->is_pciexpress)) {
646 ah->config.serialize_regmode =
647 SER_REG_MODE_ON;
648 @@ -682,13 +682,25 @@ static void ath9k_hw_init_qos(struct ath_hw *ah)
649
650 u32 ar9003_get_pll_sqsum_dvc(struct ath_hw *ah)
651 {
652 + struct ath_common *common = ath9k_hw_common(ah);
653 + int i = 0;
654 +
655 REG_CLR_BIT(ah, PLL3, PLL3_DO_MEAS_MASK);
656 udelay(100);
657 REG_SET_BIT(ah, PLL3, PLL3_DO_MEAS_MASK);
658
659 - while ((REG_READ(ah, PLL4) & PLL4_MEAS_DONE) == 0)
660 + while ((REG_READ(ah, PLL4) & PLL4_MEAS_DONE) == 0) {
661 +
662 udelay(100);
663
664 + if (WARN_ON_ONCE(i >= 100)) {
665 + ath_err(common, "PLL4 meaurement not done\n");
666 + break;
667 + }
668 +
669 + i++;
670 + }
671 +
672 return (REG_READ(ah, PLL3) & SQSUM_DVC_MASK) >> 3;
673 }
674 EXPORT_SYMBOL(ar9003_get_pll_sqsum_dvc);
675 diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
676 index a126a3e..633f962 100644
677 --- a/drivers/net/wireless/ath/ath9k/main.c
678 +++ b/drivers/net/wireless/ath/ath9k/main.c
679 @@ -648,6 +648,15 @@ void ath_hw_pll_work(struct work_struct *work)
680 hw_pll_work.work);
681 u32 pll_sqsum;
682
683 + /*
684 + * ensure that the PLL WAR is executed only
685 + * after the STA is associated (or) if the
686 + * beaconing had started in interfaces that
687 + * uses beacons.
688 + */
689 + if (!(sc->sc_flags & SC_OP_BEACONS))
690 + return;
691 +
692 if (AR_SREV_9485(sc->sc_ah)) {
693
694 ath9k_ps_wakeup(sc);
695 diff --git a/drivers/net/wireless/mwifiex/11n_rxreorder.c b/drivers/net/wireless/mwifiex/11n_rxreorder.c
696 index e5dfdc3..d2358cf 100644
697 --- a/drivers/net/wireless/mwifiex/11n_rxreorder.c
698 +++ b/drivers/net/wireless/mwifiex/11n_rxreorder.c
699 @@ -267,7 +267,8 @@ mwifiex_11n_create_rx_reorder_tbl(struct mwifiex_private *priv, u8 *ta,
700 else
701 last_seq = priv->rx_seq[tid];
702
703 - if (last_seq >= new_node->start_win)
704 + if (last_seq != MWIFIEX_DEF_11N_RX_SEQ_NUM &&
705 + last_seq >= new_node->start_win)
706 new_node->start_win = last_seq + 1;
707
708 new_node->win_size = win_size;
709 @@ -612,5 +613,5 @@ void mwifiex_11n_cleanup_reorder_tbl(struct mwifiex_private *priv)
710 spin_unlock_irqrestore(&priv->rx_reorder_tbl_lock, flags);
711
712 INIT_LIST_HEAD(&priv->rx_reorder_tbl_ptr);
713 - memset(priv->rx_seq, 0, sizeof(priv->rx_seq));
714 + mwifiex_reset_11n_rx_seq_num(priv);
715 }
716 diff --git a/drivers/net/wireless/mwifiex/11n_rxreorder.h b/drivers/net/wireless/mwifiex/11n_rxreorder.h
717 index f3ca8c8..7576c2a 100644
718 --- a/drivers/net/wireless/mwifiex/11n_rxreorder.h
719 +++ b/drivers/net/wireless/mwifiex/11n_rxreorder.h
720 @@ -37,6 +37,13 @@
721
722 #define ADDBA_RSP_STATUS_ACCEPT 0
723
724 +#define MWIFIEX_DEF_11N_RX_SEQ_NUM 0xffff
725 +
726 +static inline void mwifiex_reset_11n_rx_seq_num(struct mwifiex_private *priv)
727 +{
728 + memset(priv->rx_seq, 0xff, sizeof(priv->rx_seq));
729 +}
730 +
731 int mwifiex_11n_rx_reorder_pkt(struct mwifiex_private *,
732 u16 seqNum,
733 u16 tid, u8 *ta,
734 diff --git a/drivers/net/wireless/mwifiex/wmm.c b/drivers/net/wireless/mwifiex/wmm.c
735 index 91634da..2cdb41a 100644
736 --- a/drivers/net/wireless/mwifiex/wmm.c
737 +++ b/drivers/net/wireless/mwifiex/wmm.c
738 @@ -406,6 +406,8 @@ mwifiex_wmm_init(struct mwifiex_adapter *adapter)
739 priv->add_ba_param.tx_win_size = MWIFIEX_AMPDU_DEF_TXWINSIZE;
740 priv->add_ba_param.rx_win_size = MWIFIEX_AMPDU_DEF_RXWINSIZE;
741
742 + mwifiex_reset_11n_rx_seq_num(priv);
743 +
744 atomic_set(&priv->wmm.tx_pkts_queued, 0);
745 atomic_set(&priv->wmm.highest_queued_prio, HIGH_PRIO_TID);
746 }
747 diff --git a/drivers/net/wireless/rtl818x/rtl8187/leds.c b/drivers/net/wireless/rtl818x/rtl8187/leds.c
748 index 2e0de2f..c2d5b49 100644
749 --- a/drivers/net/wireless/rtl818x/rtl8187/leds.c
750 +++ b/drivers/net/wireless/rtl818x/rtl8187/leds.c
751 @@ -117,7 +117,7 @@ static void rtl8187_led_brightness_set(struct led_classdev *led_dev,
752 radio_on = true;
753 } else if (radio_on) {
754 radio_on = false;
755 - cancel_delayed_work_sync(&priv->led_on);
756 + cancel_delayed_work(&priv->led_on);
757 ieee80211_queue_delayed_work(hw, &priv->led_off, 0);
758 }
759 } else if (radio_on) {
760 diff --git a/drivers/oprofile/oprofile_perf.c b/drivers/oprofile/oprofile_perf.c
761 index 9046f7b..137406c 100644
762 --- a/drivers/oprofile/oprofile_perf.c
763 +++ b/drivers/oprofile/oprofile_perf.c
764 @@ -25,7 +25,7 @@ static int oprofile_perf_enabled;
765 static DEFINE_MUTEX(oprofile_perf_mutex);
766
767 static struct op_counter_config *counter_config;
768 -static struct perf_event **perf_events[nr_cpumask_bits];
769 +static struct perf_event **perf_events[NR_CPUS];
770 static int num_counters;
771
772 /*
773 diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
774 index 46767c5..475a340 100644
775 --- a/drivers/pci/pci-driver.c
776 +++ b/drivers/pci/pci-driver.c
777 @@ -726,6 +726,18 @@ static int pci_pm_suspend_noirq(struct device *dev)
778
779 pci_pm_set_unknown_state(pci_dev);
780
781 + /*
782 + * Some BIOSes from ASUS have a bug: If a USB EHCI host controller's
783 + * PCI COMMAND register isn't 0, the BIOS assumes that the controller
784 + * hasn't been quiesced and tries to turn it off. If the controller
785 + * is already in D3, this can hang or cause memory corruption.
786 + *
787 + * Since the value of the COMMAND register doesn't matter once the
788 + * device has been suspended, we can safely set it to 0 here.
789 + */
790 + if (pci_dev->class == PCI_CLASS_SERIAL_USB_EHCI)
791 + pci_write_config_word(pci_dev, PCI_COMMAND, 0);
792 +
793 return 0;
794 }
795
796 diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
797 index bf401ae..d549bbc 100644
798 --- a/drivers/pci/pci.c
799 +++ b/drivers/pci/pci.c
800 @@ -1682,11 +1682,6 @@ int pci_prepare_to_sleep(struct pci_dev *dev)
801 if (target_state == PCI_POWER_ERROR)
802 return -EIO;
803
804 - /* Some devices mustn't be in D3 during system sleep */
805 - if (target_state == PCI_D3hot &&
806 - (dev->dev_flags & PCI_DEV_FLAGS_NO_D3_DURING_SLEEP))
807 - return 0;
808 -
809 pci_enable_wake(dev, target_state, device_may_wakeup(&dev->dev));
810
811 error = pci_set_power_state(dev, target_state);
812 diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
813 index 975af43..a6b07dd 100644
814 --- a/drivers/pci/quirks.c
815 +++ b/drivers/pci/quirks.c
816 @@ -2856,32 +2856,6 @@ static void __devinit disable_igfx_irq(struct pci_dev *dev)
817 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0102, disable_igfx_irq);
818 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq);
819
820 -/*
821 - * The Intel 6 Series/C200 Series chipset's EHCI controllers on many
822 - * ASUS motherboards will cause memory corruption or a system crash
823 - * if they are in D3 while the system is put into S3 sleep.
824 - */
825 -static void __devinit asus_ehci_no_d3(struct pci_dev *dev)
826 -{
827 - const char *sys_info;
828 - static const char good_Asus_board[] = "P8Z68-V";
829 -
830 - if (dev->dev_flags & PCI_DEV_FLAGS_NO_D3_DURING_SLEEP)
831 - return;
832 - if (dev->subsystem_vendor != PCI_VENDOR_ID_ASUSTEK)
833 - return;
834 - sys_info = dmi_get_system_info(DMI_BOARD_NAME);
835 - if (sys_info && memcmp(sys_info, good_Asus_board,
836 - sizeof(good_Asus_board) - 1) == 0)
837 - return;
838 -
839 - dev_info(&dev->dev, "broken D3 during system sleep on ASUS\n");
840 - dev->dev_flags |= PCI_DEV_FLAGS_NO_D3_DURING_SLEEP;
841 - device_set_wakeup_capable(&dev->dev, false);
842 -}
843 -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x1c26, asus_ehci_no_d3);
844 -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x1c2d, asus_ehci_no_d3);
845 -
846 static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f,
847 struct pci_fixup *end)
848 {
849 diff --git a/drivers/rtc/rtc-mxc.c b/drivers/rtc/rtc-mxc.c
850 index 39e41fb..5160354 100644
851 --- a/drivers/rtc/rtc-mxc.c
852 +++ b/drivers/rtc/rtc-mxc.c
853 @@ -191,10 +191,11 @@ static irqreturn_t mxc_rtc_interrupt(int irq, void *dev_id)
854 struct platform_device *pdev = dev_id;
855 struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
856 void __iomem *ioaddr = pdata->ioaddr;
857 + unsigned long flags;
858 u32 status;
859 u32 events = 0;
860
861 - spin_lock_irq(&pdata->rtc->irq_lock);
862 + spin_lock_irqsave(&pdata->rtc->irq_lock, flags);
863 status = readw(ioaddr + RTC_RTCISR) & readw(ioaddr + RTC_RTCIENR);
864 /* clear interrupt sources */
865 writew(status, ioaddr + RTC_RTCISR);
866 @@ -217,7 +218,7 @@ static irqreturn_t mxc_rtc_interrupt(int irq, void *dev_id)
867 rtc_update_alarm(&pdev->dev, &pdata->g_rtc_alarm);
868
869 rtc_update_irq(pdata->rtc, 1, events);
870 - spin_unlock_irq(&pdata->rtc->irq_lock);
871 + spin_unlock_irqrestore(&pdata->rtc->irq_lock, flags);
872
873 return IRQ_HANDLED;
874 }
875 diff --git a/drivers/target/tcm_fc/tfc_sess.c b/drivers/target/tcm_fc/tfc_sess.c
876 index 7491e21..a40541c 100644
877 --- a/drivers/target/tcm_fc/tfc_sess.c
878 +++ b/drivers/target/tcm_fc/tfc_sess.c
879 @@ -64,7 +64,8 @@ static struct ft_tport *ft_tport_create(struct fc_lport *lport)
880 struct ft_tport *tport;
881 int i;
882
883 - tport = rcu_dereference(lport->prov[FC_TYPE_FCP]);
884 + tport = rcu_dereference_protected(lport->prov[FC_TYPE_FCP],
885 + lockdep_is_held(&ft_lport_lock));
886 if (tport && tport->tpg)
887 return tport;
888
889 diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
890 index 5a244cf..8a72e05 100644
891 --- a/drivers/usb/class/cdc-wdm.c
892 +++ b/drivers/usb/class/cdc-wdm.c
893 @@ -457,6 +457,8 @@ retry:
894 goto retry;
895 }
896 if (!desc->reslength) { /* zero length read */
897 + dev_dbg(&desc->intf->dev, "%s: zero length - clearing WDM_READ\n", __func__);
898 + clear_bit(WDM_READ, &desc->flags);
899 spin_unlock_irq(&desc->iuspin);
900 goto retry;
901 }
902 diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
903 index 0757b19..9ab094c 100644
904 --- a/drivers/usb/host/pci-quirks.c
905 +++ b/drivers/usb/host/pci-quirks.c
906 @@ -755,6 +755,7 @@ EXPORT_SYMBOL_GPL(usb_is_intel_switchable_xhci);
907 */
908 void usb_enable_xhci_ports(struct pci_dev *xhci_pdev)
909 {
910 +#if defined(CONFIG_USB_XHCI_HCD) || defined(CONFIG_USB_XHCI_HCD_MODULE)
911 u32 ports_available;
912
913 ports_available = 0xffffffff;
914 @@ -782,6 +783,18 @@ void usb_enable_xhci_ports(struct pci_dev *xhci_pdev)
915 &ports_available);
916 dev_dbg(&xhci_pdev->dev, "USB 2.0 ports that are now switched over "
917 "to xHCI: 0x%x\n", ports_available);
918 +#else
919 + /* Don't switchover the ports if the user hasn't compiled the xHCI
920 + * driver. Otherwise they will see "dead" USB ports that don't power
921 + * the devices.
922 + */
923 + dev_warn(&xhci_pdev->dev,
924 + "CONFIG_USB_XHCI_HCD is turned off, "
925 + "defaulting to EHCI.\n");
926 + dev_warn(&xhci_pdev->dev,
927 + "USB 3.0 devices will work at USB 2.0 speeds.\n");
928 +#endif /* CONFIG_USB_XHCI_HCD || CONFIG_USB_XHCI_HCD_MODULE */
929 +
930 }
931 EXPORT_SYMBOL_GPL(usb_enable_xhci_ports);
932
933 diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
934 index aa0c43f..35e6b5f 100644
935 --- a/drivers/usb/serial/cp210x.c
936 +++ b/drivers/usb/serial/cp210x.c
937 @@ -93,6 +93,7 @@ static const struct usb_device_id id_table[] = {
938 { USB_DEVICE(0x10C4, 0x814B) }, /* West Mountain Radio RIGtalk */
939 { USB_DEVICE(0x10C4, 0x8156) }, /* B&G H3000 link cable */
940 { USB_DEVICE(0x10C4, 0x815E) }, /* Helicomm IP-Link 1220-DVM */
941 + { USB_DEVICE(0x10C4, 0x815F) }, /* Timewave HamLinkUSB */
942 { USB_DEVICE(0x10C4, 0x818B) }, /* AVIT Research USB to TTL */
943 { USB_DEVICE(0x10C4, 0x819F) }, /* MJS USB Toslink Switcher */
944 { USB_DEVICE(0x10C4, 0x81A6) }, /* ThinkOptics WavIt */
945 @@ -134,7 +135,13 @@ static const struct usb_device_id id_table[] = {
946 { USB_DEVICE(0x10CE, 0xEA6A) }, /* Silicon Labs MobiData GPRS USB Modem 100EU */
947 { USB_DEVICE(0x13AD, 0x9999) }, /* Baltech card reader */
948 { USB_DEVICE(0x1555, 0x0004) }, /* Owen AC4 USB-RS485 Converter */
949 + { USB_DEVICE(0x166A, 0x0201) }, /* Clipsal 5500PACA C-Bus Pascal Automation Controller */
950 + { USB_DEVICE(0x166A, 0x0301) }, /* Clipsal 5800PC C-Bus Wireless PC Interface */
951 { USB_DEVICE(0x166A, 0x0303) }, /* Clipsal 5500PCU C-Bus USB interface */
952 + { USB_DEVICE(0x166A, 0x0304) }, /* Clipsal 5000CT2 C-Bus Black and White Touchscreen */
953 + { USB_DEVICE(0x166A, 0x0305) }, /* Clipsal C-5000CT2 C-Bus Spectrum Colour Touchscreen */
954 + { USB_DEVICE(0x166A, 0x0401) }, /* Clipsal L51xx C-Bus Architectural Dimmer */
955 + { USB_DEVICE(0x166A, 0x0101) }, /* Clipsal 5560884 C-Bus Multi-room Audio Matrix Switcher */
956 { USB_DEVICE(0x16D6, 0x0001) }, /* Jablotron serial interface */
957 { USB_DEVICE(0x16DC, 0x0010) }, /* W-IE-NE-R Plein & Baus GmbH PL512 Power Supply */
958 { USB_DEVICE(0x16DC, 0x0011) }, /* W-IE-NE-R Plein & Baus GmbH RCM Remote Control for MARATON Power Supply */
959 @@ -146,7 +153,11 @@ static const struct usb_device_id id_table[] = {
960 { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */
961 { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */
962 { USB_DEVICE(0x1BE3, 0x07A6) }, /* WAGO 750-923 USB Service Cable */
963 + { USB_DEVICE(0x1E29, 0x0102) }, /* Festo CPX-USB */
964 + { USB_DEVICE(0x1E29, 0x0501) }, /* Festo CMSP */
965 { USB_DEVICE(0x3195, 0xF190) }, /* Link Instruments MSO-19 */
966 + { USB_DEVICE(0x3195, 0xF280) }, /* Link Instruments MSO-28 */
967 + { USB_DEVICE(0x3195, 0xF281) }, /* Link Instruments MSO-28 */
968 { USB_DEVICE(0x413C, 0x9500) }, /* DW700 GPS USB interface */
969 { } /* Terminating Entry */
970 };
971 diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
972 index ce02457..d232623 100644
973 --- a/drivers/usb/serial/option.c
974 +++ b/drivers/usb/serial/option.c
975 @@ -236,6 +236,7 @@ static void option_instat_callback(struct urb *urb);
976 #define NOVATELWIRELESS_PRODUCT_G1 0xA001
977 #define NOVATELWIRELESS_PRODUCT_G1_M 0xA002
978 #define NOVATELWIRELESS_PRODUCT_G2 0xA010
979 +#define NOVATELWIRELESS_PRODUCT_MC551 0xB001
980
981 /* AMOI PRODUCTS */
982 #define AMOI_VENDOR_ID 0x1614
983 @@ -496,6 +497,19 @@ static void option_instat_callback(struct urb *urb);
984
985 /* MediaTek products */
986 #define MEDIATEK_VENDOR_ID 0x0e8d
987 +#define MEDIATEK_PRODUCT_DC_1COM 0x00a0
988 +#define MEDIATEK_PRODUCT_DC_4COM 0x00a5
989 +#define MEDIATEK_PRODUCT_DC_5COM 0x00a4
990 +#define MEDIATEK_PRODUCT_7208_1COM 0x7101
991 +#define MEDIATEK_PRODUCT_7208_2COM 0x7102
992 +#define MEDIATEK_PRODUCT_FP_1COM 0x0003
993 +#define MEDIATEK_PRODUCT_FP_2COM 0x0023
994 +#define MEDIATEK_PRODUCT_FPDC_1COM 0x0043
995 +#define MEDIATEK_PRODUCT_FPDC_2COM 0x0033
996 +
997 +/* Cellient products */
998 +#define CELLIENT_VENDOR_ID 0x2692
999 +#define CELLIENT_PRODUCT_MEN200 0x9005
1000
1001 /* some devices interfaces need special handling due to a number of reasons */
1002 enum option_blacklist_reason {
1003 @@ -549,6 +563,10 @@ static const struct option_blacklist_info net_intf1_blacklist = {
1004 .reserved = BIT(1),
1005 };
1006
1007 +static const struct option_blacklist_info net_intf2_blacklist = {
1008 + .reserved = BIT(2),
1009 +};
1010 +
1011 static const struct option_blacklist_info net_intf3_blacklist = {
1012 .reserved = BIT(3),
1013 };
1014 @@ -734,6 +752,8 @@ static const struct usb_device_id option_ids[] = {
1015 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_G1) },
1016 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_G1_M) },
1017 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_G2) },
1018 + /* Novatel Ovation MC551 a.k.a. Verizon USB551L */
1019 + { USB_DEVICE_AND_INTERFACE_INFO(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC551, 0xff, 0xff, 0xff) },
1020
1021 { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01) },
1022 { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01A) },
1023 @@ -1090,6 +1110,8 @@ static const struct usb_device_id option_ids[] = {
1024 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1298, 0xff, 0xff, 0xff) },
1025 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1299, 0xff, 0xff, 0xff) },
1026 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1300, 0xff, 0xff, 0xff) },
1027 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1402, 0xff, 0xff, 0xff),
1028 + .driver_info = (kernel_ulong_t)&net_intf2_blacklist },
1029 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2002, 0xff,
1030 0xff, 0xff), .driver_info = (kernel_ulong_t)&zte_k3765_z_blacklist },
1031 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2003, 0xff, 0xff, 0xff) },
1032 @@ -1231,6 +1253,18 @@ static const struct usb_device_id option_ids[] = {
1033 { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, 0x00a1, 0xff, 0x02, 0x01) },
1034 { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, 0x00a2, 0xff, 0x00, 0x00) },
1035 { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, 0x00a2, 0xff, 0x02, 0x01) }, /* MediaTek MT6276M modem & app port */
1036 + { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_1COM, 0x0a, 0x00, 0x00) },
1037 + { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_5COM, 0xff, 0x02, 0x01) },
1038 + { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_5COM, 0xff, 0x00, 0x00) },
1039 + { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM, 0xff, 0x02, 0x01) },
1040 + { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM, 0xff, 0x00, 0x00) },
1041 + { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_7208_1COM, 0x02, 0x00, 0x00) },
1042 + { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_7208_2COM, 0x02, 0x02, 0x01) },
1043 + { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_FP_1COM, 0x0a, 0x00, 0x00) },
1044 + { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_FP_2COM, 0x0a, 0x00, 0x00) },
1045 + { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_FPDC_1COM, 0x0a, 0x00, 0x00) },
1046 + { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_FPDC_2COM, 0x0a, 0x00, 0x00) },
1047 + { USB_DEVICE(CELLIENT_VENDOR_ID, CELLIENT_PRODUCT_MEN200) },
1048 { } /* Terminating entry */
1049 };
1050 MODULE_DEVICE_TABLE(usb, option_ids);
1051 diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
1052 index ea966b3..61047fe 100644
1053 --- a/drivers/vhost/vhost.c
1054 +++ b/drivers/vhost/vhost.c
1055 @@ -217,6 +217,8 @@ static int vhost_worker(void *data)
1056 if (work) {
1057 __set_current_state(TASK_RUNNING);
1058 work->fn(work);
1059 + if (need_resched())
1060 + schedule();
1061 } else
1062 schedule();
1063
1064 diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
1065 index 7fa128d..faf7d0b 100644
1066 --- a/fs/btrfs/tree-log.c
1067 +++ b/fs/btrfs/tree-log.c
1068 @@ -691,6 +691,8 @@ static noinline int drop_one_dir_item(struct btrfs_trans_handle *trans,
1069 kfree(name);
1070
1071 iput(inode);
1072 +
1073 + btrfs_run_delayed_items(trans, root);
1074 return ret;
1075 }
1076
1077 @@ -896,6 +898,7 @@ again:
1078 ret = btrfs_unlink_inode(trans, root, dir,
1079 inode, victim_name,
1080 victim_name_len);
1081 + btrfs_run_delayed_items(trans, root);
1082 }
1083 kfree(victim_name);
1084 ptr = (unsigned long)(victim_ref + 1) + victim_name_len;
1085 @@ -1476,6 +1479,9 @@ again:
1086 ret = btrfs_unlink_inode(trans, root, dir, inode,
1087 name, name_len);
1088 BUG_ON(ret);
1089 +
1090 + btrfs_run_delayed_items(trans, root);
1091 +
1092 kfree(name);
1093 iput(inode);
1094
1095 diff --git a/fs/ecryptfs/kthread.c b/fs/ecryptfs/kthread.c
1096 index 69f994a..0dbe58a 100644
1097 --- a/fs/ecryptfs/kthread.c
1098 +++ b/fs/ecryptfs/kthread.c
1099 @@ -149,7 +149,7 @@ int ecryptfs_privileged_open(struct file **lower_file,
1100 (*lower_file) = dentry_open(lower_dentry, lower_mnt, flags, cred);
1101 if (!IS_ERR(*lower_file))
1102 goto out;
1103 - if (flags & O_RDONLY) {
1104 + if ((flags & O_ACCMODE) == O_RDONLY) {
1105 rc = PTR_ERR((*lower_file));
1106 goto out;
1107 }
1108 diff --git a/fs/ecryptfs/miscdev.c b/fs/ecryptfs/miscdev.c
1109 index 0dc5a3d..de42310 100644
1110 --- a/fs/ecryptfs/miscdev.c
1111 +++ b/fs/ecryptfs/miscdev.c
1112 @@ -49,7 +49,10 @@ ecryptfs_miscdev_poll(struct file *file, poll_table *pt)
1113 mutex_lock(&ecryptfs_daemon_hash_mux);
1114 /* TODO: Just use file->private_data? */
1115 rc = ecryptfs_find_daemon_by_euid(&daemon, euid, current_user_ns());
1116 - BUG_ON(rc || !daemon);
1117 + if (rc || !daemon) {
1118 + mutex_unlock(&ecryptfs_daemon_hash_mux);
1119 + return -EINVAL;
1120 + }
1121 mutex_lock(&daemon->mux);
1122 mutex_unlock(&ecryptfs_daemon_hash_mux);
1123 if (daemon->flags & ECRYPTFS_DAEMON_ZOMBIE) {
1124 @@ -122,6 +125,7 @@ ecryptfs_miscdev_open(struct inode *inode, struct file *file)
1125 goto out_unlock_daemon;
1126 }
1127 daemon->flags |= ECRYPTFS_DAEMON_MISCDEV_OPEN;
1128 + file->private_data = daemon;
1129 atomic_inc(&ecryptfs_num_miscdev_opens);
1130 out_unlock_daemon:
1131 mutex_unlock(&daemon->mux);
1132 @@ -152,9 +156,9 @@ ecryptfs_miscdev_release(struct inode *inode, struct file *file)
1133
1134 mutex_lock(&ecryptfs_daemon_hash_mux);
1135 rc = ecryptfs_find_daemon_by_euid(&daemon, euid, current_user_ns());
1136 - BUG_ON(rc || !daemon);
1137 + if (rc || !daemon)
1138 + daemon = file->private_data;
1139 mutex_lock(&daemon->mux);
1140 - BUG_ON(daemon->pid != task_pid(current));
1141 BUG_ON(!(daemon->flags & ECRYPTFS_DAEMON_MISCDEV_OPEN));
1142 daemon->flags &= ~ECRYPTFS_DAEMON_MISCDEV_OPEN;
1143 atomic_dec(&ecryptfs_num_miscdev_opens);
1144 @@ -191,31 +195,32 @@ int ecryptfs_send_miscdev(char *data, size_t data_size,
1145 struct ecryptfs_msg_ctx *msg_ctx, u8 msg_type,
1146 u16 msg_flags, struct ecryptfs_daemon *daemon)
1147 {
1148 - int rc = 0;
1149 + struct ecryptfs_message *msg;
1150
1151 - mutex_lock(&msg_ctx->mux);
1152 - msg_ctx->msg = kmalloc((sizeof(*msg_ctx->msg) + data_size),
1153 - GFP_KERNEL);
1154 - if (!msg_ctx->msg) {
1155 - rc = -ENOMEM;
1156 + msg = kmalloc((sizeof(*msg) + data_size), GFP_KERNEL);
1157 + if (!msg) {
1158 printk(KERN_ERR "%s: Out of memory whilst attempting "
1159 "to kmalloc(%zd, GFP_KERNEL)\n", __func__,
1160 - (sizeof(*msg_ctx->msg) + data_size));
1161 - goto out_unlock;
1162 + (sizeof(*msg) + data_size));
1163 + return -ENOMEM;
1164 }
1165 +
1166 + mutex_lock(&msg_ctx->mux);
1167 + msg_ctx->msg = msg;
1168 msg_ctx->msg->index = msg_ctx->index;
1169 msg_ctx->msg->data_len = data_size;
1170 msg_ctx->type = msg_type;
1171 memcpy(msg_ctx->msg->data, data, data_size);
1172 msg_ctx->msg_size = (sizeof(*msg_ctx->msg) + data_size);
1173 - mutex_lock(&daemon->mux);
1174 list_add_tail(&msg_ctx->daemon_out_list, &daemon->msg_ctx_out_queue);
1175 + mutex_unlock(&msg_ctx->mux);
1176 +
1177 + mutex_lock(&daemon->mux);
1178 daemon->num_queued_msg_ctx++;
1179 wake_up_interruptible(&daemon->wait);
1180 mutex_unlock(&daemon->mux);
1181 -out_unlock:
1182 - mutex_unlock(&msg_ctx->mux);
1183 - return rc;
1184 +
1185 + return 0;
1186 }
1187
1188 /**
1189 @@ -246,8 +251,16 @@ ecryptfs_miscdev_read(struct file *file, char __user *buf, size_t count,
1190 mutex_lock(&ecryptfs_daemon_hash_mux);
1191 /* TODO: Just use file->private_data? */
1192 rc = ecryptfs_find_daemon_by_euid(&daemon, euid, current_user_ns());
1193 - BUG_ON(rc || !daemon);
1194 + if (rc || !daemon) {
1195 + mutex_unlock(&ecryptfs_daemon_hash_mux);
1196 + return -EINVAL;
1197 + }
1198 mutex_lock(&daemon->mux);
1199 + if (task_pid(current) != daemon->pid) {
1200 + mutex_unlock(&daemon->mux);
1201 + mutex_unlock(&ecryptfs_daemon_hash_mux);
1202 + return -EPERM;
1203 + }
1204 if (daemon->flags & ECRYPTFS_DAEMON_ZOMBIE) {
1205 rc = 0;
1206 mutex_unlock(&ecryptfs_daemon_hash_mux);
1207 @@ -284,9 +297,6 @@ check_list:
1208 * message from the queue; try again */
1209 goto check_list;
1210 }
1211 - BUG_ON(euid != daemon->euid);
1212 - BUG_ON(current_user_ns() != daemon->user_ns);
1213 - BUG_ON(task_pid(current) != daemon->pid);
1214 msg_ctx = list_first_entry(&daemon->msg_ctx_out_queue,
1215 struct ecryptfs_msg_ctx, daemon_out_list);
1216 BUG_ON(!msg_ctx);
1217 diff --git a/fs/nilfs2/gcinode.c b/fs/nilfs2/gcinode.c
1218 index 08a07a2..57ceaf3 100644
1219 --- a/fs/nilfs2/gcinode.c
1220 +++ b/fs/nilfs2/gcinode.c
1221 @@ -191,6 +191,8 @@ void nilfs_remove_all_gcinodes(struct the_nilfs *nilfs)
1222 while (!list_empty(head)) {
1223 ii = list_first_entry(head, struct nilfs_inode_info, i_dirty);
1224 list_del_init(&ii->i_dirty);
1225 + truncate_inode_pages(&ii->vfs_inode.i_data, 0);
1226 + nilfs_btnode_cache_clear(&ii->i_btnode_cache);
1227 iput(&ii->vfs_inode);
1228 }
1229 }
1230 diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c
1231 index bb24ab6..6f24e67 100644
1232 --- a/fs/nilfs2/segment.c
1233 +++ b/fs/nilfs2/segment.c
1234 @@ -2309,6 +2309,8 @@ nilfs_remove_written_gcinodes(struct the_nilfs *nilfs, struct list_head *head)
1235 if (!test_bit(NILFS_I_UPDATED, &ii->i_state))
1236 continue;
1237 list_del_init(&ii->i_dirty);
1238 + truncate_inode_pages(&ii->vfs_inode.i_data, 0);
1239 + nilfs_btnode_cache_clear(&ii->i_btnode_cache);
1240 iput(&ii->vfs_inode);
1241 }
1242 }
1243 diff --git a/fs/open.c b/fs/open.c
1244 index b52cf01..7e18c4d 100644
1245 --- a/fs/open.c
1246 +++ b/fs/open.c
1247 @@ -396,10 +396,10 @@ SYSCALL_DEFINE1(fchdir, unsigned int, fd)
1248 {
1249 struct file *file;
1250 struct inode *inode;
1251 - int error;
1252 + int error, fput_needed;
1253
1254 error = -EBADF;
1255 - file = fget(fd);
1256 + file = fget_raw_light(fd, &fput_needed);
1257 if (!file)
1258 goto out;
1259
1260 @@ -413,7 +413,7 @@ SYSCALL_DEFINE1(fchdir, unsigned int, fd)
1261 if (!error)
1262 set_fs_pwd(current->fs, &file->f_path);
1263 out_putf:
1264 - fput(file);
1265 + fput_light(file, fput_needed);
1266 out:
1267 return error;
1268 }
1269 diff --git a/fs/ramfs/file-nommu.c b/fs/ramfs/file-nommu.c
1270 index fbb0b47..d5378d0 100644
1271 --- a/fs/ramfs/file-nommu.c
1272 +++ b/fs/ramfs/file-nommu.c
1273 @@ -110,6 +110,7 @@ int ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize)
1274
1275 /* prevent the page from being discarded on memory pressure */
1276 SetPageDirty(page);
1277 + SetPageUptodate(page);
1278
1279 unlock_page(page);
1280 put_page(page);
1281 diff --git a/fs/udf/super.c b/fs/udf/super.c
1282 index 7f0e18a..a8e867a 100644
1283 --- a/fs/udf/super.c
1284 +++ b/fs/udf/super.c
1285 @@ -56,6 +56,7 @@
1286 #include <linux/seq_file.h>
1287 #include <linux/bitmap.h>
1288 #include <linux/crc-itu-t.h>
1289 +#include <linux/log2.h>
1290 #include <asm/byteorder.h>
1291
1292 #include "udf_sb.h"
1293 @@ -1244,16 +1245,65 @@ out_bh:
1294 return ret;
1295 }
1296
1297 +static int udf_load_sparable_map(struct super_block *sb,
1298 + struct udf_part_map *map,
1299 + struct sparablePartitionMap *spm)
1300 +{
1301 + uint32_t loc;
1302 + uint16_t ident;
1303 + struct sparingTable *st;
1304 + struct udf_sparing_data *sdata = &map->s_type_specific.s_sparing;
1305 + int i;
1306 + struct buffer_head *bh;
1307 +
1308 + map->s_partition_type = UDF_SPARABLE_MAP15;
1309 + sdata->s_packet_len = le16_to_cpu(spm->packetLength);
1310 + if (!is_power_of_2(sdata->s_packet_len)) {
1311 + udf_error(sb, __func__, "error loading logical volume descriptor: "
1312 + "Invalid packet length %u\n",
1313 + (unsigned)sdata->s_packet_len);
1314 + return -EIO;
1315 + }
1316 + if (spm->numSparingTables > 4) {
1317 + udf_error(sb, __func__, "error loading logical volume descriptor: "
1318 + "Too many sparing tables (%d)\n",
1319 + (int)spm->numSparingTables);
1320 + return -EIO;
1321 + }
1322 +
1323 + for (i = 0; i < spm->numSparingTables; i++) {
1324 + loc = le32_to_cpu(spm->locSparingTable[i]);
1325 + bh = udf_read_tagged(sb, loc, loc, &ident);
1326 + if (!bh)
1327 + continue;
1328 +
1329 + st = (struct sparingTable *)bh->b_data;
1330 + if (ident != 0 ||
1331 + strncmp(st->sparingIdent.ident, UDF_ID_SPARING,
1332 + strlen(UDF_ID_SPARING)) ||
1333 + sizeof(*st) + le16_to_cpu(st->reallocationTableLen) >
1334 + sb->s_blocksize) {
1335 + brelse(bh);
1336 + continue;
1337 + }
1338 +
1339 + sdata->s_spar_map[i] = bh;
1340 + }
1341 + map->s_partition_func = udf_get_pblock_spar15;
1342 + return 0;
1343 +}
1344 +
1345 static int udf_load_logicalvol(struct super_block *sb, sector_t block,
1346 struct kernel_lb_addr *fileset)
1347 {
1348 struct logicalVolDesc *lvd;
1349 - int i, j, offset;
1350 + int i, offset;
1351 uint8_t type;
1352 struct udf_sb_info *sbi = UDF_SB(sb);
1353 struct genericPartitionMap *gpm;
1354 uint16_t ident;
1355 struct buffer_head *bh;
1356 + unsigned int table_len;
1357 int ret = 0;
1358
1359 bh = udf_read_tagged(sb, block, block, &ident);
1360 @@ -1261,15 +1311,20 @@ static int udf_load_logicalvol(struct super_block *sb, sector_t block,
1361 return 1;
1362 BUG_ON(ident != TAG_IDENT_LVD);
1363 lvd = (struct logicalVolDesc *)bh->b_data;
1364 -
1365 - i = udf_sb_alloc_partition_maps(sb, le32_to_cpu(lvd->numPartitionMaps));
1366 - if (i != 0) {
1367 - ret = i;
1368 + table_len = le32_to_cpu(lvd->mapTableLength);
1369 + if (sizeof(*lvd) + table_len > sb->s_blocksize) {
1370 + udf_error(sb, __func__, "error loading logical volume descriptor: "
1371 + "Partition table too long (%u > %lu)\n", table_len,
1372 + sb->s_blocksize - sizeof(*lvd));
1373 goto out_bh;
1374 }
1375
1376 + ret = udf_sb_alloc_partition_maps(sb, le32_to_cpu(lvd->numPartitionMaps));
1377 + if (ret)
1378 + goto out_bh;
1379 +
1380 for (i = 0, offset = 0;
1381 - i < sbi->s_partitions && offset < le32_to_cpu(lvd->mapTableLength);
1382 + i < sbi->s_partitions && offset < table_len;
1383 i++, offset += gpm->partitionMapLength) {
1384 struct udf_part_map *map = &sbi->s_partmaps[i];
1385 gpm = (struct genericPartitionMap *)
1386 @@ -1304,38 +1359,9 @@ static int udf_load_logicalvol(struct super_block *sb, sector_t block,
1387 } else if (!strncmp(upm2->partIdent.ident,
1388 UDF_ID_SPARABLE,
1389 strlen(UDF_ID_SPARABLE))) {
1390 - uint32_t loc;
1391 - struct sparingTable *st;
1392 - struct sparablePartitionMap *spm =
1393 - (struct sparablePartitionMap *)gpm;
1394 -
1395 - map->s_partition_type = UDF_SPARABLE_MAP15;
1396 - map->s_type_specific.s_sparing.s_packet_len =
1397 - le16_to_cpu(spm->packetLength);
1398 - for (j = 0; j < spm->numSparingTables; j++) {
1399 - struct buffer_head *bh2;
1400 -
1401 - loc = le32_to_cpu(
1402 - spm->locSparingTable[j]);
1403 - bh2 = udf_read_tagged(sb, loc, loc,
1404 - &ident);
1405 - map->s_type_specific.s_sparing.
1406 - s_spar_map[j] = bh2;
1407 -
1408 - if (bh2 == NULL)
1409 - continue;
1410 -
1411 - st = (struct sparingTable *)bh2->b_data;
1412 - if (ident != 0 || strncmp(
1413 - st->sparingIdent.ident,
1414 - UDF_ID_SPARING,
1415 - strlen(UDF_ID_SPARING))) {
1416 - brelse(bh2);
1417 - map->s_type_specific.s_sparing.
1418 - s_spar_map[j] = NULL;
1419 - }
1420 - }
1421 - map->s_partition_func = udf_get_pblock_spar15;
1422 + if (udf_load_sparable_map(sb, map,
1423 + (struct sparablePartitionMap *)gpm) < 0)
1424 + goto out_bh;
1425 } else if (!strncmp(upm2->partIdent.ident,
1426 UDF_ID_METADATA,
1427 strlen(UDF_ID_METADATA))) {
1428 diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
1429 index 9f7c3eb..aa2d80b 100644
1430 --- a/include/linux/mmzone.h
1431 +++ b/include/linux/mmzone.h
1432 @@ -633,7 +633,7 @@ typedef struct pglist_data {
1433 range, including holes */
1434 int node_id;
1435 wait_queue_head_t kswapd_wait;
1436 - struct task_struct *kswapd;
1437 + struct task_struct *kswapd; /* Protected by lock_memory_hotplug() */
1438 int kswapd_max_order;
1439 enum zone_type classzone_idx;
1440 } pg_data_t;
1441 diff --git a/include/linux/pci.h b/include/linux/pci.h
1442 index ff5970b..c446b5c 100644
1443 --- a/include/linux/pci.h
1444 +++ b/include/linux/pci.h
1445 @@ -174,8 +174,6 @@ enum pci_dev_flags {
1446 PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG = (__force pci_dev_flags_t) 1,
1447 /* Device configuration is irrevocably lost if disabled into D3 */
1448 PCI_DEV_FLAGS_NO_D3 = (__force pci_dev_flags_t) 2,
1449 - /* Device causes system crash if in D3 during S3 sleep */
1450 - PCI_DEV_FLAGS_NO_D3_DURING_SLEEP = (__force pci_dev_flags_t) 8,
1451 };
1452
1453 enum pci_irq_reroute_variant {
1454 diff --git a/include/net/cipso_ipv4.h b/include/net/cipso_ipv4.h
1455 index abd4436..4af554b 100644
1456 --- a/include/net/cipso_ipv4.h
1457 +++ b/include/net/cipso_ipv4.h
1458 @@ -42,6 +42,7 @@
1459 #include <net/netlabel.h>
1460 #include <net/request_sock.h>
1461 #include <asm/atomic.h>
1462 +#include <asm/unaligned.h>
1463
1464 /* known doi values */
1465 #define CIPSO_V4_DOI_UNKNOWN 0x00000000
1466 @@ -285,7 +286,33 @@ static inline int cipso_v4_skbuff_getattr(const struct sk_buff *skb,
1467 static inline int cipso_v4_validate(const struct sk_buff *skb,
1468 unsigned char **option)
1469 {
1470 - return -ENOSYS;
1471 + unsigned char *opt = *option;
1472 + unsigned char err_offset = 0;
1473 + u8 opt_len = opt[1];
1474 + u8 opt_iter;
1475 +
1476 + if (opt_len < 8) {
1477 + err_offset = 1;
1478 + goto out;
1479 + }
1480 +
1481 + if (get_unaligned_be32(&opt[2]) == 0) {
1482 + err_offset = 2;
1483 + goto out;
1484 + }
1485 +
1486 + for (opt_iter = 6; opt_iter < opt_len;) {
1487 + if (opt[opt_iter + 1] > (opt_len - opt_iter)) {
1488 + err_offset = opt_iter + 1;
1489 + goto out;
1490 + }
1491 + opt_iter += opt[opt_iter + 1];
1492 + }
1493 +
1494 +out:
1495 + *option = opt + err_offset;
1496 + return err_offset;
1497 +
1498 }
1499 #endif /* CONFIG_NETLABEL */
1500
1501 diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
1502 index f1fbe2d..af2e047 100644
1503 --- a/include/net/sch_generic.h
1504 +++ b/include/net/sch_generic.h
1505 @@ -219,13 +219,16 @@ struct tcf_proto {
1506
1507 struct qdisc_skb_cb {
1508 unsigned int pkt_len;
1509 - unsigned char data[24];
1510 + u16 bond_queue_mapping;
1511 + u16 _pad;
1512 + unsigned char data[20];
1513 };
1514
1515 static inline void qdisc_cb_private_validate(const struct sk_buff *skb, int sz)
1516 {
1517 struct qdisc_skb_cb *qcb;
1518 - BUILD_BUG_ON(sizeof(skb->cb) < sizeof(unsigned int) + sz);
1519 +
1520 + BUILD_BUG_ON(sizeof(skb->cb) < offsetof(struct qdisc_skb_cb, data) + sz);
1521 BUILD_BUG_ON(sizeof(qcb->data) < sz);
1522 }
1523
1524 diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
1525 index 0731e81a..672a749 100644
1526 --- a/kernel/trace/trace.c
1527 +++ b/kernel/trace/trace.c
1528 @@ -2432,10 +2432,12 @@ tracing_cpumask_write(struct file *filp, const char __user *ubuf,
1529 if (cpumask_test_cpu(cpu, tracing_cpumask) &&
1530 !cpumask_test_cpu(cpu, tracing_cpumask_new)) {
1531 atomic_inc(&global_trace.data[cpu]->disabled);
1532 + ring_buffer_record_disable_cpu(global_trace.buffer, cpu);
1533 }
1534 if (!cpumask_test_cpu(cpu, tracing_cpumask) &&
1535 cpumask_test_cpu(cpu, tracing_cpumask_new)) {
1536 atomic_dec(&global_trace.data[cpu]->disabled);
1537 + ring_buffer_record_enable_cpu(global_trace.buffer, cpu);
1538 }
1539 }
1540 arch_spin_unlock(&ftrace_max_lock);
1541 diff --git a/mm/compaction.c b/mm/compaction.c
1542 index c4bc5ac..adc5336 100644
1543 --- a/mm/compaction.c
1544 +++ b/mm/compaction.c
1545 @@ -596,8 +596,11 @@ static int compact_zone(struct zone *zone, struct compact_control *cc)
1546 if (err) {
1547 putback_lru_pages(&cc->migratepages);
1548 cc->nr_migratepages = 0;
1549 + if (err == -ENOMEM) {
1550 + ret = COMPACT_PARTIAL;
1551 + goto out;
1552 + }
1553 }
1554 -
1555 }
1556
1557 out:
1558 diff --git a/mm/madvise.c b/mm/madvise.c
1559 index 2221491..deabe5f6 100644
1560 --- a/mm/madvise.c
1561 +++ b/mm/madvise.c
1562 @@ -13,6 +13,7 @@
1563 #include <linux/hugetlb.h>
1564 #include <linux/sched.h>
1565 #include <linux/ksm.h>
1566 +#include <linux/file.h>
1567
1568 /*
1569 * Any behaviour which results in changes to the vma->vm_flags needs to
1570 @@ -197,14 +198,16 @@ static long madvise_remove(struct vm_area_struct *vma,
1571 struct address_space *mapping;
1572 loff_t offset, endoff;
1573 int error;
1574 + struct file *f;
1575
1576 *prev = NULL; /* tell sys_madvise we drop mmap_sem */
1577
1578 if (vma->vm_flags & (VM_LOCKED|VM_NONLINEAR|VM_HUGETLB))
1579 return -EINVAL;
1580
1581 - if (!vma->vm_file || !vma->vm_file->f_mapping
1582 - || !vma->vm_file->f_mapping->host) {
1583 + f = vma->vm_file;
1584 +
1585 + if (!f || !f->f_mapping || !f->f_mapping->host) {
1586 return -EINVAL;
1587 }
1588
1589 @@ -218,9 +221,16 @@ static long madvise_remove(struct vm_area_struct *vma,
1590 endoff = (loff_t)(end - vma->vm_start - 1)
1591 + ((loff_t)vma->vm_pgoff << PAGE_SHIFT);
1592
1593 - /* vmtruncate_range needs to take i_mutex and i_alloc_sem */
1594 + /*
1595 + * vmtruncate_range may need to take i_mutex and i_alloc_sem.
1596 + * We need to explicitly grab a reference because the vma (and
1597 + * hence the vma's reference to the file) can go away as soon as
1598 + * we drop mmap_sem.
1599 + */
1600 + get_file(f);
1601 up_read(&current->mm->mmap_sem);
1602 error = vmtruncate_range(mapping->host, offset, endoff);
1603 + fput(f);
1604 down_read(&current->mm->mmap_sem);
1605 return error;
1606 }
1607 diff --git a/mm/vmscan.c b/mm/vmscan.c
1608 index 769935d..1b0ed36 100644
1609 --- a/mm/vmscan.c
1610 +++ b/mm/vmscan.c
1611 @@ -2952,14 +2952,17 @@ int kswapd_run(int nid)
1612 }
1613
1614 /*
1615 - * Called by memory hotplug when all memory in a node is offlined.
1616 + * Called by memory hotplug when all memory in a node is offlined. Caller must
1617 + * hold lock_memory_hotplug().
1618 */
1619 void kswapd_stop(int nid)
1620 {
1621 struct task_struct *kswapd = NODE_DATA(nid)->kswapd;
1622
1623 - if (kswapd)
1624 + if (kswapd) {
1625 kthread_stop(kswapd);
1626 + NODE_DATA(nid)->kswapd = NULL;
1627 + }
1628 }
1629
1630 static int __init kswapd_init(void)
1631 diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
1632 index 4490873..eae6a4e 100644
1633 --- a/net/bridge/br_if.c
1634 +++ b/net/bridge/br_if.c
1635 @@ -241,6 +241,7 @@ int br_add_bridge(struct net *net, const char *name)
1636 return -ENOMEM;
1637
1638 dev_net_set(dev, net);
1639 + dev->rtnl_link_ops = &br_link_ops;
1640
1641 res = register_netdev(dev);
1642 if (res)
1643 diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c
1644 index 2c16055..71861a9 100644
1645 --- a/net/bridge/br_netlink.c
1646 +++ b/net/bridge/br_netlink.c
1647 @@ -203,7 +203,7 @@ static int br_validate(struct nlattr *tb[], struct nlattr *data[])
1648 return 0;
1649 }
1650
1651 -static struct rtnl_link_ops br_link_ops __read_mostly = {
1652 +struct rtnl_link_ops br_link_ops __read_mostly = {
1653 .kind = "bridge",
1654 .priv_size = sizeof(struct net_bridge),
1655 .setup = br_dev_setup,
1656 diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
1657 index 1ca1b1c..7c1f3a0 100644
1658 --- a/net/bridge/br_private.h
1659 +++ b/net/bridge/br_private.h
1660 @@ -529,6 +529,7 @@ extern int (*br_fdb_test_addr_hook)(struct net_device *dev, unsigned char *addr)
1661 #endif
1662
1663 /* br_netlink.c */
1664 +extern struct rtnl_link_ops br_link_ops;
1665 extern int br_netlink_init(void);
1666 extern void br_netlink_fini(void);
1667 extern void br_ifinfo_notify(int event, struct net_bridge_port *port);
1668 diff --git a/net/core/ethtool.c b/net/core/ethtool.c
1669 index 4fb7704..891b19f 100644
1670 --- a/net/core/ethtool.c
1671 +++ b/net/core/ethtool.c
1672 @@ -1964,6 +1964,7 @@ int dev_ethtool(struct net *net, struct ifreq *ifr)
1673 case ETHTOOL_GRXCSUM:
1674 case ETHTOOL_GTXCSUM:
1675 case ETHTOOL_GSG:
1676 + case ETHTOOL_GSSET_INFO:
1677 case ETHTOOL_GSTRINGS:
1678 case ETHTOOL_GTSO:
1679 case ETHTOOL_GPERMADDR:
1680 diff --git a/net/core/netpoll.c b/net/core/netpoll.c
1681 index 05db410..207a178 100644
1682 --- a/net/core/netpoll.c
1683 +++ b/net/core/netpoll.c
1684 @@ -357,22 +357,23 @@ EXPORT_SYMBOL(netpoll_send_skb_on_dev);
1685
1686 void netpoll_send_udp(struct netpoll *np, const char *msg, int len)
1687 {
1688 - int total_len, eth_len, ip_len, udp_len;
1689 + int total_len, ip_len, udp_len;
1690 struct sk_buff *skb;
1691 struct udphdr *udph;
1692 struct iphdr *iph;
1693 struct ethhdr *eth;
1694
1695 udp_len = len + sizeof(*udph);
1696 - ip_len = eth_len = udp_len + sizeof(*iph);
1697 - total_len = eth_len + ETH_HLEN + NET_IP_ALIGN;
1698 + ip_len = udp_len + sizeof(*iph);
1699 + total_len = ip_len + LL_RESERVED_SPACE(np->dev);
1700
1701 - skb = find_skb(np, total_len, total_len - len);
1702 + skb = find_skb(np, total_len + np->dev->needed_tailroom,
1703 + total_len - len);
1704 if (!skb)
1705 return;
1706
1707 skb_copy_to_linear_data(skb, msg, len);
1708 - skb->len += len;
1709 + skb_put(skb, len);
1710
1711 skb_push(skb, sizeof(*udph));
1712 skb_reset_transport_header(skb);
1713 diff --git a/net/core/sock.c b/net/core/sock.c
1714 index aebb419..b4bb59a 100644
1715 --- a/net/core/sock.c
1716 +++ b/net/core/sock.c
1717 @@ -1501,6 +1501,11 @@ struct sk_buff *sock_alloc_send_pskb(struct sock *sk, unsigned long header_len,
1718 gfp_t gfp_mask;
1719 long timeo;
1720 int err;
1721 + int npages = (data_len + (PAGE_SIZE - 1)) >> PAGE_SHIFT;
1722 +
1723 + err = -EMSGSIZE;
1724 + if (npages > MAX_SKB_FRAGS)
1725 + goto failure;
1726
1727 gfp_mask = sk->sk_allocation;
1728 if (gfp_mask & __GFP_WAIT)
1729 @@ -1519,14 +1524,12 @@ struct sk_buff *sock_alloc_send_pskb(struct sock *sk, unsigned long header_len,
1730 if (atomic_read(&sk->sk_wmem_alloc) < sk->sk_sndbuf) {
1731 skb = alloc_skb(header_len, gfp_mask);
1732 if (skb) {
1733 - int npages;
1734 int i;
1735
1736 /* No pages, we're done... */
1737 if (!data_len)
1738 break;
1739
1740 - npages = (data_len + (PAGE_SIZE - 1)) >> PAGE_SHIFT;
1741 skb->truesize += data_len;
1742 skb_shinfo(skb)->nr_frags = npages;
1743 for (i = 0; i < npages; i++) {
1744 diff --git a/net/ipv6/route.c b/net/ipv6/route.c
1745 index 8e600f8..7c5b4cb 100644
1746 --- a/net/ipv6/route.c
1747 +++ b/net/ipv6/route.c
1748 @@ -2846,10 +2846,6 @@ static int __net_init ip6_route_net_init(struct net *net)
1749 net->ipv6.sysctl.ip6_rt_mtu_expires = 10*60*HZ;
1750 net->ipv6.sysctl.ip6_rt_min_advmss = IPV6_MIN_MTU - 20 - 40;
1751
1752 -#ifdef CONFIG_PROC_FS
1753 - proc_net_fops_create(net, "ipv6_route", 0, &ipv6_route_proc_fops);
1754 - proc_net_fops_create(net, "rt6_stats", S_IRUGO, &rt6_stats_seq_fops);
1755 -#endif
1756 net->ipv6.ip6_rt_gc_expire = 30*HZ;
1757
1758 ret = 0;
1759 @@ -2870,10 +2866,6 @@ out_ip6_dst_ops:
1760
1761 static void __net_exit ip6_route_net_exit(struct net *net)
1762 {
1763 -#ifdef CONFIG_PROC_FS
1764 - proc_net_remove(net, "ipv6_route");
1765 - proc_net_remove(net, "rt6_stats");
1766 -#endif
1767 kfree(net->ipv6.ip6_null_entry);
1768 #ifdef CONFIG_IPV6_MULTIPLE_TABLES
1769 kfree(net->ipv6.ip6_prohibit_entry);
1770 @@ -2882,11 +2874,33 @@ static void __net_exit ip6_route_net_exit(struct net *net)
1771 dst_entries_destroy(&net->ipv6.ip6_dst_ops);
1772 }
1773
1774 +static int __net_init ip6_route_net_init_late(struct net *net)
1775 +{
1776 +#ifdef CONFIG_PROC_FS
1777 + proc_net_fops_create(net, "ipv6_route", 0, &ipv6_route_proc_fops);
1778 + proc_net_fops_create(net, "rt6_stats", S_IRUGO, &rt6_stats_seq_fops);
1779 +#endif
1780 + return 0;
1781 +}
1782 +
1783 +static void __net_exit ip6_route_net_exit_late(struct net *net)
1784 +{
1785 +#ifdef CONFIG_PROC_FS
1786 + proc_net_remove(net, "ipv6_route");
1787 + proc_net_remove(net, "rt6_stats");
1788 +#endif
1789 +}
1790 +
1791 static struct pernet_operations ip6_route_net_ops = {
1792 .init = ip6_route_net_init,
1793 .exit = ip6_route_net_exit,
1794 };
1795
1796 +static struct pernet_operations ip6_route_net_late_ops = {
1797 + .init = ip6_route_net_init_late,
1798 + .exit = ip6_route_net_exit_late,
1799 +};
1800 +
1801 static struct notifier_block ip6_route_dev_notifier = {
1802 .notifier_call = ip6_route_dev_notify,
1803 .priority = 0,
1804 @@ -2936,19 +2950,25 @@ int __init ip6_route_init(void)
1805 if (ret)
1806 goto xfrm6_init;
1807
1808 + ret = register_pernet_subsys(&ip6_route_net_late_ops);
1809 + if (ret)
1810 + goto fib6_rules_init;
1811 +
1812 ret = -ENOBUFS;
1813 if (__rtnl_register(PF_INET6, RTM_NEWROUTE, inet6_rtm_newroute, NULL) ||
1814 __rtnl_register(PF_INET6, RTM_DELROUTE, inet6_rtm_delroute, NULL) ||
1815 __rtnl_register(PF_INET6, RTM_GETROUTE, inet6_rtm_getroute, NULL))
1816 - goto fib6_rules_init;
1817 + goto out_register_late_subsys;
1818
1819 ret = register_netdevice_notifier(&ip6_route_dev_notifier);
1820 if (ret)
1821 - goto fib6_rules_init;
1822 + goto out_register_late_subsys;
1823
1824 out:
1825 return ret;
1826
1827 +out_register_late_subsys:
1828 + unregister_pernet_subsys(&ip6_route_net_late_ops);
1829 fib6_rules_init:
1830 fib6_rules_cleanup();
1831 xfrm6_init:
1832 @@ -2967,6 +2987,7 @@ out_kmem_cache:
1833 void ip6_route_cleanup(void)
1834 {
1835 unregister_netdevice_notifier(&ip6_route_dev_notifier);
1836 + unregister_pernet_subsys(&ip6_route_net_late_ops);
1837 fib6_rules_cleanup();
1838 xfrm6_fini();
1839 fib6_gc_cleanup();
1840 diff --git a/net/l2tp/l2tp_eth.c b/net/l2tp/l2tp_eth.c
1841 index d2726a7..3c55f63 100644
1842 --- a/net/l2tp/l2tp_eth.c
1843 +++ b/net/l2tp/l2tp_eth.c
1844 @@ -167,6 +167,7 @@ static void l2tp_eth_delete(struct l2tp_session *session)
1845 if (dev) {
1846 unregister_netdev(dev);
1847 spriv->dev = NULL;
1848 + module_put(THIS_MODULE);
1849 }
1850 }
1851 }
1852 @@ -254,6 +255,7 @@ static int l2tp_eth_create(struct net *net, u32 tunnel_id, u32 session_id, u32 p
1853 if (rc < 0)
1854 goto out_del_dev;
1855
1856 + __module_get(THIS_MODULE);
1857 /* Must be done after register_netdev() */
1858 strlcpy(session->ifname, dev->name, IFNAMSIZ);
1859
1860 diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
1861 index 4100065..667f559 100644
1862 --- a/net/mac80211/rx.c
1863 +++ b/net/mac80211/rx.c
1864 @@ -2291,7 +2291,7 @@ ieee80211_rx_h_action_return(struct ieee80211_rx_data *rx)
1865 * frames that we didn't handle, including returning unknown
1866 * ones. For all other modes we will return them to the sender,
1867 * setting the 0x80 bit in the action category, as required by
1868 - * 802.11-2007 7.3.1.11.
1869 + * 802.11-2012 9.24.4.
1870 * Newer versions of hostapd shall also use the management frame
1871 * registration mechanisms, but older ones still use cooked
1872 * monitor interfaces so push all frames there.
1873 @@ -2301,6 +2301,9 @@ ieee80211_rx_h_action_return(struct ieee80211_rx_data *rx)
1874 sdata->vif.type == NL80211_IFTYPE_AP_VLAN))
1875 return RX_DROP_MONITOR;
1876
1877 + if (is_multicast_ether_addr(mgmt->da))
1878 + return RX_DROP_MONITOR;
1879 +
1880 /* do not return rejected action frames */
1881 if (mgmt->u.action.category & 0x80)
1882 return RX_DROP_UNUSABLE;
1883 diff --git a/net/wireless/reg.c b/net/wireless/reg.c
1884 index 7457697..90b73d1 100644
1885 --- a/net/wireless/reg.c
1886 +++ b/net/wireless/reg.c
1887 @@ -1358,7 +1358,7 @@ static void reg_set_request_processed(void)
1888 spin_unlock(&reg_requests_lock);
1889
1890 if (last_request->initiator == NL80211_REGDOM_SET_BY_USER)
1891 - cancel_delayed_work_sync(&reg_timeout);
1892 + cancel_delayed_work(&reg_timeout);
1893
1894 if (need_more_processing)
1895 schedule_work(&reg_work);
1896 diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
1897 index 51412e1..baa7a49 100644
1898 --- a/sound/pci/hda/patch_realtek.c
1899 +++ b/sound/pci/hda/patch_realtek.c
1900 @@ -20132,6 +20132,7 @@ static const struct hda_codec_preset snd_hda_preset_realtek[] = {
1901 { .id = 0x10ec0272, .name = "ALC272", .patch = patch_alc662 },
1902 { .id = 0x10ec0275, .name = "ALC275", .patch = patch_alc269 },
1903 { .id = 0x10ec0276, .name = "ALC276", .patch = patch_alc269 },
1904 + { .id = 0x10ec0280, .name = "ALC280", .patch = patch_alc269 },
1905 { .id = 0x10ec0861, .rev = 0x100340, .name = "ALC660",
1906 .patch = patch_alc861 },
1907 { .id = 0x10ec0660, .name = "ALC660-VD", .patch = patch_alc861vd },
1908 diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
1909 index 789453d..0b08bb7 100644
1910 --- a/sound/soc/codecs/tlv320aic3x.c
1911 +++ b/sound/soc/codecs/tlv320aic3x.c
1912 @@ -949,9 +949,7 @@ static int aic3x_hw_params(struct snd_pcm_substream *substream,
1913 }
1914
1915 found:
1916 - data = snd_soc_read(codec, AIC3X_PLL_PROGA_REG);
1917 - snd_soc_write(codec, AIC3X_PLL_PROGA_REG,
1918 - data | (pll_p << PLLP_SHIFT));
1919 + snd_soc_update_bits(codec, AIC3X_PLL_PROGA_REG, PLLP_MASK, pll_p);
1920 snd_soc_write(codec, AIC3X_OVRF_STATUS_AND_PLLR_REG,
1921 pll_r << PLLR_SHIFT);
1922 snd_soc_write(codec, AIC3X_PLL_PROGB_REG, pll_j << PLLJ_SHIFT);
1923 diff --git a/sound/soc/codecs/tlv320aic3x.h b/sound/soc/codecs/tlv320aic3x.h
1924 index 06a1978..16d9999 100644
1925 --- a/sound/soc/codecs/tlv320aic3x.h
1926 +++ b/sound/soc/codecs/tlv320aic3x.h
1927 @@ -166,6 +166,7 @@
1928
1929 /* PLL registers bitfields */
1930 #define PLLP_SHIFT 0
1931 +#define PLLP_MASK 7
1932 #define PLLQ_SHIFT 3
1933 #define PLLR_SHIFT 0
1934 #define PLLJ_SHIFT 2

  ViewVC Help
Powered by ViewVC 1.1.20