/[linux-patches]/genpatches-2.6/tags/3.0-30/1009_linux-3.0.10.patch
Gentoo

Contents of /genpatches-2.6/tags/3.0-30/1009_linux-3.0.10.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2206 - (show annotations) (download)
Mon Sep 17 18:58:14 2012 UTC (22 months ago) by mpagano
File size: 29381 byte(s)
3.0-30 release
1 diff --git a/Makefile b/Makefile
2 index 438c11a..36036d1 100644
3 --- a/Makefile
4 +++ b/Makefile
5 @@ -1,6 +1,6 @@
6 VERSION = 3
7 PATCHLEVEL = 0
8 -SUBLEVEL = 9
9 +SUBLEVEL = 10
10 EXTRAVERSION =
11 NAME = Sneaky Weasel
12
13 diff --git a/arch/powerpc/include/asm/sections.h b/arch/powerpc/include/asm/sections.h
14 index 6fbce72..a0f358d 100644
15 --- a/arch/powerpc/include/asm/sections.h
16 +++ b/arch/powerpc/include/asm/sections.h
17 @@ -8,7 +8,7 @@
18
19 #ifdef __powerpc64__
20
21 -extern char _end[];
22 +extern char __end_interrupts[];
23
24 static inline int in_kernel_text(unsigned long addr)
25 {
26 diff --git a/arch/powerpc/include/asm/synch.h b/arch/powerpc/include/asm/synch.h
27 index d7cab44..87878c6 100644
28 --- a/arch/powerpc/include/asm/synch.h
29 +++ b/arch/powerpc/include/asm/synch.h
30 @@ -13,6 +13,7 @@
31 extern unsigned int __start___lwsync_fixup, __stop___lwsync_fixup;
32 extern void do_lwsync_fixups(unsigned long value, void *fixup_start,
33 void *fixup_end);
34 +extern void do_final_fixups(void);
35
36 static inline void eieio(void)
37 {
38 diff --git a/arch/powerpc/kernel/kvm.c b/arch/powerpc/kernel/kvm.c
39 index b06bdae..ad892f7 100644
40 --- a/arch/powerpc/kernel/kvm.c
41 +++ b/arch/powerpc/kernel/kvm.c
42 @@ -131,7 +131,6 @@ static void kvm_patch_ins_b(u32 *inst, int addr)
43 /* On relocatable kernels interrupts handlers and our code
44 can be in different regions, so we don't patch them */
45
46 - extern u32 __end_interrupts;
47 if ((ulong)inst < (ulong)&__end_interrupts)
48 return;
49 #endif
50 diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
51 index 620d792..c7e7b8c 100644
52 --- a/arch/powerpc/kernel/setup_32.c
53 +++ b/arch/powerpc/kernel/setup_32.c
54 @@ -107,6 +107,8 @@ notrace unsigned long __init early_init(unsigned long dt_ptr)
55 PTRRELOC(&__start___lwsync_fixup),
56 PTRRELOC(&__stop___lwsync_fixup));
57
58 + do_final_fixups();
59 +
60 return KERNELBASE + offset;
61 }
62
63 diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
64 index a88bf27..7867fd1 100644
65 --- a/arch/powerpc/kernel/setup_64.c
66 +++ b/arch/powerpc/kernel/setup_64.c
67 @@ -352,6 +352,7 @@ void __init setup_system(void)
68 &__start___fw_ftr_fixup, &__stop___fw_ftr_fixup);
69 do_lwsync_fixups(cur_cpu_spec->cpu_features,
70 &__start___lwsync_fixup, &__stop___lwsync_fixup);
71 + do_final_fixups();
72
73 /*
74 * Unflatten the device-tree passed by prom_init or kexec
75 diff --git a/arch/powerpc/lib/feature-fixups.c b/arch/powerpc/lib/feature-fixups.c
76 index 0d08d01..7a8a748 100644
77 --- a/arch/powerpc/lib/feature-fixups.c
78 +++ b/arch/powerpc/lib/feature-fixups.c
79 @@ -18,6 +18,8 @@
80 #include <linux/init.h>
81 #include <asm/cputable.h>
82 #include <asm/code-patching.h>
83 +#include <asm/page.h>
84 +#include <asm/sections.h>
85
86
87 struct fixup_entry {
88 @@ -128,6 +130,27 @@ void do_lwsync_fixups(unsigned long value, void *fixup_start, void *fixup_end)
89 }
90 }
91
92 +void do_final_fixups(void)
93 +{
94 +#if defined(CONFIG_PPC64) && defined(CONFIG_RELOCATABLE)
95 + int *src, *dest;
96 + unsigned long length;
97 +
98 + if (PHYSICAL_START == 0)
99 + return;
100 +
101 + src = (int *)(KERNELBASE + PHYSICAL_START);
102 + dest = (int *)KERNELBASE;
103 + length = (__end_interrupts - _stext) / sizeof(int);
104 +
105 + while (length--) {
106 + patch_instruction(dest, *src);
107 + src++;
108 + dest++;
109 + }
110 +#endif
111 +}
112 +
113 #ifdef CONFIG_FTR_FIXUP_SELFTEST
114
115 #define check(x) \
116 diff --git a/arch/powerpc/platforms/ps3/interrupt.c b/arch/powerpc/platforms/ps3/interrupt.c
117 index 600ed2c..1aa478b 100644
118 --- a/arch/powerpc/platforms/ps3/interrupt.c
119 +++ b/arch/powerpc/platforms/ps3/interrupt.c
120 @@ -88,6 +88,7 @@ struct ps3_private {
121 struct ps3_bmp bmp __attribute__ ((aligned (PS3_BMP_MINALIGN)));
122 u64 ppe_id;
123 u64 thread_id;
124 + unsigned long ipi_mask;
125 };
126
127 static DEFINE_PER_CPU(struct ps3_private, ps3_private);
128 @@ -144,7 +145,11 @@ static void ps3_chip_unmask(struct irq_data *d)
129 static void ps3_chip_eoi(struct irq_data *d)
130 {
131 const struct ps3_private *pd = irq_data_get_irq_chip_data(d);
132 - lv1_end_of_interrupt_ext(pd->ppe_id, pd->thread_id, d->irq);
133 +
134 + /* non-IPIs are EOIed here. */
135 +
136 + if (!test_bit(63 - d->irq, &pd->ipi_mask))
137 + lv1_end_of_interrupt_ext(pd->ppe_id, pd->thread_id, d->irq);
138 }
139
140 /**
141 @@ -691,6 +696,16 @@ void __init ps3_register_ipi_debug_brk(unsigned int cpu, unsigned int virq)
142 cpu, virq, pd->bmp.ipi_debug_brk_mask);
143 }
144
145 +void __init ps3_register_ipi_irq(unsigned int cpu, unsigned int virq)
146 +{
147 + struct ps3_private *pd = &per_cpu(ps3_private, cpu);
148 +
149 + set_bit(63 - virq, &pd->ipi_mask);
150 +
151 + DBG("%s:%d: cpu %u, virq %u, ipi_mask %lxh\n", __func__, __LINE__,
152 + cpu, virq, pd->ipi_mask);
153 +}
154 +
155 static unsigned int ps3_get_irq(void)
156 {
157 struct ps3_private *pd = &__get_cpu_var(ps3_private);
158 @@ -720,6 +735,12 @@ static unsigned int ps3_get_irq(void)
159 BUG();
160 }
161 #endif
162 +
163 + /* IPIs are EOIed here. */
164 +
165 + if (test_bit(63 - plug, &pd->ipi_mask))
166 + lv1_end_of_interrupt_ext(pd->ppe_id, pd->thread_id, plug);
167 +
168 return plug;
169 }
170
171 diff --git a/arch/powerpc/platforms/ps3/platform.h b/arch/powerpc/platforms/ps3/platform.h
172 index 9a196a8..1a633ed 100644
173 --- a/arch/powerpc/platforms/ps3/platform.h
174 +++ b/arch/powerpc/platforms/ps3/platform.h
175 @@ -43,6 +43,7 @@ void ps3_mm_shutdown(void);
176 void ps3_init_IRQ(void);
177 void ps3_shutdown_IRQ(int cpu);
178 void __init ps3_register_ipi_debug_brk(unsigned int cpu, unsigned int virq);
179 +void __init ps3_register_ipi_irq(unsigned int cpu, unsigned int virq);
180
181 /* smp */
182
183 diff --git a/arch/powerpc/platforms/ps3/smp.c b/arch/powerpc/platforms/ps3/smp.c
184 index 4c44794..f609345 100644
185 --- a/arch/powerpc/platforms/ps3/smp.c
186 +++ b/arch/powerpc/platforms/ps3/smp.c
187 @@ -94,6 +94,8 @@ static void __init ps3_smp_setup_cpu(int cpu)
188
189 if (result)
190 virqs[i] = NO_IRQ;
191 + else
192 + ps3_register_ipi_irq(cpu, virqs[i]);
193 }
194
195 ps3_register_ipi_debug_brk(cpu, virqs[PPC_MSG_DEBUGGER_BREAK]);
196 diff --git a/arch/sh/include/asm/page.h b/arch/sh/include/asm/page.h
197 index 822d608..abcc4dc 100644
198 --- a/arch/sh/include/asm/page.h
199 +++ b/arch/sh/include/asm/page.h
200 @@ -141,8 +141,13 @@ typedef struct page *pgtable_t;
201 #endif /* !__ASSEMBLY__ */
202
203 #ifdef CONFIG_UNCACHED_MAPPING
204 +#if defined(CONFIG_29BIT)
205 +#define UNCAC_ADDR(addr) P2SEGADDR(addr)
206 +#define CAC_ADDR(addr) P1SEGADDR(addr)
207 +#else
208 #define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + uncached_start)
209 #define CAC_ADDR(addr) ((addr) - uncached_start + PAGE_OFFSET)
210 +#endif
211 #else
212 #define UNCAC_ADDR(addr) ((addr))
213 #define CAC_ADDR(addr) ((addr))
214 diff --git a/arch/x86/platform/mrst/mrst.c b/arch/x86/platform/mrst/mrst.c
215 index 7000e74..fe73276 100644
216 --- a/arch/x86/platform/mrst/mrst.c
217 +++ b/arch/x86/platform/mrst/mrst.c
218 @@ -678,36 +678,40 @@ static int __init sfi_parse_devs(struct sfi_table_header *table)
219 pentry = (struct sfi_device_table_entry *)sb->pentry;
220
221 for (i = 0; i < num; i++, pentry++) {
222 - if (pentry->irq != (u8)0xff) { /* native RTE case */
223 + int irq = pentry->irq;
224 +
225 + if (irq != (u8)0xff) { /* native RTE case */
226 /* these SPI2 devices are not exposed to system as PCI
227 * devices, but they have separate RTE entry in IOAPIC
228 * so we have to enable them one by one here
229 */
230 - ioapic = mp_find_ioapic(pentry->irq);
231 + ioapic = mp_find_ioapic(irq);
232 irq_attr.ioapic = ioapic;
233 - irq_attr.ioapic_pin = pentry->irq;
234 + irq_attr.ioapic_pin = irq;
235 irq_attr.trigger = 1;
236 irq_attr.polarity = 1;
237 - io_apic_set_pci_routing(NULL, pentry->irq, &irq_attr);
238 - }
239 + io_apic_set_pci_routing(NULL, irq, &irq_attr);
240 + } else
241 + irq = 0; /* No irq */
242 +
243 switch (pentry->type) {
244 case SFI_DEV_TYPE_IPC:
245 /* ID as IRQ is a hack that will go away */
246 - pdev = platform_device_alloc(pentry->name, pentry->irq);
247 + pdev = platform_device_alloc(pentry->name, irq);
248 if (pdev == NULL) {
249 pr_err("out of memory for SFI platform device '%s'.\n",
250 pentry->name);
251 continue;
252 }
253 - install_irq_resource(pdev, pentry->irq);
254 + install_irq_resource(pdev, irq);
255 pr_debug("info[%2d]: IPC bus, name = %16.16s, "
256 - "irq = 0x%2x\n", i, pentry->name, pentry->irq);
257 + "irq = 0x%2x\n", i, pentry->name, irq);
258 sfi_handle_ipc_dev(pdev);
259 break;
260 case SFI_DEV_TYPE_SPI:
261 memset(&spi_info, 0, sizeof(spi_info));
262 strncpy(spi_info.modalias, pentry->name, SFI_NAME_LEN);
263 - spi_info.irq = pentry->irq;
264 + spi_info.irq = irq;
265 spi_info.bus_num = pentry->host_num;
266 spi_info.chip_select = pentry->addr;
267 spi_info.max_speed_hz = pentry->max_freq;
268 @@ -724,7 +728,7 @@ static int __init sfi_parse_devs(struct sfi_table_header *table)
269 memset(&i2c_info, 0, sizeof(i2c_info));
270 bus = pentry->host_num;
271 strncpy(i2c_info.type, pentry->name, SFI_NAME_LEN);
272 - i2c_info.irq = pentry->irq;
273 + i2c_info.irq = irq;
274 i2c_info.addr = pentry->addr;
275 pr_debug("info[%2d]: I2C bus = %d, name = %16.16s, "
276 "irq = 0x%2x, addr = 0x%x\n", i, bus,
277 diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
278 index 67d69f1..0fb662a 100644
279 --- a/arch/x86/xen/enlighten.c
280 +++ b/arch/x86/xen/enlighten.c
281 @@ -1337,7 +1337,7 @@ static int __cpuinit xen_hvm_cpu_notify(struct notifier_block *self,
282 int cpu = (long)hcpu;
283 switch (action) {
284 case CPU_UP_PREPARE:
285 - per_cpu(xen_vcpu, cpu) = &HYPERVISOR_shared_info->vcpu_info[cpu];
286 + xen_vcpu_setup(cpu);
287 if (xen_have_vector_callback)
288 xen_init_lock_cpu(cpu);
289 break;
290 @@ -1367,7 +1367,6 @@ static void __init xen_hvm_guest_init(void)
291 xen_hvm_smp_init();
292 register_cpu_notifier(&xen_hvm_cpu_notifier);
293 xen_unplug_emulated_devices();
294 - have_vcpu_info_placement = 0;
295 x86_init.irqs.intr_init = xen_init_IRQ;
296 xen_hvm_init_time_ops();
297 xen_hvm_init_mmu_ops();
298 diff --git a/block/blk-map.c b/block/blk-map.c
299 index e663ac2..164cd00 100644
300 --- a/block/blk-map.c
301 +++ b/block/blk-map.c
302 @@ -204,10 +204,11 @@ int blk_rq_map_user_iov(struct request_queue *q, struct request *rq,
303 if (!iov[i].iov_len)
304 return -EINVAL;
305
306 - if (uaddr & queue_dma_alignment(q)) {
307 + /*
308 + * Keep going so we check length of all segments
309 + */
310 + if (uaddr & queue_dma_alignment(q))
311 unaligned = 1;
312 - break;
313 - }
314 }
315
316 if (unaligned || (q->dma_pad_mask & len) || map_data)
317 diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
318 index 0a893f7..e36efdc 100644
319 --- a/drivers/gpu/drm/i915/i915_debugfs.c
320 +++ b/drivers/gpu/drm/i915/i915_debugfs.c
321 @@ -865,7 +865,7 @@ static int i915_cur_delayinfo(struct seq_file *m, void *unused)
322 MEMSTAT_VID_SHIFT);
323 seq_printf(m, "Current P-state: %d\n",
324 (rgvstat & MEMSTAT_PSTATE_MASK) >> MEMSTAT_PSTATE_SHIFT);
325 - } else if (IS_GEN6(dev)) {
326 + } else if (IS_GEN6(dev) || IS_GEN7(dev)) {
327 u32 gt_perf_status = I915_READ(GEN6_GT_PERF_STATUS);
328 u32 rp_state_limits = I915_READ(GEN6_RP_STATE_LIMITS);
329 u32 rp_state_cap = I915_READ(GEN6_RP_STATE_CAP);
330 diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
331 index a087e1b..5548593 100644
332 --- a/drivers/gpu/drm/i915/i915_gem.c
333 +++ b/drivers/gpu/drm/i915/i915_gem.c
334 @@ -1475,7 +1475,7 @@ i915_gem_mmap_gtt(struct drm_file *file,
335
336 if (obj->base.size > dev_priv->mm.gtt_mappable_end) {
337 ret = -E2BIG;
338 - goto unlock;
339 + goto out;
340 }
341
342 if (obj->madv != I915_MADV_WILLNEED) {
343 diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
344 index 5609c06..cbf4c4c 100644
345 --- a/drivers/gpu/drm/i915/intel_display.c
346 +++ b/drivers/gpu/drm/i915/intel_display.c
347 @@ -7943,7 +7943,7 @@ void intel_modeset_init(struct drm_device *dev)
348 intel_init_emon(dev);
349 }
350
351 - if (IS_GEN6(dev))
352 + if (IS_GEN6(dev) || IS_GEN7(dev))
353 gen6_enable_rps(dev_priv);
354
355 INIT_WORK(&dev_priv->idle_work, intel_idle_update);
356 @@ -7985,7 +7985,7 @@ void intel_modeset_cleanup(struct drm_device *dev)
357
358 if (IS_IRONLAKE_M(dev))
359 ironlake_disable_drps(dev);
360 - if (IS_GEN6(dev))
361 + if (IS_GEN6(dev) || IS_GEN7(dev))
362 gen6_disable_rps(dev);
363
364 if (IS_IRONLAKE_M(dev))
365 diff --git a/drivers/gpu/drm/nouveau/nouveau_channel.c b/drivers/gpu/drm/nouveau/nouveau_channel.c
366 index a7583a8..d31d355 100644
367 --- a/drivers/gpu/drm/nouveau/nouveau_channel.c
368 +++ b/drivers/gpu/drm/nouveau/nouveau_channel.c
369 @@ -159,6 +159,7 @@ nouveau_channel_alloc(struct drm_device *dev, struct nouveau_channel **chan_ret,
370 INIT_LIST_HEAD(&chan->nvsw.vbl_wait);
371 INIT_LIST_HEAD(&chan->nvsw.flip);
372 INIT_LIST_HEAD(&chan->fence.pending);
373 + spin_lock_init(&chan->fence.lock);
374
375 /* Allocate DMA push buffer */
376 chan->pushbuf_bo = nouveau_channel_user_pushbuf_alloc(dev);
377 diff --git a/drivers/gpu/drm/nouveau/nouveau_fence.c b/drivers/gpu/drm/nouveau/nouveau_fence.c
378 index 7347075..56f06b0 100644
379 --- a/drivers/gpu/drm/nouveau/nouveau_fence.c
380 +++ b/drivers/gpu/drm/nouveau/nouveau_fence.c
381 @@ -542,8 +542,6 @@ nouveau_fence_channel_init(struct nouveau_channel *chan)
382 return ret;
383 }
384
385 - INIT_LIST_HEAD(&chan->fence.pending);
386 - spin_lock_init(&chan->fence.lock);
387 atomic_set(&chan->fence.last_sequence_irq, 0);
388 return 0;
389 }
390 diff --git a/drivers/gpu/drm/radeon/atombios_dp.c b/drivers/gpu/drm/radeon/atombios_dp.c
391 index b5628ce..3b77ad6 100644
392 --- a/drivers/gpu/drm/radeon/atombios_dp.c
393 +++ b/drivers/gpu/drm/radeon/atombios_dp.c
394 @@ -283,7 +283,7 @@ int radeon_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode,
395 }
396 }
397
398 - DRM_ERROR("aux i2c too many retries, giving up\n");
399 + DRM_DEBUG_KMS("aux i2c too many retries, giving up\n");
400 return -EREMOTEIO;
401 }
402
403 diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c
404 index 661b692..6d5628b 100644
405 --- a/drivers/leds/led-class.c
406 +++ b/drivers/leds/led-class.c
407 @@ -270,11 +270,8 @@ void led_blink_set(struct led_classdev *led_cdev,
408 del_timer_sync(&led_cdev->blink_timer);
409
410 if (led_cdev->blink_set &&
411 - !led_cdev->blink_set(led_cdev, delay_on, delay_off)) {
412 - led_cdev->blink_delay_on = *delay_on;
413 - led_cdev->blink_delay_off = *delay_off;
414 + !led_cdev->blink_set(led_cdev, delay_on, delay_off))
415 return;
416 - }
417
418 /* blink with 1 Hz as default if nothing specified */
419 if (!*delay_on && !*delay_off)
420 diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
421 index e509147..cbb50d3 100644
422 --- a/drivers/md/raid5.c
423 +++ b/drivers/md/raid5.c
424 @@ -3120,12 +3120,16 @@ static void handle_stripe5(struct stripe_head *sh)
425 /* check if the array has lost two devices and, if so, some requests might
426 * need to be failed
427 */
428 - if (s.failed > 1 && s.to_read+s.to_write+s.written)
429 - handle_failed_stripe(conf, sh, &s, disks, &return_bi);
430 - if (s.failed > 1 && s.syncing) {
431 - md_done_sync(conf->mddev, STRIPE_SECTORS,0);
432 - clear_bit(STRIPE_SYNCING, &sh->state);
433 - s.syncing = 0;
434 + if (s.failed > 1) {
435 + sh->check_state = 0;
436 + sh->reconstruct_state = 0;
437 + if (s.to_read+s.to_write+s.written)
438 + handle_failed_stripe(conf, sh, &s, disks, &return_bi);
439 + if (s.syncing) {
440 + md_done_sync(conf->mddev, STRIPE_SECTORS,0);
441 + clear_bit(STRIPE_SYNCING, &sh->state);
442 + s.syncing = 0;
443 + }
444 }
445
446 /* might be able to return some write requests if the parity block
447 @@ -3412,12 +3416,16 @@ static void handle_stripe6(struct stripe_head *sh)
448 /* check if the array has lost >2 devices and, if so, some requests
449 * might need to be failed
450 */
451 - if (s.failed > 2 && s.to_read+s.to_write+s.written)
452 - handle_failed_stripe(conf, sh, &s, disks, &return_bi);
453 - if (s.failed > 2 && s.syncing) {
454 - md_done_sync(conf->mddev, STRIPE_SECTORS,0);
455 - clear_bit(STRIPE_SYNCING, &sh->state);
456 - s.syncing = 0;
457 + if (s.failed > 2) {
458 + sh->check_state = 0;
459 + sh->reconstruct_state = 0;
460 + if (s.to_read+s.to_write+s.written)
461 + handle_failed_stripe(conf, sh, &s, disks, &return_bi);
462 + if (s.syncing) {
463 + md_done_sync(conf->mddev, STRIPE_SECTORS,0);
464 + clear_bit(STRIPE_SYNCING, &sh->state);
465 + s.syncing = 0;
466 + }
467 }
468
469 /*
470 diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
471 index b8f2a4e..b9188a2 100644
472 --- a/drivers/mfd/twl-core.c
473 +++ b/drivers/mfd/twl-core.c
474 @@ -109,7 +109,7 @@
475 #define twl_has_watchdog() false
476 #endif
477
478 -#if defined(CONFIG_TWL4030_CODEC) || defined(CONFIG_TWL4030_CODEC_MODULE) ||\
479 +#if defined(CONFIG_MFD_TWL4030_AUDIO) || defined(CONFIG_MFD_TWL4030_AUDIO_MODULE) ||\
480 defined(CONFIG_SND_SOC_TWL6040) || defined(CONFIG_SND_SOC_TWL6040_MODULE)
481 #define twl_has_codec() true
482 #else
483 diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
484 index b1fe4fe..7c2e09a 100644
485 --- a/drivers/net/wireless/b43/main.c
486 +++ b/drivers/net/wireless/b43/main.c
487 @@ -2401,6 +2401,13 @@ static int b43_upload_microcode(struct b43_wldev *dev)
488 b43_print_fw_helptext(dev->wl, 1);
489 err = -EOPNOTSUPP;
490 goto error;
491 + } else if (fwrev >= 598) {
492 + b43err(dev->wl, "YOUR FIRMWARE IS TOO NEW. Support for "
493 + "firmware 598 and up requires kernel 3.2 or newer. You "
494 + "have to install older firmware or upgrade kernel.\n");
495 + b43_print_fw_helptext(dev->wl, 1);
496 + err = -EOPNOTSUPP;
497 + goto error;
498 }
499 dev->fw.rev = fwrev;
500 dev->fw.patch = fwpatch;
501 diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
502 index 4bcc8b8..ecb9254 100644
503 --- a/drivers/virtio/virtio_pci.c
504 +++ b/drivers/virtio/virtio_pci.c
505 @@ -590,11 +590,11 @@ static struct virtio_config_ops virtio_pci_config_ops = {
506
507 static void virtio_pci_release_dev(struct device *_d)
508 {
509 - struct virtio_device *dev = container_of(_d, struct virtio_device,
510 - dev);
511 - struct virtio_pci_device *vp_dev = to_vp_device(dev);
512 -
513 - kfree(vp_dev);
514 + /*
515 + * No need for a release method as we allocate/free
516 + * all devices together with the pci devices.
517 + * Provide an empty one to avoid getting a warning from core.
518 + */
519 }
520
521 /* the PCI probing function */
522 @@ -682,6 +682,7 @@ static void __devexit virtio_pci_remove(struct pci_dev *pci_dev)
523 pci_iounmap(pci_dev, vp_dev->ioaddr);
524 pci_release_regions(pci_dev);
525 pci_disable_device(pci_dev);
526 + kfree(vp_dev);
527 }
528
529 #ifdef CONFIG_PM
530 diff --git a/drivers/xen/gntalloc.c b/drivers/xen/gntalloc.c
531 index f6832f4..e1c4c6e 100644
532 --- a/drivers/xen/gntalloc.c
533 +++ b/drivers/xen/gntalloc.c
534 @@ -135,7 +135,7 @@ static int add_grefs(struct ioctl_gntalloc_alloc_gref *op,
535 /* Grant foreign access to the page. */
536 gref->gref_id = gnttab_grant_foreign_access(op->domid,
537 pfn_to_mfn(page_to_pfn(gref->page)), readonly);
538 - if (gref->gref_id < 0) {
539 + if ((int)gref->gref_id < 0) {
540 rc = gref->gref_id;
541 goto undo;
542 }
543 @@ -280,7 +280,7 @@ static long gntalloc_ioctl_alloc(struct gntalloc_file_private_data *priv,
544 goto out;
545 }
546
547 - gref_ids = kzalloc(sizeof(gref_ids[0]) * op.count, GFP_TEMPORARY);
548 + gref_ids = kcalloc(op.count, sizeof(gref_ids[0]), GFP_TEMPORARY);
549 if (!gref_ids) {
550 rc = -ENOMEM;
551 goto out;
552 diff --git a/fs/hfs/trans.c b/fs/hfs/trans.c
553 index e673a88..b1ce4c7 100644
554 --- a/fs/hfs/trans.c
555 +++ b/fs/hfs/trans.c
556 @@ -40,6 +40,8 @@ int hfs_mac2asc(struct super_block *sb, char *out, const struct hfs_name *in)
557
558 src = in->name;
559 srclen = in->len;
560 + if (srclen > HFS_NAMELEN)
561 + srclen = HFS_NAMELEN;
562 dst = out;
563 dstlen = HFS_MAX_NAMELEN;
564 if (nls_io) {
565 diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h
566 index 3d53efd..f81676f 100644
567 --- a/include/drm/drm_pciids.h
568 +++ b/include/drm/drm_pciids.h
569 @@ -4,6 +4,7 @@
570 */
571 #define radeon_PCI_IDS \
572 {0x1002, 0x3150, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY}, \
573 + {0x1002, 0x3151, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
574 {0x1002, 0x3152, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
575 {0x1002, 0x3154, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
576 {0x1002, 0x3155, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
577 @@ -55,6 +56,7 @@
578 {0x1002, 0x4C64, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV250|RADEON_IS_MOBILITY}, \
579 {0x1002, 0x4C66, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV250|RADEON_IS_MOBILITY}, \
580 {0x1002, 0x4C67, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV250|RADEON_IS_MOBILITY}, \
581 + {0x1002, 0x4C6E, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280|RADEON_IS_MOBILITY}, \
582 {0x1002, 0x4E44, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R300}, \
583 {0x1002, 0x4E45, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R300}, \
584 {0x1002, 0x4E46, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R300}, \
585 diff --git a/mm/backing-dev.c b/mm/backing-dev.c
586 index e56fe35..b3b122f 100644
587 --- a/mm/backing-dev.c
588 +++ b/mm/backing-dev.c
589 @@ -686,6 +686,14 @@ void bdi_destroy(struct backing_dev_info *bdi)
590
591 bdi_unregister(bdi);
592
593 + /*
594 + * If bdi_unregister() had already been called earlier, the
595 + * wakeup_timer could still be armed because bdi_prune_sb()
596 + * can race with the bdi_wakeup_thread_delayed() calls from
597 + * __mark_inode_dirty().
598 + */
599 + del_timer_sync(&bdi->wb.wakeup_timer);
600 +
601 for (i = 0; i < NR_BDI_STAT_ITEMS; i++)
602 percpu_counter_destroy(&bdi->bdi_stat[i]);
603
604 diff --git a/security/keys/user_defined.c b/security/keys/user_defined.c
605 index 5b366d7..69ff52c 100644
606 --- a/security/keys/user_defined.c
607 +++ b/security/keys/user_defined.c
608 @@ -102,7 +102,8 @@ int user_update(struct key *key, const void *data, size_t datalen)
609 key->expiry = 0;
610 }
611
612 - kfree_rcu(zap, rcu);
613 + if (zap)
614 + kfree_rcu(zap, rcu);
615
616 error:
617 return ret;
618 diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
619 index 45b4a8d..2195851 100644
620 --- a/sound/pci/hda/hda_codec.c
621 +++ b/sound/pci/hda/hda_codec.c
622 @@ -2187,6 +2187,39 @@ int snd_hda_codec_reset(struct hda_codec *codec)
623 return 0;
624 }
625
626 +typedef int (*map_slave_func_t)(void *, struct snd_kcontrol *);
627 +
628 +/* apply the function to all matching slave ctls in the mixer list */
629 +static int map_slaves(struct hda_codec *codec, const char * const *slaves,
630 + map_slave_func_t func, void *data)
631 +{
632 + struct hda_nid_item *items;
633 + const char * const *s;
634 + int i, err;
635 +
636 + items = codec->mixers.list;
637 + for (i = 0; i < codec->mixers.used; i++) {
638 + struct snd_kcontrol *sctl = items[i].kctl;
639 + if (!sctl || !sctl->id.name ||
640 + sctl->id.iface != SNDRV_CTL_ELEM_IFACE_MIXER)
641 + continue;
642 + for (s = slaves; *s; s++) {
643 + if (!strcmp(sctl->id.name, *s)) {
644 + err = func(data, sctl);
645 + if (err)
646 + return err;
647 + break;
648 + }
649 + }
650 + }
651 + return 0;
652 +}
653 +
654 +static int check_slave_present(void *data, struct snd_kcontrol *sctl)
655 +{
656 + return 1;
657 +}
658 +
659 /**
660 * snd_hda_add_vmaster - create a virtual master control and add slaves
661 * @codec: HD-audio codec
662 @@ -2207,12 +2240,10 @@ int snd_hda_add_vmaster(struct hda_codec *codec, char *name,
663 unsigned int *tlv, const char * const *slaves)
664 {
665 struct snd_kcontrol *kctl;
666 - const char * const *s;
667 int err;
668
669 - for (s = slaves; *s && !snd_hda_find_mixer_ctl(codec, *s); s++)
670 - ;
671 - if (!*s) {
672 + err = map_slaves(codec, slaves, check_slave_present, NULL);
673 + if (err != 1) {
674 snd_printdd("No slave found for %s\n", name);
675 return 0;
676 }
677 @@ -2223,23 +2254,10 @@ int snd_hda_add_vmaster(struct hda_codec *codec, char *name,
678 if (err < 0)
679 return err;
680
681 - for (s = slaves; *s; s++) {
682 - struct snd_kcontrol *sctl;
683 - int i = 0;
684 - for (;;) {
685 - sctl = _snd_hda_find_mixer_ctl(codec, *s, i);
686 - if (!sctl) {
687 - if (!i)
688 - snd_printdd("Cannot find slave %s, "
689 - "skipped\n", *s);
690 - break;
691 - }
692 - err = snd_ctl_add_slave(kctl, sctl);
693 - if (err < 0)
694 - return err;
695 - i++;
696 - }
697 - }
698 + err = map_slaves(codec, slaves, (map_slave_func_t)snd_ctl_add_slave,
699 + kctl);
700 + if (err < 0)
701 + return err;
702 return 0;
703 }
704 EXPORT_SYMBOL_HDA(snd_hda_add_vmaster);
705 diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
706 index fb9f08a..2194912 100644
707 --- a/sound/soc/codecs/wm8994.c
708 +++ b/sound/soc/codecs/wm8994.c
709 @@ -56,7 +56,7 @@ static int wm8994_retune_mobile_base[] = {
710 static int wm8994_readable(struct snd_soc_codec *codec, unsigned int reg)
711 {
712 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
713 - struct wm8994 *control = wm8994->control_data;
714 + struct wm8994 *control = codec->control_data;
715
716 switch (reg) {
717 case WM8994_GPIO_1:
718 diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
719 index cdd19d7..0de7cbd 100644
720 --- a/sound/usb/mixer.c
721 +++ b/sound/usb/mixer.c
722 @@ -765,10 +765,60 @@ static void usb_mixer_elem_free(struct snd_kcontrol *kctl)
723 * interface to ALSA control for feature/mixer units
724 */
725
726 +/* volume control quirks */
727 +static void volume_control_quirks(struct usb_mixer_elem_info *cval,
728 + struct snd_kcontrol *kctl)
729 +{
730 + switch (cval->mixer->chip->usb_id) {
731 + case USB_ID(0x0471, 0x0101):
732 + case USB_ID(0x0471, 0x0104):
733 + case USB_ID(0x0471, 0x0105):
734 + case USB_ID(0x0672, 0x1041):
735 + /* quirk for UDA1321/N101.
736 + * note that detection between firmware 2.1.1.7 (N101)
737 + * and later 2.1.1.21 is not very clear from datasheets.
738 + * I hope that the min value is -15360 for newer firmware --jk
739 + */
740 + if (!strcmp(kctl->id.name, "PCM Playback Volume") &&
741 + cval->min == -15616) {
742 + snd_printk(KERN_INFO
743 + "set volume quirk for UDA1321/N101 chip\n");
744 + cval->max = -256;
745 + }
746 + break;
747 +
748 + case USB_ID(0x046d, 0x09a4):
749 + if (!strcmp(kctl->id.name, "Mic Capture Volume")) {
750 + snd_printk(KERN_INFO
751 + "set volume quirk for QuickCam E3500\n");
752 + cval->min = 6080;
753 + cval->max = 8768;
754 + cval->res = 192;
755 + }
756 + break;
757 +
758 + case USB_ID(0x046d, 0x0808):
759 + case USB_ID(0x046d, 0x0809):
760 + case USB_ID(0x046d, 0x0991):
761 + /* Most audio usb devices lie about volume resolution.
762 + * Most Logitech webcams have res = 384.
763 + * Proboly there is some logitech magic behind this number --fishor
764 + */
765 + if (!strcmp(kctl->id.name, "Mic Capture Volume")) {
766 + snd_printk(KERN_INFO
767 + "set resolution quirk: cval->res = 384\n");
768 + cval->res = 384;
769 + }
770 + break;
771 +
772 + }
773 +}
774 +
775 /*
776 * retrieve the minimum and maximum values for the specified control
777 */
778 -static int get_min_max(struct usb_mixer_elem_info *cval, int default_min)
779 +static int get_min_max_with_quirks(struct usb_mixer_elem_info *cval,
780 + int default_min, struct snd_kcontrol *kctl)
781 {
782 /* for failsafe */
783 cval->min = default_min;
784 @@ -844,6 +894,9 @@ static int get_min_max(struct usb_mixer_elem_info *cval, int default_min)
785 cval->initialized = 1;
786 }
787
788 + if (kctl)
789 + volume_control_quirks(cval, kctl);
790 +
791 /* USB descriptions contain the dB scale in 1/256 dB unit
792 * while ALSA TLV contains in 1/100 dB unit
793 */
794 @@ -864,6 +917,7 @@ static int get_min_max(struct usb_mixer_elem_info *cval, int default_min)
795 return 0;
796 }
797
798 +#define get_min_max(cval, def) get_min_max_with_quirks(cval, def, NULL)
799
800 /* get a feature/mixer unit info */
801 static int mixer_ctl_feature_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
802 @@ -881,8 +935,17 @@ static int mixer_ctl_feature_info(struct snd_kcontrol *kcontrol, struct snd_ctl_
803 uinfo->value.integer.min = 0;
804 uinfo->value.integer.max = 1;
805 } else {
806 - if (! cval->initialized)
807 - get_min_max(cval, 0);
808 + if (!cval->initialized) {
809 + get_min_max_with_quirks(cval, 0, kcontrol);
810 + if (cval->initialized && cval->dBmin >= cval->dBmax) {
811 + kcontrol->vd[0].access &=
812 + ~(SNDRV_CTL_ELEM_ACCESS_TLV_READ |
813 + SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK);
814 + snd_ctl_notify(cval->mixer->chip->card,
815 + SNDRV_CTL_EVENT_MASK_INFO,
816 + &kcontrol->id);
817 + }
818 + }
819 uinfo->value.integer.min = 0;
820 uinfo->value.integer.max =
821 (cval->max - cval->min + cval->res - 1) / cval->res;
822 @@ -1036,9 +1099,6 @@ static void build_feature_ctl(struct mixer_build *state, void *raw_desc,
823 cval->ch_readonly = readonly_mask;
824 }
825
826 - /* get min/max values */
827 - get_min_max(cval, 0);
828 -
829 /* if all channels in the mask are marked read-only, make the control
830 * read-only. set_cur_mix_value() will check the mask again and won't
831 * issue write commands to read-only channels. */
832 @@ -1060,6 +1120,9 @@ static void build_feature_ctl(struct mixer_build *state, void *raw_desc,
833 len = snd_usb_copy_string_desc(state, nameid,
834 kctl->id.name, sizeof(kctl->id.name));
835
836 + /* get min/max values */
837 + get_min_max_with_quirks(cval, 0, kctl);
838 +
839 switch (control) {
840 case UAC_FU_MUTE:
841 case UAC_FU_VOLUME:
842 @@ -1109,51 +1172,6 @@ static void build_feature_ctl(struct mixer_build *state, void *raw_desc,
843 break;
844 }
845
846 - /* volume control quirks */
847 - switch (state->chip->usb_id) {
848 - case USB_ID(0x0471, 0x0101):
849 - case USB_ID(0x0471, 0x0104):
850 - case USB_ID(0x0471, 0x0105):
851 - case USB_ID(0x0672, 0x1041):
852 - /* quirk for UDA1321/N101.
853 - * note that detection between firmware 2.1.1.7 (N101)
854 - * and later 2.1.1.21 is not very clear from datasheets.
855 - * I hope that the min value is -15360 for newer firmware --jk
856 - */
857 - if (!strcmp(kctl->id.name, "PCM Playback Volume") &&
858 - cval->min == -15616) {
859 - snd_printk(KERN_INFO
860 - "set volume quirk for UDA1321/N101 chip\n");
861 - cval->max = -256;
862 - }
863 - break;
864 -
865 - case USB_ID(0x046d, 0x09a4):
866 - if (!strcmp(kctl->id.name, "Mic Capture Volume")) {
867 - snd_printk(KERN_INFO
868 - "set volume quirk for QuickCam E3500\n");
869 - cval->min = 6080;
870 - cval->max = 8768;
871 - cval->res = 192;
872 - }
873 - break;
874 -
875 - case USB_ID(0x046d, 0x0808):
876 - case USB_ID(0x046d, 0x0809):
877 - case USB_ID(0x046d, 0x0991):
878 - /* Most audio usb devices lie about volume resolution.
879 - * Most Logitech webcams have res = 384.
880 - * Proboly there is some logitech magic behind this number --fishor
881 - */
882 - if (!strcmp(kctl->id.name, "Mic Capture Volume")) {
883 - snd_printk(KERN_INFO
884 - "set resolution quirk: cval->res = 384\n");
885 - cval->res = 384;
886 - }
887 - break;
888 -
889 - }
890 -
891 range = (cval->max - cval->min) / cval->res;
892 /* Are there devices with volume range more than 255? I use a bit more
893 * to be sure. 384 is a resolution magic number found on Logitech

  ViewVC Help
Powered by ViewVC 1.1.20