summaryrefslogtreecommitdiffstats
path: root/extras/recipes-kernel/linux/linux-omap/linus
diff options
context:
space:
mode:
Diffstat (limited to 'extras/recipes-kernel/linux/linux-omap/linus')
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0001-ARM-pxa-PXA_ESERIES-depends-on-FB_W100.patch29
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0002-ARM-smp-avoid-incrementing-mm_users-on-CPU-startup.patch32
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0003-ARM-get-rid-of-kmap_high_l1_vipt.patch186
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0004-ARM-fix-cache-xsc3l2-after-stack-based-kmap_atomic.patch189
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0005-ARM-fix-cache-feroceon-l2-after-stack-based-kmap_ato.patch119
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0006-drm-i915-Set-the-required-VFMUNIT-clock-gating-disab.patch45
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0007-drm-i915-sdvo-Add-hdmi-connector-properties-after-in.patch38
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0008-drm-i915-intel_ips-When-i915-loads-after-IPS-make-IP.patch190
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0009-drm-i915-Verify-Ironlake-eDP-presence-on-DP_A-using-.patch69
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0010-ARM-6536-1-Add-missing-SZ_-32-64-128.patch42
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0011-ARM-6537-1-update-Nomadik-U300-and-Ux500-maintainers.patch65
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0012-ARM-6540-1-Stop-irqsoff-trace-on-return-to-user.patch44
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0013-ueagle-atm-fix-PHY-signal-initialization-race.patch100
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0014-ehea-Avoid-changing-vlan-flags.patch34
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0015-ppp-allow-disabling-multilink-protocol-ID-compressio.patch64
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0016-skfp-testing-the-wrong-variable-in-skfp_driver_init.patch31
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0017-ASoC-codecs-Add-missing-control_type-initialization.patch84
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0018-ASoC-codecs-max98088-Fix-register-cache-incoherency.patch72
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0019-ASoC-codecs-wm8523-Fix-register-cache-incoherency.patch74
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0020-ASoC-codecs-wm8741-Fix-register-cache-incoherency.patch61
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0021-ASoC-codecs-wm8904-Fix-register-cache-incoherency.patch131
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0022-ASoC-codecs-wm8955-Fix-register-cache-incoherency.patch107
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0023-ASoC-codecs-wm8962-Fix-register-cache-incoherency.patch151
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0024-ASoC-codecs-wm9090-Fix-register-cache-incoherency.patch75
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0025-ASoC-codecs-wm8753-Fix-register-cache-incoherency.patch514
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0026-KVM-MMU-Fix-incorrect-direct-gfn-for-unpaged-mode-sh.patch35
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0027-fix-freeing-user_struct-in-user-cache.patch34
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0028-spi-omap2_mcspi.c-Force-CS-to-be-in-inactive-state-a.patch111
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0029-kconfig-fix-undesirable-side-effect-of-adding-visibl.patch49
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0030-spi-m68knommu-Coldfire-QSPI-platform-support.patch33
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0031-sound-Prevent-buffer-overflow-in-OSS-load_mixer_volu.patch47
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0032-ALSA-hda-Use-LPIB-quirk-for-Dell-Inspiron-m101z-1120.patch32
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0033-Revert-drm-i915-bios-Reverse-order-of-100-120-Mhz-SS.patch33
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0034-drm-i915-dvo-Report-LVDS-attached-to-ch701x-as-conne.patch30
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0035-update-Documentation-filesystems-Locking.patch402
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0036-memcg-fix-wrong-VM_BUG_ON-in-try_charge-s-mm-owner-c.patch63
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0037-Revert-Staging-zram-work-around-oops-due-to-startup-.patch54
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0038-CAN-Use-inode-instead-of-kernel-address-for-proc-fil.patch43
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0039-ISDN-Gigaset-Fix-memory-leak-in-do_disconnect_req.patch56
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0040-Broadcom-CNIC-core-network-driver-fix-mem-leak-on-al.patch58
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0041-tg3-fix-return-value-check-in-tg3_read_vpd.patch35
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0042-starfire-Fix-dma_addr_t-size-test-for-MIPS.patch37
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0043-drivers-atm-atmtcp.c-add-missing-atm_dev_put.patch50
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0044-KVM-i8259-initialize-isr_ack.patch32
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0045-hwmon-s3c-hwmon-Fix-compilation.patch37
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0046-watchdog-Improve-initialisation-error-message-and-do.patch58
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0047-ARM-6605-1-Add-missing-include-asm-memory.h.patch42
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0048-mv_xor-fix-race-in-tasklet-function.patch31
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0049-dmaengine-provide-dummy-functions-for-DMA_ENGINE-n.patch55
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0050-cx25840-Prevent-device-probe-failure-due-to-volume-c.patch52
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0051-wm8775-Revert-changeset-fcb9757333-to-avoid-a-regres.patch518
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0052-em28xx-radio_fops-should-also-use-unlocked_ioctl.patch31
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0053-arch-x86-oprofile-op_model_amd.c-Perform-initialisat.patch81
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0054-perf-Fix-callchain-hit-bad-cast-on-ascii-display.patch39
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0055-ARM-it8152-add-IT8152_LAST_IRQ-definition-to-fix-bui.patch40
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0056-ARM-pxa-fix-page-table-corruption-on-resume.patch46
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0057-atl1-fix-oops-when-changing-tx-rx-ring-params.patch63
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0058-bridge-fix-br_multicast_ipv6_rcv-for-paged-skbs.patch157
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0059-name_to_dev_t-must-not-call-__init-code.patch31
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0060-bridge-stp-ensure-mac-header-is-set.patch38
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0061-ima-fix-add-LSM-rule-bug.patch64
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0062-arch-mn10300-kernel-irq.c-fix-build.patch31
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0063-remove-trim_fs-method-from-Documentation-filesystems.patch38
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0064-ipv4-route.c-respect-prefsrc-for-local-routes.patch57
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0065-Linux-2.6.37.patch25
65 files changed, 5314 insertions, 0 deletions
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0001-ARM-pxa-PXA_ESERIES-depends-on-FB_W100.patch b/extras/recipes-kernel/linux/linux-omap/linus/0001-ARM-pxa-PXA_ESERIES-depends-on-FB_W100.patch
new file mode 100644
index 00000000..845a4f9c
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0001-ARM-pxa-PXA_ESERIES-depends-on-FB_W100.patch
@@ -0,0 +1,29 @@
1From 679fd7bc2af7980a4b9360ff42f515c3cc4e3674 Mon Sep 17 00:00:00 2001
2From: Lennert Buytenhek <buytenh@wantstofly.org>
3Date: Wed, 15 Dec 2010 07:20:16 +0800
4Subject: [PATCH 01/65] ARM: pxa: PXA_ESERIES depends on FB_W100.
5
6As arch/arm/mach-pxa/eseries.c references w100fb_gpio_{read,write}()
7directly.
8
9Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
10Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
11---
12 arch/arm/mach-pxa/Kconfig | 1 +
13 1 files changed, 1 insertions(+), 0 deletions(-)
14
15diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
16index dd235ec..c93e73d 100644
17--- a/arch/arm/mach-pxa/Kconfig
18+++ b/arch/arm/mach-pxa/Kconfig
19@@ -540,6 +540,7 @@ config MACH_ICONTROL
20 config ARCH_PXA_ESERIES
21 bool "PXA based Toshiba e-series PDAs"
22 select PXA25x
23+ select FB_W100
24
25 config MACH_E330
26 bool "Toshiba e330"
27--
281.6.6.1
29
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0002-ARM-smp-avoid-incrementing-mm_users-on-CPU-startup.patch b/extras/recipes-kernel/linux/linux-omap/linus/0002-ARM-smp-avoid-incrementing-mm_users-on-CPU-startup.patch
new file mode 100644
index 00000000..19b1a6c6
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0002-ARM-smp-avoid-incrementing-mm_users-on-CPU-startup.patch
@@ -0,0 +1,32 @@
1From d7bbfe094baebc1515d3919a1e886fcfa655ff5a Mon Sep 17 00:00:00 2001
2From: Russell King <rmk+kernel@arm.linux.org.uk>
3Date: Sat, 18 Dec 2010 13:57:00 +0000
4Subject: [PATCH 02/65] ARM: smp: avoid incrementing mm_users on CPU startup
5
6We should not be incrementing mm_users when we startup a secondary
7CPU - doing so results in mm_users incrementing by one each time we
8hotplug a CPU, which will eventually wrap, and will cause problems.
9
10Other architectures such as x86 do not increment mm_users, but only
11mm_count, so we follow that pattern.
12
13Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14---
15 arch/arm/kernel/smp.c | 1 -
16 1 files changed, 0 insertions(+), 1 deletions(-)
17
18diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
19index 8c19595..9066473 100644
20--- a/arch/arm/kernel/smp.c
21+++ b/arch/arm/kernel/smp.c
22@@ -310,7 +310,6 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
23 * All kernel threads share the same mm context; grab a
24 * reference and switch to it.
25 */
26- atomic_inc(&mm->mm_users);
27 atomic_inc(&mm->mm_count);
28 current->active_mm = mm;
29 cpumask_set_cpu(cpu, mm_cpumask(mm));
30--
311.6.6.1
32
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0003-ARM-get-rid-of-kmap_high_l1_vipt.patch b/extras/recipes-kernel/linux/linux-omap/linus/0003-ARM-get-rid-of-kmap_high_l1_vipt.patch
new file mode 100644
index 00000000..d31b0e69
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0003-ARM-get-rid-of-kmap_high_l1_vipt.patch
@@ -0,0 +1,186 @@
1From b4edc88b911049a85162600f579d0364ee311d4e Mon Sep 17 00:00:00 2001
2From: Nicolas Pitre <nicolas.pitre@linaro.org>
3Date: Wed, 15 Dec 2010 15:14:45 -0500
4Subject: [PATCH 03/65] ARM: get rid of kmap_high_l1_vipt()
5
6Since commit 3e4d3af501 "mm: stack based kmap_atomic()", it is no longer
7necessary to carry an ad hoc version of kmap_atomic() added in commit
87e5a69e83b "ARM: 6007/1: fix highmem with VIPT cache and DMA" to cope
9with reentrancy.
10
11In fact, it is now actively wrong to rely on fixed kmap type indices
12(namely KM_L1_CACHE) as kmap_atomic() totally ignores them now and a
13concurrent instance of it may reuse any slot for any purpose.
14
15Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
16---
17 arch/arm/include/asm/highmem.h | 3 -
18 arch/arm/mm/dma-mapping.c | 7 ++-
19 arch/arm/mm/flush.c | 7 ++-
20 arch/arm/mm/highmem.c | 87 ----------------------------------------
21 4 files changed, 8 insertions(+), 96 deletions(-)
22
23diff --git a/arch/arm/include/asm/highmem.h b/arch/arm/include/asm/highmem.h
24index 1fc684e..7080e2c 100644
25--- a/arch/arm/include/asm/highmem.h
26+++ b/arch/arm/include/asm/highmem.h
27@@ -25,9 +25,6 @@ extern void *kmap_high(struct page *page);
28 extern void *kmap_high_get(struct page *page);
29 extern void kunmap_high(struct page *page);
30
31-extern void *kmap_high_l1_vipt(struct page *page, pte_t *saved_pte);
32-extern void kunmap_high_l1_vipt(struct page *page, pte_t saved_pte);
33-
34 /*
35 * The following functions are already defined by <linux/highmem.h>
36 * when CONFIG_HIGHMEM is not set.
37diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
38index ac6a361..809f1bf 100644
39--- a/arch/arm/mm/dma-mapping.c
40+++ b/arch/arm/mm/dma-mapping.c
41@@ -17,6 +17,7 @@
42 #include <linux/init.h>
43 #include <linux/device.h>
44 #include <linux/dma-mapping.h>
45+#include <linux/highmem.h>
46
47 #include <asm/memory.h>
48 #include <asm/highmem.h>
49@@ -480,10 +481,10 @@ static void dma_cache_maint_page(struct page *page, unsigned long offset,
50 op(vaddr, len, dir);
51 kunmap_high(page);
52 } else if (cache_is_vipt()) {
53- pte_t saved_pte;
54- vaddr = kmap_high_l1_vipt(page, &saved_pte);
55+ /* unmapped pages might still be cached */
56+ vaddr = kmap_atomic(page);
57 op(vaddr + offset, len, dir);
58- kunmap_high_l1_vipt(page, saved_pte);
59+ kunmap_atomic(vaddr);
60 }
61 } else {
62 vaddr = page_address(page) + offset;
63diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c
64index 391ffae..c29f283 100644
65--- a/arch/arm/mm/flush.c
66+++ b/arch/arm/mm/flush.c
67@@ -10,6 +10,7 @@
68 #include <linux/module.h>
69 #include <linux/mm.h>
70 #include <linux/pagemap.h>
71+#include <linux/highmem.h>
72
73 #include <asm/cacheflush.h>
74 #include <asm/cachetype.h>
75@@ -180,10 +181,10 @@ void __flush_dcache_page(struct address_space *mapping, struct page *page)
76 __cpuc_flush_dcache_area(addr, PAGE_SIZE);
77 kunmap_high(page);
78 } else if (cache_is_vipt()) {
79- pte_t saved_pte;
80- addr = kmap_high_l1_vipt(page, &saved_pte);
81+ /* unmapped pages might still be cached */
82+ addr = kmap_atomic(page);
83 __cpuc_flush_dcache_area(addr, PAGE_SIZE);
84- kunmap_high_l1_vipt(page, saved_pte);
85+ kunmap_atomic(addr);
86 }
87 }
88
89diff --git a/arch/arm/mm/highmem.c b/arch/arm/mm/highmem.c
90index c435fd9..807c057 100644
91--- a/arch/arm/mm/highmem.c
92+++ b/arch/arm/mm/highmem.c
93@@ -140,90 +140,3 @@ struct page *kmap_atomic_to_page(const void *ptr)
94 pte = TOP_PTE(vaddr);
95 return pte_page(*pte);
96 }
97-
98-#ifdef CONFIG_CPU_CACHE_VIPT
99-
100-#include <linux/percpu.h>
101-
102-/*
103- * The VIVT cache of a highmem page is always flushed before the page
104- * is unmapped. Hence unmapped highmem pages need no cache maintenance
105- * in that case.
106- *
107- * However unmapped pages may still be cached with a VIPT cache, and
108- * it is not possible to perform cache maintenance on them using physical
109- * addresses unfortunately. So we have no choice but to set up a temporary
110- * virtual mapping for that purpose.
111- *
112- * Yet this VIPT cache maintenance may be triggered from DMA support
113- * functions which are possibly called from interrupt context. As we don't
114- * want to keep interrupt disabled all the time when such maintenance is
115- * taking place, we therefore allow for some reentrancy by preserving and
116- * restoring the previous fixmap entry before the interrupted context is
117- * resumed. If the reentrancy depth is 0 then there is no need to restore
118- * the previous fixmap, and leaving the current one in place allow it to
119- * be reused the next time without a TLB flush (common with DMA).
120- */
121-
122-static DEFINE_PER_CPU(int, kmap_high_l1_vipt_depth);
123-
124-void *kmap_high_l1_vipt(struct page *page, pte_t *saved_pte)
125-{
126- unsigned int idx, cpu;
127- int *depth;
128- unsigned long vaddr, flags;
129- pte_t pte, *ptep;
130-
131- if (!in_interrupt())
132- preempt_disable();
133-
134- cpu = smp_processor_id();
135- depth = &per_cpu(kmap_high_l1_vipt_depth, cpu);
136-
137- idx = KM_L1_CACHE + KM_TYPE_NR * cpu;
138- vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
139- ptep = TOP_PTE(vaddr);
140- pte = mk_pte(page, kmap_prot);
141-
142- raw_local_irq_save(flags);
143- (*depth)++;
144- if (pte_val(*ptep) == pte_val(pte)) {
145- *saved_pte = pte;
146- } else {
147- *saved_pte = *ptep;
148- set_pte_ext(ptep, pte, 0);
149- local_flush_tlb_kernel_page(vaddr);
150- }
151- raw_local_irq_restore(flags);
152-
153- return (void *)vaddr;
154-}
155-
156-void kunmap_high_l1_vipt(struct page *page, pte_t saved_pte)
157-{
158- unsigned int idx, cpu = smp_processor_id();
159- int *depth = &per_cpu(kmap_high_l1_vipt_depth, cpu);
160- unsigned long vaddr, flags;
161- pte_t pte, *ptep;
162-
163- idx = KM_L1_CACHE + KM_TYPE_NR * cpu;
164- vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
165- ptep = TOP_PTE(vaddr);
166- pte = mk_pte(page, kmap_prot);
167-
168- BUG_ON(pte_val(*ptep) != pte_val(pte));
169- BUG_ON(*depth <= 0);
170-
171- raw_local_irq_save(flags);
172- (*depth)--;
173- if (*depth != 0 && pte_val(pte) != pte_val(saved_pte)) {
174- set_pte_ext(ptep, saved_pte, 0);
175- local_flush_tlb_kernel_page(vaddr);
176- }
177- raw_local_irq_restore(flags);
178-
179- if (!in_interrupt())
180- preempt_enable();
181-}
182-
183-#endif /* CONFIG_CPU_CACHE_VIPT */
184--
1851.6.6.1
186
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0004-ARM-fix-cache-xsc3l2-after-stack-based-kmap_atomic.patch b/extras/recipes-kernel/linux/linux-omap/linus/0004-ARM-fix-cache-xsc3l2-after-stack-based-kmap_atomic.patch
new file mode 100644
index 00000000..32643f67
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0004-ARM-fix-cache-xsc3l2-after-stack-based-kmap_atomic.patch
@@ -0,0 +1,189 @@
1From fc077c0fbb09ca255691d05789076d121ae11789 Mon Sep 17 00:00:00 2001
2From: Nicolas Pitre <nicolas.pitre@linaro.org>
3Date: Wed, 15 Dec 2010 23:29:04 -0500
4Subject: [PATCH 04/65] ARM: fix cache-xsc3l2 after stack based kmap_atomic()
5
6Since commit 3e4d3af501 "mm: stack based kmap_atomic()", it is actively
7wrong to rely on fixed kmap type indices (namely KM_L2_CACHE) as
8kmap_atomic() totally ignores them and a concurrent instance of it may
9happily reuse any slot for any purpose. Because kmap_atomic() is now
10able to deal with reentrancy, we can get rid of the ad hoc mapping here,
11and we even don't have to disable IRQs anymore (highmem case).
12
13While the code is made much simpler, there is a needless cache flush
14introduced by the usage of __kunmap_atomic(). It is not clear if the
15performance difference to remove that is worth the cost in code
16maintenance (I don't think there are that many highmem users on that
17platform if at all anyway).
18
19Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
20---
21 arch/arm/mm/cache-xsc3l2.c | 57 ++++++++++++++++---------------------------
22 1 files changed, 21 insertions(+), 36 deletions(-)
23
24diff --git a/arch/arm/mm/cache-xsc3l2.c b/arch/arm/mm/cache-xsc3l2.c
25index c315492..5a32020 100644
26--- a/arch/arm/mm/cache-xsc3l2.c
27+++ b/arch/arm/mm/cache-xsc3l2.c
28@@ -17,14 +17,10 @@
29 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30 */
31 #include <linux/init.h>
32+#include <linux/highmem.h>
33 #include <asm/system.h>
34 #include <asm/cputype.h>
35 #include <asm/cacheflush.h>
36-#include <asm/kmap_types.h>
37-#include <asm/fixmap.h>
38-#include <asm/pgtable.h>
39-#include <asm/tlbflush.h>
40-#include "mm.h"
41
42 #define CR_L2 (1 << 26)
43
44@@ -71,16 +67,15 @@ static inline void xsc3_l2_inv_all(void)
45 dsb();
46 }
47
48+static inline void l2_unmap_va(unsigned long va)
49+{
50 #ifdef CONFIG_HIGHMEM
51-#define l2_map_save_flags(x) raw_local_save_flags(x)
52-#define l2_map_restore_flags(x) raw_local_irq_restore(x)
53-#else
54-#define l2_map_save_flags(x) ((x) = 0)
55-#define l2_map_restore_flags(x) ((void)(x))
56+ if (va != -1)
57+ kunmap_atomic((void *)va);
58 #endif
59+}
60
61-static inline unsigned long l2_map_va(unsigned long pa, unsigned long prev_va,
62- unsigned long flags)
63+static inline unsigned long l2_map_va(unsigned long pa, unsigned long prev_va)
64 {
65 #ifdef CONFIG_HIGHMEM
66 unsigned long va = prev_va & PAGE_MASK;
67@@ -89,17 +84,10 @@ static inline unsigned long l2_map_va(unsigned long pa, unsigned long prev_va,
68 /*
69 * Switching to a new page. Because cache ops are
70 * using virtual addresses only, we must put a mapping
71- * in place for it. We also enable interrupts for a
72- * short while and disable them again to protect this
73- * mapping.
74+ * in place for it.
75 */
76- unsigned long idx;
77- raw_local_irq_restore(flags);
78- idx = KM_L2_CACHE + KM_TYPE_NR * smp_processor_id();
79- va = __fix_to_virt(FIX_KMAP_BEGIN + idx);
80- raw_local_irq_restore(flags | PSR_I_BIT);
81- set_pte_ext(TOP_PTE(va), pfn_pte(pa >> PAGE_SHIFT, PAGE_KERNEL), 0);
82- local_flush_tlb_kernel_page(va);
83+ l2_unmap_va(prev_va);
84+ va = (unsigned long)kmap_atomic_pfn(pa >> PAGE_SHIFT);
85 }
86 return va + (pa_offset >> (32 - PAGE_SHIFT));
87 #else
88@@ -109,7 +97,7 @@ static inline unsigned long l2_map_va(unsigned long pa, unsigned long prev_va,
89
90 static void xsc3_l2_inv_range(unsigned long start, unsigned long end)
91 {
92- unsigned long vaddr, flags;
93+ unsigned long vaddr;
94
95 if (start == 0 && end == -1ul) {
96 xsc3_l2_inv_all();
97@@ -117,13 +105,12 @@ static void xsc3_l2_inv_range(unsigned long start, unsigned long end)
98 }
99
100 vaddr = -1; /* to force the first mapping */
101- l2_map_save_flags(flags);
102
103 /*
104 * Clean and invalidate partial first cache line.
105 */
106 if (start & (CACHE_LINE_SIZE - 1)) {
107- vaddr = l2_map_va(start & ~(CACHE_LINE_SIZE - 1), vaddr, flags);
108+ vaddr = l2_map_va(start & ~(CACHE_LINE_SIZE - 1), vaddr);
109 xsc3_l2_clean_mva(vaddr);
110 xsc3_l2_inv_mva(vaddr);
111 start = (start | (CACHE_LINE_SIZE - 1)) + 1;
112@@ -133,7 +120,7 @@ static void xsc3_l2_inv_range(unsigned long start, unsigned long end)
113 * Invalidate all full cache lines between 'start' and 'end'.
114 */
115 while (start < (end & ~(CACHE_LINE_SIZE - 1))) {
116- vaddr = l2_map_va(start, vaddr, flags);
117+ vaddr = l2_map_va(start, vaddr);
118 xsc3_l2_inv_mva(vaddr);
119 start += CACHE_LINE_SIZE;
120 }
121@@ -142,31 +129,30 @@ static void xsc3_l2_inv_range(unsigned long start, unsigned long end)
122 * Clean and invalidate partial last cache line.
123 */
124 if (start < end) {
125- vaddr = l2_map_va(start, vaddr, flags);
126+ vaddr = l2_map_va(start, vaddr);
127 xsc3_l2_clean_mva(vaddr);
128 xsc3_l2_inv_mva(vaddr);
129 }
130
131- l2_map_restore_flags(flags);
132+ l2_unmap_va(vaddr);
133
134 dsb();
135 }
136
137 static void xsc3_l2_clean_range(unsigned long start, unsigned long end)
138 {
139- unsigned long vaddr, flags;
140+ unsigned long vaddr;
141
142 vaddr = -1; /* to force the first mapping */
143- l2_map_save_flags(flags);
144
145 start &= ~(CACHE_LINE_SIZE - 1);
146 while (start < end) {
147- vaddr = l2_map_va(start, vaddr, flags);
148+ vaddr = l2_map_va(start, vaddr);
149 xsc3_l2_clean_mva(vaddr);
150 start += CACHE_LINE_SIZE;
151 }
152
153- l2_map_restore_flags(flags);
154+ l2_unmap_va(vaddr);
155
156 dsb();
157 }
158@@ -193,7 +179,7 @@ static inline void xsc3_l2_flush_all(void)
159
160 static void xsc3_l2_flush_range(unsigned long start, unsigned long end)
161 {
162- unsigned long vaddr, flags;
163+ unsigned long vaddr;
164
165 if (start == 0 && end == -1ul) {
166 xsc3_l2_flush_all();
167@@ -201,17 +187,16 @@ static void xsc3_l2_flush_range(unsigned long start, unsigned long end)
168 }
169
170 vaddr = -1; /* to force the first mapping */
171- l2_map_save_flags(flags);
172
173 start &= ~(CACHE_LINE_SIZE - 1);
174 while (start < end) {
175- vaddr = l2_map_va(start, vaddr, flags);
176+ vaddr = l2_map_va(start, vaddr);
177 xsc3_l2_clean_mva(vaddr);
178 xsc3_l2_inv_mva(vaddr);
179 start += CACHE_LINE_SIZE;
180 }
181
182- l2_map_restore_flags(flags);
183+ l2_unmap_va(vaddr);
184
185 dsb();
186 }
187--
1881.6.6.1
189
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0005-ARM-fix-cache-feroceon-l2-after-stack-based-kmap_ato.patch b/extras/recipes-kernel/linux/linux-omap/linus/0005-ARM-fix-cache-feroceon-l2-after-stack-based-kmap_ato.patch
new file mode 100644
index 00000000..a9fd1f02
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0005-ARM-fix-cache-feroceon-l2-after-stack-based-kmap_ato.patch
@@ -0,0 +1,119 @@
1From ccb2858c9bd5fff216feab665db14ca32be8d6fe Mon Sep 17 00:00:00 2001
2From: Nicolas Pitre <nicolas.pitre@linaro.org>
3Date: Thu, 16 Dec 2010 14:56:34 -0500
4Subject: [PATCH 05/65] ARM: fix cache-feroceon-l2 after stack based kmap_atomic()
5
6Since commit 3e4d3af501 "mm: stack based kmap_atomic()", it is actively
7wrong to rely on fixed kmap type indices (namely KM_L2_CACHE) as
8kmap_atomic() totally ignores them and a concurrent instance of it may
9happily reuse any slot for any purpose. Because kmap_atomic() is now
10able to deal with reentrancy, we can get rid of the ad hoc mapping here.
11
12While the code is made much simpler, there is a needless cache flush
13introduced by the usage of __kunmap_atomic(). It is not clear if the
14performance difference to remove that is worth the cost in code
15maintenance (I don't think there are that many highmem users on that
16platform anyway) but that should be reconsidered when/if someone cares
17enough to do some measurements.
18
19Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
20---
21 arch/arm/mm/cache-feroceon-l2.c | 37 +++++++++++++++++++------------------
22 1 files changed, 19 insertions(+), 18 deletions(-)
23
24diff --git a/arch/arm/mm/cache-feroceon-l2.c b/arch/arm/mm/cache-feroceon-l2.c
25index 6e77c04..e0b0e7a 100644
26--- a/arch/arm/mm/cache-feroceon-l2.c
27+++ b/arch/arm/mm/cache-feroceon-l2.c
28@@ -13,13 +13,9 @@
29 */
30
31 #include <linux/init.h>
32+#include <linux/highmem.h>
33 #include <asm/cacheflush.h>
34-#include <asm/kmap_types.h>
35-#include <asm/fixmap.h>
36-#include <asm/pgtable.h>
37-#include <asm/tlbflush.h>
38 #include <plat/cache-feroceon-l2.h>
39-#include "mm.h"
40
41 /*
42 * Low-level cache maintenance operations.
43@@ -39,27 +35,30 @@
44 * between which we don't want to be preempted.
45 */
46
47-static inline unsigned long l2_start_va(unsigned long paddr)
48+static inline unsigned long l2_get_va(unsigned long paddr)
49 {
50 #ifdef CONFIG_HIGHMEM
51 /*
52- * Let's do our own fixmap stuff in a minimal way here.
53 * Because range ops can't be done on physical addresses,
54 * we simply install a virtual mapping for it only for the
55 * TLB lookup to occur, hence no need to flush the untouched
56- * memory mapping. This is protected with the disabling of
57- * interrupts by the caller.
58+ * memory mapping afterwards (note: a cache flush may happen
59+ * in some circumstances depending on the path taken in kunmap_atomic).
60 */
61- unsigned long idx = KM_L2_CACHE + KM_TYPE_NR * smp_processor_id();
62- unsigned long vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
63- set_pte_ext(TOP_PTE(vaddr), pfn_pte(paddr >> PAGE_SHIFT, PAGE_KERNEL), 0);
64- local_flush_tlb_kernel_page(vaddr);
65- return vaddr + (paddr & ~PAGE_MASK);
66+ void *vaddr = kmap_atomic_pfn(paddr >> PAGE_SHIFT);
67+ return (unsigned long)vaddr + (paddr & ~PAGE_MASK);
68 #else
69 return __phys_to_virt(paddr);
70 #endif
71 }
72
73+static inline void l2_put_va(unsigned long vaddr)
74+{
75+#ifdef CONFIG_HIGHMEM
76+ kunmap_atomic((void *)vaddr);
77+#endif
78+}
79+
80 static inline void l2_clean_pa(unsigned long addr)
81 {
82 __asm__("mcr p15, 1, %0, c15, c9, 3" : : "r" (addr));
83@@ -76,13 +75,14 @@ static inline void l2_clean_pa_range(unsigned long start, unsigned long end)
84 */
85 BUG_ON((start ^ end) >> PAGE_SHIFT);
86
87- raw_local_irq_save(flags);
88- va_start = l2_start_va(start);
89+ va_start = l2_get_va(start);
90 va_end = va_start + (end - start);
91+ raw_local_irq_save(flags);
92 __asm__("mcr p15, 1, %0, c15, c9, 4\n\t"
93 "mcr p15, 1, %1, c15, c9, 5"
94 : : "r" (va_start), "r" (va_end));
95 raw_local_irq_restore(flags);
96+ l2_put_va(va_start);
97 }
98
99 static inline void l2_clean_inv_pa(unsigned long addr)
100@@ -106,13 +106,14 @@ static inline void l2_inv_pa_range(unsigned long start, unsigned long end)
101 */
102 BUG_ON((start ^ end) >> PAGE_SHIFT);
103
104- raw_local_irq_save(flags);
105- va_start = l2_start_va(start);
106+ va_start = l2_get_va(start);
107 va_end = va_start + (end - start);
108+ raw_local_irq_save(flags);
109 __asm__("mcr p15, 1, %0, c15, c11, 4\n\t"
110 "mcr p15, 1, %1, c15, c11, 5"
111 : : "r" (va_start), "r" (va_end));
112 raw_local_irq_restore(flags);
113+ l2_put_va(va_start);
114 }
115
116 static inline void l2_inv_all(void)
117--
1181.6.6.1
119
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0006-drm-i915-Set-the-required-VFMUNIT-clock-gating-disab.patch b/extras/recipes-kernel/linux/linux-omap/linus/0006-drm-i915-Set-the-required-VFMUNIT-clock-gating-disab.patch
new file mode 100644
index 00000000..8302e6c0
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0006-drm-i915-Set-the-required-VFMUNIT-clock-gating-disab.patch
@@ -0,0 +1,45 @@
1From b4defd15cd77597734bab7089fa721fde6e3cfd5 Mon Sep 17 00:00:00 2001
2From: Eric Anholt <eric@anholt.net>
3Date: Tue, 14 Dec 2010 10:06:46 -0800
4Subject: [PATCH 06/65] drm/i915: Set the required VFMUNIT clock gating disable on Ironlake.
5
6It's required by the specs, but we don't know why. Let's not find out
7why.
8
9Signed-off-by: Eric Anholt <eric@anholt.net>
10Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11---
12 drivers/gpu/drm/i915/i915_reg.h | 3 +++
13 drivers/gpu/drm/i915/intel_display.c | 2 ++
14 2 files changed, 5 insertions(+), 0 deletions(-)
15
16diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
17index 878fc76..8470a97 100644
18--- a/drivers/gpu/drm/i915/i915_reg.h
19+++ b/drivers/gpu/drm/i915/i915_reg.h
20@@ -2471,6 +2471,9 @@
21 # define MARIUNIT_CLOCK_GATE_DISABLE (1 << 18)
22 # define SVSMUNIT_CLOCK_GATE_DISABLE (1 << 1)
23
24+#define PCH_3DCGDIS1 0x46024
25+# define VFMUNIT_CLOCK_GATE_DISABLE (1 << 11)
26+
27 #define FDI_PLL_FREQ_CTL 0x46030
28 #define FDI_PLL_FREQ_CHANGE_REQUEST (1<<24)
29 #define FDI_PLL_FREQ_LOCK_LIMIT_MASK 0xfff00
30diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
31index d9b7092..97e374e 100644
32--- a/drivers/gpu/drm/i915/intel_display.c
33+++ b/drivers/gpu/drm/i915/intel_display.c
34@@ -5825,6 +5825,8 @@ void intel_init_clock_gating(struct drm_device *dev)
35 I915_WRITE(PCH_3DCGDIS0,
36 MARIUNIT_CLOCK_GATE_DISABLE |
37 SVSMUNIT_CLOCK_GATE_DISABLE);
38+ I915_WRITE(PCH_3DCGDIS1,
39+ VFMUNIT_CLOCK_GATE_DISABLE);
40 }
41
42 I915_WRITE(PCH_DSPCLK_GATE_D, dspclk_gate);
43--
441.6.6.1
45
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0007-drm-i915-sdvo-Add-hdmi-connector-properties-after-in.patch b/extras/recipes-kernel/linux/linux-omap/linus/0007-drm-i915-sdvo-Add-hdmi-connector-properties-after-in.patch
new file mode 100644
index 00000000..4e5120a1
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0007-drm-i915-sdvo-Add-hdmi-connector-properties-after-in.patch
@@ -0,0 +1,38 @@
1From 184e12ee6bca758bee292970ed045d7a0405168c Mon Sep 17 00:00:00 2001
2From: Chris Wilson <chris@chris-wilson.co.uk>
3Date: Thu, 23 Dec 2010 09:43:48 +0000
4Subject: [PATCH 07/65] drm/i915/sdvo: Add hdmi connector properties after initing the connector
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=25012
10Reported-by: Tõnu Raitviir <jussuf@linux.ee>
11Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
12---
13 drivers/gpu/drm/i915/intel_sdvo.c | 3 ++-
14 1 files changed, 2 insertions(+), 1 deletions(-)
15
16diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
17index 27e63ab..6bc42fa 100644
18--- a/drivers/gpu/drm/i915/intel_sdvo.c
19+++ b/drivers/gpu/drm/i915/intel_sdvo.c
20@@ -2040,13 +2040,14 @@ intel_sdvo_dvi_init(struct intel_sdvo *intel_sdvo, int device)
21 SDVO_COLORIMETRY_RGB256);
22 connector->connector_type = DRM_MODE_CONNECTOR_HDMIA;
23
24- intel_sdvo_add_hdmi_properties(intel_sdvo_connector);
25 intel_sdvo->is_hdmi = true;
26 }
27 intel_sdvo->base.clone_mask = ((1 << INTEL_SDVO_NON_TV_CLONE_BIT) |
28 (1 << INTEL_ANALOG_CLONE_BIT));
29
30 intel_sdvo_connector_init(intel_sdvo_connector, intel_sdvo);
31+ if (intel_sdvo->is_hdmi)
32+ intel_sdvo_add_hdmi_properties(intel_sdvo_connector);
33
34 return true;
35 }
36--
371.6.6.1
38
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0008-drm-i915-intel_ips-When-i915-loads-after-IPS-make-IP.patch b/extras/recipes-kernel/linux/linux-omap/linus/0008-drm-i915-intel_ips-When-i915-loads-after-IPS-make-IP.patch
new file mode 100644
index 00000000..9fecb7b8
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0008-drm-i915-intel_ips-When-i915-loads-after-IPS-make-IP.patch
@@ -0,0 +1,190 @@
1From 38684934e58030113d3e89a3f60472e22e2e1ea6 Mon Sep 17 00:00:00 2001
2From: Eric Anholt <eric@anholt.net>
3Date: Mon, 20 Dec 2010 18:40:06 -0800
4Subject: [PATCH 08/65] drm/i915, intel_ips: When i915 loads after IPS, make IPS relink to i915.
5
6The IPS driver is designed to be able to run detached from i915 and
7just not enable GPU turbo in that case, in order to avoid module
8dependencies between the two drivers. This means that we don't know
9what the load order between the two is going to be, and we had
10previously only supported IPS after (optionally) i915, but not i915
11after IPS. If the wrong order was chosen, you'd get no GPU turbo, and
12something like half the possible graphics performance.
13
14Signed-off-by: Eric Anholt <eric@anholt.net>
15Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
16Cc: stable@kernel.org
17---
18 drivers/gpu/drm/i915/i915_dma.c | 23 +++++++++++++++++++++++
19 drivers/platform/x86/intel_ips.c | 36 +++++++++++++++++++++++++++++++++---
20 drivers/platform/x86/intel_ips.h | 21 +++++++++++++++++++++
21 3 files changed, 77 insertions(+), 3 deletions(-)
22 create mode 100644 drivers/platform/x86/intel_ips.h
23
24diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
25index e680081..cb900dc 100644
26--- a/drivers/gpu/drm/i915/i915_dma.c
27+++ b/drivers/gpu/drm/i915/i915_dma.c
28@@ -34,6 +34,7 @@
29 #include "i915_drm.h"
30 #include "i915_drv.h"
31 #include "i915_trace.h"
32+#include "../../../platform/x86/intel_ips.h"
33 #include <linux/pci.h>
34 #include <linux/vgaarb.h>
35 #include <linux/acpi.h>
36@@ -1871,6 +1872,26 @@ out_unlock:
37 EXPORT_SYMBOL_GPL(i915_gpu_turbo_disable);
38
39 /**
40+ * Tells the intel_ips driver that the i915 driver is now loaded, if
41+ * IPS got loaded first.
42+ *
43+ * This awkward dance is so that neither module has to depend on the
44+ * other in order for IPS to do the appropriate communication of
45+ * GPU turbo limits to i915.
46+ */
47+static void
48+ips_ping_for_i915_load(void)
49+{
50+ void (*link)(void);
51+
52+ link = symbol_get(ips_link_to_i915_driver);
53+ if (link) {
54+ link();
55+ symbol_put(ips_link_to_i915_driver);
56+ }
57+}
58+
59+/**
60 * i915_driver_load - setup chip and create an initial config
61 * @dev: DRM device
62 * @flags: startup flags
63@@ -2075,6 +2096,8 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
64 dev_priv->mchdev_lock = &mchdev_lock;
65 spin_unlock(&mchdev_lock);
66
67+ ips_ping_for_i915_load();
68+
69 return 0;
70
71 out_workqueue_free:
72diff --git a/drivers/platform/x86/intel_ips.c b/drivers/platform/x86/intel_ips.c
73index c44a5e8..f0b3ad1 100644
74--- a/drivers/platform/x86/intel_ips.c
75+++ b/drivers/platform/x86/intel_ips.c
76@@ -75,6 +75,7 @@
77 #include <drm/i915_drm.h>
78 #include <asm/msr.h>
79 #include <asm/processor.h>
80+#include "intel_ips.h"
81
82 #define PCI_DEVICE_ID_INTEL_THERMAL_SENSOR 0x3b32
83
84@@ -245,6 +246,7 @@
85 #define thm_writel(off, val) writel((val), ips->regmap + (off))
86
87 static const int IPS_ADJUST_PERIOD = 5000; /* ms */
88+static bool late_i915_load = false;
89
90 /* For initial average collection */
91 static const int IPS_SAMPLE_PERIOD = 200; /* ms */
92@@ -339,6 +341,9 @@ struct ips_driver {
93 u64 orig_turbo_ratios;
94 };
95
96+static bool
97+ips_gpu_turbo_enabled(struct ips_driver *ips);
98+
99 /**
100 * ips_cpu_busy - is CPU busy?
101 * @ips: IPS driver struct
102@@ -517,7 +522,7 @@ static void ips_disable_cpu_turbo(struct ips_driver *ips)
103 */
104 static bool ips_gpu_busy(struct ips_driver *ips)
105 {
106- if (!ips->gpu_turbo_enabled)
107+ if (!ips_gpu_turbo_enabled(ips))
108 return false;
109
110 return ips->gpu_busy();
111@@ -532,7 +537,7 @@ static bool ips_gpu_busy(struct ips_driver *ips)
112 */
113 static void ips_gpu_raise(struct ips_driver *ips)
114 {
115- if (!ips->gpu_turbo_enabled)
116+ if (!ips_gpu_turbo_enabled(ips))
117 return;
118
119 if (!ips->gpu_raise())
120@@ -549,7 +554,7 @@ static void ips_gpu_raise(struct ips_driver *ips)
121 */
122 static void ips_gpu_lower(struct ips_driver *ips)
123 {
124- if (!ips->gpu_turbo_enabled)
125+ if (!ips_gpu_turbo_enabled(ips))
126 return;
127
128 if (!ips->gpu_lower())
129@@ -1454,6 +1459,31 @@ out_err:
130 return false;
131 }
132
133+static bool
134+ips_gpu_turbo_enabled(struct ips_driver *ips)
135+{
136+ if (!ips->gpu_busy && late_i915_load) {
137+ if (ips_get_i915_syms(ips)) {
138+ dev_info(&ips->dev->dev,
139+ "i915 driver attached, reenabling gpu turbo\n");
140+ ips->gpu_turbo_enabled = !(thm_readl(THM_HTS) & HTS_GTD_DIS);
141+ }
142+ }
143+
144+ return ips->gpu_turbo_enabled;
145+}
146+
147+void
148+ips_link_to_i915_driver()
149+{
150+ /* We can't cleanly get at the various ips_driver structs from
151+ * this caller (the i915 driver), so just set a flag saying
152+ * that it's time to try getting the symbols again.
153+ */
154+ late_i915_load = true;
155+}
156+EXPORT_SYMBOL_GPL(ips_link_to_i915_driver);
157+
158 static DEFINE_PCI_DEVICE_TABLE(ips_id_table) = {
159 { PCI_DEVICE(PCI_VENDOR_ID_INTEL,
160 PCI_DEVICE_ID_INTEL_THERMAL_SENSOR), },
161diff --git a/drivers/platform/x86/intel_ips.h b/drivers/platform/x86/intel_ips.h
162new file mode 100644
163index 0000000..73299be
164--- /dev/null
165+++ b/drivers/platform/x86/intel_ips.h
166@@ -0,0 +1,21 @@
167+/*
168+ * Copyright (c) 2010 Intel Corporation
169+ *
170+ * This program is free software; you can redistribute it and/or modify it
171+ * under the terms and conditions of the GNU General Public License,
172+ * version 2, as published by the Free Software Foundation.
173+ *
174+ * This program is distributed in the hope it will be useful, but WITHOUT
175+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
176+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
177+ * more details.
178+ *
179+ * You should have received a copy of the GNU General Public License along with
180+ * this program; if not, write to the Free Software Foundation, Inc.,
181+ * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
182+ *
183+ * The full GNU General Public License is included in this distribution in
184+ * the file called "COPYING".
185+ */
186+
187+void ips_link_to_i915_driver(void);
188--
1891.6.6.1
190
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0009-drm-i915-Verify-Ironlake-eDP-presence-on-DP_A-using-.patch b/extras/recipes-kernel/linux/linux-omap/linus/0009-drm-i915-Verify-Ironlake-eDP-presence-on-DP_A-using-.patch
new file mode 100644
index 00000000..e0f4515e
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0009-drm-i915-Verify-Ironlake-eDP-presence-on-DP_A-using-.patch
@@ -0,0 +1,69 @@
1From b3ae260de2254a0aed982b5964396a9914859c0e Mon Sep 17 00:00:00 2001
2From: Chris Wilson <chris@chris-wilson.co.uk>
3Date: Tue, 14 Dec 2010 19:21:29 +0000
4Subject: [PATCH 09/65] drm/i915: Verify Ironlake eDP presence on DP_A using the capability fuse
5
6Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
7---
8 drivers/gpu/drm/i915/i915_reg.h | 7 +++++++
9 drivers/gpu/drm/i915/intel_display.c | 19 ++++++++++++++++++-
10 2 files changed, 25 insertions(+), 1 deletions(-)
11
12diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
13index 8470a97..cb8f434 100644
14--- a/drivers/gpu/drm/i915/i915_reg.h
15+++ b/drivers/gpu/drm/i915/i915_reg.h
16@@ -2591,6 +2591,13 @@
17 #define ILK_DISPLAY_CHICKEN2 0x42004
18 #define ILK_DPARB_GATE (1<<22)
19 #define ILK_VSDPFD_FULL (1<<21)
20+#define ILK_DISPLAY_CHICKEN_FUSES 0x42014
21+#define ILK_INTERNAL_GRAPHICS_DISABLE (1<<31)
22+#define ILK_INTERNAL_DISPLAY_DISABLE (1<<30)
23+#define ILK_DISPLAY_DEBUG_DISABLE (1<<29)
24+#define ILK_HDCP_DISABLE (1<<25)
25+#define ILK_eDP_A_DISABLE (1<<24)
26+#define ILK_DESKTOP (1<<23)
27 #define ILK_DSPCLK_GATE 0x42020
28 #define ILK_DPARB_CLK_GATE (1<<5)
29 /* According to spec this bit 7/8/9 of 0x42020 should be set to enable FBC */
30diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
31index 97e374e..fca5232 100644
32--- a/drivers/gpu/drm/i915/intel_display.c
33+++ b/drivers/gpu/drm/i915/intel_display.c
34@@ -5379,6 +5379,23 @@ static int intel_encoder_clones(struct drm_device *dev, int type_mask)
35 return index_mask;
36 }
37
38+static bool has_edp_a(struct drm_device *dev)
39+{
40+ struct drm_i915_private *dev_priv = dev->dev_private;
41+
42+ if (!IS_MOBILE(dev))
43+ return false;
44+
45+ if ((I915_READ(DP_A) & DP_DETECTED) == 0)
46+ return false;
47+
48+ if (IS_GEN5(dev) &&
49+ (I915_READ(ILK_DISPLAY_CHICKEN_FUSES) & ILK_eDP_A_DISABLE))
50+ return false;
51+
52+ return true;
53+}
54+
55 static void intel_setup_outputs(struct drm_device *dev)
56 {
57 struct drm_i915_private *dev_priv = dev->dev_private;
58@@ -5396,7 +5413,7 @@ static void intel_setup_outputs(struct drm_device *dev)
59 if (HAS_PCH_SPLIT(dev)) {
60 dpd_is_edp = intel_dpd_is_edp(dev);
61
62- if (IS_MOBILE(dev) && (I915_READ(DP_A) & DP_DETECTED))
63+ if (has_edp_a(dev))
64 intel_dp_init(dev, DP_A);
65
66 if (dpd_is_edp && (I915_READ(PCH_DP_D) & DP_DETECTED))
67--
681.6.6.1
69
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0010-ARM-6536-1-Add-missing-SZ_-32-64-128.patch b/extras/recipes-kernel/linux/linux-omap/linus/0010-ARM-6536-1-Add-missing-SZ_-32-64-128.patch
new file mode 100644
index 00000000..1eeffc28
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0010-ARM-6536-1-Add-missing-SZ_-32-64-128.patch
@@ -0,0 +1,42 @@
1From 233828cbb5d2331e47cba932130428ea5f915f91 Mon Sep 17 00:00:00 2001
2From: Stephen Warren <swarren@nvidia.com>
3Date: Wed, 22 Dec 2010 04:52:05 +0100
4Subject: [PATCH 10/65] ARM: 6536/1: Add missing SZ_{32,64,128}
5
6... and also remove misleading comment stating that this header is
7auto-generated.
8
9Signed-off-by: Stephen Warren <swarren@nvidia.com>
10Acked-by: Uwe Kleine-Knig <u.kleine-koenig@pengutronix.de>
11Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12---
13 arch/arm/include/asm/sizes.h | 6 +++---
14 1 files changed, 3 insertions(+), 3 deletions(-)
15
16diff --git a/arch/arm/include/asm/sizes.h b/arch/arm/include/asm/sizes.h
17index 4fc1565..316bb2b 100644
18--- a/arch/arm/include/asm/sizes.h
19+++ b/arch/arm/include/asm/sizes.h
20@@ -13,9 +13,6 @@
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 */
24-/* DO NOT EDIT!! - this file automatically generated
25- * from .s file by awk -f s2h.awk
26- */
27 /* Size definitions
28 * Copyright (C) ARM Limited 1998. All rights reserved.
29 */
30@@ -25,6 +22,9 @@
31
32 /* handy sizes */
33 #define SZ_16 0x00000010
34+#define SZ_32 0x00000020
35+#define SZ_64 0x00000040
36+#define SZ_128 0x00000080
37 #define SZ_256 0x00000100
38 #define SZ_512 0x00000200
39
40--
411.6.6.1
42
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0011-ARM-6537-1-update-Nomadik-U300-and-Ux500-maintainers.patch b/extras/recipes-kernel/linux/linux-omap/linus/0011-ARM-6537-1-update-Nomadik-U300-and-Ux500-maintainers.patch
new file mode 100644
index 00000000..99a9ce2a
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0011-ARM-6537-1-update-Nomadik-U300-and-Ux500-maintainers.patch
@@ -0,0 +1,65 @@
1From 1efad2ad25ed60a4d90a87f7e77babb808b3052f Mon Sep 17 00:00:00 2001
2From: Linus Walleij <linus.walleij@stericsson.com>
3Date: Wed, 22 Dec 2010 09:18:29 +0100
4Subject: [PATCH 11/65] ARM: 6537/1: update Nomadik, U300 and Ux500 maintainers
5
6Adding in self as maintainer for Nomadik and Ux500, I'm running
7an active -next tree for that stuff now. Extend file matchers to
8cover a few more relevant drivers and add git references.
9
10Cc: Alessandro Rubini <rubini@unipv.it>
11Acked-by: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
12Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
13Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14---
15 MAINTAINERS | 17 ++++++++++++++++-
16 1 files changed, 16 insertions(+), 1 deletions(-)
17
18diff --git a/MAINTAINERS b/MAINTAINERS
19index 4607f18..1c15602 100644
20--- a/MAINTAINERS
21+++ b/MAINTAINERS
22@@ -792,11 +792,14 @@ S: Maintained
23
24 ARM/NOMADIK ARCHITECTURE
25 M: Alessandro Rubini <rubini@unipv.it>
26+M: Linus Walleij <linus.walleij@stericsson.com>
27 M: STEricsson <STEricsson_nomadik_linux@list.st.com>
28 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
29 S: Maintained
30 F: arch/arm/mach-nomadik/
31 F: arch/arm/plat-nomadik/
32+F: drivers/i2c/busses/i2c-nomadik.c
33+T: git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson.git
34
35 ARM/OPENMOKO NEO FREERUNNER (GTA02) MACHINE SUPPORT
36 M: Nelson Castillo <arhuaco@freaks-unidos.net>
37@@ -998,12 +1001,24 @@ F: drivers/i2c/busses/i2c-stu300.c
38 F: drivers/rtc/rtc-coh901331.c
39 F: drivers/watchdog/coh901327_wdt.c
40 F: drivers/dma/coh901318*
41+F: drivers/mfd/ab3100*
42+F: drivers/rtc/rtc-ab3100.c
43+F: drivers/rtc/rtc-coh901331.c
44+T: git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson.git
45
46-ARM/U8500 ARM ARCHITECTURE
47+ARM/Ux500 ARM ARCHITECTURE
48 M: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
49+M: Linus Walleij <linus.walleij@stericsson.com>
50 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
51 S: Maintained
52 F: arch/arm/mach-ux500/
53+F: drivers/dma/ste_dma40*
54+F: drivers/mfd/ab3550*
55+F: drivers/mfd/abx500*
56+F: drivers/mfd/ab8500*
57+F: drivers/mfd/stmpe*
58+F: drivers/rtc/rtc-ab8500.c
59+T: git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson.git
60
61 ARM/VFP SUPPORT
62 M: Russell King <linux@arm.linux.org.uk>
63--
641.6.6.1
65
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0012-ARM-6540-1-Stop-irqsoff-trace-on-return-to-user.patch b/extras/recipes-kernel/linux/linux-omap/linus/0012-ARM-6540-1-Stop-irqsoff-trace-on-return-to-user.patch
new file mode 100644
index 00000000..0e55c525
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0012-ARM-6540-1-Stop-irqsoff-trace-on-return-to-user.patch
@@ -0,0 +1,44 @@
1From d0427fe2982e2f4f644b936fe39636916b69fee1 Mon Sep 17 00:00:00 2001
2From: Todd Android Poynor <toddpoynor@google.com>
3Date: Thu, 23 Dec 2010 01:52:44 +0100
4Subject: [PATCH 12/65] ARM: 6540/1: Stop irqsoff trace on return to user
5
6If the irqsoff tracer is in use, stop tracing the interrupt disable
7interval when returning to userspace. Tracing userspace execution time
8as interrupts disabled time is not helpful for kernel performance
9analysis purposes. Only do so if the irqsoff tracer is enabled, to
10avoid overhead for lockdep, which doesn't care.
11
12Signed-off-by: Todd Poynor <toddpoynor@google.com>
13Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14---
15 arch/arm/kernel/entry-common.S | 6 ++++++
16 1 files changed, 6 insertions(+), 0 deletions(-)
17
18diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
19index 8bfa987..80bf8cd 100644
20--- a/arch/arm/kernel/entry-common.S
21+++ b/arch/arm/kernel/entry-common.S
22@@ -29,6 +29,9 @@ ret_fast_syscall:
23 ldr r1, [tsk, #TI_FLAGS]
24 tst r1, #_TIF_WORK_MASK
25 bne fast_work_pending
26+#if defined(CONFIG_IRQSOFF_TRACER)
27+ asm_trace_hardirqs_on
28+#endif
29
30 /* perform architecture specific actions before user return */
31 arch_ret_to_user r1, lr
32@@ -65,6 +68,9 @@ ret_slow_syscall:
33 tst r1, #_TIF_WORK_MASK
34 bne work_pending
35 no_work_pending:
36+#if defined(CONFIG_IRQSOFF_TRACER)
37+ asm_trace_hardirqs_on
38+#endif
39 /* perform architecture specific actions before user return */
40 arch_ret_to_user r1, lr
41
42--
431.6.6.1
44
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0013-ueagle-atm-fix-PHY-signal-initialization-race.patch b/extras/recipes-kernel/linux/linux-omap/linus/0013-ueagle-atm-fix-PHY-signal-initialization-race.patch
new file mode 100644
index 00000000..e62a9d8c
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0013-ueagle-atm-fix-PHY-signal-initialization-race.patch
@@ -0,0 +1,100 @@
1From c23a13703fb00384d49a00875fc12a5e00f1946a Mon Sep 17 00:00:00 2001
2From: Dan Williams <dcbw@redhat.com>
3Date: Sun, 19 Dec 2010 08:17:50 +0000
4Subject: [PATCH 13/65] ueagle-atm: fix PHY signal initialization race
5
6A race exists when initializing ueagle-atm devices where the generic atm
7device may not yet be created before the driver attempts to initialize
8it's PHY signal state, which checks whether the atm device has been
9created or not. This often causes the sysfs 'carrier' attribute to be
10'1' even though no signal has actually been found.
11
12uea_probe
13 usbatm_usb_probe
14 driver->bind (uea_bind)
15 uea_boot
16 kthread_run(uea_kthread) uea_kthread
17 usbatm_atm_init uea_start_reset
18 atm_dev_register UPDATE_ATM_SIGNAL
19
20UPDATE_ATM_SIGNAL checks whether the ATM device has been created and if
21not, will not update the PHY signal state. Because of the race that
22does not always happen in time, and the PHY signal state remains
23ATM_PHY_SIG_FOUND even though no signal exists.
24
25To fix the race, just create the kthread during initialization, and only
26after initialization is complete, start the thread that reboots the
27device and initializes PHY state.
28
29[ 3030.490931] uea_probe: calling usbatm_usb_probe
30[ 3030.490946] ueagle-atm 8-2:1.0: usbatm_usb_probe: trying driver ueagle-atm with vendor=1110, product=9031, ifnum 0
31[ 3030.493691] uea_bind: setting usbatm
32[ 3030.496932] usb 8-2: [ueagle-atm] using iso mode
33[ 3030.497283] ueagle-atm 8-2:1.0: usbatm_usb_probe: using 3021 byte buffer for rx channel 0xffff880125953508
34 <kthread already started before usbatm_usb_probe() has returned>
35[ 3030.497292] usb 8-2: [ueagle-atm] (re)booting started
36 <UPDATE_ATM_SIGNAL checks whether ATM device has been created yet before setting PHY state>
37[ 3030.497298] uea_start_reset: atm dev (null)
38 <and since it hasn't been created yet PHY state is not set>
39[ 3030.497306] ueagle-atm 8-2:1.0: usbatm_usb_probe: using 3392 byte buffer for tx channel 0xffff8801259535b8
40[ 3030.497374] usbatm_usb_probe: about to init
41[ 3030.497379] usbatm_usb_probe: calling usbatm_atm_init
42 <atm device finally gets created>
43[ 3030.497384] usbatm_atm_init: creating atm device!
44
45Signed-off-by: Dan Williams <dcbw@redhat.com>
46Signed-off-by: David S. Miller <davem@davemloft.net>
47---
48 drivers/usb/atm/ueagle-atm.c | 22 +++++++++++++++++++---
49 1 files changed, 19 insertions(+), 3 deletions(-)
50
51diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c
52index 44447f5..99ac70e 100644
53--- a/drivers/usb/atm/ueagle-atm.c
54+++ b/drivers/usb/atm/ueagle-atm.c
55@@ -2206,8 +2206,11 @@ static int uea_boot(struct uea_softc *sc)
56 goto err1;
57 }
58
59- sc->kthread = kthread_run(uea_kthread, sc, "ueagle-atm");
60- if (sc->kthread == ERR_PTR(-ENOMEM)) {
61+ /* Create worker thread, but don't start it here. Start it after
62+ * all usbatm generic initialization is done.
63+ */
64+ sc->kthread = kthread_create(uea_kthread, sc, "ueagle-atm");
65+ if (IS_ERR(sc->kthread)) {
66 uea_err(INS_TO_USBDEV(sc), "failed to create thread\n");
67 goto err2;
68 }
69@@ -2624,6 +2627,7 @@ static struct usbatm_driver uea_usbatm_driver = {
70 static int uea_probe(struct usb_interface *intf, const struct usb_device_id *id)
71 {
72 struct usb_device *usb = interface_to_usbdev(intf);
73+ int ret;
74
75 uea_enters(usb);
76 uea_info(usb, "ADSL device founded vid (%#X) pid (%#X) Rev (%#X): %s\n",
77@@ -2637,7 +2641,19 @@ static int uea_probe(struct usb_interface *intf, const struct usb_device_id *id)
78 if (UEA_IS_PREFIRM(id))
79 return uea_load_firmware(usb, UEA_CHIP_VERSION(id));
80
81- return usbatm_usb_probe(intf, id, &uea_usbatm_driver);
82+ ret = usbatm_usb_probe(intf, id, &uea_usbatm_driver);
83+ if (ret == 0) {
84+ struct usbatm_data *usbatm = usb_get_intfdata(intf);
85+ struct uea_softc *sc = usbatm->driver_data;
86+
87+ /* Ensure carrier is initialized to off as early as possible */
88+ UPDATE_ATM_SIGNAL(ATM_PHY_SIG_LOST);
89+
90+ /* Only start the worker thread when all init is done */
91+ wake_up_process(sc->kthread);
92+ }
93+
94+ return ret;
95 }
96
97 static void uea_disconnect(struct usb_interface *intf)
98--
991.6.6.1
100
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0014-ehea-Avoid-changing-vlan-flags.patch b/extras/recipes-kernel/linux/linux-omap/linus/0014-ehea-Avoid-changing-vlan-flags.patch
new file mode 100644
index 00000000..24557a3e
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0014-ehea-Avoid-changing-vlan-flags.patch
@@ -0,0 +1,34 @@
1From a6b08e88ed5a716b2f27989c949cdfa0704c1dfd Mon Sep 17 00:00:00 2001
2From: Breno Leitao <leitao@linux.vnet.ibm.com>
3Date: Mon, 20 Dec 2010 09:02:37 +0000
4Subject: [PATCH 14/65] ehea: Avoid changing vlan flags
5
6This patch avoids disabling the vlan flags using ethtool.
7
8Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
9Signed-off-by: David S. Miller <davem@davemloft.net>
10---
11 drivers/net/ehea/ehea_ethtool.c | 7 +++++++
12 1 files changed, 7 insertions(+), 0 deletions(-)
13
14diff --git a/drivers/net/ehea/ehea_ethtool.c b/drivers/net/ehea/ehea_ethtool.c
15index 1f37ee6..d6cf502 100644
16--- a/drivers/net/ehea/ehea_ethtool.c
17+++ b/drivers/net/ehea/ehea_ethtool.c
18@@ -263,6 +263,13 @@ static void ehea_get_ethtool_stats(struct net_device *dev,
19
20 static int ehea_set_flags(struct net_device *dev, u32 data)
21 {
22+ /* Avoid changing the VLAN flags */
23+ if ((data & (ETH_FLAG_RXVLAN | ETH_FLAG_TXVLAN)) !=
24+ (ethtool_op_get_flags(dev) & (ETH_FLAG_RXVLAN |
25+ ETH_FLAG_TXVLAN))){
26+ return -EINVAL;
27+ }
28+
29 return ethtool_op_set_flags(dev, data, ETH_FLAG_LRO
30 | ETH_FLAG_TXVLAN
31 | ETH_FLAG_RXVLAN);
32--
331.6.6.1
34
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0015-ppp-allow-disabling-multilink-protocol-ID-compressio.patch b/extras/recipes-kernel/linux/linux-omap/linus/0015-ppp-allow-disabling-multilink-protocol-ID-compressio.patch
new file mode 100644
index 00000000..b06d2c56
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0015-ppp-allow-disabling-multilink-protocol-ID-compressio.patch
@@ -0,0 +1,64 @@
1From 3b4878d988f13c50a8a6d68e9359eb28cc432a4f Mon Sep 17 00:00:00 2001
2From: stephen hemminger <shemminger@vyatta.com>
3Date: Mon, 20 Dec 2010 17:58:33 +0000
4Subject: [PATCH 15/65] ppp: allow disabling multilink protocol ID compression
5
6Linux would not connect to other router running old version Cisco IOS (12.0).
7This is most likely a bug in that version of IOS, since it is fixed
8in later versions. As a workaround this patch allows a module parameter
9to be set to disable compressing the protocol ID.
10
11See: https://bugzilla.vyatta.com/show_bug.cgi?id=3979
12
13RFC 1990 allows an implementation to formulate MP fragments as if protocol
14compression had been negotiated. This allows us to always send compressed
15protocol IDs. But some implementations don't accept MP fragments with
16compressed protocol IDs. This parameter allows us to interoperate with
17them. The default value of the configurable parameter is the same as the
18current behavior: protocol compression is enabled. If protocol compression
19is disabled we will not send compressed protocol IDs.
20
21This is based on an earlier patch by Bob Gilligan (using a sysctl).
22Module parameter is writable to allow for enabling even if ppp
23is already loaded for other uses.
24
25Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
26Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
27Acked-by: Paul Mackerras <paulus@samba.org>
28Signed-off-by: David S. Miller <davem@davemloft.net>
29---
30 drivers/net/ppp_generic.c | 9 +++++++--
31 1 files changed, 7 insertions(+), 2 deletions(-)
32
33diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c
34index 3965997..89294b4 100644
35--- a/drivers/net/ppp_generic.c
36+++ b/drivers/net/ppp_generic.c
37@@ -1285,6 +1285,11 @@ ppp_push(struct ppp *ppp)
38 }
39
40 #ifdef CONFIG_PPP_MULTILINK
41+static bool mp_protocol_compress __read_mostly = true;
42+module_param(mp_protocol_compress, bool, S_IRUGO | S_IWUSR);
43+MODULE_PARM_DESC(mp_protocol_compress,
44+ "compress protocol id in multilink fragments");
45+
46 /*
47 * Divide a packet to be transmitted into fragments and
48 * send them out the individual links.
49@@ -1347,10 +1352,10 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb)
50 if (nfree == 0 || nfree < navail / 2)
51 return 0; /* can't take now, leave it in xmit_pending */
52
53- /* Do protocol field compression (XXX this should be optional) */
54+ /* Do protocol field compression */
55 p = skb->data;
56 len = skb->len;
57- if (*p == 0) {
58+ if (*p == 0 && mp_protocol_compress) {
59 ++p;
60 --len;
61 }
62--
631.6.6.1
64
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0016-skfp-testing-the-wrong-variable-in-skfp_driver_init.patch b/extras/recipes-kernel/linux/linux-omap/linus/0016-skfp-testing-the-wrong-variable-in-skfp_driver_init.patch
new file mode 100644
index 00000000..951a2813
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0016-skfp-testing-the-wrong-variable-in-skfp_driver_init.patch
@@ -0,0 +1,31 @@
1From 276d3ef4021021959540cdb7a5041c477432d29e Mon Sep 17 00:00:00 2001
2From: Dan Carpenter <error27@gmail.com>
3Date: Thu, 23 Dec 2010 19:17:34 +0000
4Subject: [PATCH 16/65] skfp: testing the wrong variable in skfp_driver_init()
5
6The intent here was to test if the allocation failed but we tested
7"SharedMemSize" instead of "SharedMemAddr" by mistake.
8
9Signed-off-by: Dan Carpenter <error27@gmail.com>
10Reviewed-by: Jiri Pirko <jpirko@redhat.com>
11Signed-off-by: David S. Miller <davem@davemloft.net>
12---
13 drivers/net/skfp/skfddi.c | 2 +-
14 1 files changed, 1 insertions(+), 1 deletions(-)
15
16diff --git a/drivers/net/skfp/skfddi.c b/drivers/net/skfp/skfddi.c
17index 0a66fed..16c6265 100644
18--- a/drivers/net/skfp/skfddi.c
19+++ b/drivers/net/skfp/skfddi.c
20@@ -412,7 +412,7 @@ static int skfp_driver_init(struct net_device *dev)
21 bp->SharedMemAddr = pci_alloc_consistent(&bp->pdev,
22 bp->SharedMemSize,
23 &bp->SharedMemDMA);
24- if (!bp->SharedMemSize) {
25+ if (!bp->SharedMemAddr) {
26 printk("could not allocate mem for ");
27 printk("hardware module: %ld byte\n",
28 bp->SharedMemSize);
29--
301.6.6.1
31
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0017-ASoC-codecs-Add-missing-control_type-initialization.patch b/extras/recipes-kernel/linux/linux-omap/linus/0017-ASoC-codecs-Add-missing-control_type-initialization.patch
new file mode 100644
index 00000000..bb5a944f
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0017-ASoC-codecs-Add-missing-control_type-initialization.patch
@@ -0,0 +1,84 @@
1From d03eac98a7ae4af982f3c19161f850effbfd0f57 Mon Sep 17 00:00:00 2001
2From: Lars-Peter Clausen <lars@metafoo.de>
3Date: Tue, 28 Dec 2010 21:08:57 +0100
4Subject: [PATCH 17/65] ASoC: codecs: Add missing control_type initialization
5
6Some codec drivers do not initialize the control_type field in their private
7device struct, but still use it when calling snd_soc_codec_set_cache_io.
8This patch fixes the issue by properly initializing it in the drivers probe
9functions.
10
11Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
12Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13Cc: stable@kernel.org (for 2.6.37 only)
14---
15 sound/soc/codecs/wm8940.c | 1 +
16 sound/soc/codecs/wm8955.c | 1 +
17 sound/soc/codecs/wm8960.c | 1 +
18 sound/soc/codecs/wm8971.c | 1 +
19 sound/soc/codecs/wm9081.c | 1 +
20 5 files changed, 5 insertions(+), 0 deletions(-)
21
22diff --git a/sound/soc/codecs/wm8940.c b/sound/soc/codecs/wm8940.c
23index 2cb16f8..23086e2 100644
24--- a/sound/soc/codecs/wm8940.c
25+++ b/sound/soc/codecs/wm8940.c
26@@ -768,6 +768,7 @@ static __devinit int wm8940_i2c_probe(struct i2c_client *i2c,
27
28 i2c_set_clientdata(i2c, wm8940);
29 wm8940->control_data = i2c;
30+ wm8940->control_type = SND_SOC_I2C;
31
32 ret = snd_soc_register_codec(&i2c->dev,
33 &soc_codec_dev_wm8940, &wm8940_dai, 1);
34diff --git a/sound/soc/codecs/wm8955.c b/sound/soc/codecs/wm8955.c
35index 9cbab8e..a2ad91d 100644
36--- a/sound/soc/codecs/wm8955.c
37+++ b/sound/soc/codecs/wm8955.c
38@@ -1003,6 +1003,7 @@ static __devinit int wm8955_i2c_probe(struct i2c_client *i2c,
39 return -ENOMEM;
40
41 i2c_set_clientdata(i2c, wm8955);
42+ wm8955->control_type = SND_SOC_I2C;
43
44 ret = snd_soc_register_codec(&i2c->dev,
45 &soc_codec_dev_wm8955, &wm8955_dai, 1);
46diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c
47index 21986c4..ff6ff2f 100644
48--- a/sound/soc/codecs/wm8960.c
49+++ b/sound/soc/codecs/wm8960.c
50@@ -1013,6 +1013,7 @@ static __devinit int wm8960_i2c_probe(struct i2c_client *i2c,
51 return -ENOMEM;
52
53 i2c_set_clientdata(i2c, wm8960);
54+ wm8960->control_type = SND_SOC_I2C;
55 wm8960->control_data = i2c;
56
57 ret = snd_soc_register_codec(&i2c->dev,
58diff --git a/sound/soc/codecs/wm8971.c b/sound/soc/codecs/wm8971.c
59index 63f6dbf..9f18db6 100644
60--- a/sound/soc/codecs/wm8971.c
61+++ b/sound/soc/codecs/wm8971.c
62@@ -718,6 +718,7 @@ static __devinit int wm8971_i2c_probe(struct i2c_client *i2c,
63 if (wm8971 == NULL)
64 return -ENOMEM;
65
66+ wm8971->control_type = SND_SOC_I2C;
67 i2c_set_clientdata(i2c, wm8971);
68
69 ret = snd_soc_register_codec(&i2c->dev,
70diff --git a/sound/soc/codecs/wm9081.c b/sound/soc/codecs/wm9081.c
71index ecc7c37..a486670 100644
72--- a/sound/soc/codecs/wm9081.c
73+++ b/sound/soc/codecs/wm9081.c
74@@ -1335,6 +1335,7 @@ static __devinit int wm9081_i2c_probe(struct i2c_client *i2c,
75 return -ENOMEM;
76
77 i2c_set_clientdata(i2c, wm9081);
78+ wm9081->control_type = SND_SOC_I2C;
79 wm9081->control_data = i2c;
80
81 ret = snd_soc_register_codec(&i2c->dev,
82--
831.6.6.1
84
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0018-ASoC-codecs-max98088-Fix-register-cache-incoherency.patch b/extras/recipes-kernel/linux/linux-omap/linus/0018-ASoC-codecs-max98088-Fix-register-cache-incoherency.patch
new file mode 100644
index 00000000..5c139ab5
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0018-ASoC-codecs-max98088-Fix-register-cache-incoherency.patch
@@ -0,0 +1,72 @@
1From 0ff8217bd7272d8aef1e58250d84cf5680b16b2d Mon Sep 17 00:00:00 2001
2From: Lars-Peter Clausen <lars@metafoo.de>
3Date: Tue, 28 Dec 2010 21:37:56 +0100
4Subject: [PATCH 18/65] ASoC: codecs: max98088: Fix register cache incoherency
5
6The multi-component patch(commit f0fba2ad1) moved the allocation of the
7register cache from the driver to the ASoC core. Most drivers where adjusted to
8this, but the max98088 driver still uses its own register cache for its
9private functions, while functions from the ASoC core use the generic cache.
10Thus we end up with two from each other incoherent caches, which can lead to
11undefined behaviour.
12This patch fixes the issue by changing the max98088 driver to use the
13generic register cache in its private functions.
14
15Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
16Cc: Peter Hsiang <Peter.Hsiang@maxim-ic.com>
17Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
18Cc: stable@kernel.org (for 2.6.37 only)
19---
20 sound/soc/codecs/max98088.c | 10 ++++------
21 1 files changed, 4 insertions(+), 6 deletions(-)
22
23diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c
24index d63e287..6447dbb 100644
25--- a/sound/soc/codecs/max98088.c
26+++ b/sound/soc/codecs/max98088.c
27@@ -40,7 +40,6 @@ struct max98088_cdata {
28 };
29
30 struct max98088_priv {
31- u8 reg_cache[M98088_REG_CNT];
32 enum max98088_type devtype;
33 void *control_data;
34 struct max98088_pdata *pdata;
35@@ -1588,7 +1587,7 @@ static int max98088_dai2_set_fmt(struct snd_soc_dai *codec_dai,
36
37 static void max98088_sync_cache(struct snd_soc_codec *codec)
38 {
39- struct max98088_priv *max98088 = snd_soc_codec_get_drvdata(codec);
40+ u16 *reg_cache = codec->reg_cache;
41 int i;
42
43 if (!codec->cache_sync)
44@@ -1599,14 +1598,14 @@ static void max98088_sync_cache(struct snd_soc_codec *codec)
45 /* write back cached values if they're writeable and
46 * different from the hardware default.
47 */
48- for (i = 1; i < ARRAY_SIZE(max98088->reg_cache); i++) {
49+ for (i = 1; i < codec->driver->reg_cache_size; i++) {
50 if (!max98088_access[i].writable)
51 continue;
52
53- if (max98088->reg_cache[i] == max98088_reg[i])
54+ if (reg_cache[i] == max98088_reg[i])
55 continue;
56
57- snd_soc_write(codec, i, max98088->reg_cache[i]);
58+ snd_soc_write(codec, i, reg_cache[i]);
59 }
60
61 codec->cache_sync = 0;
62@@ -1951,7 +1950,6 @@ static int max98088_probe(struct snd_soc_codec *codec)
63 int ret = 0;
64
65 codec->cache_sync = 1;
66- memcpy(codec->reg_cache, max98088_reg, sizeof(max98088_reg));
67
68 ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_I2C);
69 if (ret != 0) {
70--
711.6.6.1
72
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0019-ASoC-codecs-wm8523-Fix-register-cache-incoherency.patch b/extras/recipes-kernel/linux/linux-omap/linus/0019-ASoC-codecs-wm8523-Fix-register-cache-incoherency.patch
new file mode 100644
index 00000000..6ef2360a
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0019-ASoC-codecs-wm8523-Fix-register-cache-incoherency.patch
@@ -0,0 +1,74 @@
1From 50e75c326e4d3278b73385a3baf78fc4660d3610 Mon Sep 17 00:00:00 2001
2From: Lars-Peter Clausen <lars@metafoo.de>
3Date: Tue, 28 Dec 2010 21:37:57 +0100
4Subject: [PATCH 19/65] ASoC: codecs: wm8523: Fix register cache incoherency
5
6The multi-component patch(commit f0fba2ad1) moved the allocation of the
7register cache from the driver to the ASoC core. Most drivers where adjusted to
8this, but the wm8523 driver still uses its own register cache for its
9private functions, while functions from the ASoC core use the generic cache.
10Thus we end up with two from each other incoherent caches, which can lead to
11undefined behaviour.
12This patch fixes the issue by changing the wm8523 driver to use the
13generic register cache in its private functions.
14
15Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
16Cc: Ian Lartey <ian@opensource.wolfsonmicro.com>
17Cc: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
18Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
19Cc: stable@kernel.org (for 2.6.37 only)
20---
21 sound/soc/codecs/wm8523.c | 9 +++++----
22 1 files changed, 5 insertions(+), 4 deletions(-)
23
24diff --git a/sound/soc/codecs/wm8523.c b/sound/soc/codecs/wm8523.c
25index 9a433a5..deca79e 100644
26--- a/sound/soc/codecs/wm8523.c
27+++ b/sound/soc/codecs/wm8523.c
28@@ -41,7 +41,6 @@ static const char *wm8523_supply_names[WM8523_NUM_SUPPLIES] = {
29 /* codec private data */
30 struct wm8523_priv {
31 enum snd_soc_control_type control_type;
32- u16 reg_cache[WM8523_REGISTER_COUNT];
33 struct regulator_bulk_data supplies[WM8523_NUM_SUPPLIES];
34 unsigned int sysclk;
35 unsigned int rate_constraint_list[WM8523_NUM_RATES];
36@@ -314,6 +313,7 @@ static int wm8523_set_bias_level(struct snd_soc_codec *codec,
37 enum snd_soc_bias_level level)
38 {
39 struct wm8523_priv *wm8523 = snd_soc_codec_get_drvdata(codec);
40+ u16 *reg_cache = codec->reg_cache;
41 int ret, i;
42
43 switch (level) {
44@@ -344,7 +344,7 @@ static int wm8523_set_bias_level(struct snd_soc_codec *codec,
45 /* Sync back default/cached values */
46 for (i = WM8523_AIF_CTRL1;
47 i < WM8523_MAX_REGISTER; i++)
48- snd_soc_write(codec, i, wm8523->reg_cache[i]);
49+ snd_soc_write(codec, i, reg_cache[i]);
50
51
52 msleep(100);
53@@ -414,6 +414,7 @@ static int wm8523_resume(struct snd_soc_codec *codec)
54 static int wm8523_probe(struct snd_soc_codec *codec)
55 {
56 struct wm8523_priv *wm8523 = snd_soc_codec_get_drvdata(codec);
57+ u16 *reg_cache = codec->reg_cache;
58 int ret, i;
59
60 codec->hw_write = (hw_write_t)i2c_master_send;
61@@ -470,8 +471,8 @@ static int wm8523_probe(struct snd_soc_codec *codec)
62 }
63
64 /* Change some default settings - latch VU and enable ZC */
65- wm8523->reg_cache[WM8523_DAC_GAINR] |= WM8523_DACR_VU;
66- wm8523->reg_cache[WM8523_DAC_CTRL3] |= WM8523_ZC;
67+ reg_cache[WM8523_DAC_GAINR] |= WM8523_DACR_VU;
68+ reg_cache[WM8523_DAC_CTRL3] |= WM8523_ZC;
69
70 wm8523_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
71
72--
731.6.6.1
74
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0020-ASoC-codecs-wm8741-Fix-register-cache-incoherency.patch b/extras/recipes-kernel/linux/linux-omap/linus/0020-ASoC-codecs-wm8741-Fix-register-cache-incoherency.patch
new file mode 100644
index 00000000..f4ee49eb
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0020-ASoC-codecs-wm8741-Fix-register-cache-incoherency.patch
@@ -0,0 +1,61 @@
1From ed4250725ac617b420d25e2b4ca0958818a7cde9 Mon Sep 17 00:00:00 2001
2From: Lars-Peter Clausen <lars@metafoo.de>
3Date: Tue, 28 Dec 2010 21:37:58 +0100
4Subject: [PATCH 20/65] ASoC: codecs: wm8741: Fix register cache incoherency
5
6The multi-component patch(commit f0fba2ad1) moved the allocation of the
7register cache from the driver to the ASoC core. Most drivers where adjusted to
8this, but the wm8741 driver still uses its own register cache for its
9private functions, while functions from the ASoC core use the generic cache.
10Thus we end up with two from each other incoherent caches, which can lead to
11undefined behaviour.
12This patch fixes the issue by changing the wm8741 driver to use the
13generic register cache in its private functions.
14
15Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
16Cc: Ian Lartey <ian@opensource.wolfsonmicro.com>
17Cc: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
18Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
19Cc: stable@kernel.org (for 2.6.37 only)
20---
21 sound/soc/codecs/wm8741.c | 10 +++++-----
22 1 files changed, 5 insertions(+), 5 deletions(-)
23
24diff --git a/sound/soc/codecs/wm8741.c b/sound/soc/codecs/wm8741.c
25index 90e31e9..aea60ef 100644
26--- a/sound/soc/codecs/wm8741.c
27+++ b/sound/soc/codecs/wm8741.c
28@@ -41,7 +41,6 @@ static const char *wm8741_supply_names[WM8741_NUM_SUPPLIES] = {
29 /* codec private data */
30 struct wm8741_priv {
31 enum snd_soc_control_type control_type;
32- u16 reg_cache[WM8741_REGISTER_COUNT];
33 struct regulator_bulk_data supplies[WM8741_NUM_SUPPLIES];
34 unsigned int sysclk;
35 struct snd_pcm_hw_constraint_list *sysclk_constraints;
36@@ -422,6 +421,7 @@ static int wm8741_resume(struct snd_soc_codec *codec)
37 static int wm8741_probe(struct snd_soc_codec *codec)
38 {
39 struct wm8741_priv *wm8741 = snd_soc_codec_get_drvdata(codec);
40+ u16 *reg_cache = codec->reg_cache;
41 int ret = 0;
42
43 ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8741->control_type);
44@@ -437,10 +437,10 @@ static int wm8741_probe(struct snd_soc_codec *codec)
45 }
46
47 /* Change some default settings - latch VU */
48- wm8741->reg_cache[WM8741_DACLLSB_ATTENUATION] |= WM8741_UPDATELL;
49- wm8741->reg_cache[WM8741_DACLMSB_ATTENUATION] |= WM8741_UPDATELM;
50- wm8741->reg_cache[WM8741_DACRLSB_ATTENUATION] |= WM8741_UPDATERL;
51- wm8741->reg_cache[WM8741_DACRLSB_ATTENUATION] |= WM8741_UPDATERM;
52+ reg_cache[WM8741_DACLLSB_ATTENUATION] |= WM8741_UPDATELL;
53+ reg_cache[WM8741_DACLMSB_ATTENUATION] |= WM8741_UPDATELM;
54+ reg_cache[WM8741_DACRLSB_ATTENUATION] |= WM8741_UPDATERL;
55+ reg_cache[WM8741_DACRLSB_ATTENUATION] |= WM8741_UPDATERM;
56
57 snd_soc_add_controls(codec, wm8741_snd_controls,
58 ARRAY_SIZE(wm8741_snd_controls));
59--
601.6.6.1
61
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0021-ASoC-codecs-wm8904-Fix-register-cache-incoherency.patch b/extras/recipes-kernel/linux/linux-omap/linus/0021-ASoC-codecs-wm8904-Fix-register-cache-incoherency.patch
new file mode 100644
index 00000000..51363a40
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0021-ASoC-codecs-wm8904-Fix-register-cache-incoherency.patch
@@ -0,0 +1,131 @@
1From 2f369c65cdd41f8eda535cd4065edd63346a016b Mon Sep 17 00:00:00 2001
2From: Lars-Peter Clausen <lars@metafoo.de>
3Date: Tue, 28 Dec 2010 21:37:59 +0100
4Subject: [PATCH 21/65] ASoC: codecs: wm8904: Fix register cache incoherency
5
6The multi-component patch(commit f0fba2ad1) moved the allocation of the
7register cache from the driver to the ASoC core. Most drivers where adjusted to
8this, but the wm8904 driver still uses its own register cache for its
9private functions, while functions from the ASoC core use the generic cache.
10Thus we end up with two from each other incoherent caches, which can lead to
11undefined behaviour.
12This patch fixes the issue by changing the wm8904 driver to use the
13generic register cache in its private functions.
14
15Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
16Cc: Ian Lartey <ian@opensource.wolfsonmicro.com>
17Cc: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
18Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
19Cc: stable@kernel.org (for 2.6.37 only)
20---
21 sound/soc/codecs/wm8904.c | 37 ++++++++++++++++++-------------------
22 1 files changed, 18 insertions(+), 19 deletions(-)
23
24diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c
25index 9001cc4..1ec12ef 100644
26--- a/sound/soc/codecs/wm8904.c
27+++ b/sound/soc/codecs/wm8904.c
28@@ -50,8 +50,6 @@ static const char *wm8904_supply_names[WM8904_NUM_SUPPLIES] = {
29 /* codec private data */
30 struct wm8904_priv {
31
32- u16 reg_cache[WM8904_MAX_REGISTER + 1];
33-
34 enum wm8904_type devtype;
35 void *control_data;
36
37@@ -2094,7 +2092,7 @@ static int wm8904_digital_mute(struct snd_soc_dai *codec_dai, int mute)
38
39 static void wm8904_sync_cache(struct snd_soc_codec *codec)
40 {
41- struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec);
42+ u16 *reg_cache = codec->reg_cache;
43 int i;
44
45 if (!codec->cache_sync)
46@@ -2105,14 +2103,14 @@ static void wm8904_sync_cache(struct snd_soc_codec *codec)
47 /* Sync back cached values if they're different from the
48 * hardware default.
49 */
50- for (i = 1; i < ARRAY_SIZE(wm8904->reg_cache); i++) {
51+ for (i = 1; i < codec->driver->reg_cache_size; i++) {
52 if (!wm8904_access[i].writable)
53 continue;
54
55- if (wm8904->reg_cache[i] == wm8904_reg[i])
56+ if (reg_cache[i] == wm8904_reg[i])
57 continue;
58
59- snd_soc_write(codec, i, wm8904->reg_cache[i]);
60+ snd_soc_write(codec, i, reg_cache[i]);
61 }
62
63 codec->cache_sync = 0;
64@@ -2371,6 +2369,7 @@ static int wm8904_probe(struct snd_soc_codec *codec)
65 {
66 struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec);
67 struct wm8904_pdata *pdata = wm8904->pdata;
68+ u16 *reg_cache = codec->reg_cache;
69 int ret, i;
70
71 codec->cache_sync = 1;
72@@ -2437,19 +2436,19 @@ static int wm8904_probe(struct snd_soc_codec *codec)
73 }
74
75 /* Change some default settings - latch VU and enable ZC */
76- wm8904->reg_cache[WM8904_ADC_DIGITAL_VOLUME_LEFT] |= WM8904_ADC_VU;
77- wm8904->reg_cache[WM8904_ADC_DIGITAL_VOLUME_RIGHT] |= WM8904_ADC_VU;
78- wm8904->reg_cache[WM8904_DAC_DIGITAL_VOLUME_LEFT] |= WM8904_DAC_VU;
79- wm8904->reg_cache[WM8904_DAC_DIGITAL_VOLUME_RIGHT] |= WM8904_DAC_VU;
80- wm8904->reg_cache[WM8904_ANALOGUE_OUT1_LEFT] |= WM8904_HPOUT_VU |
81+ reg_cache[WM8904_ADC_DIGITAL_VOLUME_LEFT] |= WM8904_ADC_VU;
82+ reg_cache[WM8904_ADC_DIGITAL_VOLUME_RIGHT] |= WM8904_ADC_VU;
83+ reg_cache[WM8904_DAC_DIGITAL_VOLUME_LEFT] |= WM8904_DAC_VU;
84+ reg_cache[WM8904_DAC_DIGITAL_VOLUME_RIGHT] |= WM8904_DAC_VU;
85+ reg_cache[WM8904_ANALOGUE_OUT1_LEFT] |= WM8904_HPOUT_VU |
86 WM8904_HPOUTLZC;
87- wm8904->reg_cache[WM8904_ANALOGUE_OUT1_RIGHT] |= WM8904_HPOUT_VU |
88+ reg_cache[WM8904_ANALOGUE_OUT1_RIGHT] |= WM8904_HPOUT_VU |
89 WM8904_HPOUTRZC;
90- wm8904->reg_cache[WM8904_ANALOGUE_OUT2_LEFT] |= WM8904_LINEOUT_VU |
91+ reg_cache[WM8904_ANALOGUE_OUT2_LEFT] |= WM8904_LINEOUT_VU |
92 WM8904_LINEOUTLZC;
93- wm8904->reg_cache[WM8904_ANALOGUE_OUT2_RIGHT] |= WM8904_LINEOUT_VU |
94+ reg_cache[WM8904_ANALOGUE_OUT2_RIGHT] |= WM8904_LINEOUT_VU |
95 WM8904_LINEOUTRZC;
96- wm8904->reg_cache[WM8904_CLOCK_RATES_0] &= ~WM8904_SR_MODE;
97+ reg_cache[WM8904_CLOCK_RATES_0] &= ~WM8904_SR_MODE;
98
99 /* Apply configuration from the platform data. */
100 if (wm8904->pdata) {
101@@ -2457,23 +2456,23 @@ static int wm8904_probe(struct snd_soc_codec *codec)
102 if (!pdata->gpio_cfg[i])
103 continue;
104
105- wm8904->reg_cache[WM8904_GPIO_CONTROL_1 + i]
106+ reg_cache[WM8904_GPIO_CONTROL_1 + i]
107 = pdata->gpio_cfg[i] & 0xffff;
108 }
109
110 /* Zero is the default value for these anyway */
111 for (i = 0; i < WM8904_MIC_REGS; i++)
112- wm8904->reg_cache[WM8904_MIC_BIAS_CONTROL_0 + i]
113+ reg_cache[WM8904_MIC_BIAS_CONTROL_0 + i]
114 = pdata->mic_cfg[i];
115 }
116
117 /* Set Class W by default - this will be managed by the Class
118 * G widget at runtime where bypass paths are available.
119 */
120- wm8904->reg_cache[WM8904_CLASS_W_0] |= WM8904_CP_DYN_PWR;
121+ reg_cache[WM8904_CLASS_W_0] |= WM8904_CP_DYN_PWR;
122
123 /* Use normal bias source */
124- wm8904->reg_cache[WM8904_BIAS_CONTROL_0] &= ~WM8904_POBCTRL;
125+ reg_cache[WM8904_BIAS_CONTROL_0] &= ~WM8904_POBCTRL;
126
127 wm8904_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
128
129--
1301.6.6.1
131
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0022-ASoC-codecs-wm8955-Fix-register-cache-incoherency.patch b/extras/recipes-kernel/linux/linux-omap/linus/0022-ASoC-codecs-wm8955-Fix-register-cache-incoherency.patch
new file mode 100644
index 00000000..420b4cc2
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0022-ASoC-codecs-wm8955-Fix-register-cache-incoherency.patch
@@ -0,0 +1,107 @@
1From 8febc5cbe3b8d4a4a056df364e4a82958a6eb1df Mon Sep 17 00:00:00 2001
2From: Lars-Peter Clausen <lars@metafoo.de>
3Date: Tue, 28 Dec 2010 21:38:00 +0100
4Subject: [PATCH 22/65] ASoC: codecs: wm8955: Fix register cache incoherency
5
6The multi-component patch(commit f0fba2ad1) moved the allocation of the
7register cache from the driver to the ASoC core. Most drivers where adjusted to
8this, but the wm8955 driver still uses its own register cache for its
9private functions, while functions from the ASoC core use the generic cache.
10Thus we end up with two from each other incoherent caches, which can lead to
11undefined behaviour.
12This patch fixes the issue by changing the wm8955 driver to use the
13generic register cache in its private functions.
14
15Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
16Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
17Cc: stable@kernel.org (for 2.6.37 only)
18---
19 sound/soc/codecs/wm8955.c | 30 +++++++++++++++---------------
20 1 files changed, 15 insertions(+), 15 deletions(-)
21
22diff --git a/sound/soc/codecs/wm8955.c b/sound/soc/codecs/wm8955.c
23index a2ad91d..2ac35b0 100644
24--- a/sound/soc/codecs/wm8955.c
25+++ b/sound/soc/codecs/wm8955.c
26@@ -42,8 +42,6 @@ static const char *wm8955_supply_names[WM8955_NUM_SUPPLIES] = {
27 struct wm8955_priv {
28 enum snd_soc_control_type control_type;
29
30- u16 reg_cache[WM8955_MAX_REGISTER + 1];
31-
32 unsigned int mclk_rate;
33
34 int deemph;
35@@ -768,6 +766,7 @@ static int wm8955_set_bias_level(struct snd_soc_codec *codec,
36 enum snd_soc_bias_level level)
37 {
38 struct wm8955_priv *wm8955 = snd_soc_codec_get_drvdata(codec);
39+ u16 *reg_cache = codec->reg_cache;
40 int ret, i;
41
42 switch (level) {
43@@ -800,14 +799,14 @@ static int wm8955_set_bias_level(struct snd_soc_codec *codec,
44 /* Sync back cached values if they're
45 * different from the hardware default.
46 */
47- for (i = 0; i < ARRAY_SIZE(wm8955->reg_cache); i++) {
48+ for (i = 0; i < codec->driver->reg_cache_size; i++) {
49 if (i == WM8955_RESET)
50 continue;
51
52- if (wm8955->reg_cache[i] == wm8955_reg[i])
53+ if (reg_cache[i] == wm8955_reg[i])
54 continue;
55
56- snd_soc_write(codec, i, wm8955->reg_cache[i]);
57+ snd_soc_write(codec, i, reg_cache[i]);
58 }
59
60 /* Enable VREF and VMID */
61@@ -902,6 +901,7 @@ static int wm8955_probe(struct snd_soc_codec *codec)
62 {
63 struct wm8955_priv *wm8955 = snd_soc_codec_get_drvdata(codec);
64 struct wm8955_pdata *pdata = dev_get_platdata(codec->dev);
65+ u16 *reg_cache = codec->reg_cache;
66 int ret, i;
67
68 ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8955->control_type);
69@@ -934,25 +934,25 @@ static int wm8955_probe(struct snd_soc_codec *codec)
70 }
71
72 /* Change some default settings - latch VU and enable ZC */
73- wm8955->reg_cache[WM8955_LEFT_DAC_VOLUME] |= WM8955_LDVU;
74- wm8955->reg_cache[WM8955_RIGHT_DAC_VOLUME] |= WM8955_RDVU;
75- wm8955->reg_cache[WM8955_LOUT1_VOLUME] |= WM8955_LO1VU | WM8955_LO1ZC;
76- wm8955->reg_cache[WM8955_ROUT1_VOLUME] |= WM8955_RO1VU | WM8955_RO1ZC;
77- wm8955->reg_cache[WM8955_LOUT2_VOLUME] |= WM8955_LO2VU | WM8955_LO2ZC;
78- wm8955->reg_cache[WM8955_ROUT2_VOLUME] |= WM8955_RO2VU | WM8955_RO2ZC;
79- wm8955->reg_cache[WM8955_MONOOUT_VOLUME] |= WM8955_MOZC;
80+ reg_cache[WM8955_LEFT_DAC_VOLUME] |= WM8955_LDVU;
81+ reg_cache[WM8955_RIGHT_DAC_VOLUME] |= WM8955_RDVU;
82+ reg_cache[WM8955_LOUT1_VOLUME] |= WM8955_LO1VU | WM8955_LO1ZC;
83+ reg_cache[WM8955_ROUT1_VOLUME] |= WM8955_RO1VU | WM8955_RO1ZC;
84+ reg_cache[WM8955_LOUT2_VOLUME] |= WM8955_LO2VU | WM8955_LO2ZC;
85+ reg_cache[WM8955_ROUT2_VOLUME] |= WM8955_RO2VU | WM8955_RO2ZC;
86+ reg_cache[WM8955_MONOOUT_VOLUME] |= WM8955_MOZC;
87
88 /* Also enable adaptive bass boost by default */
89- wm8955->reg_cache[WM8955_BASS_CONTROL] |= WM8955_BB;
90+ reg_cache[WM8955_BASS_CONTROL] |= WM8955_BB;
91
92 /* Set platform data values */
93 if (pdata) {
94 if (pdata->out2_speaker)
95- wm8955->reg_cache[WM8955_ADDITIONAL_CONTROL_2]
96+ reg_cache[WM8955_ADDITIONAL_CONTROL_2]
97 |= WM8955_ROUT2INV;
98
99 if (pdata->monoin_diff)
100- wm8955->reg_cache[WM8955_MONO_OUT_MIX_1]
101+ reg_cache[WM8955_MONO_OUT_MIX_1]
102 |= WM8955_DMEN;
103 }
104
105--
1061.6.6.1
107
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0023-ASoC-codecs-wm8962-Fix-register-cache-incoherency.patch b/extras/recipes-kernel/linux/linux-omap/linus/0023-ASoC-codecs-wm8962-Fix-register-cache-incoherency.patch
new file mode 100644
index 00000000..3e7aa10c
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0023-ASoC-codecs-wm8962-Fix-register-cache-incoherency.patch
@@ -0,0 +1,151 @@
1From 9760063610bb4890c0f88c1dd839ec1531706f33 Mon Sep 17 00:00:00 2001
2From: Lars-Peter Clausen <lars@metafoo.de>
3Date: Tue, 28 Dec 2010 21:38:01 +0100
4Subject: [PATCH 23/65] ASoC: codecs: wm8962: Fix register cache incoherency
5
6The multi-component patch(commit f0fba2ad1) moved the allocation of the
7register cache from the driver to the ASoC core. Most drivers where adjusted to
8this, but the wm8962 driver still uses its own register cache for its
9private functions, while functions from the ASoC core use the generic cache.
10Thus we end up with two from each other incoherent caches, which can lead to
11undefined behaviour.
12This patch fixes the issue by changing the wm8962 driver to use the
13generic register cache in its private functions.
14
15Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
16Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
17Cc: stable@kernel.org (for 2.6.37 only)
18---
19 sound/soc/codecs/wm8962.c | 45 ++++++++++++++++++++-------------------------
20 1 files changed, 20 insertions(+), 25 deletions(-)
21
22diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
23index 1304ca9..7c421cc 100644
24--- a/sound/soc/codecs/wm8962.c
25+++ b/sound/soc/codecs/wm8962.c
26@@ -52,8 +52,6 @@ static const char *wm8962_supply_names[WM8962_NUM_SUPPLIES] = {
27 struct wm8962_priv {
28 struct snd_soc_codec *codec;
29
30- u16 reg_cache[WM8962_MAX_REGISTER + 1];
31-
32 int sysclk;
33 int sysclk_rate;
34
35@@ -1991,8 +1989,7 @@ static int wm8962_put_hp_sw(struct snd_kcontrol *kcontrol,
36 struct snd_ctl_elem_value *ucontrol)
37 {
38 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
39- struct wm8962_priv *wm8962 = snd_soc_codec_get_drvdata(codec);
40- u16 *reg_cache = wm8962->reg_cache;
41+ u16 *reg_cache = codec->reg_cache;
42 int ret;
43
44 /* Apply the update (if any) */
45@@ -2020,8 +2017,7 @@ static int wm8962_put_spk_sw(struct snd_kcontrol *kcontrol,
46 struct snd_ctl_elem_value *ucontrol)
47 {
48 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
49- struct wm8962_priv *wm8962 = snd_soc_codec_get_drvdata(codec);
50- u16 *reg_cache = wm8962->reg_cache;
51+ u16 *reg_cache = codec->reg_cache;
52 int ret;
53
54 /* Apply the update (if any) */
55@@ -2329,8 +2325,7 @@ static int out_pga_event(struct snd_soc_dapm_widget *w,
56 struct snd_kcontrol *kcontrol, int event)
57 {
58 struct snd_soc_codec *codec = w->codec;
59- struct wm8962_priv *wm8962 = snd_soc_codec_get_drvdata(codec);
60- u16 *reg_cache = wm8962->reg_cache;
61+ u16 *reg_cache = codec->reg_cache;
62 int reg;
63
64 switch (w->shift) {
65@@ -2719,7 +2714,7 @@ static int wm8962_add_widgets(struct snd_soc_codec *codec)
66
67 static void wm8962_sync_cache(struct snd_soc_codec *codec)
68 {
69- struct wm8962_priv *wm8962 = snd_soc_codec_get_drvdata(codec);
70+ u16 *reg_cache = codec->reg_cache;
71 int i;
72
73 if (!codec->cache_sync)
74@@ -2732,13 +2727,13 @@ static void wm8962_sync_cache(struct snd_soc_codec *codec)
75 /* Sync back cached values if they're different from the
76 * hardware default.
77 */
78- for (i = 1; i < ARRAY_SIZE(wm8962->reg_cache); i++) {
79+ for (i = 1; i < codec->driver->reg_cache_size; i++) {
80 if (i == WM8962_SOFTWARE_RESET)
81 continue;
82- if (wm8962->reg_cache[i] == wm8962_reg[i])
83+ if (reg_cache[i] == wm8962_reg[i])
84 continue;
85
86- snd_soc_write(codec, i, wm8962->reg_cache[i]);
87+ snd_soc_write(codec, i, reg_cache[i]);
88 }
89
90 codec->cache_sync = 0;
91@@ -3406,12 +3401,11 @@ EXPORT_SYMBOL_GPL(wm8962_mic_detect);
92 #ifdef CONFIG_PM
93 static int wm8962_resume(struct snd_soc_codec *codec)
94 {
95- struct wm8962_priv *wm8962 = snd_soc_codec_get_drvdata(codec);
96 u16 *reg_cache = codec->reg_cache;
97 int i;
98
99 /* Restore the registers */
100- for (i = 1; i < ARRAY_SIZE(wm8962->reg_cache); i++) {
101+ for (i = 1; i < codec->driver->reg_cache_size; i++) {
102 switch (i) {
103 case WM8962_SOFTWARE_RESET:
104 continue;
105@@ -3705,6 +3699,7 @@ static int wm8962_probe(struct snd_soc_codec *codec)
106 struct wm8962_pdata *pdata = dev_get_platdata(codec->dev);
107 struct i2c_client *i2c = container_of(codec->dev, struct i2c_client,
108 dev);
109+ u16 *reg_cache = codec->reg_cache;
110 int i, trigger, irq_pol;
111
112 wm8962->codec = codec;
113@@ -3804,7 +3799,7 @@ static int wm8962_probe(struct snd_soc_codec *codec)
114
115 /* Put the speakers into mono mode? */
116 if (pdata->spk_mono)
117- wm8962->reg_cache[WM8962_CLASS_D_CONTROL_2]
118+ reg_cache[WM8962_CLASS_D_CONTROL_2]
119 |= WM8962_SPK_MONO;
120
121 /* Micbias setup, detection enable and detection
122@@ -3819,16 +3814,16 @@ static int wm8962_probe(struct snd_soc_codec *codec)
123 }
124
125 /* Latch volume update bits */
126- wm8962->reg_cache[WM8962_LEFT_INPUT_VOLUME] |= WM8962_IN_VU;
127- wm8962->reg_cache[WM8962_RIGHT_INPUT_VOLUME] |= WM8962_IN_VU;
128- wm8962->reg_cache[WM8962_LEFT_ADC_VOLUME] |= WM8962_ADC_VU;
129- wm8962->reg_cache[WM8962_RIGHT_ADC_VOLUME] |= WM8962_ADC_VU;
130- wm8962->reg_cache[WM8962_LEFT_DAC_VOLUME] |= WM8962_DAC_VU;
131- wm8962->reg_cache[WM8962_RIGHT_DAC_VOLUME] |= WM8962_DAC_VU;
132- wm8962->reg_cache[WM8962_SPKOUTL_VOLUME] |= WM8962_SPKOUT_VU;
133- wm8962->reg_cache[WM8962_SPKOUTR_VOLUME] |= WM8962_SPKOUT_VU;
134- wm8962->reg_cache[WM8962_HPOUTL_VOLUME] |= WM8962_HPOUT_VU;
135- wm8962->reg_cache[WM8962_HPOUTR_VOLUME] |= WM8962_HPOUT_VU;
136+ reg_cache[WM8962_LEFT_INPUT_VOLUME] |= WM8962_IN_VU;
137+ reg_cache[WM8962_RIGHT_INPUT_VOLUME] |= WM8962_IN_VU;
138+ reg_cache[WM8962_LEFT_ADC_VOLUME] |= WM8962_ADC_VU;
139+ reg_cache[WM8962_RIGHT_ADC_VOLUME] |= WM8962_ADC_VU;
140+ reg_cache[WM8962_LEFT_DAC_VOLUME] |= WM8962_DAC_VU;
141+ reg_cache[WM8962_RIGHT_DAC_VOLUME] |= WM8962_DAC_VU;
142+ reg_cache[WM8962_SPKOUTL_VOLUME] |= WM8962_SPKOUT_VU;
143+ reg_cache[WM8962_SPKOUTR_VOLUME] |= WM8962_SPKOUT_VU;
144+ reg_cache[WM8962_HPOUTL_VOLUME] |= WM8962_HPOUT_VU;
145+ reg_cache[WM8962_HPOUTR_VOLUME] |= WM8962_HPOUT_VU;
146
147 wm8962_add_widgets(codec);
148
149--
1501.6.6.1
151
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0024-ASoC-codecs-wm9090-Fix-register-cache-incoherency.patch b/extras/recipes-kernel/linux/linux-omap/linus/0024-ASoC-codecs-wm9090-Fix-register-cache-incoherency.patch
new file mode 100644
index 00000000..ad5aedd1
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0024-ASoC-codecs-wm9090-Fix-register-cache-incoherency.patch
@@ -0,0 +1,75 @@
1From 2f2f23c75c1c055ca6274b04bd2dc71d0a6e8c62 Mon Sep 17 00:00:00 2001
2From: Lars-Peter Clausen <lars@metafoo.de>
3Date: Tue, 28 Dec 2010 21:38:02 +0100
4Subject: [PATCH 24/65] ASoC: codecs: wm9090: Fix register cache incoherency
5
6The multi-component patch(commit f0fba2ad1) moved the allocation of the
7register cache from the driver to the ASoC core. Most drivers where adjusted to
8this, but the wm9090 driver still uses its own register cache for its
9private functions, while functions from the ASoC core use the generic cache.
10Thus we end up with two from each other incoherent caches, which can lead to
11undefined behaviour.
12This patch fixes the issue by changing the wm9090 driver to use the
13generic register cache in its private functions.
14
15Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
16Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
17Cc: stable@kernel.org (for 2.6.37 only)
18---
19 sound/soc/codecs/wm9090.c | 18 +++++++++---------
20 1 files changed, 9 insertions(+), 9 deletions(-)
21
22diff --git a/sound/soc/codecs/wm9090.c b/sound/soc/codecs/wm9090.c
23index 99c046b..6e5f64f 100644
24--- a/sound/soc/codecs/wm9090.c
25+++ b/sound/soc/codecs/wm9090.c
26@@ -141,7 +141,6 @@ static const u16 wm9090_reg_defaults[] = {
27 /* This struct is used to save the context */
28 struct wm9090_priv {
29 struct mutex mutex;
30- u16 reg_cache[WM9090_MAX_REGISTER + 1];
31 struct wm9090_platform_data pdata;
32 void *control_data;
33 };
34@@ -552,6 +551,7 @@ static int wm9090_set_bias_level(struct snd_soc_codec *codec,
35 static int wm9090_probe(struct snd_soc_codec *codec)
36 {
37 struct wm9090_priv *wm9090 = snd_soc_codec_get_drvdata(codec);
38+ u16 *reg_cache = codec->reg_cache;
39 int ret;
40
41 codec->control_data = wm9090->control_data;
42@@ -576,22 +576,22 @@ static int wm9090_probe(struct snd_soc_codec *codec)
43 /* Configure some defaults; they will be written out when we
44 * bring the bias up.
45 */
46- wm9090->reg_cache[WM9090_IN1_LINE_INPUT_A_VOLUME] |= WM9090_IN1_VU
47+ reg_cache[WM9090_IN1_LINE_INPUT_A_VOLUME] |= WM9090_IN1_VU
48 | WM9090_IN1A_ZC;
49- wm9090->reg_cache[WM9090_IN1_LINE_INPUT_B_VOLUME] |= WM9090_IN1_VU
50+ reg_cache[WM9090_IN1_LINE_INPUT_B_VOLUME] |= WM9090_IN1_VU
51 | WM9090_IN1B_ZC;
52- wm9090->reg_cache[WM9090_IN2_LINE_INPUT_A_VOLUME] |= WM9090_IN2_VU
53+ reg_cache[WM9090_IN2_LINE_INPUT_A_VOLUME] |= WM9090_IN2_VU
54 | WM9090_IN2A_ZC;
55- wm9090->reg_cache[WM9090_IN2_LINE_INPUT_B_VOLUME] |= WM9090_IN2_VU
56+ reg_cache[WM9090_IN2_LINE_INPUT_B_VOLUME] |= WM9090_IN2_VU
57 | WM9090_IN2B_ZC;
58- wm9090->reg_cache[WM9090_SPEAKER_VOLUME_LEFT] |=
59+ reg_cache[WM9090_SPEAKER_VOLUME_LEFT] |=
60 WM9090_SPKOUT_VU | WM9090_SPKOUTL_ZC;
61- wm9090->reg_cache[WM9090_LEFT_OUTPUT_VOLUME] |=
62+ reg_cache[WM9090_LEFT_OUTPUT_VOLUME] |=
63 WM9090_HPOUT1_VU | WM9090_HPOUT1L_ZC;
64- wm9090->reg_cache[WM9090_RIGHT_OUTPUT_VOLUME] |=
65+ reg_cache[WM9090_RIGHT_OUTPUT_VOLUME] |=
66 WM9090_HPOUT1_VU | WM9090_HPOUT1R_ZC;
67
68- wm9090->reg_cache[WM9090_CLOCKING_1] |= WM9090_TOCLK_ENA;
69+ reg_cache[WM9090_CLOCKING_1] |= WM9090_TOCLK_ENA;
70
71 wm9090_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
72
73--
741.6.6.1
75
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0025-ASoC-codecs-wm8753-Fix-register-cache-incoherency.patch b/extras/recipes-kernel/linux/linux-omap/linus/0025-ASoC-codecs-wm8753-Fix-register-cache-incoherency.patch
new file mode 100644
index 00000000..574c76ea
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0025-ASoC-codecs-wm8753-Fix-register-cache-incoherency.patch
@@ -0,0 +1,514 @@
1From 0e07d2db08fa60b3e1bbc9837775feaf1cb8a381 Mon Sep 17 00:00:00 2001
2From: Lars-Peter Clausen <lars@metafoo.de>
3Date: Tue, 28 Dec 2010 21:38:03 +0100
4Subject: [PATCH 25/65] ASoC: codecs: wm8753: Fix register cache incoherency
5
6The multi-component patch(commit f0fba2ad1) moved the allocation of the
7register cache from the driver to the ASoC core. Most drivers where adjusted to
8this, but the wm8753 driver still uses its own register cache for its
9private functions, while functions from the ASoC core use the generic cache.
10Furthermore the generic cache uses zero-based numbering while the wm8753 cache
11uses one-based numbering.
12Thus we end up with two from each other incoherent caches, which leads to undefined
13behaviour and crashes.
14This patch fixes the issue by changing the wm8753 driver to use the generic
15register cache in its private functions.
16
17Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
18Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
19---
20 sound/soc/codecs/wm8753.c | 226 +++++++++++++++++----------------------------
21 1 files changed, 83 insertions(+), 143 deletions(-)
22
23diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c
24index 8f679a1..87caae5 100644
25--- a/sound/soc/codecs/wm8753.c
26+++ b/sound/soc/codecs/wm8753.c
27@@ -65,22 +65,22 @@ static void wm8753_set_dai_mode(struct snd_soc_codec *codec,
28 * are using 2 wire for device control, so we cache them instead.
29 */
30 static const u16 wm8753_reg[] = {
31- 0x0008, 0x0000, 0x000a, 0x000a,
32- 0x0033, 0x0000, 0x0007, 0x00ff,
33- 0x00ff, 0x000f, 0x000f, 0x007b,
34- 0x0000, 0x0032, 0x0000, 0x00c3,
35- 0x00c3, 0x00c0, 0x0000, 0x0000,
36+ 0x0000, 0x0008, 0x0000, 0x000a,
37+ 0x000a, 0x0033, 0x0000, 0x0007,
38+ 0x00ff, 0x00ff, 0x000f, 0x000f,
39+ 0x007b, 0x0000, 0x0032, 0x0000,
40+ 0x00c3, 0x00c3, 0x00c0, 0x0000,
41 0x0000, 0x0000, 0x0000, 0x0000,
42 0x0000, 0x0000, 0x0000, 0x0000,
43- 0x0000, 0x0000, 0x0000, 0x0055,
44- 0x0005, 0x0050, 0x0055, 0x0050,
45- 0x0055, 0x0050, 0x0055, 0x0079,
46- 0x0079, 0x0079, 0x0079, 0x0079,
47 0x0000, 0x0000, 0x0000, 0x0000,
48- 0x0097, 0x0097, 0x0000, 0x0004,
49- 0x0000, 0x0083, 0x0024, 0x01ba,
50- 0x0000, 0x0083, 0x0024, 0x01ba,
51- 0x0000, 0x0000, 0x0000
52+ 0x0055, 0x0005, 0x0050, 0x0055,
53+ 0x0050, 0x0055, 0x0050, 0x0055,
54+ 0x0079, 0x0079, 0x0079, 0x0079,
55+ 0x0079, 0x0000, 0x0000, 0x0000,
56+ 0x0000, 0x0097, 0x0097, 0x0000,
57+ 0x0004, 0x0000, 0x0083, 0x0024,
58+ 0x01ba, 0x0000, 0x0083, 0x0024,
59+ 0x01ba, 0x0000, 0x0000, 0x0000
60 };
61
62 /* codec private data */
63@@ -88,57 +88,10 @@ struct wm8753_priv {
64 enum snd_soc_control_type control_type;
65 unsigned int sysclk;
66 unsigned int pcmclk;
67- u16 reg_cache[ARRAY_SIZE(wm8753_reg)];
68 int dai_func;
69 };
70
71-/*
72- * read wm8753 register cache
73- */
74-static inline unsigned int wm8753_read_reg_cache(struct snd_soc_codec *codec,
75- unsigned int reg)
76-{
77- u16 *cache = codec->reg_cache;
78- if (reg < 1 || reg >= (ARRAY_SIZE(wm8753_reg) + 1))
79- return -1;
80- return cache[reg - 1];
81-}
82-
83-/*
84- * write wm8753 register cache
85- */
86-static inline void wm8753_write_reg_cache(struct snd_soc_codec *codec,
87- unsigned int reg, unsigned int value)
88-{
89- u16 *cache = codec->reg_cache;
90- if (reg < 1 || reg >= (ARRAY_SIZE(wm8753_reg) + 1))
91- return;
92- cache[reg - 1] = value;
93-}
94-
95-/*
96- * write to the WM8753 register space
97- */
98-static int wm8753_write(struct snd_soc_codec *codec, unsigned int reg,
99- unsigned int value)
100-{
101- u8 data[2];
102-
103- /* data is
104- * D15..D9 WM8753 register offset
105- * D8...D0 register data
106- */
107- data[0] = (reg << 1) | ((value >> 8) & 0x0001);
108- data[1] = value & 0x00ff;
109-
110- wm8753_write_reg_cache(codec, reg, value);
111- if (codec->hw_write(codec->control_data, data, 2) == 2)
112- return 0;
113- else
114- return -EIO;
115-}
116-
117-#define wm8753_reset(c) wm8753_write(c, WM8753_RESET, 0)
118+#define wm8753_reset(c) snd_soc_write(c, WM8753_RESET, 0)
119
120 /*
121 * WM8753 Controls
122@@ -218,7 +171,7 @@ static int wm8753_get_dai(struct snd_kcontrol *kcontrol,
123 struct snd_ctl_elem_value *ucontrol)
124 {
125 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
126- int mode = wm8753_read_reg_cache(codec, WM8753_IOCTL);
127+ int mode = snd_soc_read(codec, WM8753_IOCTL);
128
129 ucontrol->value.integer.value[0] = (mode & 0xc) >> 2;
130 return 0;
131@@ -228,7 +181,7 @@ static int wm8753_set_dai(struct snd_kcontrol *kcontrol,
132 struct snd_ctl_elem_value *ucontrol)
133 {
134 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
135- int mode = wm8753_read_reg_cache(codec, WM8753_IOCTL);
136+ int mode = snd_soc_read(codec, WM8753_IOCTL);
137 struct wm8753_priv *wm8753 = snd_soc_codec_get_drvdata(codec);
138
139 if (((mode & 0xc) >> 2) == ucontrol->value.integer.value[0])
140@@ -738,17 +691,17 @@ static int wm8753_set_dai_pll(struct snd_soc_dai *codec_dai, int pll_id,
141 if (pll_id == WM8753_PLL1) {
142 offset = 0;
143 enable = 0x10;
144- reg = wm8753_read_reg_cache(codec, WM8753_CLOCK) & 0xffef;
145+ reg = snd_soc_read(codec, WM8753_CLOCK) & 0xffef;
146 } else {
147 offset = 4;
148 enable = 0x8;
149- reg = wm8753_read_reg_cache(codec, WM8753_CLOCK) & 0xfff7;
150+ reg = snd_soc_read(codec, WM8753_CLOCK) & 0xfff7;
151 }
152
153 if (!freq_in || !freq_out) {
154 /* disable PLL */
155- wm8753_write(codec, WM8753_PLL1CTL1 + offset, 0x0026);
156- wm8753_write(codec, WM8753_CLOCK, reg);
157+ snd_soc_write(codec, WM8753_PLL1CTL1 + offset, 0x0026);
158+ snd_soc_write(codec, WM8753_CLOCK, reg);
159 return 0;
160 } else {
161 u16 value = 0;
162@@ -759,20 +712,20 @@ static int wm8753_set_dai_pll(struct snd_soc_dai *codec_dai, int pll_id,
163 /* set up N and K PLL divisor ratios */
164 /* bits 8:5 = PLL_N, bits 3:0 = PLL_K[21:18] */
165 value = (pll_div.n << 5) + ((pll_div.k & 0x3c0000) >> 18);
166- wm8753_write(codec, WM8753_PLL1CTL2 + offset, value);
167+ snd_soc_write(codec, WM8753_PLL1CTL2 + offset, value);
168
169 /* bits 8:0 = PLL_K[17:9] */
170 value = (pll_div.k & 0x03fe00) >> 9;
171- wm8753_write(codec, WM8753_PLL1CTL3 + offset, value);
172+ snd_soc_write(codec, WM8753_PLL1CTL3 + offset, value);
173
174 /* bits 8:0 = PLL_K[8:0] */
175 value = pll_div.k & 0x0001ff;
176- wm8753_write(codec, WM8753_PLL1CTL4 + offset, value);
177+ snd_soc_write(codec, WM8753_PLL1CTL4 + offset, value);
178
179 /* set PLL as input and enable */
180- wm8753_write(codec, WM8753_PLL1CTL1 + offset, 0x0027 |
181+ snd_soc_write(codec, WM8753_PLL1CTL1 + offset, 0x0027 |
182 (pll_div.div2 << 3));
183- wm8753_write(codec, WM8753_CLOCK, reg | enable);
184+ snd_soc_write(codec, WM8753_CLOCK, reg | enable);
185 }
186 return 0;
187 }
188@@ -879,7 +832,7 @@ static int wm8753_vdac_adc_set_dai_fmt(struct snd_soc_dai *codec_dai,
189 unsigned int fmt)
190 {
191 struct snd_soc_codec *codec = codec_dai->codec;
192- u16 voice = wm8753_read_reg_cache(codec, WM8753_PCM) & 0x01ec;
193+ u16 voice = snd_soc_read(codec, WM8753_PCM) & 0x01ec;
194
195 /* interface format */
196 switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
197@@ -901,7 +854,7 @@ static int wm8753_vdac_adc_set_dai_fmt(struct snd_soc_dai *codec_dai,
198 return -EINVAL;
199 }
200
201- wm8753_write(codec, WM8753_PCM, voice);
202+ snd_soc_write(codec, WM8753_PCM, voice);
203 return 0;
204 }
205
206@@ -922,8 +875,8 @@ static int wm8753_pcm_hw_params(struct snd_pcm_substream *substream,
207 struct snd_soc_pcm_runtime *rtd = substream->private_data;
208 struct snd_soc_codec *codec = rtd->codec;
209 struct wm8753_priv *wm8753 = snd_soc_codec_get_drvdata(codec);
210- u16 voice = wm8753_read_reg_cache(codec, WM8753_PCM) & 0x01f3;
211- u16 srate = wm8753_read_reg_cache(codec, WM8753_SRATE1) & 0x017f;
212+ u16 voice = snd_soc_read(codec, WM8753_PCM) & 0x01f3;
213+ u16 srate = snd_soc_read(codec, WM8753_SRATE1) & 0x017f;
214
215 /* bit size */
216 switch (params_format(params)) {
217@@ -943,9 +896,9 @@ static int wm8753_pcm_hw_params(struct snd_pcm_substream *substream,
218 /* sample rate */
219 if (params_rate(params) * 384 == wm8753->pcmclk)
220 srate |= 0x80;
221- wm8753_write(codec, WM8753_SRATE1, srate);
222+ snd_soc_write(codec, WM8753_SRATE1, srate);
223
224- wm8753_write(codec, WM8753_PCM, voice);
225+ snd_soc_write(codec, WM8753_PCM, voice);
226 return 0;
227 }
228
229@@ -958,8 +911,8 @@ static int wm8753_pcm_set_dai_fmt(struct snd_soc_dai *codec_dai,
230 struct snd_soc_codec *codec = codec_dai->codec;
231 u16 voice, ioctl;
232
233- voice = wm8753_read_reg_cache(codec, WM8753_PCM) & 0x011f;
234- ioctl = wm8753_read_reg_cache(codec, WM8753_IOCTL) & 0x015d;
235+ voice = snd_soc_read(codec, WM8753_PCM) & 0x011f;
236+ ioctl = snd_soc_read(codec, WM8753_IOCTL) & 0x015d;
237
238 /* set master/slave audio interface */
239 switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
240@@ -1013,8 +966,8 @@ static int wm8753_pcm_set_dai_fmt(struct snd_soc_dai *codec_dai,
241 return -EINVAL;
242 }
243
244- wm8753_write(codec, WM8753_PCM, voice);
245- wm8753_write(codec, WM8753_IOCTL, ioctl);
246+ snd_soc_write(codec, WM8753_PCM, voice);
247+ snd_soc_write(codec, WM8753_IOCTL, ioctl);
248 return 0;
249 }
250
251@@ -1026,16 +979,16 @@ static int wm8753_set_dai_clkdiv(struct snd_soc_dai *codec_dai,
252
253 switch (div_id) {
254 case WM8753_PCMDIV:
255- reg = wm8753_read_reg_cache(codec, WM8753_CLOCK) & 0x003f;
256- wm8753_write(codec, WM8753_CLOCK, reg | div);
257+ reg = snd_soc_read(codec, WM8753_CLOCK) & 0x003f;
258+ snd_soc_write(codec, WM8753_CLOCK, reg | div);
259 break;
260 case WM8753_BCLKDIV:
261- reg = wm8753_read_reg_cache(codec, WM8753_SRATE2) & 0x01c7;
262- wm8753_write(codec, WM8753_SRATE2, reg | div);
263+ reg = snd_soc_read(codec, WM8753_SRATE2) & 0x01c7;
264+ snd_soc_write(codec, WM8753_SRATE2, reg | div);
265 break;
266 case WM8753_VXCLKDIV:
267- reg = wm8753_read_reg_cache(codec, WM8753_SRATE2) & 0x003f;
268- wm8753_write(codec, WM8753_SRATE2, reg | div);
269+ reg = snd_soc_read(codec, WM8753_SRATE2) & 0x003f;
270+ snd_soc_write(codec, WM8753_SRATE2, reg | div);
271 break;
272 default:
273 return -EINVAL;
274@@ -1050,7 +1003,7 @@ static int wm8753_hdac_set_dai_fmt(struct snd_soc_dai *codec_dai,
275 unsigned int fmt)
276 {
277 struct snd_soc_codec *codec = codec_dai->codec;
278- u16 hifi = wm8753_read_reg_cache(codec, WM8753_HIFI) & 0x01e0;
279+ u16 hifi = snd_soc_read(codec, WM8753_HIFI) & 0x01e0;
280
281 /* interface format */
282 switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
283@@ -1072,7 +1025,7 @@ static int wm8753_hdac_set_dai_fmt(struct snd_soc_dai *codec_dai,
284 return -EINVAL;
285 }
286
287- wm8753_write(codec, WM8753_HIFI, hifi);
288+ snd_soc_write(codec, WM8753_HIFI, hifi);
289 return 0;
290 }
291
292@@ -1085,8 +1038,8 @@ static int wm8753_i2s_set_dai_fmt(struct snd_soc_dai *codec_dai,
293 struct snd_soc_codec *codec = codec_dai->codec;
294 u16 ioctl, hifi;
295
296- hifi = wm8753_read_reg_cache(codec, WM8753_HIFI) & 0x011f;
297- ioctl = wm8753_read_reg_cache(codec, WM8753_IOCTL) & 0x00ae;
298+ hifi = snd_soc_read(codec, WM8753_HIFI) & 0x011f;
299+ ioctl = snd_soc_read(codec, WM8753_IOCTL) & 0x00ae;
300
301 /* set master/slave audio interface */
302 switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
303@@ -1140,8 +1093,8 @@ static int wm8753_i2s_set_dai_fmt(struct snd_soc_dai *codec_dai,
304 return -EINVAL;
305 }
306
307- wm8753_write(codec, WM8753_HIFI, hifi);
308- wm8753_write(codec, WM8753_IOCTL, ioctl);
309+ snd_soc_write(codec, WM8753_HIFI, hifi);
310+ snd_soc_write(codec, WM8753_IOCTL, ioctl);
311 return 0;
312 }
313
314@@ -1162,8 +1115,8 @@ static int wm8753_i2s_hw_params(struct snd_pcm_substream *substream,
315 struct snd_soc_pcm_runtime *rtd = substream->private_data;
316 struct snd_soc_codec *codec = rtd->codec;
317 struct wm8753_priv *wm8753 = snd_soc_codec_get_drvdata(codec);
318- u16 srate = wm8753_read_reg_cache(codec, WM8753_SRATE1) & 0x01c0;
319- u16 hifi = wm8753_read_reg_cache(codec, WM8753_HIFI) & 0x01f3;
320+ u16 srate = snd_soc_read(codec, WM8753_SRATE1) & 0x01c0;
321+ u16 hifi = snd_soc_read(codec, WM8753_HIFI) & 0x01f3;
322 int coeff;
323
324 /* is digital filter coefficient valid ? */
325@@ -1172,7 +1125,7 @@ static int wm8753_i2s_hw_params(struct snd_pcm_substream *substream,
326 printk(KERN_ERR "wm8753 invalid MCLK or rate\n");
327 return coeff;
328 }
329- wm8753_write(codec, WM8753_SRATE1, srate | (coeff_div[coeff].sr << 1) |
330+ snd_soc_write(codec, WM8753_SRATE1, srate | (coeff_div[coeff].sr << 1) |
331 coeff_div[coeff].usb);
332
333 /* bit size */
334@@ -1190,7 +1143,7 @@ static int wm8753_i2s_hw_params(struct snd_pcm_substream *substream,
335 break;
336 }
337
338- wm8753_write(codec, WM8753_HIFI, hifi);
339+ snd_soc_write(codec, WM8753_HIFI, hifi);
340 return 0;
341 }
342
343@@ -1201,8 +1154,8 @@ static int wm8753_mode1v_set_dai_fmt(struct snd_soc_dai *codec_dai,
344 u16 clock;
345
346 /* set clk source as pcmclk */
347- clock = wm8753_read_reg_cache(codec, WM8753_CLOCK) & 0xfffb;
348- wm8753_write(codec, WM8753_CLOCK, clock);
349+ clock = snd_soc_read(codec, WM8753_CLOCK) & 0xfffb;
350+ snd_soc_write(codec, WM8753_CLOCK, clock);
351
352 if (wm8753_vdac_adc_set_dai_fmt(codec_dai, fmt) < 0)
353 return -EINVAL;
354@@ -1224,8 +1177,8 @@ static int wm8753_mode2_set_dai_fmt(struct snd_soc_dai *codec_dai,
355 u16 clock;
356
357 /* set clk source as pcmclk */
358- clock = wm8753_read_reg_cache(codec, WM8753_CLOCK) & 0xfffb;
359- wm8753_write(codec, WM8753_CLOCK, clock);
360+ clock = snd_soc_read(codec, WM8753_CLOCK) & 0xfffb;
361+ snd_soc_write(codec, WM8753_CLOCK, clock);
362
363 if (wm8753_vdac_adc_set_dai_fmt(codec_dai, fmt) < 0)
364 return -EINVAL;
365@@ -1239,8 +1192,8 @@ static int wm8753_mode3_4_set_dai_fmt(struct snd_soc_dai *codec_dai,
366 u16 clock;
367
368 /* set clk source as mclk */
369- clock = wm8753_read_reg_cache(codec, WM8753_CLOCK) & 0xfffb;
370- wm8753_write(codec, WM8753_CLOCK, clock | 0x4);
371+ clock = snd_soc_read(codec, WM8753_CLOCK) & 0xfffb;
372+ snd_soc_write(codec, WM8753_CLOCK, clock | 0x4);
373
374 if (wm8753_hdac_set_dai_fmt(codec_dai, fmt) < 0)
375 return -EINVAL;
376@@ -1252,19 +1205,19 @@ static int wm8753_mode3_4_set_dai_fmt(struct snd_soc_dai *codec_dai,
377 static int wm8753_mute(struct snd_soc_dai *dai, int mute)
378 {
379 struct snd_soc_codec *codec = dai->codec;
380- u16 mute_reg = wm8753_read_reg_cache(codec, WM8753_DAC) & 0xfff7;
381+ u16 mute_reg = snd_soc_read(codec, WM8753_DAC) & 0xfff7;
382 struct wm8753_priv *wm8753 = snd_soc_codec_get_drvdata(codec);
383
384 /* the digital mute covers the HiFi and Voice DAC's on the WM8753.
385 * make sure we check if they are not both active when we mute */
386 if (mute && wm8753->dai_func == 1) {
387 if (!codec->active)
388- wm8753_write(codec, WM8753_DAC, mute_reg | 0x8);
389+ snd_soc_write(codec, WM8753_DAC, mute_reg | 0x8);
390 } else {
391 if (mute)
392- wm8753_write(codec, WM8753_DAC, mute_reg | 0x8);
393+ snd_soc_write(codec, WM8753_DAC, mute_reg | 0x8);
394 else
395- wm8753_write(codec, WM8753_DAC, mute_reg);
396+ snd_soc_write(codec, WM8753_DAC, mute_reg);
397 }
398
399 return 0;
400@@ -1273,23 +1226,23 @@ static int wm8753_mute(struct snd_soc_dai *dai, int mute)
401 static int wm8753_set_bias_level(struct snd_soc_codec *codec,
402 enum snd_soc_bias_level level)
403 {
404- u16 pwr_reg = wm8753_read_reg_cache(codec, WM8753_PWR1) & 0xfe3e;
405+ u16 pwr_reg = snd_soc_read(codec, WM8753_PWR1) & 0xfe3e;
406
407 switch (level) {
408 case SND_SOC_BIAS_ON:
409 /* set vmid to 50k and unmute dac */
410- wm8753_write(codec, WM8753_PWR1, pwr_reg | 0x00c0);
411+ snd_soc_write(codec, WM8753_PWR1, pwr_reg | 0x00c0);
412 break;
413 case SND_SOC_BIAS_PREPARE:
414 /* set vmid to 5k for quick power up */
415- wm8753_write(codec, WM8753_PWR1, pwr_reg | 0x01c1);
416+ snd_soc_write(codec, WM8753_PWR1, pwr_reg | 0x01c1);
417 break;
418 case SND_SOC_BIAS_STANDBY:
419 /* mute dac and set vmid to 500k, enable VREF */
420- wm8753_write(codec, WM8753_PWR1, pwr_reg | 0x0141);
421+ snd_soc_write(codec, WM8753_PWR1, pwr_reg | 0x0141);
422 break;
423 case SND_SOC_BIAS_OFF:
424- wm8753_write(codec, WM8753_PWR1, 0x0001);
425+ snd_soc_write(codec, WM8753_PWR1, 0x0001);
426 break;
427 }
428 codec->bias_level = level;
429@@ -1477,7 +1430,7 @@ static void wm8753_set_dai_mode(struct snd_soc_codec *codec,
430 else
431 dai->driver = &wm8753_all_dai[(wm8753->dai_func << 1) + 1];
432 }
433- wm8753_write(codec, WM8753_IOCTL, wm8753->dai_func);
434+ snd_soc_write(codec, WM8753_IOCTL, wm8753->dai_func);
435 }
436
437 static void wm8753_work(struct work_struct *work)
438@@ -1495,22 +1448,19 @@ static int wm8753_suspend(struct snd_soc_codec *codec, pm_message_t state)
439
440 static int wm8753_resume(struct snd_soc_codec *codec)
441 {
442+ u16 *reg_cache = codec->reg_cache;
443 int i;
444- u8 data[2];
445- u16 *cache = codec->reg_cache;
446
447 /* Sync reg_cache with the hardware */
448- for (i = 0; i < ARRAY_SIZE(wm8753_reg); i++) {
449- if (i + 1 == WM8753_RESET)
450+ for (i = 1; i < ARRAY_SIZE(wm8753_reg); i++) {
451+ if (i == WM8753_RESET)
452 continue;
453
454 /* No point in writing hardware default values back */
455- if (cache[i] == wm8753_reg[i])
456+ if (reg_cache[i] == wm8753_reg[i])
457 continue;
458
459- data[0] = ((i + 1) << 1) | ((cache[i] >> 8) & 0x0001);
460- data[1] = cache[i] & 0x00ff;
461- codec->hw_write(codec->control_data, data, 2);
462+ snd_soc_write(codec, i, reg_cache[i]);
463 }
464
465 wm8753_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
466@@ -1548,7 +1498,7 @@ static int run_delayed_work(struct delayed_work *dwork)
467 static int wm8753_probe(struct snd_soc_codec *codec)
468 {
469 struct wm8753_priv *wm8753 = snd_soc_codec_get_drvdata(codec);
470- int ret = 0, reg;
471+ int ret;
472
473 INIT_DELAYED_WORK(&codec->delayed_work, wm8753_work);
474
475@@ -1573,26 +1523,16 @@ static int wm8753_probe(struct snd_soc_codec *codec)
476 msecs_to_jiffies(caps_charge));
477
478 /* set the update bits */
479- reg = wm8753_read_reg_cache(codec, WM8753_LDAC);
480- wm8753_write(codec, WM8753_LDAC, reg | 0x0100);
481- reg = wm8753_read_reg_cache(codec, WM8753_RDAC);
482- wm8753_write(codec, WM8753_RDAC, reg | 0x0100);
483- reg = wm8753_read_reg_cache(codec, WM8753_LADC);
484- wm8753_write(codec, WM8753_LADC, reg | 0x0100);
485- reg = wm8753_read_reg_cache(codec, WM8753_RADC);
486- wm8753_write(codec, WM8753_RADC, reg | 0x0100);
487- reg = wm8753_read_reg_cache(codec, WM8753_LOUT1V);
488- wm8753_write(codec, WM8753_LOUT1V, reg | 0x0100);
489- reg = wm8753_read_reg_cache(codec, WM8753_ROUT1V);
490- wm8753_write(codec, WM8753_ROUT1V, reg | 0x0100);
491- reg = wm8753_read_reg_cache(codec, WM8753_LOUT2V);
492- wm8753_write(codec, WM8753_LOUT2V, reg | 0x0100);
493- reg = wm8753_read_reg_cache(codec, WM8753_ROUT2V);
494- wm8753_write(codec, WM8753_ROUT2V, reg | 0x0100);
495- reg = wm8753_read_reg_cache(codec, WM8753_LINVOL);
496- wm8753_write(codec, WM8753_LINVOL, reg | 0x0100);
497- reg = wm8753_read_reg_cache(codec, WM8753_RINVOL);
498- wm8753_write(codec, WM8753_RINVOL, reg | 0x0100);
499+ snd_soc_update_bits(codec, WM8753_LDAC, 0x0100, 0x0100);
500+ snd_soc_update_bits(codec, WM8753_RDAC, 0x0100, 0x0100);
501+ snd_soc_update_bits(codec, WM8753_LDAC, 0x0100, 0x0100);
502+ snd_soc_update_bits(codec, WM8753_RDAC, 0x0100, 0x0100);
503+ snd_soc_update_bits(codec, WM8753_LOUT1V, 0x0100, 0x0100);
504+ snd_soc_update_bits(codec, WM8753_ROUT1V, 0x0100, 0x0100);
505+ snd_soc_update_bits(codec, WM8753_LOUT2V, 0x0100, 0x0100);
506+ snd_soc_update_bits(codec, WM8753_ROUT2V, 0x0100, 0x0100);
507+ snd_soc_update_bits(codec, WM8753_LINVOL, 0x0100, 0x0100);
508+ snd_soc_update_bits(codec, WM8753_RINVOL, 0x0100, 0x0100);
509
510 snd_soc_add_controls(codec, wm8753_snd_controls,
511 ARRAY_SIZE(wm8753_snd_controls));
512--
5131.6.6.1
514
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0026-KVM-MMU-Fix-incorrect-direct-gfn-for-unpaged-mode-sh.patch b/extras/recipes-kernel/linux/linux-omap/linus/0026-KVM-MMU-Fix-incorrect-direct-gfn-for-unpaged-mode-sh.patch
new file mode 100644
index 00000000..9372cf05
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0026-KVM-MMU-Fix-incorrect-direct-gfn-for-unpaged-mode-sh.patch
@@ -0,0 +1,35 @@
1From 22c5ed7018eb4157e317c8513fe2ced2c8ec5e0c Mon Sep 17 00:00:00 2001
2From: Avi Kivity <avi@redhat.com>
3Date: Tue, 28 Dec 2010 12:09:07 +0200
4Subject: [PATCH 26/65] KVM: MMU: Fix incorrect direct gfn for unpaged mode shadow
5
6We use the physical address instead of the base gfn for the four
7PAE page directories we use in unpaged mode. When the guest accesses
8an address above 1GB that is backed by a large host page, a BUG_ON()
9in kvm_mmu_set_gfn() triggers.
10
11Resolves: https://bugzilla.kernel.org/show_bug.cgi?id=21962
12Reported-and-tested-by: Nicolas Prochazka <prochazka.nicolas@gmail.com>
13KVM-Stable-Tag.
14Signed-off-by: Avi Kivity <avi@redhat.com>
15---
16 arch/x86/kvm/mmu.c | 3 ++-
17 1 files changed, 2 insertions(+), 1 deletions(-)
18
19diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
20index fb8b376..fbb04ae 100644
21--- a/arch/x86/kvm/mmu.c
22+++ b/arch/x86/kvm/mmu.c
23@@ -2394,7 +2394,8 @@ static int mmu_alloc_direct_roots(struct kvm_vcpu *vcpu)
24 ASSERT(!VALID_PAGE(root));
25 spin_lock(&vcpu->kvm->mmu_lock);
26 kvm_mmu_free_some_pages(vcpu);
27- sp = kvm_mmu_get_page(vcpu, i << 30, i << 30,
28+ sp = kvm_mmu_get_page(vcpu, i << (30 - PAGE_SHIFT),
29+ i << 30,
30 PT32_ROOT_LEVEL, 1, ACC_ALL,
31 NULL);
32 root = __pa(sp->spt);
33--
341.6.6.1
35
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0027-fix-freeing-user_struct-in-user-cache.patch b/extras/recipes-kernel/linux/linux-omap/linus/0027-fix-freeing-user_struct-in-user-cache.patch
new file mode 100644
index 00000000..8ddca9c1
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0027-fix-freeing-user_struct-in-user-cache.patch
@@ -0,0 +1,34 @@
1From 2bffbb04acdf2e58726ba8192d468f2bda528fdf Mon Sep 17 00:00:00 2001
2From: Hillf Danton <dhillf@gmail.com>
3Date: Wed, 29 Dec 2010 21:55:28 +0800
4Subject: [PATCH 27/65] fix freeing user_struct in user cache
5
6When racing on adding into user cache, the new allocated from mm slab
7is freed without putting user namespace.
8
9Since the user namespace is already operated by getting, putting has
10to be issued.
11
12Signed-off-by: Hillf Danton <dhillf@gmail.com>
13Acked-by: Serge Hallyn <serge@hallyn.com>
14Cc: stable@kernel.org
15Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16---
17 kernel/user.c | 1 +
18 1 files changed, 1 insertions(+), 0 deletions(-)
19
20diff --git a/kernel/user.c b/kernel/user.c
21index 2c7d8d5..5c598ca 100644
22--- a/kernel/user.c
23+++ b/kernel/user.c
24@@ -158,6 +158,7 @@ struct user_struct *alloc_uid(struct user_namespace *ns, uid_t uid)
25 spin_lock_irq(&uidhash_lock);
26 up = uid_hash_find(uid, hashent);
27 if (up) {
28+ put_user_ns(ns);
29 key_put(new->uid_keyring);
30 key_put(new->session_keyring);
31 kmem_cache_free(uid_cachep, new);
32--
331.6.6.1
34
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0028-spi-omap2_mcspi.c-Force-CS-to-be-in-inactive-state-a.patch b/extras/recipes-kernel/linux/linux-omap/linus/0028-spi-omap2_mcspi.c-Force-CS-to-be-in-inactive-state-a.patch
new file mode 100644
index 00000000..4c3acd7c
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0028-spi-omap2_mcspi.c-Force-CS-to-be-in-inactive-state-a.patch
@@ -0,0 +1,111 @@
1From 72ce69f5fe32170f9662b5c87b0226d6ba19462f Mon Sep 17 00:00:00 2001
2From: Gregory CLEMENT <gregory.clement@free-electrons.com>
3Date: Wed, 29 Dec 2010 11:52:53 +0100
4Subject: [PATCH 28/65] spi/omap2_mcspi.c: Force CS to be in inactive state after off-mode transition
5
6When SPI wake up from OFF mode, CS is in the wrong state: force it to the
7inactive state.
8
9During the system life, I monitored the CS behavior using a oscilloscope.
10I also activated debug in omap2_mcspi, so I saw when driver disable the clocks
11and restore context when device is not used.Each time the CS was in the correct
12state. It was only when system was put suspend to ram with off-mode activated
13that on resume the CS was in wrong state( ie activated).
14
15Changelog:
16* Change from v1 to v2:
17 - Rebase on linus/master (after 2.6.37-rc1)
18 - Do some clean-up and fix indentation on both patches
19 - Add more explanations for patch 2
20
21* Change from v2 to v3:
22 - Use directly resume function of spi_master instead of using function
23 - from spi_device as Grant Likely pointed it out.
24 - Force this transition explicitly for each CS used by a device.
25
26* Change from v3 to v4:
27 - Patch clean-up according to Kevin Hilman and checkpatch.
28 - Now force CS to be in inactive state only if it was inactive when it was
29 suspended.
30
31* Change from v4 to v5:
32 - Rebase on linus/master (after 2.6.37-rc3)
33 - Collapse some lines as pointed by Grant Likely
34 - Fix a spelling
35
36* Change from v5 to v6:
37 - Rebase on linus/master (after 2.6.37-rc7)
38 - Use CONFIG_SUSPEND instead of CONFIG_PM
39 - Didn't use legacy PM methods anymore. Instead, add a struct dev_pm_ops and
40 add the resume method there.
41 - Fix multi-line comment style
42
43* Change from v6 to v7:
44 - Rebase on linus/master (after 2.6.37-rc8)
45 - Drop an extra line
46
47Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
48Acked-by: David Brownell <dbrownell@users.sourceforge.net>
49Reviewed-by: Kevin Hilman <khilman@deeprootsystems.com>
50Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
51---
52 drivers/spi/omap2_mcspi.c | 39 +++++++++++++++++++++++++++++++++++++++
53 1 files changed, 39 insertions(+), 0 deletions(-)
54
55diff --git a/drivers/spi/omap2_mcspi.c b/drivers/spi/omap2_mcspi.c
56index 2a651e6..951a160 100644
57--- a/drivers/spi/omap2_mcspi.c
58+++ b/drivers/spi/omap2_mcspi.c
59@@ -1305,10 +1305,49 @@ static int __exit omap2_mcspi_remove(struct platform_device *pdev)
60 /* work with hotplug and coldplug */
61 MODULE_ALIAS("platform:omap2_mcspi");
62
63+#ifdef CONFIG_SUSPEND
64+/*
65+ * When SPI wake up from off-mode, CS is in activate state. If it was in
66+ * unactive state when driver was suspend, then force it to unactive state at
67+ * wake up.
68+ */
69+static int omap2_mcspi_resume(struct device *dev)
70+{
71+ struct spi_master *master = dev_get_drvdata(dev);
72+ struct omap2_mcspi *mcspi = spi_master_get_devdata(master);
73+ struct omap2_mcspi_cs *cs;
74+
75+ omap2_mcspi_enable_clocks(mcspi);
76+ list_for_each_entry(cs, &omap2_mcspi_ctx[master->bus_num - 1].cs,
77+ node) {
78+ if ((cs->chconf0 & OMAP2_MCSPI_CHCONF_FORCE) == 0) {
79+
80+ /*
81+ * We need to toggle CS state for OMAP take this
82+ * change in account.
83+ */
84+ MOD_REG_BIT(cs->chconf0, OMAP2_MCSPI_CHCONF_FORCE, 1);
85+ __raw_writel(cs->chconf0, cs->base + OMAP2_MCSPI_CHCONF0);
86+ MOD_REG_BIT(cs->chconf0, OMAP2_MCSPI_CHCONF_FORCE, 0);
87+ __raw_writel(cs->chconf0, cs->base + OMAP2_MCSPI_CHCONF0);
88+ }
89+ }
90+ omap2_mcspi_disable_clocks(mcspi);
91+ return 0;
92+}
93+#else
94+#define omap2_mcspi_resume NULL
95+#endif
96+
97+static const struct dev_pm_ops omap2_mcspi_pm_ops = {
98+ .resume = omap2_mcspi_resume,
99+};
100+
101 static struct platform_driver omap2_mcspi_driver = {
102 .driver = {
103 .name = "omap2_mcspi",
104 .owner = THIS_MODULE,
105+ .pm = &omap2_mcspi_pm_ops
106 },
107 .remove = __exit_p(omap2_mcspi_remove),
108 };
109--
1101.6.6.1
111
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0029-kconfig-fix-undesirable-side-effect-of-adding-visibl.patch b/extras/recipes-kernel/linux/linux-omap/linus/0029-kconfig-fix-undesirable-side-effect-of-adding-visibl.patch
new file mode 100644
index 00000000..c1af0112
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0029-kconfig-fix-undesirable-side-effect-of-adding-visibl.patch
@@ -0,0 +1,49 @@
1From 38f5b0c391281eded0e6e5b2bc75a28ae72d0abe Mon Sep 17 00:00:00 2001
2From: Jan Beulich <JBeulich@novell.com>
3Date: Thu, 9 Dec 2010 08:11:38 +0000
4Subject: [PATCH 29/65] kconfig: fix undesirable side effect of adding "visible" menu attribute
5
6This lead to non-selected, non-user-selectable options to be written
7out to .config. This is not only pointless, but also preventing the
8user to be prompted should any of those options eventually become
9visible (e.g. by de-selecting the *_AUTO options the "visible"
10attribute was added for.
11
12Furthermore it is quite logical for the "visible" attribute of a menu
13to control the visibility of all contained prompts, which is what the
14patch does.
15
16Signed-off-by: Jan Beulich <jbeulich@novell.com>
17Signed-off-by: Michal Marek <mmarek@suse.cz>
18---
19 scripts/kconfig/menu.c | 14 ++++++++++++++
20 1 files changed, 14 insertions(+), 0 deletions(-)
21
22diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
23index b9d9aa1..5f77dcb 100644
24--- a/scripts/kconfig/menu.c
25+++ b/scripts/kconfig/menu.c
26@@ -140,6 +140,20 @@ struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *e
27 }
28 if (current_entry->prompt && current_entry != &rootmenu)
29 prop_warn(prop, "prompt redefined");
30+
31+ /* Apply all upper menus' visibilities to actual prompts. */
32+ if(type == P_PROMPT) {
33+ struct menu *menu = current_entry;
34+
35+ while ((menu = menu->parent) != NULL) {
36+ if (!menu->visibility)
37+ continue;
38+ prop->visible.expr
39+ = expr_alloc_and(prop->visible.expr,
40+ menu->visibility);
41+ }
42+ }
43+
44 current_entry->prompt = prop;
45 }
46 prop->text = prompt;
47--
481.6.6.1
49
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0030-spi-m68knommu-Coldfire-QSPI-platform-support.patch b/extras/recipes-kernel/linux/linux-omap/linus/0030-spi-m68knommu-Coldfire-QSPI-platform-support.patch
new file mode 100644
index 00000000..c6dcff2c
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0030-spi-m68knommu-Coldfire-QSPI-platform-support.patch
@@ -0,0 +1,33 @@
1From 806e90c4e5253095f9576113edc6fc78b2d5fec1 Mon Sep 17 00:00:00 2001
2From: Jate Sujjavanich <jsujjavanich@syntech-fuelmaster.com>
3Date: Wed, 29 Sep 2010 09:44:32 -0400
4Subject: [PATCH 30/65] spi/m68knommu: Coldfire QSPI platform support
5
6After grabbing a msg from the msgq, the mcfqspi_work function calls
7list_del_init on the mcfqspi->msgq which unintentionally deletes the rest
8of the list before it can be processed. If qspi call was made using
9spi_sync, this can result in a process hang.
10
11Signed-off-by: Jate Sujjavanich <jsujjavanich@syntech-fuelmaster.com>
12Acked-by: Steven King <sfking@fdwdc.com>
13Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
14---
15 drivers/spi/coldfire_qspi.c | 2 +-
16 1 files changed, 1 insertions(+), 1 deletions(-)
17
18diff --git a/drivers/spi/coldfire_qspi.c b/drivers/spi/coldfire_qspi.c
19index 052b3c7..8856bcc 100644
20--- a/drivers/spi/coldfire_qspi.c
21+++ b/drivers/spi/coldfire_qspi.c
22@@ -317,7 +317,7 @@ static void mcfqspi_work(struct work_struct *work)
23 msg = container_of(mcfqspi->msgq.next, struct spi_message,
24 queue);
25
26- list_del_init(&mcfqspi->msgq);
27+ list_del_init(&msg->queue);
28 spin_unlock_irqrestore(&mcfqspi->lock, flags);
29
30 spi = msg->spi;
31--
321.6.6.1
33
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0031-sound-Prevent-buffer-overflow-in-OSS-load_mixer_volu.patch b/extras/recipes-kernel/linux/linux-omap/linus/0031-sound-Prevent-buffer-overflow-in-OSS-load_mixer_volu.patch
new file mode 100644
index 00000000..473a408d
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0031-sound-Prevent-buffer-overflow-in-OSS-load_mixer_volu.patch
@@ -0,0 +1,47 @@
1From 6540a62434750fe29b877293e54dbf05c0fb54c4 Mon Sep 17 00:00:00 2001
2From: Dan Rosenberg <drosenberg@vsecurity.com>
3Date: Sat, 25 Dec 2010 16:23:40 -0500
4Subject: [PATCH 31/65] sound: Prevent buffer overflow in OSS load_mixer_volumes
5
6The load_mixer_volumes() function, which can be triggered by
7unprivileged users via the SOUND_MIXER_SETLEVELS ioctl, is vulnerable to
8a buffer overflow. Because the provided "name" argument isn't
9guaranteed to be NULL terminated at the expected 32 bytes, it's possible
10to overflow past the end of the last element in the mixer_vols array.
11Further exploitation can result in an arbitrary kernel write (via
12subsequent calls to load_mixer_volumes()) leading to privilege
13escalation, or arbitrary kernel reads via get_mixer_levels(). In
14addition, the strcmp() may leak bytes beyond the mixer_vols array.
15
16Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com>
17Cc: stable <stable@kernel.org>
18Signed-off-by: Takashi Iwai <tiwai@suse.de>
19---
20 sound/oss/soundcard.c | 4 ++--
21 1 files changed, 2 insertions(+), 2 deletions(-)
22
23diff --git a/sound/oss/soundcard.c b/sound/oss/soundcard.c
24index 46c0d03..fcb14a0 100644
25--- a/sound/oss/soundcard.c
26+++ b/sound/oss/soundcard.c
27@@ -87,7 +87,7 @@ int *load_mixer_volumes(char *name, int *levels, int present)
28 int i, n;
29
30 for (i = 0; i < num_mixer_volumes; i++) {
31- if (strcmp(name, mixer_vols[i].name) == 0) {
32+ if (strncmp(name, mixer_vols[i].name, 32) == 0) {
33 if (present)
34 mixer_vols[i].num = i;
35 return mixer_vols[i].levels;
36@@ -99,7 +99,7 @@ int *load_mixer_volumes(char *name, int *levels, int present)
37 }
38 n = num_mixer_volumes++;
39
40- strcpy(mixer_vols[n].name, name);
41+ strncpy(mixer_vols[n].name, name, 32);
42
43 if (present)
44 mixer_vols[n].num = n;
45--
461.6.6.1
47
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0032-ALSA-hda-Use-LPIB-quirk-for-Dell-Inspiron-m101z-1120.patch b/extras/recipes-kernel/linux/linux-omap/linus/0032-ALSA-hda-Use-LPIB-quirk-for-Dell-Inspiron-m101z-1120.patch
new file mode 100644
index 00000000..048a3db1
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0032-ALSA-hda-Use-LPIB-quirk-for-Dell-Inspiron-m101z-1120.patch
@@ -0,0 +1,32 @@
1From 927b580b918babc2ecc22a1ae1b6deef428d933f Mon Sep 17 00:00:00 2001
2From: Daniel T Chen <crimsun@ubuntu.com>
3Date: Tue, 28 Dec 2010 17:20:02 -0500
4Subject: [PATCH 32/65] ALSA: hda: Use LPIB quirk for Dell Inspiron m101z/1120
5
6Sjoerd Simons reports that, without using position_fix=1, recording
7experiences overruns. Work around that by applying the LPIB quirk
8for his hardware.
9
10Reported-and-tested-by: Sjoerd Simons <sjoerd@debian.org>
11Cc: <stable@kernel.org>
12Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
13Signed-off-by: Takashi Iwai <tiwai@suse.de>
14---
15 sound/pci/hda/hda_intel.c | 1 +
16 1 files changed, 1 insertions(+), 0 deletions(-)
17
18diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
19index b030c8e..a1c4008 100644
20--- a/sound/pci/hda/hda_intel.c
21+++ b/sound/pci/hda/hda_intel.c
22@@ -2300,6 +2300,7 @@ static struct snd_pci_quirk position_fix_list[] __devinitdata = {
23 SND_PCI_QUIRK(0x1028, 0x01cc, "Dell D820", POS_FIX_LPIB),
24 SND_PCI_QUIRK(0x1028, 0x01de, "Dell Precision 390", POS_FIX_LPIB),
25 SND_PCI_QUIRK(0x1028, 0x01f6, "Dell Latitude 131L", POS_FIX_LPIB),
26+ SND_PCI_QUIRK(0x1028, 0x0470, "Dell Inspiron 1120", POS_FIX_LPIB),
27 SND_PCI_QUIRK(0x103c, 0x306d, "HP dv3", POS_FIX_LPIB),
28 SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", POS_FIX_LPIB),
29 SND_PCI_QUIRK(0x1043, 0x81b3, "ASUS", POS_FIX_LPIB),
30--
311.6.6.1
32
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0033-Revert-drm-i915-bios-Reverse-order-of-100-120-Mhz-SS.patch b/extras/recipes-kernel/linux/linux-omap/linus/0033-Revert-drm-i915-bios-Reverse-order-of-100-120-Mhz-SS.patch
new file mode 100644
index 00000000..ffffd87e
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0033-Revert-drm-i915-bios-Reverse-order-of-100-120-Mhz-SS.patch
@@ -0,0 +1,33 @@
1From 5cd3371a75c27fe5b105037b1a9a53b661a3624e Mon Sep 17 00:00:00 2001
2From: Chris Wilson <chris@chris-wilson.co.uk>
3Date: Thu, 30 Dec 2010 09:07:15 +0000
4Subject: [PATCH 33/65] Revert "drm/i915/bios: Reverse order of 100/120 Mhz SSC clocks"
5
6As I feared, whilst this fixed the clocks for the Lenovo U160, it broke
7many other machines. So lets reverts commit 448f53a1ede54eb854d036abf
8and search for the real bug.
9
10Reported-and-tested-by: Travis Hume <travis@computoring.org> [et al]
11Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=25842
12Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32698
13Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
14---
15 drivers/gpu/drm/i915/intel_bios.c | 2 +-
16 1 files changed, 1 insertions(+), 1 deletions(-)
17
18diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
19index 2b20786..b0b1200 100644
20--- a/drivers/gpu/drm/i915/intel_bios.c
21+++ b/drivers/gpu/drm/i915/intel_bios.c
22@@ -270,7 +270,7 @@ parse_general_features(struct drm_i915_private *dev_priv,
23 general->ssc_freq ? 66 : 48;
24 else if (IS_GEN5(dev) || IS_GEN6(dev))
25 dev_priv->lvds_ssc_freq =
26- general->ssc_freq ? 120 : 100;
27+ general->ssc_freq ? 100 : 120;
28 else
29 dev_priv->lvds_ssc_freq =
30 general->ssc_freq ? 100 : 96;
31--
321.6.6.1
33
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0034-drm-i915-dvo-Report-LVDS-attached-to-ch701x-as-conne.patch b/extras/recipes-kernel/linux/linux-omap/linus/0034-drm-i915-dvo-Report-LVDS-attached-to-ch701x-as-conne.patch
new file mode 100644
index 00000000..8747c9f2
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0034-drm-i915-dvo-Report-LVDS-attached-to-ch701x-as-conne.patch
@@ -0,0 +1,30 @@
1From a5cbe1d2c6eede52b1773eefcff8e3c1c171b99b Mon Sep 17 00:00:00 2001
2From: Chris Wilson <chris@chris-wilson.co.uk>
3Date: Thu, 30 Dec 2010 12:54:00 +0000
4Subject: [PATCH 34/65] drm/i915/dvo: Report LVDS attached to ch701x as connected
5
6As we have already detected something attached to the chip during
7initialisation, always report the LVDS connector status as connected
8during probing.
9
10Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11---
12 drivers/gpu/drm/i915/dvo_ch7017.c | 2 +-
13 1 files changed, 1 insertions(+), 1 deletions(-)
14
15diff --git a/drivers/gpu/drm/i915/dvo_ch7017.c b/drivers/gpu/drm/i915/dvo_ch7017.c
16index af70337..d3e8c54 100644
17--- a/drivers/gpu/drm/i915/dvo_ch7017.c
18+++ b/drivers/gpu/drm/i915/dvo_ch7017.c
19@@ -242,7 +242,7 @@ fail:
20
21 static enum drm_connector_status ch7017_detect(struct intel_dvo_device *dvo)
22 {
23- return connector_status_unknown;
24+ return connector_status_connected;
25 }
26
27 static enum drm_mode_status ch7017_mode_valid(struct intel_dvo_device *dvo,
28--
291.6.6.1
30
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0035-update-Documentation-filesystems-Locking.patch b/extras/recipes-kernel/linux/linux-omap/linus/0035-update-Documentation-filesystems-Locking.patch
new file mode 100644
index 00000000..5a5610b5
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0035-update-Documentation-filesystems-Locking.patch
@@ -0,0 +1,402 @@
1From 84a03bcb1f1fb5b6a9f6f508fa0a1fae41a5827a Mon Sep 17 00:00:00 2001
2From: Christoph Hellwig <hch>
3Date: Thu, 16 Dec 2010 12:04:54 +0100
4Subject: [PATCH 35/65] update Documentation/filesystems/Locking
5
6Mostly inspired by all the recent BKL removal changes, but a lot of older
7updates also weren't properly recorded.
8
9Signed-off-by: Christoph Hellwig <hch@lst.de>
10Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11---
12 Documentation/filesystems/Locking | 214 ++++++++++++++++++-------------------
13 1 files changed, 102 insertions(+), 112 deletions(-)
14
15diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
16index b6426f1..7686e76 100644
17--- a/Documentation/filesystems/Locking
18+++ b/Documentation/filesystems/Locking
19@@ -18,7 +18,6 @@ prototypes:
20 char *(*d_dname)((struct dentry *dentry, char *buffer, int buflen);
21
22 locking rules:
23- none have BKL
24 dcache_lock rename_lock ->d_lock may block
25 d_revalidate: no no no yes
26 d_hash no no no yes
27@@ -42,18 +41,23 @@ ata *);
28 int (*rename) (struct inode *, struct dentry *,
29 struct inode *, struct dentry *);
30 int (*readlink) (struct dentry *, char __user *,int);
31- int (*follow_link) (struct dentry *, struct nameidata *);
32+ void * (*follow_link) (struct dentry *, struct nameidata *);
33+ void (*put_link) (struct dentry *, struct nameidata *, void *);
34 void (*truncate) (struct inode *);
35 int (*permission) (struct inode *, int, struct nameidata *);
36+ int (*check_acl)(struct inode *, int);
37 int (*setattr) (struct dentry *, struct iattr *);
38 int (*getattr) (struct vfsmount *, struct dentry *, struct kstat *);
39 int (*setxattr) (struct dentry *, const char *,const void *,size_t,int);
40 ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t);
41 ssize_t (*listxattr) (struct dentry *, char *, size_t);
42 int (*removexattr) (struct dentry *, const char *);
43+ void (*truncate_range)(struct inode *, loff_t, loff_t);
44+ long (*fallocate)(struct inode *inode, int mode, loff_t offset, loff_t len);
45+ int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, u64 len);
46
47 locking rules:
48- all may block, none have BKL
49+ all may block
50 i_mutex(inode)
51 lookup: yes
52 create: yes
53@@ -66,19 +70,24 @@ rmdir: yes (both) (see below)
54 rename: yes (all) (see below)
55 readlink: no
56 follow_link: no
57+put_link: no
58 truncate: yes (see below)
59 setattr: yes
60 permission: no
61+check_acl: no
62 getattr: no
63 setxattr: yes
64 getxattr: no
65 listxattr: no
66 removexattr: yes
67+truncate_range: yes
68+fallocate: no
69+fiemap: no
70 Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on
71 victim.
72 cross-directory ->rename() has (per-superblock) ->s_vfs_rename_sem.
73 ->truncate() is never called directly - it's a callback, not a
74-method. It's called by vmtruncate() - library function normally used by
75+method. It's called by vmtruncate() - deprecated library function used by
76 ->setattr(). Locking information above applies to that call (i.e. is
77 inherited from ->setattr() - vmtruncate() is used when ATTR_SIZE had been
78 passed).
79@@ -91,7 +100,7 @@ prototypes:
80 struct inode *(*alloc_inode)(struct super_block *sb);
81 void (*destroy_inode)(struct inode *);
82 void (*dirty_inode) (struct inode *);
83- int (*write_inode) (struct inode *, int);
84+ int (*write_inode) (struct inode *, struct writeback_control *wbc);
85 int (*drop_inode) (struct inode *);
86 void (*evict_inode) (struct inode *);
87 void (*put_super) (struct super_block *);
88@@ -105,10 +114,11 @@ prototypes:
89 int (*show_options)(struct seq_file *, struct vfsmount *);
90 ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t);
91 ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t);
92+ int (*bdev_try_to_free_page)(struct super_block*, struct page*, gfp_t);
93+ int (*trim_fs) (struct super_block *, struct fstrim_range *);
94
95 locking rules:
96 All may block [not true, see below]
97- None have BKL
98 s_umount
99 alloc_inode:
100 destroy_inode:
101@@ -127,6 +137,8 @@ umount_begin: no
102 show_options: no (namespace_sem)
103 quota_read: no (see below)
104 quota_write: no (see below)
105+bdev_try_to_free_page: no (see below)
106+trim_fs: no
107
108 ->statfs() has s_umount (shared) when called by ustat(2) (native or
109 compat), but that's an accident of bad API; s_umount is used to pin
110@@ -139,19 +151,25 @@ be the only ones operating on the quota file by the quota code (via
111 dqio_sem) (unless an admin really wants to screw up something and
112 writes to quota files with quotas on). For other details about locking
113 see also dquot_operations section.
114+->bdev_try_to_free_page is called from the ->releasepage handler of
115+the block device inode. See there for more details.
116
117 --------------------------- file_system_type ---------------------------
118 prototypes:
119 int (*get_sb) (struct file_system_type *, int,
120 const char *, void *, struct vfsmount *);
121+ struct dentry *(*mount) (struct file_system_type *, int,
122+ const char *, void *);
123 void (*kill_sb) (struct super_block *);
124 locking rules:
125- may block BKL
126-get_sb yes no
127-kill_sb yes no
128+ may block
129+get_sb yes
130+mount yes
131+kill_sb yes
132
133 ->get_sb() returns error or 0 with locked superblock attached to the vfsmount
134 (exclusive on ->s_umount).
135+->mount() returns ERR_PTR or the root dentry.
136 ->kill_sb() takes a write-locked superblock, does all shutdown work on it,
137 unlocks and drops the reference.
138
139@@ -176,27 +194,35 @@ prototypes:
140 void (*freepage)(struct page *);
141 int (*direct_IO)(int, struct kiocb *, const struct iovec *iov,
142 loff_t offset, unsigned long nr_segs);
143- int (*launder_page) (struct page *);
144+ int (*get_xip_mem)(struct address_space *, pgoff_t, int, void **,
145+ unsigned long *);
146+ int (*migratepage)(struct address_space *, struct page *, struct page *);
147+ int (*launder_page)(struct page *);
148+ int (*is_partially_uptodate)(struct page *, read_descriptor_t *, unsigned long);
149+ int (*error_remove_page)(struct address_space *, struct page *);
150
151 locking rules:
152 All except set_page_dirty and freepage may block
153
154- BKL PageLocked(page) i_mutex
155-writepage: no yes, unlocks (see below)
156-readpage: no yes, unlocks
157-sync_page: no maybe
158-writepages: no
159-set_page_dirty no no
160-readpages: no
161-write_begin: no locks the page yes
162-write_end: no yes, unlocks yes
163-perform_write: no n/a yes
164-bmap: no
165-invalidatepage: no yes
166-releasepage: no yes
167-freepage: no yes
168-direct_IO: no
169-launder_page: no yes
170+ PageLocked(page) i_mutex
171+writepage: yes, unlocks (see below)
172+readpage: yes, unlocks
173+sync_page: maybe
174+writepages:
175+set_page_dirty no
176+readpages:
177+write_begin: locks the page yes
178+write_end: yes, unlocks yes
179+bmap:
180+invalidatepage: yes
181+releasepage: yes
182+freepage: yes
183+direct_IO:
184+get_xip_mem: maybe
185+migratepage: yes (both)
186+launder_page: yes
187+is_partially_uptodate: yes
188+error_remove_page: yes
189
190 ->write_begin(), ->write_end(), ->sync_page() and ->readpage()
191 may be called from the request handler (/dev/loop).
192@@ -276,9 +302,8 @@ under spinlock (it cannot block) and is sometimes called with the page
193 not locked.
194
195 ->bmap() is currently used by legacy ioctl() (FIBMAP) provided by some
196-filesystems and by the swapper. The latter will eventually go away. All
197-instances do not actually need the BKL. Please, keep it that way and don't
198-breed new callers.
199+filesystems and by the swapper. The latter will eventually go away. Please,
200+keep it that way and don't breed new callers.
201
202 ->invalidatepage() is called when the filesystem must attempt to drop
203 some or all of the buffers from the page when it is being truncated. It
204@@ -299,47 +324,37 @@ cleaned, or an error value if not. Note that in order to prevent the page
205 getting mapped back in and redirtied, it needs to be kept locked
206 across the entire operation.
207
208- Note: currently almost all instances of address_space methods are
209-using BKL for internal serialization and that's one of the worst sources
210-of contention. Normally they are calling library functions (in fs/buffer.c)
211-and pass foo_get_block() as a callback (on local block-based filesystems,
212-indeed). BKL is not needed for library stuff and is usually taken by
213-foo_get_block(). It's an overkill, since block bitmaps can be protected by
214-internal fs locking and real critical areas are much smaller than the areas
215-filesystems protect now.
216-
217 ----------------------- file_lock_operations ------------------------------
218 prototypes:
219- void (*fl_insert)(struct file_lock *); /* lock insertion callback */
220- void (*fl_remove)(struct file_lock *); /* lock removal callback */
221 void (*fl_copy_lock)(struct file_lock *, struct file_lock *);
222 void (*fl_release_private)(struct file_lock *);
223
224
225 locking rules:
226- BKL may block
227-fl_insert: yes no
228-fl_remove: yes no
229-fl_copy_lock: yes no
230-fl_release_private: yes yes
231+ file_lock_lock may block
232+fl_copy_lock: yes no
233+fl_release_private: maybe no
234
235 ----------------------- lock_manager_operations ---------------------------
236 prototypes:
237 int (*fl_compare_owner)(struct file_lock *, struct file_lock *);
238 void (*fl_notify)(struct file_lock *); /* unblock callback */
239+ int (*fl_grant)(struct file_lock *, struct file_lock *, int);
240 void (*fl_release_private)(struct file_lock *);
241 void (*fl_break)(struct file_lock *); /* break_lease callback */
242+ int (*fl_mylease)(struct file_lock *, struct file_lock *);
243+ int (*fl_change)(struct file_lock **, int);
244
245 locking rules:
246- BKL may block
247-fl_compare_owner: yes no
248-fl_notify: yes no
249-fl_release_private: yes yes
250-fl_break: yes no
251-
252- Currently only NFSD and NLM provide instances of this class. None of the
253-them block. If you have out-of-tree instances - please, show up. Locking
254-in that area will change.
255+ file_lock_lock may block
256+fl_compare_owner: yes no
257+fl_notify: yes no
258+fl_grant: no no
259+fl_release_private: maybe no
260+fl_break: yes no
261+fl_mylease: yes no
262+fl_change yes no
263+
264 --------------------------- buffer_head -----------------------------------
265 prototypes:
266 void (*b_end_io)(struct buffer_head *bh, int uptodate);
267@@ -364,17 +379,17 @@ prototypes:
268 void (*swap_slot_free_notify) (struct block_device *, unsigned long);
269
270 locking rules:
271- BKL bd_mutex
272-open: no yes
273-release: no yes
274-ioctl: no no
275-compat_ioctl: no no
276-direct_access: no no
277-media_changed: no no
278-unlock_native_capacity: no no
279-revalidate_disk: no no
280-getgeo: no no
281-swap_slot_free_notify: no no (see below)
282+ bd_mutex
283+open: yes
284+release: yes
285+ioctl: no
286+compat_ioctl: no
287+direct_access: no
288+media_changed: no
289+unlock_native_capacity: no
290+revalidate_disk: no
291+getgeo: no
292+swap_slot_free_notify: no (see below)
293
294 media_changed, unlock_native_capacity and revalidate_disk are called only from
295 check_disk_change().
296@@ -413,34 +428,21 @@ prototypes:
297 unsigned long (*get_unmapped_area)(struct file *, unsigned long,
298 unsigned long, unsigned long, unsigned long);
299 int (*check_flags)(int);
300+ int (*flock) (struct file *, int, struct file_lock *);
301+ ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *,
302+ size_t, unsigned int);
303+ ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *,
304+ size_t, unsigned int);
305+ int (*setlease)(struct file *, long, struct file_lock **);
306 };
307
308 locking rules:
309- All may block.
310- BKL
311-llseek: no (see below)
312-read: no
313-aio_read: no
314-write: no
315-aio_write: no
316-readdir: no
317-poll: no
318-unlocked_ioctl: no
319-compat_ioctl: no
320-mmap: no
321-open: no
322-flush: no
323-release: no
324-fsync: no (see below)
325-aio_fsync: no
326-fasync: no
327-lock: yes
328-readv: no
329-writev: no
330-sendfile: no
331-sendpage: no
332-get_unmapped_area: no
333-check_flags: no
334+ All may block except for ->setlease.
335+ No VFS locks held on entry except for ->fsync and ->setlease.
336+
337+->fsync() has i_mutex on inode.
338+
339+->setlease has the file_list_lock held and must not sleep.
340
341 ->llseek() locking has moved from llseek to the individual llseek
342 implementations. If your fs is not using generic_file_llseek, you
343@@ -450,17 +452,10 @@ mutex or just to use i_size_read() instead.
344 Note: this does not protect the file->f_pos against concurrent modifications
345 since this is something the userspace has to take care about.
346
347-Note: ext2_release() was *the* source of contention on fs-intensive
348-loads and dropping BKL on ->release() helps to get rid of that (we still
349-grab BKL for cases when we close a file that had been opened r/w, but that
350-can and should be done using the internal locking with smaller critical areas).
351-Current worst offender is ext2_get_block()...
352-
353-->fasync() is called without BKL protection, and is responsible for
354-maintaining the FASYNC bit in filp->f_flags. Most instances call
355-fasync_helper(), which does that maintenance, so it's not normally
356-something one needs to worry about. Return values > 0 will be mapped to
357-zero in the VFS layer.
358+->fasync() is responsible for maintaining the FASYNC bit in filp->f_flags.
359+Most instances call fasync_helper(), which does that maintenance, so it's
360+not normally something one needs to worry about. Return values > 0 will be
361+mapped to zero in the VFS layer.
362
363 ->readdir() and ->ioctl() on directories must be changed. Ideally we would
364 move ->readdir() to inode_operations and use a separate method for directory
365@@ -471,8 +466,6 @@ components. And there are other reasons why the current interface is a mess...
366 ->read on directories probably must go away - we should just enforce -EISDIR
367 in sys_read() and friends.
368
369-->fsync() has i_mutex on inode.
370-
371 --------------------------- dquot_operations -------------------------------
372 prototypes:
373 int (*write_dquot) (struct dquot *);
374@@ -507,12 +500,12 @@ prototypes:
375 int (*access)(struct vm_area_struct *, unsigned long, void*, int, int);
376
377 locking rules:
378- BKL mmap_sem PageLocked(page)
379-open: no yes
380-close: no yes
381-fault: no yes can return with page locked
382-page_mkwrite: no yes can return with page locked
383-access: no yes
384+ mmap_sem PageLocked(page)
385+open: yes
386+close: yes
387+fault: yes can return with page locked
388+page_mkwrite: yes can return with page locked
389+access: yes
390
391 ->fault() is called when a previously not present pte is about
392 to be faulted in. The filesystem must find and return the page associated
393@@ -539,6 +532,3 @@ VM_IO | VM_PFNMAP VMAs.
394
395 (if you break something or notice that it is broken and do not fix it yourself
396 - at least put it here)
397-
398-ipc/shm.c::shm_delete() - may need BKL.
399-->read() and ->write() in many drivers are (probably) missing BKL.
400--
4011.6.6.1
402
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0036-memcg-fix-wrong-VM_BUG_ON-in-try_charge-s-mm-owner-c.patch b/extras/recipes-kernel/linux/linux-omap/linus/0036-memcg-fix-wrong-VM_BUG_ON-in-try_charge-s-mm-owner-c.patch
new file mode 100644
index 00000000..cbdc9bea
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0036-memcg-fix-wrong-VM_BUG_ON-in-try_charge-s-mm-owner-c.patch
@@ -0,0 +1,63 @@
1From 06410121f430702f9f482331a1f6d9ba3ebe5911 Mon Sep 17 00:00:00 2001
2From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
3Date: Wed, 29 Dec 2010 14:07:11 -0800
4Subject: [PATCH 36/65] memcg: fix wrong VM_BUG_ON() in try_charge()'s mm->owner check
5
6At __mem_cgroup_try_charge(), VM_BUG_ON(!mm->owner) is checked.
7But as commented in mem_cgroup_from_task(), mm->owner can be NULL
8in some racy case. This check of VM_BUG_ON() is bad.
9
10A possible story to hit this is at swapoff()->try_to_unuse(). It passes
11mm_struct to mem_cgroup_try_charge_swapin() while mm->owner is NULL. If we
12can't get proper mem_cgroup from swap_cgroup information, mm->owner is used
13as charge target and we see NULL.
14
15Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
16Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
17Reported-by: Hugh Dickins <hughd@google.com>
18Reported-by: Thomas Meyer <thomas@m3y3r.de>
19Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
20Reviewed-by: Balbir Singh <balbir@linux.vnet.ibm.com>
21Signed-off-by: Hugh Dickins <hughd@google.com>
22Cc: stable@kernel.org
23Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
24---
25 mm/memcontrol.c | 19 +++++++++----------
26 1 files changed, 9 insertions(+), 10 deletions(-)
27
28diff --git a/mm/memcontrol.c b/mm/memcontrol.c
29index 7a22b41..00bb8a6 100644
30--- a/mm/memcontrol.c
31+++ b/mm/memcontrol.c
32@@ -1925,19 +1925,18 @@ again:
33
34 rcu_read_lock();
35 p = rcu_dereference(mm->owner);
36- VM_BUG_ON(!p);
37 /*
38- * because we don't have task_lock(), "p" can exit while
39- * we're here. In that case, "mem" can point to root
40- * cgroup but never be NULL. (and task_struct itself is freed
41- * by RCU, cgroup itself is RCU safe.) Then, we have small
42- * risk here to get wrong cgroup. But such kind of mis-account
43- * by race always happens because we don't have cgroup_mutex().
44- * It's overkill and we allow that small race, here.
45+ * Because we don't have task_lock(), "p" can exit.
46+ * In that case, "mem" can point to root or p can be NULL with
47+ * race with swapoff. Then, we have small risk of mis-accouning.
48+ * But such kind of mis-account by race always happens because
49+ * we don't have cgroup_mutex(). It's overkill and we allo that
50+ * small race, here.
51+ * (*) swapoff at el will charge against mm-struct not against
52+ * task-struct. So, mm->owner can be NULL.
53 */
54 mem = mem_cgroup_from_task(p);
55- VM_BUG_ON(!mem);
56- if (mem_cgroup_is_root(mem)) {
57+ if (!mem || mem_cgroup_is_root(mem)) {
58 rcu_read_unlock();
59 goto done;
60 }
61--
621.6.6.1
63
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0037-Revert-Staging-zram-work-around-oops-due-to-startup-.patch b/extras/recipes-kernel/linux/linux-omap/linus/0037-Revert-Staging-zram-work-around-oops-due-to-startup-.patch
new file mode 100644
index 00000000..03e390eb
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0037-Revert-Staging-zram-work-around-oops-due-to-startup-.patch
@@ -0,0 +1,54 @@
1From 9214e9d423fea726c5497ae5be07d3069246e6bd Mon Sep 17 00:00:00 2001
2From: Nitin Gupta <ngupta@vflare.org>
3Date: Thu, 30 Dec 2010 04:07:58 -0500
4Subject: [PATCH 37/65] Revert "Staging: zram: work around oops due to startup ordering snafu"
5
6This reverts commit 7e24cce38a99f373450db67bf576fe73e8168d66 because it
7was never appropriate for mainline.
8
9Do not check for init flag before starting I/O - zram module is unusable
10without this fix.
11
12The oops mentioned in the reverted commit message was actually a problem
13only with the zram version as present in project's own repository where
14we allocate struct zram_stats_cpu upon device initialization. OTOH, In
15mainline/staging version of zram, we allocate struct stats upfront, so
16this oops cannot happen in mainline version.
17
18Checking for init_done flag in zram_make_request() results in a *no-op*
19for any I/O operation since we simply always return success. This flag
20is actually set when the first write occurs on a zram disk which
21triggers its initialization.
22
23Bug report: https://bugzilla.kernel.org/show_bug.cgi?id=25722
24
25Reported-by: Dennis Jansen <dennis.jansen@web.de>
26Signed-off-by: Nitin Gupta <ngupta@vflare.org>
27Cc: Anton Blanchard <anton@samba.org>
28Cc: Andrew Morton <akpm@linux-foundation.org>
29Cc: Greg Kroah-Hartman <gregkh@suse.de>
30Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
31---
32 drivers/staging/zram/zram_drv.c | 6 ------
33 1 files changed, 0 insertions(+), 6 deletions(-)
34
35diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c
36index 8c3c057..d0e9e02 100644
37--- a/drivers/staging/zram/zram_drv.c
38+++ b/drivers/staging/zram/zram_drv.c
39@@ -435,12 +435,6 @@ static int zram_make_request(struct request_queue *queue, struct bio *bio)
40 int ret = 0;
41 struct zram *zram = queue->queuedata;
42
43- if (unlikely(!zram->init_done)) {
44- set_bit(BIO_UPTODATE, &bio->bi_flags);
45- bio_endio(bio, 0);
46- return 0;
47- }
48-
49 if (!valid_io_request(zram, bio)) {
50 zram_stat64_inc(zram, &zram->stats.invalid_io);
51 bio_io_error(bio);
52--
531.6.6.1
54
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0038-CAN-Use-inode-instead-of-kernel-address-for-proc-fil.patch b/extras/recipes-kernel/linux/linux-omap/linus/0038-CAN-Use-inode-instead-of-kernel-address-for-proc-fil.patch
new file mode 100644
index 00000000..130a6407
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0038-CAN-Use-inode-instead-of-kernel-address-for-proc-fil.patch
@@ -0,0 +1,43 @@
1From 177f55e48f91842a6e33e896d64ebb9a44db298b Mon Sep 17 00:00:00 2001
2From: Dan Rosenberg <drosenberg@vsecurity.com>
3Date: Sun, 26 Dec 2010 06:54:53 +0000
4Subject: [PATCH 38/65] CAN: Use inode instead of kernel address for /proc file
5
6Since the socket address is just being used as a unique identifier, its
7inode number is an alternative that does not leak potentially sensitive
8information.
9
10CC-ing stable because MITRE has assigned CVE-2010-4565 to the issue.
11
12Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com>
13Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
14Signed-off-by: David S. Miller <davem@davemloft.net>
15---
16 net/can/bcm.c | 4 ++--
17 1 files changed, 2 insertions(+), 2 deletions(-)
18
19diff --git a/net/can/bcm.c b/net/can/bcm.c
20index 6faa825..9d5e8ac 100644
21--- a/net/can/bcm.c
22+++ b/net/can/bcm.c
23@@ -125,7 +125,7 @@ struct bcm_sock {
24 struct list_head tx_ops;
25 unsigned long dropped_usr_msgs;
26 struct proc_dir_entry *bcm_proc_read;
27- char procname [20]; /* pointer printed in ASCII with \0 */
28+ char procname [32]; /* inode number in decimal with \0 */
29 };
30
31 static inline struct bcm_sock *bcm_sk(const struct sock *sk)
32@@ -1521,7 +1521,7 @@ static int bcm_connect(struct socket *sock, struct sockaddr *uaddr, int len,
33
34 if (proc_dir) {
35 /* unique socket address as filename */
36- sprintf(bo->procname, "%p", sock);
37+ sprintf(bo->procname, "%lu", sock_i_ino(sk));
38 bo->bcm_proc_read = proc_create_data(bo->procname, 0644,
39 proc_dir,
40 &bcm_proc_fops, sk);
41--
421.6.6.1
43
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0039-ISDN-Gigaset-Fix-memory-leak-in-do_disconnect_req.patch b/extras/recipes-kernel/linux/linux-omap/linus/0039-ISDN-Gigaset-Fix-memory-leak-in-do_disconnect_req.patch
new file mode 100644
index 00000000..24fdff6c
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0039-ISDN-Gigaset-Fix-memory-leak-in-do_disconnect_req.patch
@@ -0,0 +1,56 @@
1From 7b63a1b5eed2e8f4c90cef7ba893dd95ab1d71ae Mon Sep 17 00:00:00 2001
2From: Jesper Juhl <jj@chaosbits.net>
3Date: Sun, 26 Dec 2010 09:59:58 +0000
4Subject: [PATCH 39/65] ISDN, Gigaset: Fix memory leak in do_disconnect_req()
5
6Hi,
7
8In drivers/isdn/gigaset/capi.c::do_disconnect_req() we will leak the
9memory allocated (with kmalloc) to 'b3cmsg' if the call to alloc_skb()
10fails.
11
12...
13 b3cmsg = kmalloc(sizeof(*b3cmsg), GFP_KERNEL);
14 allocation here ------^
15 if (!b3cmsg) {
16 dev_err(cs->dev, "%s: out of memory\n", __func__);
17 send_conf(iif, ap, skb, CAPI_MSGOSRESOURCEERR);
18 return;
19 }
20 capi_cmsg_header(b3cmsg, ap->id, CAPI_DISCONNECT_B3, CAPI_IND,
21 ap->nextMessageNumber++,
22 cmsg->adr.adrPLCI | (1 << 16));
23 b3cmsg->Reason_B3 = CapiProtocolErrorLayer1;
24 b3skb = alloc_skb(CAPI_DISCONNECT_B3_IND_BASELEN, GFP_KERNEL);
25 if (b3skb == NULL) {
26 dev_err(cs->dev, "%s: out of memory\n", __func__);
27 send_conf(iif, ap, skb, CAPI_MSGOSRESOURCEERR);
28 return;
29 leak here ------^
30...
31
32This leak is easily fixed by just kfree()'ing the memory allocated to
33'b3cmsg' right before we return. The following patch does that.
34
35Signed-off-by: Jesper Juhl <jj@chaosbits.net>
36Acked-by: Tilman Schmidt <tilman@imap.cc>
37Signed-off-by: David S. Miller <davem@davemloft.net>
38---
39 drivers/isdn/gigaset/capi.c | 1 +
40 1 files changed, 1 insertions(+), 0 deletions(-)
41
42diff --git a/drivers/isdn/gigaset/capi.c b/drivers/isdn/gigaset/capi.c
43index bcc174e..658e75f 100644
44--- a/drivers/isdn/gigaset/capi.c
45+++ b/drivers/isdn/gigaset/capi.c
46@@ -1900,6 +1900,7 @@ static void do_disconnect_req(struct gigaset_capi_ctr *iif,
47 if (b3skb == NULL) {
48 dev_err(cs->dev, "%s: out of memory\n", __func__);
49 send_conf(iif, ap, skb, CAPI_MSGOSRESOURCEERR);
50+ kfree(b3cmsg);
51 return;
52 }
53 capi_cmsg2message(b3cmsg,
54--
551.6.6.1
56
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0040-Broadcom-CNIC-core-network-driver-fix-mem-leak-on-al.patch b/extras/recipes-kernel/linux/linux-omap/linus/0040-Broadcom-CNIC-core-network-driver-fix-mem-leak-on-al.patch
new file mode 100644
index 00000000..b9be4132
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0040-Broadcom-CNIC-core-network-driver-fix-mem-leak-on-al.patch
@@ -0,0 +1,58 @@
1From dcb64d3c0d57e8bc674ec4ca6bf7f4812f49f7b2 Mon Sep 17 00:00:00 2001
2From: Jesper Juhl <jj@chaosbits.net>
3Date: Fri, 31 Dec 2010 11:18:48 -0800
4Subject: [PATCH 40/65] Broadcom CNIC core network driver: fix mem leak on allocation failures in cnic_alloc_uio_rings()
5
6We are leaking memory in drivers/net/cnic.c::cnic_alloc_uio_rings() if
7either of the calls to dma_alloc_coherent() fail. This patch fixes it by
8freeing both the memory allocated with kzalloc() and memory allocated with
9previous calls to dma_alloc_coherent() when there's a failure.
10
11Thanks to Joe Perches <joe@perches.com> for suggesting a better
12implementation than my initial version.
13
14Signed-off-by: Jesper Juhl <jj@chaosbits.net>
15Acked-by: Michael Chan <mchan@broadcom.com>
16Signed-off-by: David S. Miller <davem@davemloft.net>
17---
18 drivers/net/cnic.c | 10 ++++++++--
19 1 files changed, 8 insertions(+), 2 deletions(-)
20
21diff --git a/drivers/net/cnic.c b/drivers/net/cnic.c
22index 92bac19..6dff321 100644
23--- a/drivers/net/cnic.c
24+++ b/drivers/net/cnic.c
25@@ -940,7 +940,7 @@ static int cnic_alloc_uio_rings(struct cnic_dev *dev, int pages)
26 &udev->l2_ring_map,
27 GFP_KERNEL | __GFP_COMP);
28 if (!udev->l2_ring)
29- return -ENOMEM;
30+ goto err_udev;
31
32 udev->l2_buf_size = (cp->l2_rx_ring_size + 1) * cp->l2_single_buf_size;
33 udev->l2_buf_size = PAGE_ALIGN(udev->l2_buf_size);
34@@ -948,7 +948,7 @@ static int cnic_alloc_uio_rings(struct cnic_dev *dev, int pages)
35 &udev->l2_buf_map,
36 GFP_KERNEL | __GFP_COMP);
37 if (!udev->l2_buf)
38- return -ENOMEM;
39+ goto err_dma;
40
41 write_lock(&cnic_dev_lock);
42 list_add(&udev->list, &cnic_udev_list);
43@@ -959,6 +959,12 @@ static int cnic_alloc_uio_rings(struct cnic_dev *dev, int pages)
44 cp->udev = udev;
45
46 return 0;
47+ err_dma:
48+ dma_free_coherent(&udev->pdev->dev, udev->l2_ring_size,
49+ udev->l2_ring, udev->l2_ring_map);
50+ err_udev:
51+ kfree(udev);
52+ return -ENOMEM;
53 }
54
55 static int cnic_init_uio(struct cnic_dev *dev)
56--
571.6.6.1
58
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0041-tg3-fix-return-value-check-in-tg3_read_vpd.patch b/extras/recipes-kernel/linux/linux-omap/linus/0041-tg3-fix-return-value-check-in-tg3_read_vpd.patch
new file mode 100644
index 00000000..c77fb857
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0041-tg3-fix-return-value-check-in-tg3_read_vpd.patch
@@ -0,0 +1,35 @@
1From 8742365f4de2afdd0168366b49a3118e67354a21 Mon Sep 17 00:00:00 2001
2From: David Sterba <dsterba@suse.cz>
3Date: Wed, 29 Dec 2010 03:40:31 +0000
4Subject: [PATCH 41/65] tg3: fix return value check in tg3_read_vpd()
5
6Besides -ETIMEDOUT and -EINTR, pci_read_vpd may return other error
7values like -ENODEV or -EINVAL which are ignored due to the buggy
8check, but the data are not read from VPD anyway and this is checked
9subsequently with at most 3 needless loop iterations. This does not
10show up as a runtime bug.
11
12CC: Matt Carlson <mcarlson@broadcom.com>
13CC: Michael Chan <mchan@broadcom.com>
14Signed-off-by: David Sterba <dsterba@suse.cz>
15Signed-off-by: David S. Miller <davem@davemloft.net>
16---
17 drivers/net/tg3.c | 2 +-
18 1 files changed, 1 insertions(+), 1 deletions(-)
19
20diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
21index 30ccbb6..6f97b7b 100644
22--- a/drivers/net/tg3.c
23+++ b/drivers/net/tg3.c
24@@ -12658,7 +12658,7 @@ static void __devinit tg3_read_vpd(struct tg3 *tp)
25 cnt = pci_read_vpd(tp->pdev, pos,
26 TG3_NVM_VPD_LEN - pos,
27 &vpd_data[pos]);
28- if (cnt == -ETIMEDOUT || -EINTR)
29+ if (cnt == -ETIMEDOUT || cnt == -EINTR)
30 cnt = 0;
31 else if (cnt < 0)
32 goto out_not_found;
33--
341.6.6.1
35
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0042-starfire-Fix-dma_addr_t-size-test-for-MIPS.patch b/extras/recipes-kernel/linux/linux-omap/linus/0042-starfire-Fix-dma_addr_t-size-test-for-MIPS.patch
new file mode 100644
index 00000000..c2ed56ea
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0042-starfire-Fix-dma_addr_t-size-test-for-MIPS.patch
@@ -0,0 +1,37 @@
1From f6a826af05cb9de0de0218f3cd05af203170fd12 Mon Sep 17 00:00:00 2001
2From: Ben Hutchings <ben@decadent.org.uk>
3Date: Wed, 29 Dec 2010 04:26:17 +0000
4Subject: [PATCH 42/65] starfire: Fix dma_addr_t size test for MIPS
5
6Commit 56543af "starfire: use BUILD_BUG_ON for netdrv_addr_t" revealed
7that the preprocessor condition used to find the size of dma_addr_t
8yielded the wrong result for some architectures and configurations.
9This was kluged for 64-bit PowerPC in commit 3e502e6 by adding yet
10another case to the condition. However, 64-bit MIPS configurations
11are not detected reliably either.
12
13This should be fixed by using CONFIG_ARCH_DMA_ADDR_T_64BIT, but that
14isn't yet defined everywhere it should be.
15
16Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
17Signed-off-by: David S. Miller <davem@davemloft.net>
18---
19 drivers/net/starfire.c | 2 +-
20 1 files changed, 1 insertions(+), 1 deletions(-)
21
22diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c
23index 4adf124..a4f2bd5 100644
24--- a/drivers/net/starfire.c
25+++ b/drivers/net/starfire.c
26@@ -148,7 +148,7 @@ static int full_duplex[MAX_UNITS] = {0, };
27 * This SUCKS.
28 * We need a much better method to determine if dma_addr_t is 64-bit.
29 */
30-#if (defined(__i386__) && defined(CONFIG_HIGHMEM64G)) || defined(__x86_64__) || defined (__ia64__) || defined(__alpha__) || defined(__mips64__) || (defined(__mips__) && defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) || (defined(__powerpc64__) || defined(CONFIG_PHYS_64BIT))
31+#if (defined(__i386__) && defined(CONFIG_HIGHMEM64G)) || defined(__x86_64__) || defined (__ia64__) || defined(__alpha__) || (defined(CONFIG_MIPS) && ((defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) || defined(CONFIG_64BIT))) || (defined(__powerpc64__) || defined(CONFIG_PHYS_64BIT))
32 /* 64-bit dma_addr_t */
33 #define ADDR_64BITS /* This chip uses 64 bit addresses. */
34 #define netdrv_addr_t __le64
35--
361.6.6.1
37
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0043-drivers-atm-atmtcp.c-add-missing-atm_dev_put.patch b/extras/recipes-kernel/linux/linux-omap/linus/0043-drivers-atm-atmtcp.c-add-missing-atm_dev_put.patch
new file mode 100644
index 00000000..20077bf9
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0043-drivers-atm-atmtcp.c-add-missing-atm_dev_put.patch
@@ -0,0 +1,50 @@
1From 0af81f1e48cd0f4a1cdce5939408e1d9ad508190 Mon Sep 17 00:00:00 2001
2From: Julia Lawall <julia@diku.dk>
3Date: Wed, 29 Dec 2010 04:01:03 +0000
4Subject: [PATCH 43/65] drivers/atm/atmtcp.c: add missing atm_dev_put
5
6The earlier call to atm_dev_lookup increases the reference count of dev,
7so decrease it on the way out.
8
9The semantic match that finds this problem is as follows:
10(http://coccinelle.lip6.fr/)
11
12// <smpl>
13@@
14expression x, E;
15constant C;
16@@
17
18x = atm_dev_lookup(...);
19... when != false x != NULL
20 when != true x == NULL
21 when != \(E = x\|x = E\)
22 when != atm_dev_put(dev);
23*return -C;
24// </smpl>
25
26Signed-off-by: Julia Lawall <julia@diku.dk>
27Signed-off-by: David S. Miller <davem@davemloft.net>
28---
29 drivers/atm/atmtcp.c | 5 ++++-
30 1 files changed, 4 insertions(+), 1 deletions(-)
31
32diff --git a/drivers/atm/atmtcp.c b/drivers/atm/atmtcp.c
33index 2b464b6..0b06250 100644
34--- a/drivers/atm/atmtcp.c
35+++ b/drivers/atm/atmtcp.c
36@@ -392,7 +392,10 @@ static int atmtcp_attach(struct atm_vcc *vcc,int itf)
37 atm_dev_put(dev);
38 return -EMEDIUMTYPE;
39 }
40- if (PRIV(dev)->vcc) return -EBUSY;
41+ if (PRIV(dev)->vcc) {
42+ atm_dev_put(dev);
43+ return -EBUSY;
44+ }
45 }
46 else {
47 int error;
48--
491.6.6.1
50
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0044-KVM-i8259-initialize-isr_ack.patch b/extras/recipes-kernel/linux/linux-omap/linus/0044-KVM-i8259-initialize-isr_ack.patch
new file mode 100644
index 00000000..0f47f868
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0044-KVM-i8259-initialize-isr_ack.patch
@@ -0,0 +1,32 @@
1From 1e144569ab9d311fa5e08efc9a7fb35853d697d9 Mon Sep 17 00:00:00 2001
2From: Avi Kivity <avi@redhat.com>
3Date: Fri, 31 Dec 2010 10:52:15 +0200
4Subject: [PATCH 44/65] KVM: i8259: initialize isr_ack
5
6isr_ack is never initialized. So, until the first PIC reset, interrupts
7may fail to be injected. This can cause Windows XP to fail to boot, as
8reported in the fallout from the fix to
9https://bugzilla.kernel.org/show_bug.cgi?id=21962.
10
11Reported-and-tested-by: Nicolas Prochazka <prochazka.nicolas@gmail.com>
12Signed-off-by: Avi Kivity <avi@redhat.com>
13---
14 arch/x86/kvm/i8259.c | 2 ++
15 1 files changed, 2 insertions(+), 0 deletions(-)
16
17diff --git a/arch/x86/kvm/i8259.c b/arch/x86/kvm/i8259.c
18index f628234..3cece05 100644
19--- a/arch/x86/kvm/i8259.c
20+++ b/arch/x86/kvm/i8259.c
21@@ -575,6 +575,8 @@ struct kvm_pic *kvm_create_pic(struct kvm *kvm)
22 s->pics[1].elcr_mask = 0xde;
23 s->pics[0].pics_state = s;
24 s->pics[1].pics_state = s;
25+ s->pics[0].isr_ack = 0xff;
26+ s->pics[1].isr_ack = 0xff;
27
28 /*
29 * Initialize PIO device
30--
311.6.6.1
32
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0045-hwmon-s3c-hwmon-Fix-compilation.patch b/extras/recipes-kernel/linux/linux-omap/linus/0045-hwmon-s3c-hwmon-Fix-compilation.patch
new file mode 100644
index 00000000..c322f9c9
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0045-hwmon-s3c-hwmon-Fix-compilation.patch
@@ -0,0 +1,37 @@
1From cdca50978acd2a0be9ef675b8cdd3b77fadab492 Mon Sep 17 00:00:00 2001
2From: Maurus Cuelenaere <mcuelenaere@gmail.com>
3Date: Sun, 2 Jan 2011 14:48:16 -0500
4Subject: [PATCH 45/65] hwmon: (s3c-hwmon) Fix compilation
5
6The owner field was removed from struct attribute in
76fd69dc578fa0b1bbc3aad70ae3af9a137211707, so don't assign it anymore.
8
9Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
10Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
11---
12 drivers/hwmon/s3c-hwmon.c | 2 --
13 1 files changed, 0 insertions(+), 2 deletions(-)
14
15diff --git a/drivers/hwmon/s3c-hwmon.c b/drivers/hwmon/s3c-hwmon.c
16index 05248f2..92b42db 100644
17--- a/drivers/hwmon/s3c-hwmon.c
18+++ b/drivers/hwmon/s3c-hwmon.c
19@@ -234,7 +234,6 @@ static int s3c_hwmon_create_attr(struct device *dev,
20 attr->index = channel;
21 attr->dev_attr.attr.name = attrs->in_name;
22 attr->dev_attr.attr.mode = S_IRUGO;
23- attr->dev_attr.attr.owner = THIS_MODULE;
24 attr->dev_attr.show = s3c_hwmon_ch_show;
25
26 ret = device_create_file(dev, &attr->dev_attr);
27@@ -252,7 +251,6 @@ static int s3c_hwmon_create_attr(struct device *dev,
28 attr->index = channel;
29 attr->dev_attr.attr.name = attrs->label_name;
30 attr->dev_attr.attr.mode = S_IRUGO;
31- attr->dev_attr.attr.owner = THIS_MODULE;
32 attr->dev_attr.show = s3c_hwmon_label_show;
33
34 ret = device_create_file(dev, &attr->dev_attr);
35--
361.6.6.1
37
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0046-watchdog-Improve-initialisation-error-message-and-do.patch b/extras/recipes-kernel/linux/linux-omap/linus/0046-watchdog-Improve-initialisation-error-message-and-do.patch
new file mode 100644
index 00000000..b490dc07
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0046-watchdog-Improve-initialisation-error-message-and-do.patch
@@ -0,0 +1,58 @@
1From 358160309eeeb8e29b74240874267ea9f7e43d36 Mon Sep 17 00:00:00 2001
2From: Ben Hutchings <ben@decadent.org.uk>
3Date: Sun, 2 Jan 2011 23:02:42 +0000
4Subject: [PATCH 46/65] watchdog: Improve initialisation error message and documentation
5
6The error message 'NMI watchdog failed to create perf event...'
7does not make it clear that this is a fatal error for the
8watchdog. It also currently prints the error value as a
9pointer, rather than extracting the error code with PTR_ERR().
10Fix that.
11
12Add a note to the description of the 'nowatchdog' kernel
13parameter to associate it with this message.
14
15Reported-by: Cesare Leonardi <celeonar@gmail.com>
16Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
17Cc: 599368@bugs.debian.org
18Cc: 608138@bugs.debian.org
19Cc: Don Zickus <dzickus@redhat.com>
20Cc: Frederic Weisbecker <fweisbec@gmail.com>
21Cc: <stable@kernel.org> # .37.x and later
22LKML-Reference: <1294009362.3167.126.camel@localhost>
23Signed-off-by: Ingo Molnar <mingo@elte.hu>
24---
25 Documentation/kernel-parameters.txt | 2 +-
26 kernel/watchdog.c | 3 ++-
27 2 files changed, 3 insertions(+), 2 deletions(-)
28
29diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
30index 8b61c93..01ece1b 100644
31--- a/Documentation/kernel-parameters.txt
32+++ b/Documentation/kernel-parameters.txt
33@@ -1759,7 +1759,7 @@ and is between 256 and 4096 characters. It is defined in the file
34
35 nousb [USB] Disable the USB subsystem
36
37- nowatchdog [KNL] Disable the lockup detector.
38+ nowatchdog [KNL] Disable the lockup detector (NMI watchdog).
39
40 nowb [ARM]
41
42diff --git a/kernel/watchdog.c b/kernel/watchdog.c
43index 6e3c41a..5b08215 100644
44--- a/kernel/watchdog.c
45+++ b/kernel/watchdog.c
46@@ -364,7 +364,8 @@ static int watchdog_nmi_enable(int cpu)
47 goto out_save;
48 }
49
50- printk(KERN_ERR "NMI watchdog failed to create perf event on cpu%i: %p\n", cpu, event);
51+ printk(KERN_ERR "NMI watchdog disabled for cpu%i: unable to create perf event: %ld\n",
52+ cpu, PTR_ERR(event));
53 return PTR_ERR(event);
54
55 /* success path */
56--
571.6.6.1
58
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0047-ARM-6605-1-Add-missing-include-asm-memory.h.patch b/extras/recipes-kernel/linux/linux-omap/linus/0047-ARM-6605-1-Add-missing-include-asm-memory.h.patch
new file mode 100644
index 00000000..1b083882
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0047-ARM-6605-1-Add-missing-include-asm-memory.h.patch
@@ -0,0 +1,42 @@
1From ff3df95843c9713d7b7247c461b955b1f794db76 Mon Sep 17 00:00:00 2001
2From: Axel Lin <axel.lin@gmail.com>
3Date: Mon, 3 Jan 2011 02:26:53 +0100
4Subject: [PATCH 47/65] ARM: 6605/1: Add missing include "asm/memory.h"
5
6This patch fixes below build error by adding the missing asm/memory.h,
7which is needed for arch_is_coherent().
8
9$ make pxa3xx_defconfig; make
10 CC init/do_mounts_rd.o
11In file included from include/linux/list_bl.h:5,
12 from include/linux/rculist_bl.h:7,
13 from include/linux/dcache.h:7,
14 from include/linux/fs.h:381,
15 from init/do_mounts_rd.c:3:
16include/linux/bit_spinlock.h: In function 'bit_spin_unlock':
17include/linux/bit_spinlock.h:61: error: implicit declaration of function 'arch_is_coherent'
18make[1]: *** [init/do_mounts_rd.o] Error 1
19make: *** [init] Error 2
20
21Signed-off-by: Axel Lin <axel.lin@gmail.com>
22Acked-by: Peter Huewe <peterhuewe@gmx.de>
23Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
24---
25 arch/arm/include/asm/system.h | 1 +
26 1 files changed, 1 insertions(+), 0 deletions(-)
27
28diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
29index 1120f18..8002594 100644
30--- a/arch/arm/include/asm/system.h
31+++ b/arch/arm/include/asm/system.h
32@@ -150,6 +150,7 @@ extern unsigned int user_debug;
33 #define rmb() dmb()
34 #define wmb() mb()
35 #else
36+#include <asm/memory.h>
37 #define mb() do { if (arch_is_coherent()) dmb(); else barrier(); } while (0)
38 #define rmb() do { if (arch_is_coherent()) dmb(); else barrier(); } while (0)
39 #define wmb() do { if (arch_is_coherent()) dmb(); else barrier(); } while (0)
40--
411.6.6.1
42
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0048-mv_xor-fix-race-in-tasklet-function.patch b/extras/recipes-kernel/linux/linux-omap/linus/0048-mv_xor-fix-race-in-tasklet-function.patch
new file mode 100644
index 00000000..6c1d8467
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0048-mv_xor-fix-race-in-tasklet-function.patch
@@ -0,0 +1,31 @@
1From b4c914578637d1d92b92842c50b02a98f2a7357d Mon Sep 17 00:00:00 2001
2From: Saeed Bishara <saeed@marvell.com>
3Date: Tue, 21 Dec 2010 16:53:39 +0200
4Subject: [PATCH 48/65] mv_xor: fix race in tasklet function
5
6use mv_xor_slot_cleanup() instead of __mv_xor_slot_cleanup() as the former function
7aquires the spin lock that needed to protect the drivers data.
8
9Cc: <stable@kernel.org>
10Signed-off-by: Saeed Bishara <saeed@marvell.com>
11Signed-off-by: Dan Williams <dan.j.williams@intel.com>
12---
13 drivers/dma/mv_xor.c | 2 +-
14 1 files changed, 1 insertions(+), 1 deletions(-)
15
16diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c
17index 411d5bf..a25f5f6 100644
18--- a/drivers/dma/mv_xor.c
19+++ b/drivers/dma/mv_xor.c
20@@ -449,7 +449,7 @@ mv_xor_slot_cleanup(struct mv_xor_chan *mv_chan)
21 static void mv_xor_tasklet(unsigned long data)
22 {
23 struct mv_xor_chan *chan = (struct mv_xor_chan *) data;
24- __mv_xor_slot_cleanup(chan);
25+ mv_xor_slot_cleanup(chan);
26 }
27
28 static struct mv_xor_desc_slot *
29--
301.6.6.1
31
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0049-dmaengine-provide-dummy-functions-for-DMA_ENGINE-n.patch b/extras/recipes-kernel/linux/linux-omap/linus/0049-dmaengine-provide-dummy-functions-for-DMA_ENGINE-n.patch
new file mode 100644
index 00000000..a5a0850c
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0049-dmaengine-provide-dummy-functions-for-DMA_ENGINE-n.patch
@@ -0,0 +1,55 @@
1From 8948bfb494b67389d7ea6249b3d6e765f4500d88 Mon Sep 17 00:00:00 2001
2From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
3Date: Wed, 22 Dec 2010 14:46:46 +0100
4Subject: [PATCH 49/65] dmaengine: provide dummy functions for DMA_ENGINE=n
5
6This lets drivers, optionally using the dmaengine, build with DMA_ENGINE
7unselected.
8
9Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
10Signed-off-by: Dan Williams <dan.j.williams@intel.com>
11---
12 include/linux/dmaengine.h | 13 ++++++++++---
13 1 files changed, 10 insertions(+), 3 deletions(-)
14
15diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
16index 9d8688b..8cd00ad 100644
17--- a/include/linux/dmaengine.h
18+++ b/include/linux/dmaengine.h
19@@ -824,6 +824,8 @@ enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie);
20 #ifdef CONFIG_DMA_ENGINE
21 enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx);
22 void dma_issue_pending_all(void);
23+struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, void *fn_param);
24+void dma_release_channel(struct dma_chan *chan);
25 #else
26 static inline enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx)
27 {
28@@ -831,7 +833,14 @@ static inline enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descript
29 }
30 static inline void dma_issue_pending_all(void)
31 {
32- do { } while (0);
33+}
34+static inline struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask,
35+ dma_filter_fn fn, void *fn_param)
36+{
37+ return NULL;
38+}
39+static inline void dma_release_channel(struct dma_chan *chan)
40+{
41 }
42 #endif
43
44@@ -842,8 +851,6 @@ void dma_async_device_unregister(struct dma_device *device);
45 void dma_run_dependencies(struct dma_async_tx_descriptor *tx);
46 struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type);
47 #define dma_request_channel(mask, x, y) __dma_request_channel(&(mask), x, y)
48-struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, void *fn_param);
49-void dma_release_channel(struct dma_chan *chan);
50
51 /* --- Helper iov-locking functions --- */
52
53--
541.6.6.1
55
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0050-cx25840-Prevent-device-probe-failure-due-to-volume-c.patch b/extras/recipes-kernel/linux/linux-omap/linus/0050-cx25840-Prevent-device-probe-failure-due-to-volume-c.patch
new file mode 100644
index 00000000..b1b84018
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0050-cx25840-Prevent-device-probe-failure-due-to-volume-c.patch
@@ -0,0 +1,52 @@
1From 99ce7fb9211326fed836b7dee035f8a4b1df0250 Mon Sep 17 00:00:00 2001
2From: Andy Walls <awalls@md.metrocast.net>
3Date: Sun, 5 Dec 2010 19:42:30 -0300
4Subject: [PATCH 50/65] cx25840: Prevent device probe failure due to volume control ERANGE error
5
6This patch fixes a regression that crept into 2.6.36.
7
8The volume control scale in the cx25840 driver has an unusual mapping
9from register values to v4l2 volume control values. Enforce the mapping
10limits, so that the default volume control setting does not fall out of
11bounds to prevent the cx25840 module device probe from failing.
12
13Signed-off-by: Andy Walls <awalls@md.metrocast.net>
14Cc: Hans Verkuil <hverkuil@xs4all.nl>
15Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
16---
17 drivers/media/video/cx25840/cx25840-core.c | 19 +++++++++++++++++--
18 1 files changed, 17 insertions(+), 2 deletions(-)
19
20diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c
21index dfb198d..f164618 100644
22--- a/drivers/media/video/cx25840/cx25840-core.c
23+++ b/drivers/media/video/cx25840/cx25840-core.c
24@@ -1989,8 +1989,23 @@ static int cx25840_probe(struct i2c_client *client,
25 v4l2_ctrl_new_std(&state->hdl, &cx25840_ctrl_ops,
26 V4L2_CID_HUE, -128, 127, 1, 0);
27 if (!is_cx2583x(state)) {
28- default_volume = 228 - cx25840_read(client, 0x8d4);
29- default_volume = ((default_volume / 2) + 23) << 9;
30+ default_volume = cx25840_read(client, 0x8d4);
31+ /*
32+ * Enforce the legacy PVR-350/MSP3400 to PVR-150/CX25843 volume
33+ * scale mapping limits to avoid -ERANGE errors when
34+ * initializing the volume control
35+ */
36+ if (default_volume > 228) {
37+ /* Bottom out at -96 dB, v4l2 vol range 0x2e00-0x2fff */
38+ default_volume = 228;
39+ cx25840_write(client, 0x8d4, 228);
40+ }
41+ else if (default_volume < 20) {
42+ /* Top out at + 8 dB, v4l2 vol range 0xfe00-0xffff */
43+ default_volume = 20;
44+ cx25840_write(client, 0x8d4, 20);
45+ }
46+ default_volume = (((228 - default_volume) >> 1) + 23) << 9;
47
48 state->volume = v4l2_ctrl_new_std(&state->hdl,
49 &cx25840_audio_ctrl_ops, V4L2_CID_AUDIO_VOLUME,
50--
511.6.6.1
52
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0051-wm8775-Revert-changeset-fcb9757333-to-avoid-a-regres.patch b/extras/recipes-kernel/linux/linux-omap/linus/0051-wm8775-Revert-changeset-fcb9757333-to-avoid-a-regres.patch
new file mode 100644
index 00000000..792fe440
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0051-wm8775-Revert-changeset-fcb9757333-to-avoid-a-regres.patch
@@ -0,0 +1,518 @@
1From 2d2e6426126f420da1df0e4c2b37069e00aefdb8 Mon Sep 17 00:00:00 2001
2From: Mauro Carvalho Chehab <mchehab@redhat.com>
3Date: Mon, 3 Jan 2011 09:09:56 -0200
4Subject: [PATCH 51/65] wm8775: Revert changeset fcb9757333 to avoid a regression
5
6It seems that cx88 and ivtv use wm8775 on some different modes. The
7patch that added support for a board with wm8775 broke ivtv boards with
8this device. As we're too close to release 2.6.37, let's just revert
9it.
10
11Reported-by: Andy Walls <awalls@md.metrocast.net>
12Reported-by: Eric Sharkey <eric@lisaneric.org>
13Reported-by: Auric <auric@aanet.com.au>
14Reported by: David Gesswein <djg@pdp8online.com>
15Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
16---
17 drivers/media/video/cx88/cx88-alsa.c | 99 ++++---------------------------
18 drivers/media/video/cx88/cx88-cards.c | 7 ++
19 drivers/media/video/cx88/cx88-video.c | 27 +--------
20 drivers/media/video/cx88/cx88.h | 6 +-
21 drivers/media/video/wm8775.c | 104 ++++++++++++--------------------
22 include/media/wm8775.h | 3 -
23 6 files changed, 61 insertions(+), 185 deletions(-)
24
25diff --git a/drivers/media/video/cx88/cx88-alsa.c b/drivers/media/video/cx88/cx88-alsa.c
26index 4aaa47c..54b7fcd 100644
27--- a/drivers/media/video/cx88/cx88-alsa.c
28+++ b/drivers/media/video/cx88/cx88-alsa.c
29@@ -40,7 +40,6 @@
30 #include <sound/control.h>
31 #include <sound/initval.h>
32 #include <sound/tlv.h>
33-#include <media/wm8775.h>
34
35 #include "cx88.h"
36 #include "cx88-reg.h"
37@@ -587,47 +586,26 @@ static int snd_cx88_volume_put(struct snd_kcontrol *kcontrol,
38 int left, right, v, b;
39 int changed = 0;
40 u32 old;
41- struct v4l2_control client_ctl;
42-
43- /* Pass volume & balance onto any WM8775 */
44- if (value->value.integer.value[0] >= value->value.integer.value[1]) {
45- v = value->value.integer.value[0] << 10;
46- b = value->value.integer.value[0] ?
47- (0x8000 * value->value.integer.value[1]) / value->value.integer.value[0] :
48- 0x8000;
49- } else {
50- v = value->value.integer.value[1] << 10;
51- b = value->value.integer.value[1] ?
52- 0xffff - (0x8000 * value->value.integer.value[0]) / value->value.integer.value[1] :
53- 0x8000;
54- }
55- client_ctl.value = v;
56- client_ctl.id = V4L2_CID_AUDIO_VOLUME;
57- call_hw(core, WM8775_GID, core, s_ctrl, &client_ctl);
58-
59- client_ctl.value = b;
60- client_ctl.id = V4L2_CID_AUDIO_BALANCE;
61- call_hw(core, WM8775_GID, core, s_ctrl, &client_ctl);
62
63 left = value->value.integer.value[0] & 0x3f;
64 right = value->value.integer.value[1] & 0x3f;
65 b = right - left;
66 if (b < 0) {
67- v = 0x3f - left;
68- b = (-b) | 0x40;
69+ v = 0x3f - left;
70+ b = (-b) | 0x40;
71 } else {
72- v = 0x3f - right;
73+ v = 0x3f - right;
74 }
75 /* Do we really know this will always be called with IRQs on? */
76 spin_lock_irq(&chip->reg_lock);
77 old = cx_read(AUD_VOL_CTL);
78 if (v != (old & 0x3f)) {
79- cx_swrite(SHADOW_AUD_VOL_CTL, AUD_VOL_CTL, (old & ~0x3f) | v);
80- changed = 1;
81+ cx_write(AUD_VOL_CTL, (old & ~0x3f) | v);
82+ changed = 1;
83 }
84- if ((cx_read(AUD_BAL_CTL) & 0x7f) != b) {
85- cx_write(AUD_BAL_CTL, b);
86- changed = 1;
87+ if (cx_read(AUD_BAL_CTL) != b) {
88+ cx_write(AUD_BAL_CTL, b);
89+ changed = 1;
90 }
91 spin_unlock_irq(&chip->reg_lock);
92
93@@ -640,7 +618,7 @@ static const struct snd_kcontrol_new snd_cx88_volume = {
94 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
95 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE |
96 SNDRV_CTL_ELEM_ACCESS_TLV_READ,
97- .name = "Analog-TV Volume",
98+ .name = "Playback Volume",
99 .info = snd_cx88_volume_info,
100 .get = snd_cx88_volume_get,
101 .put = snd_cx88_volume_put,
102@@ -671,14 +649,7 @@ static int snd_cx88_switch_put(struct snd_kcontrol *kcontrol,
103 vol = cx_read(AUD_VOL_CTL);
104 if (value->value.integer.value[0] != !(vol & bit)) {
105 vol ^= bit;
106- cx_swrite(SHADOW_AUD_VOL_CTL, AUD_VOL_CTL, vol);
107- /* Pass mute onto any WM8775 */
108- if ((1<<6) == bit) {
109- struct v4l2_control client_ctl;
110- client_ctl.value = 0 != (vol & bit);
111- client_ctl.id = V4L2_CID_AUDIO_MUTE;
112- call_hw(core, WM8775_GID, core, s_ctrl, &client_ctl);
113- }
114+ cx_write(AUD_VOL_CTL, vol);
115 ret = 1;
116 }
117 spin_unlock_irq(&chip->reg_lock);
118@@ -687,7 +658,7 @@ static int snd_cx88_switch_put(struct snd_kcontrol *kcontrol,
119
120 static const struct snd_kcontrol_new snd_cx88_dac_switch = {
121 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
122- .name = "Audio-Out Switch",
123+ .name = "Playback Switch",
124 .info = snd_ctl_boolean_mono_info,
125 .get = snd_cx88_switch_get,
126 .put = snd_cx88_switch_put,
127@@ -696,49 +667,13 @@ static const struct snd_kcontrol_new snd_cx88_dac_switch = {
128
129 static const struct snd_kcontrol_new snd_cx88_source_switch = {
130 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
131- .name = "Analog-TV Switch",
132+ .name = "Capture Switch",
133 .info = snd_ctl_boolean_mono_info,
134 .get = snd_cx88_switch_get,
135 .put = snd_cx88_switch_put,
136 .private_value = (1<<6),
137 };
138
139-static int snd_cx88_alc_get(struct snd_kcontrol *kcontrol,
140- struct snd_ctl_elem_value *value)
141-{
142- snd_cx88_card_t *chip = snd_kcontrol_chip(kcontrol);
143- struct cx88_core *core = chip->core;
144- struct v4l2_control client_ctl;
145-
146- client_ctl.id = V4L2_CID_AUDIO_LOUDNESS;
147- call_hw(core, WM8775_GID, core, g_ctrl, &client_ctl);
148- value->value.integer.value[0] = client_ctl.value ? 1 : 0;
149-
150- return 0;
151-}
152-
153-static int snd_cx88_alc_put(struct snd_kcontrol *kcontrol,
154- struct snd_ctl_elem_value *value)
155-{
156- snd_cx88_card_t *chip = snd_kcontrol_chip(kcontrol);
157- struct cx88_core *core = chip->core;
158- struct v4l2_control client_ctl;
159-
160- client_ctl.value = 0 != value->value.integer.value[0];
161- client_ctl.id = V4L2_CID_AUDIO_LOUDNESS;
162- call_hw(core, WM8775_GID, core, s_ctrl, &client_ctl);
163-
164- return 0;
165-}
166-
167-static struct snd_kcontrol_new snd_cx88_alc_switch = {
168- .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
169- .name = "Line-In ALC Switch",
170- .info = snd_ctl_boolean_mono_info,
171- .get = snd_cx88_alc_get,
172- .put = snd_cx88_alc_put,
173-};
174-
175 /****************************************************************************
176 Basic Flow for Sound Devices
177 ****************************************************************************/
178@@ -860,7 +795,6 @@ static int __devinit cx88_audio_initdev(struct pci_dev *pci,
179 {
180 struct snd_card *card;
181 snd_cx88_card_t *chip;
182- struct v4l2_subdev *sd;
183 int err;
184
185 if (devno >= SNDRV_CARDS)
186@@ -896,15 +830,6 @@ static int __devinit cx88_audio_initdev(struct pci_dev *pci,
187 if (err < 0)
188 goto error;
189
190- /* If there's a wm8775 then add a Line-In ALC switch */
191- list_for_each_entry(sd, &chip->core->v4l2_dev.subdevs, list) {
192- if (WM8775_GID == sd->grp_id) {
193- snd_ctl_add(card, snd_ctl_new1(&snd_cx88_alc_switch,
194- chip));
195- break;
196- }
197- }
198-
199 strcpy (card->driver, "CX88x");
200 sprintf(card->shortname, "Conexant CX%x", pci->device);
201 sprintf(card->longname, "%s at %#llx",
202diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c
203index 9b9e169..0ccc2af 100644
204--- a/drivers/media/video/cx88/cx88-cards.c
205+++ b/drivers/media/video/cx88/cx88-cards.c
206@@ -1007,15 +1007,22 @@ static const struct cx88_board cx88_boards[] = {
207 .radio_type = UNSET,
208 .tuner_addr = ADDR_UNSET,
209 .radio_addr = ADDR_UNSET,
210+ .audio_chip = V4L2_IDENT_WM8775,
211 .input = {{
212 .type = CX88_VMUX_DVB,
213 .vmux = 0,
214+ /* 2: Line-In */
215+ .audioroute = 2,
216 },{
217 .type = CX88_VMUX_COMPOSITE1,
218 .vmux = 1,
219+ /* 2: Line-In */
220+ .audioroute = 2,
221 },{
222 .type = CX88_VMUX_SVIDEO,
223 .vmux = 2,
224+ /* 2: Line-In */
225+ .audioroute = 2,
226 }},
227 .mpeg = CX88_MPEG_DVB,
228 },
229diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c
230index 62cea95..d9249e5 100644
231--- a/drivers/media/video/cx88/cx88-video.c
232+++ b/drivers/media/video/cx88/cx88-video.c
233@@ -40,7 +40,6 @@
234 #include "cx88.h"
235 #include <media/v4l2-common.h>
236 #include <media/v4l2-ioctl.h>
237-#include <media/wm8775.h>
238
239 MODULE_DESCRIPTION("v4l2 driver module for cx2388x based TV cards");
240 MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]");
241@@ -977,7 +976,6 @@ int cx88_set_control(struct cx88_core *core, struct v4l2_control *ctl)
242 const struct cx88_ctrl *c = NULL;
243 u32 value,mask;
244 int i;
245- struct v4l2_control client_ctl;
246
247 for (i = 0; i < CX8800_CTLS; i++) {
248 if (cx8800_ctls[i].v.id == ctl->id) {
249@@ -991,27 +989,6 @@ int cx88_set_control(struct cx88_core *core, struct v4l2_control *ctl)
250 ctl->value = c->v.minimum;
251 if (ctl->value > c->v.maximum)
252 ctl->value = c->v.maximum;
253-
254- /* Pass changes onto any WM8775 */
255- client_ctl.id = ctl->id;
256- switch (ctl->id) {
257- case V4L2_CID_AUDIO_MUTE:
258- client_ctl.value = ctl->value;
259- break;
260- case V4L2_CID_AUDIO_VOLUME:
261- client_ctl.value = (ctl->value) ?
262- (0x90 + ctl->value) << 8 : 0;
263- break;
264- case V4L2_CID_AUDIO_BALANCE:
265- client_ctl.value = ctl->value << 9;
266- break;
267- default:
268- client_ctl.id = 0;
269- break;
270- }
271- if (client_ctl.id)
272- call_hw(core, WM8775_GID, core, s_ctrl, &client_ctl);
273-
274 mask=c->mask;
275 switch (ctl->id) {
276 case V4L2_CID_AUDIO_BALANCE:
277@@ -1558,9 +1535,7 @@ static int radio_queryctrl (struct file *file, void *priv,
278 if (c->id < V4L2_CID_BASE ||
279 c->id >= V4L2_CID_LASTP1)
280 return -EINVAL;
281- if (c->id == V4L2_CID_AUDIO_MUTE ||
282- c->id == V4L2_CID_AUDIO_VOLUME ||
283- c->id == V4L2_CID_AUDIO_BALANCE) {
284+ if (c->id == V4L2_CID_AUDIO_MUTE) {
285 for (i = 0; i < CX8800_CTLS; i++) {
286 if (cx8800_ctls[i].v.id == c->id)
287 break;
288diff --git a/drivers/media/video/cx88/cx88.h b/drivers/media/video/cx88/cx88.h
289index e8c732e..c9981e7 100644
290--- a/drivers/media/video/cx88/cx88.h
291+++ b/drivers/media/video/cx88/cx88.h
292@@ -398,19 +398,17 @@ static inline struct cx88_core *to_core(struct v4l2_device *v4l2_dev)
293 return container_of(v4l2_dev, struct cx88_core, v4l2_dev);
294 }
295
296-#define call_hw(core, grpid, o, f, args...) \
297+#define call_all(core, o, f, args...) \
298 do { \
299 if (!core->i2c_rc) { \
300 if (core->gate_ctrl) \
301 core->gate_ctrl(core, 1); \
302- v4l2_device_call_all(&core->v4l2_dev, grpid, o, f, ##args); \
303+ v4l2_device_call_all(&core->v4l2_dev, 0, o, f, ##args); \
304 if (core->gate_ctrl) \
305 core->gate_ctrl(core, 0); \
306 } \
307 } while (0)
308
309-#define call_all(core, o, f, args...) call_hw(core, 0, o, f, ##args)
310-
311 struct cx8800_dev;
312 struct cx8802_dev;
313
314diff --git a/drivers/media/video/wm8775.c b/drivers/media/video/wm8775.c
315index 1355256..fe8ef64 100644
316--- a/drivers/media/video/wm8775.c
317+++ b/drivers/media/video/wm8775.c
318@@ -35,7 +35,6 @@
319 #include <media/v4l2-device.h>
320 #include <media/v4l2-chip-ident.h>
321 #include <media/v4l2-ctrls.h>
322-#include <media/wm8775.h>
323
324 MODULE_DESCRIPTION("wm8775 driver");
325 MODULE_AUTHOR("Ulf Eklund, Hans Verkuil");
326@@ -51,16 +50,10 @@ enum {
327 TOT_REGS
328 };
329
330-#define ALC_HOLD 0x85 /* R17: use zero cross detection, ALC hold time 42.6 ms */
331-#define ALC_EN 0x100 /* R17: ALC enable */
332-
333 struct wm8775_state {
334 struct v4l2_subdev sd;
335 struct v4l2_ctrl_handler hdl;
336 struct v4l2_ctrl *mute;
337- struct v4l2_ctrl *vol;
338- struct v4l2_ctrl *bal;
339- struct v4l2_ctrl *loud;
340 u8 input; /* Last selected input (0-0xf) */
341 };
342
343@@ -92,30 +85,6 @@ static int wm8775_write(struct v4l2_subdev *sd, int reg, u16 val)
344 return -1;
345 }
346
347-static void wm8775_set_audio(struct v4l2_subdev *sd, int quietly)
348-{
349- struct wm8775_state *state = to_state(sd);
350- u8 vol_l, vol_r;
351- int muted = 0 != state->mute->val;
352- u16 volume = (u16)state->vol->val;
353- u16 balance = (u16)state->bal->val;
354-
355- /* normalize ( 65535 to 0 -> 255 to 0 (+24dB to -103dB) ) */
356- vol_l = (min(65536 - balance, 32768) * volume) >> 23;
357- vol_r = (min(balance, (u16)32768) * volume) >> 23;
358-
359- /* Mute */
360- if (muted || quietly)
361- wm8775_write(sd, R21, 0x0c0 | state->input);
362-
363- wm8775_write(sd, R14, vol_l | 0x100); /* 0x100= Left channel ADC zero cross enable */
364- wm8775_write(sd, R15, vol_r | 0x100); /* 0x100= Right channel ADC zero cross enable */
365-
366- /* Un-mute */
367- if (!muted)
368- wm8775_write(sd, R21, state->input);
369-}
370-
371 static int wm8775_s_routing(struct v4l2_subdev *sd,
372 u32 input, u32 output, u32 config)
373 {
374@@ -133,26 +102,25 @@ static int wm8775_s_routing(struct v4l2_subdev *sd,
375 state->input = input;
376 if (!v4l2_ctrl_g_ctrl(state->mute))
377 return 0;
378- if (!v4l2_ctrl_g_ctrl(state->vol))
379- return 0;
380- if (!v4l2_ctrl_g_ctrl(state->bal))
381- return 0;
382- wm8775_set_audio(sd, 1);
383+ wm8775_write(sd, R21, 0x0c0);
384+ wm8775_write(sd, R14, 0x1d4);
385+ wm8775_write(sd, R15, 0x1d4);
386+ wm8775_write(sd, R21, 0x100 + state->input);
387 return 0;
388 }
389
390 static int wm8775_s_ctrl(struct v4l2_ctrl *ctrl)
391 {
392 struct v4l2_subdev *sd = to_sd(ctrl);
393+ struct wm8775_state *state = to_state(sd);
394
395 switch (ctrl->id) {
396 case V4L2_CID_AUDIO_MUTE:
397- case V4L2_CID_AUDIO_VOLUME:
398- case V4L2_CID_AUDIO_BALANCE:
399- wm8775_set_audio(sd, 0);
400- return 0;
401- case V4L2_CID_AUDIO_LOUDNESS:
402- wm8775_write(sd, R17, (ctrl->val ? ALC_EN : 0) | ALC_HOLD);
403+ wm8775_write(sd, R21, 0x0c0);
404+ wm8775_write(sd, R14, 0x1d4);
405+ wm8775_write(sd, R15, 0x1d4);
406+ if (!ctrl->val)
407+ wm8775_write(sd, R21, 0x100 + state->input);
408 return 0;
409 }
410 return -EINVAL;
411@@ -176,7 +144,16 @@ static int wm8775_log_status(struct v4l2_subdev *sd)
412
413 static int wm8775_s_frequency(struct v4l2_subdev *sd, struct v4l2_frequency *freq)
414 {
415- wm8775_set_audio(sd, 0);
416+ struct wm8775_state *state = to_state(sd);
417+
418+ /* If I remove this, then it can happen that I have no
419+ sound the first time I tune from static to a valid channel.
420+ It's difficult to reproduce and is almost certainly related
421+ to the zero cross detect circuit. */
422+ wm8775_write(sd, R21, 0x0c0);
423+ wm8775_write(sd, R14, 0x1d4);
424+ wm8775_write(sd, R15, 0x1d4);
425+ wm8775_write(sd, R21, 0x100 + state->input);
426 return 0;
427 }
428
429@@ -226,7 +203,6 @@ static int wm8775_probe(struct i2c_client *client,
430 {
431 struct wm8775_state *state;
432 struct v4l2_subdev *sd;
433- int err;
434
435 /* Check if the adapter supports the needed features */
436 if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA))
437@@ -240,21 +216,15 @@ static int wm8775_probe(struct i2c_client *client,
438 return -ENOMEM;
439 sd = &state->sd;
440 v4l2_i2c_subdev_init(sd, client, &wm8775_ops);
441- sd->grp_id = WM8775_GID; /* subdev group id */
442 state->input = 2;
443
444- v4l2_ctrl_handler_init(&state->hdl, 4);
445+ v4l2_ctrl_handler_init(&state->hdl, 1);
446 state->mute = v4l2_ctrl_new_std(&state->hdl, &wm8775_ctrl_ops,
447 V4L2_CID_AUDIO_MUTE, 0, 1, 1, 0);
448- state->vol = v4l2_ctrl_new_std(&state->hdl, &wm8775_ctrl_ops,
449- V4L2_CID_AUDIO_VOLUME, 0, 65535, (65535+99)/100, 0xCF00); /* 0dB*/
450- state->bal = v4l2_ctrl_new_std(&state->hdl, &wm8775_ctrl_ops,
451- V4L2_CID_AUDIO_BALANCE, 0, 65535, (65535+99)/100, 32768);
452- state->loud = v4l2_ctrl_new_std(&state->hdl, &wm8775_ctrl_ops,
453- V4L2_CID_AUDIO_LOUDNESS, 0, 1, 1, 1);
454 sd->ctrl_handler = &state->hdl;
455- err = state->hdl.error;
456- if (err) {
457+ if (state->hdl.error) {
458+ int err = state->hdl.error;
459+
460 v4l2_ctrl_handler_free(&state->hdl);
461 kfree(state);
462 return err;
463@@ -266,25 +236,29 @@ static int wm8775_probe(struct i2c_client *client,
464 wm8775_write(sd, R23, 0x000);
465 /* Disable zero cross detect timeout */
466 wm8775_write(sd, R7, 0x000);
467- /* HPF enable, I2S mode, 24-bit */
468- wm8775_write(sd, R11, 0x022);
469+ /* Left justified, 24-bit mode */
470+ wm8775_write(sd, R11, 0x021);
471 /* Master mode, clock ratio 256fs */
472 wm8775_write(sd, R12, 0x102);
473 /* Powered up */
474 wm8775_write(sd, R13, 0x000);
475- /* ALC stereo, ALC target level -5dB FS, ALC max gain +8dB */
476- wm8775_write(sd, R16, 0x1bb);
477- /* Set ALC mode and hold time */
478- wm8775_write(sd, R17, (state->loud->val ? ALC_EN : 0) | ALC_HOLD);
479+ /* ADC gain +2.5dB, enable zero cross */
480+ wm8775_write(sd, R14, 0x1d4);
481+ /* ADC gain +2.5dB, enable zero cross */
482+ wm8775_write(sd, R15, 0x1d4);
483+ /* ALC Stereo, ALC target level -1dB FS max gain +8dB */
484+ wm8775_write(sd, R16, 0x1bf);
485+ /* Enable gain control, use zero cross detection,
486+ ALC hold time 42.6 ms */
487+ wm8775_write(sd, R17, 0x185);
488 /* ALC gain ramp up delay 34 s, ALC gain ramp down delay 33 ms */
489 wm8775_write(sd, R18, 0x0a2);
490 /* Enable noise gate, threshold -72dBfs */
491 wm8775_write(sd, R19, 0x005);
492- /* Transient window 4ms, ALC min gain -5dB */
493- wm8775_write(sd, R20, 0x0fb);
494-
495- wm8775_set_audio(sd, 1); /* set volume/mute/mux */
496-
497+ /* Transient window 4ms, lower PGA gain limit -1dB */
498+ wm8775_write(sd, R20, 0x07a);
499+ /* LRBOTH = 1, use input 2. */
500+ wm8775_write(sd, R21, 0x102);
501 return 0;
502 }
503
504diff --git a/include/media/wm8775.h b/include/media/wm8775.h
505index a1c4d41..60739c5 100644
506--- a/include/media/wm8775.h
507+++ b/include/media/wm8775.h
508@@ -32,7 +32,4 @@
509 #define WM8775_AIN3 4
510 #define WM8775_AIN4 8
511
512-/* subdev group ID */
513-#define WM8775_GID (1 << 0)
514-
515 #endif
516--
5171.6.6.1
518
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0052-em28xx-radio_fops-should-also-use-unlocked_ioctl.patch b/extras/recipes-kernel/linux/linux-omap/linus/0052-em28xx-radio_fops-should-also-use-unlocked_ioctl.patch
new file mode 100644
index 00000000..f8070990
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0052-em28xx-radio_fops-should-also-use-unlocked_ioctl.patch
@@ -0,0 +1,31 @@
1From 002eb3b2ab46fef443a2e40c52255e1c30b83704 Mon Sep 17 00:00:00 2001
2From: Hans Verkuil <hverkuil@xs4all.nl>
3Date: Sat, 18 Dec 2010 09:59:51 -0300
4Subject: [PATCH 52/65] em28xx: radio_fops should also use unlocked_ioctl
5
6em28xx uses core assisted locking, so it shouldn't use .ioctl.
7The .ioctl callback was replaced by .unlocked_ioctl for video nodes,
8but not for radio nodes. This is now corrected.
9
10Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
11Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12---
13 drivers/media/video/em28xx/em28xx-video.c | 2 +-
14 1 files changed, 1 insertions(+), 1 deletions(-)
15
16diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c
17index 908e3bc..2c30072 100644
18--- a/drivers/media/video/em28xx/em28xx-video.c
19+++ b/drivers/media/video/em28xx/em28xx-video.c
20@@ -2377,7 +2377,7 @@ static const struct v4l2_file_operations radio_fops = {
21 .owner = THIS_MODULE,
22 .open = em28xx_v4l2_open,
23 .release = em28xx_v4l2_close,
24- .ioctl = video_ioctl2,
25+ .unlocked_ioctl = video_ioctl2,
26 };
27
28 static const struct v4l2_ioctl_ops radio_ioctl_ops = {
29--
301.6.6.1
31
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0053-arch-x86-oprofile-op_model_amd.c-Perform-initialisat.patch b/extras/recipes-kernel/linux/linux-omap/linus/0053-arch-x86-oprofile-op_model_amd.c-Perform-initialisat.patch
new file mode 100644
index 00000000..dc5522d0
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0053-arch-x86-oprofile-op_model_amd.c-Perform-initialisat.patch
@@ -0,0 +1,81 @@
1From b376276870006eabba46427b79a3f3be70b3e3ea Mon Sep 17 00:00:00 2001
2From: Robert Richter <robert.richter@amd.com>
3Date: Mon, 3 Jan 2011 12:15:14 +0100
4Subject: [PATCH 53/65] arch/x86/oprofile/op_model_amd.c: Perform initialisation on a single CPU
5
6Disable preemption in init_ibs(). The function only checks the
7ibs capabilities and sets up pci devices (if necessary). It runs
8only on one cpu but operates with the local APIC and some MSRs,
9thus it is better to disable preemption.
10
11[ 7.034377] BUG: using smp_processor_id() in preemptible [00000000] code: modprobe/483
12[ 7.034385] caller is setup_APIC_eilvt+0x155/0x180
13[ 7.034389] Pid: 483, comm: modprobe Not tainted 2.6.37-rc1-20101110+ #1
14[ 7.034392] Call Trace:
15[ 7.034400] [<ffffffff812a2b72>] debug_smp_processor_id+0xd2/0xf0
16[ 7.034404] [<ffffffff8101e985>] setup_APIC_eilvt+0x155/0x180
17[ ... ]
18
19Addresses https://bugzilla.kernel.org/show_bug.cgi?id=22812
20
21Reported-by: <atswartz@gmail.com>
22Signed-off-by: Robert Richter <robert.richter@amd.com>
23Cc: oprofile-list@lists.sourceforge.net <oprofile-list@lists.sourceforge.net>
24Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
25Cc: Frederic Weisbecker <fweisbec@gmail.com>
26Cc: Rafael J. Wysocki <rjw@sisk.pl>
27Cc: Dan Carpenter <error27@gmail.com>
28Cc: Andrew Morton <akpm@linux-foundation.org>
29Cc: <stable@kernel.org> [2.6.37.x]
30LKML-Reference: <20110103111514.GM4739@erda.amd.com>
31[ small cleanups ]
32Signed-off-by: Ingo Molnar <mingo@elte.hu>
33---
34 arch/x86/oprofile/op_model_amd.c | 24 ++++++++++++++++--------
35 1 files changed, 16 insertions(+), 8 deletions(-)
36
37diff --git a/arch/x86/oprofile/op_model_amd.c b/arch/x86/oprofile/op_model_amd.c
38index a011bcc..7d90d47 100644
39--- a/arch/x86/oprofile/op_model_amd.c
40+++ b/arch/x86/oprofile/op_model_amd.c
41@@ -630,21 +630,29 @@ static int __init_ibs_nmi(void)
42 return 0;
43 }
44
45-/* initialize the APIC for the IBS interrupts if available */
46+/*
47+ * check and reserve APIC extended interrupt LVT offset for IBS if
48+ * available
49+ *
50+ * init_ibs() preforms implicitly cpu-local operations, so pin this
51+ * thread to its current CPU
52+ */
53+
54 static void init_ibs(void)
55 {
56- ibs_caps = get_ibs_caps();
57+ preempt_disable();
58
59+ ibs_caps = get_ibs_caps();
60 if (!ibs_caps)
61- return;
62+ goto out;
63
64- if (__init_ibs_nmi()) {
65+ if (__init_ibs_nmi() < 0)
66 ibs_caps = 0;
67- return;
68- }
69+ else
70+ printk(KERN_INFO "oprofile: AMD IBS detected (0x%08x)\n", ibs_caps);
71
72- printk(KERN_INFO "oprofile: AMD IBS detected (0x%08x)\n",
73- (unsigned)ibs_caps);
74+out:
75+ preempt_enable();
76 }
77
78 static int (*create_arch_files)(struct super_block *sb, struct dentry *root);
79--
801.6.6.1
81
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0054-perf-Fix-callchain-hit-bad-cast-on-ascii-display.patch b/extras/recipes-kernel/linux/linux-omap/linus/0054-perf-Fix-callchain-hit-bad-cast-on-ascii-display.patch
new file mode 100644
index 00000000..09ed27c3
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0054-perf-Fix-callchain-hit-bad-cast-on-ascii-display.patch
@@ -0,0 +1,39 @@
1From ef44b2900e7bfd255e56ae9bd2ec03d2c13b780c Mon Sep 17 00:00:00 2001
2From: Frederic Weisbecker <fweisbec@gmail.com>
3Date: Mon, 3 Jan 2011 16:13:11 +0100
4Subject: [PATCH 54/65] perf: Fix callchain hit bad cast on ascii display
5
6ipchain__fprintf_graph() casts the number of hits in a branch as an
7int, which means we lose its highests bits.
8
9This results in meaningless number of callchain hits in perf.data
10that have a high number of hits recorded, typically those that have
11callchain branches hits appearing more than INT_MAX. This happens
12easily as those are pondered by the event period.
13
14Reported-by: Nick Piggin <npiggin@kernel.dk>
15Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
16Cc: Ingo Molnar <mingo@elte.hu>
17Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
18Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
19Cc: Paul Mackerras <paulus@samba.org>
20---
21 tools/perf/util/hist.c | 2 +-
22 1 files changed, 1 insertions(+), 1 deletions(-)
23
24diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
25index 2022e87..76bcc35 100644
26--- a/tools/perf/util/hist.c
27+++ b/tools/perf/util/hist.c
28@@ -356,7 +356,7 @@ static size_t ipchain__fprintf_graph_line(FILE *fp, int depth, int depth_mask,
29
30 static size_t ipchain__fprintf_graph(FILE *fp, struct callchain_list *chain,
31 int depth, int depth_mask, int period,
32- u64 total_samples, int hits,
33+ u64 total_samples, u64 hits,
34 int left_margin)
35 {
36 int i;
37--
381.6.6.1
39
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0055-ARM-it8152-add-IT8152_LAST_IRQ-definition-to-fix-bui.patch b/extras/recipes-kernel/linux/linux-omap/linus/0055-ARM-it8152-add-IT8152_LAST_IRQ-definition-to-fix-bui.patch
new file mode 100644
index 00000000..9a1f006b
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0055-ARM-it8152-add-IT8152_LAST_IRQ-definition-to-fix-bui.patch
@@ -0,0 +1,40 @@
1From 83c04c29567a2f57c4881c8c11bce2bd4bc0b0ab Mon Sep 17 00:00:00 2001
2From: Mike Rapoport <mike@compulab.co.il>
3Date: Wed, 29 Dec 2010 09:06:26 +0200
4Subject: [PATCH 55/65] ARM: it8152: add IT8152_LAST_IRQ definition to fix build error
5
6The commit 6ac6b817f3f4c23c5febd960d8deb343e13af5f3 (ARM: pxa: encode
7IRQ number into .nr_irqs) removed definition of ITE_LAST_IRQ which
8caused the following build error:
9
10CC arch/arm/common/it8152.o
11arch/arm/common/it8152.c: In function 'it8152_init_irq':
12arch/arm/common/it8152.c:86: error: 'IT8152_LAST_IRQ' undeclared (first use in this function)
13arch/arm/common/it8152.c:86: error: (Each undeclared identifier is reported only once
14arch/arm/common/it8152.c:86: error: for each function it appears in.)
15make[2]: *** [arch/arm/common/it8152.o] Error 1
16
17Defining the IT8152_LAST_IRQ in the arch/arm/include/hardware/it8152.c
18fixes the build.
19
20Signed-off-by: Mike Rapoport <mike@compulab.co.il>
21Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
22---
23 arch/arm/include/asm/hardware/it8152.h | 1 +
24 1 files changed, 1 insertions(+), 0 deletions(-)
25
26diff --git a/arch/arm/include/asm/hardware/it8152.h b/arch/arm/include/asm/hardware/it8152.h
27index 21fa272..b2f95c7 100644
28--- a/arch/arm/include/asm/hardware/it8152.h
29+++ b/arch/arm/include/asm/hardware/it8152.h
30@@ -76,6 +76,7 @@ extern unsigned long it8152_base_address;
31 IT8152_PD_IRQ(0) Audio controller (ACR)
32 */
33 #define IT8152_IRQ(x) (IRQ_BOARD_START + (x))
34+#define IT8152_LAST_IRQ (IRQ_BOARD_START + 40)
35
36 /* IRQ-sources in 3 groups - local devices, LPC (serial), and external PCI */
37 #define IT8152_LD_IRQ_COUNT 9
38--
391.6.6.1
40
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0056-ARM-pxa-fix-page-table-corruption-on-resume.patch b/extras/recipes-kernel/linux/linux-omap/linus/0056-ARM-pxa-fix-page-table-corruption-on-resume.patch
new file mode 100644
index 00000000..5ae9609e
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0056-ARM-pxa-fix-page-table-corruption-on-resume.patch
@@ -0,0 +1,46 @@
1From b7072ddc2682868372d060e1e25447e5c1aee007 Mon Sep 17 00:00:00 2001
2From: Aric D. Blumer <aric@sdgsystems.com>
3Date: Wed, 29 Dec 2010 11:18:29 -0500
4Subject: [PATCH 56/65] ARM: pxa: fix page table corruption on resume
5
6Before this patch, the following error would sometimes occur after a
7resume on pxa3xx:
8
9 /path/to/mm/memory.c:144: bad pmd 8040542e.
10
11The problem was that a temporary page table mapping was being improperly
12restored.
13
14The PXA3xx resume code creates a temporary mapping of resume_turn_on_mmu
15to avoid a prefetch abort. The pxa3xx_resume_after_mmu code requires
16that the r1 register holding the address of this mapping not be
17modified, however, resume_turn_on_mmu does modify it. It is mostly
18correct in that r1 receives the base table address, but it may also
19get other bits in 13:0. This results in pxa3xx_resume_after_mmu
20restoring the original mapping to the wrong place, corrupting memory
21and leaving the temporary mapping in place.
22
23Signed-off-by: Matt Reimer <mreimer@sdgsystems.com>
24Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
25---
26 arch/arm/mach-pxa/sleep.S | 4 ++--
27 1 files changed, 2 insertions(+), 2 deletions(-)
28
29diff --git a/arch/arm/mach-pxa/sleep.S b/arch/arm/mach-pxa/sleep.S
30index 52c30b0..ae00811 100644
31--- a/arch/arm/mach-pxa/sleep.S
32+++ b/arch/arm/mach-pxa/sleep.S
33@@ -353,8 +353,8 @@ resume_turn_on_mmu:
34
35 @ Let us ensure we jump to resume_after_mmu only when the mcr above
36 @ actually took effect. They call it the "cpwait" operation.
37- mrc p15, 0, r1, c2, c0, 0 @ queue a dependency on CP15
38- sub pc, r2, r1, lsr #32 @ jump to virtual addr
39+ mrc p15, 0, r0, c2, c0, 0 @ queue a dependency on CP15
40+ sub pc, r2, r0, lsr #32 @ jump to virtual addr
41 nop
42 nop
43 nop
44--
451.6.6.1
46
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0057-atl1-fix-oops-when-changing-tx-rx-ring-params.patch b/extras/recipes-kernel/linux/linux-omap/linus/0057-atl1-fix-oops-when-changing-tx-rx-ring-params.patch
new file mode 100644
index 00000000..9db691b1
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0057-atl1-fix-oops-when-changing-tx-rx-ring-params.patch
@@ -0,0 +1,63 @@
1From f14284bb4ad057377b4944bb3985352fe1079c60 Mon Sep 17 00:00:00 2001
2From: J. K. Cliburn <jcliburn@gmail.com>
3Date: Sat, 1 Jan 2011 05:02:12 +0000
4Subject: [PATCH 57/65] atl1: fix oops when changing tx/rx ring params
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Commit 3f5a2a713aad28480d86b0add00c68484b54febc zeroes out the statistics
10message block (SMB) and coalescing message block (CMB) when adapter ring
11resources are freed. This is desirable behavior, but, as a side effect,
12the commit leads to an oops when atl1_set_ringparam() attempts to alter
13the number of rx or tx elements in the ring buffer (by using ethtool
14-G, for example). We don't want SMB or CMB to change during this
15operation.
16
17Modify atl1_set_ringparam() to preserve SMB and CMB when changing ring
18parameters.
19
20Cc: stable@kernel.org
21Signed-off-by: Jay Cliburn <jcliburn@gmail.com>
22Reported-by: Tõnu Raitviir <jussuf@linux.ee>
23Signed-off-by: David S. Miller <davem@davemloft.net>
24---
25 drivers/net/atlx/atl1.c | 10 ++++++++++
26 1 files changed, 10 insertions(+), 0 deletions(-)
27
28diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c
29index 5336310..3acf512 100644
30--- a/drivers/net/atlx/atl1.c
31+++ b/drivers/net/atlx/atl1.c
32@@ -3504,6 +3504,8 @@ static int atl1_set_ringparam(struct net_device *netdev,
33 struct atl1_rfd_ring rfd_old, rfd_new;
34 struct atl1_rrd_ring rrd_old, rrd_new;
35 struct atl1_ring_header rhdr_old, rhdr_new;
36+ struct atl1_smb smb;
37+ struct atl1_cmb cmb;
38 int err;
39
40 tpd_old = adapter->tpd_ring;
41@@ -3544,11 +3546,19 @@ static int atl1_set_ringparam(struct net_device *netdev,
42 adapter->rrd_ring = rrd_old;
43 adapter->tpd_ring = tpd_old;
44 adapter->ring_header = rhdr_old;
45+ /*
46+ * Save SMB and CMB, since atl1_free_ring_resources
47+ * will clear them.
48+ */
49+ smb = adapter->smb;
50+ cmb = adapter->cmb;
51 atl1_free_ring_resources(adapter);
52 adapter->rfd_ring = rfd_new;
53 adapter->rrd_ring = rrd_new;
54 adapter->tpd_ring = tpd_new;
55 adapter->ring_header = rhdr_new;
56+ adapter->smb = smb;
57+ adapter->cmb = cmb;
58
59 err = atl1_up(adapter);
60 if (err)
61--
621.6.6.1
63
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0058-bridge-fix-br_multicast_ipv6_rcv-for-paged-skbs.patch b/extras/recipes-kernel/linux/linux-omap/linus/0058-bridge-fix-br_multicast_ipv6_rcv-for-paged-skbs.patch
new file mode 100644
index 00000000..857f506f
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0058-bridge-fix-br_multicast_ipv6_rcv-for-paged-skbs.patch
@@ -0,0 +1,157 @@
1From 87bd79394bd7f4b7e01199421aae0df5fb1910d0 Mon Sep 17 00:00:00 2001
2From: Tomas Winkler <tomas.winkler@intel.com>
3Date: Mon, 3 Jan 2011 11:26:08 -0800
4Subject: [PATCH 58/65] bridge: fix br_multicast_ipv6_rcv for paged skbs
5
6use pskb_may_pull to access ipv6 header correctly for paged skbs
7It was omitted in the bridge code leading to crash in blind
8__skb_pull
9
10since the skb is cloned undonditionally we also simplify the
11the exit path
12
13this fixes bug https://bugzilla.kernel.org/show_bug.cgi?id=25202
14
15Dec 15 14:36:40 User-PC hostapd: wlan0: STA 00:15:00:60:5d:34 IEEE 802.11: authenticated
16Dec 15 14:36:40 User-PC hostapd: wlan0: STA 00:15:00:60:5d:34 IEEE 802.11: associated (aid 2)
17Dec 15 14:36:40 User-PC hostapd: wlan0: STA 00:15:00:60:5d:34 RADIUS: starting accounting session 4D0608A3-00000005
18Dec 15 14:36:41 User-PC kernel: [175576.120287] ------------[ cut here ]------------
19Dec 15 14:36:41 User-PC kernel: [175576.120452] kernel BUG at include/linux/skbuff.h:1178!
20Dec 15 14:36:41 User-PC kernel: [175576.120609] invalid opcode: 0000 [#1] SMP
21Dec 15 14:36:41 User-PC kernel: [175576.120749] last sysfs file: /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/uevent
22Dec 15 14:36:41 User-PC kernel: [175576.121035] Modules linked in: approvals binfmt_misc bridge stp llc parport_pc ppdev arc4 iwlagn snd_hda_codec_realtek iwlcore i915 snd_hda_intel mac80211 joydev snd_hda_codec snd_hwdep snd_pcm snd_seq_midi drm_kms_helper snd_rawmidi drm snd_seq_midi_event snd_seq snd_timer snd_seq_device cfg80211 eeepc_wmi usbhid psmouse intel_agp i2c_algo_bit intel_gtt uvcvideo agpgart videodev sparse_keymap snd shpchp v4l1_compat lp hid video serio_raw soundcore output snd_page_alloc ahci libahci atl1c
23Dec 15 14:36:41 User-PC kernel: [175576.122712]
24Dec 15 14:36:41 User-PC kernel: [175576.122769] Pid: 0, comm: kworker/0:0 Tainted: G W 2.6.37-rc5-wl+ #3 1015PE/1016P
25Dec 15 14:36:41 User-PC kernel: [175576.123012] EIP: 0060:[<f83edd65>] EFLAGS: 00010283 CPU: 1
26Dec 15 14:36:41 User-PC kernel: [175576.123193] EIP is at br_multicast_rcv+0xc95/0xe1c [bridge]
27Dec 15 14:36:41 User-PC kernel: [175576.123362] EAX: 0000001c EBX: f5626318 ECX: 00000000 EDX: 00000000
28Dec 15 14:36:41 User-PC kernel: [175576.123550] ESI: ec512262 EDI: f5626180 EBP: f60b5ca0 ESP: f60b5bd8
29Dec 15 14:36:41 User-PC kernel: [175576.123737] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
30Dec 15 14:36:41 User-PC kernel: [175576.123902] Process kworker/0:0 (pid: 0, ti=f60b4000 task=f60a8000 task.ti=f60b0000)
31Dec 15 14:36:41 User-PC kernel: [175576.124137] Stack:
32Dec 15 14:36:41 User-PC kernel: [175576.124181] ec556500 f6d06800 f60b5be8 c01087d8 ec512262 00000030 00000024 f5626180
33Dec 15 14:36:41 User-PC kernel: [175576.124181] f572c200 ef463440 f5626300 3affffff f6d06dd0 e60766a4 000000c4 f6d06860
34Dec 15 14:36:41 User-PC kernel: [175576.124181] ffffffff ec55652c 00000001 f6d06844 f60b5c64 c0138264 c016e451 c013e47d
35Dec 15 14:36:41 User-PC kernel: [175576.124181] Call Trace:
36Dec 15 14:36:41 User-PC kernel: [175576.124181] [<c01087d8>] ? sched_clock+0x8/0x10
37Dec 15 14:36:41 User-PC kernel: [175576.124181] [<c0138264>] ? enqueue_entity+0x174/0x440
38Dec 15 14:36:41 User-PC kernel: [175576.124181] [<c016e451>] ? sched_clock_cpu+0x131/0x190
39Dec 15 14:36:41 User-PC kernel: [175576.124181] [<c013e47d>] ? select_task_rq_fair+0x2ad/0x730
40Dec 15 14:36:41 User-PC kernel: [175576.124181] [<c0524fc1>] ? nf_iterate+0x71/0x90
41Dec 15 14:36:41 User-PC kernel: [175576.124181] [<f83e4914>] ? br_handle_frame_finish+0x184/0x220 [bridge]
42Dec 15 14:36:41 User-PC kernel: [175576.124181] [<f83e4790>] ? br_handle_frame_finish+0x0/0x220 [bridge]
43Dec 15 14:36:41 User-PC kernel: [175576.124181] [<f83e46e9>] ? br_handle_frame+0x189/0x230 [bridge]
44Dec 15 14:36:41 User-PC kernel: [175576.124181] [<f83e4790>] ? br_handle_frame_finish+0x0/0x220 [bridge]
45Dec 15 14:36:41 User-PC kernel: [175576.124181] [<f83e4560>] ? br_handle_frame+0x0/0x230 [bridge]
46Dec 15 14:36:41 User-PC kernel: [175576.124181] [<c04ff026>] ? __netif_receive_skb+0x1b6/0x5b0
47Dec 15 14:36:41 User-PC kernel: [175576.124181] [<c04f7a30>] ? skb_copy_bits+0x110/0x210
48Dec 15 14:36:41 User-PC kernel: [175576.124181] [<c0503a7f>] ? netif_receive_skb+0x6f/0x80
49Dec 15 14:36:41 User-PC kernel: [175576.124181] [<f82cb74c>] ? ieee80211_deliver_skb+0x8c/0x1a0 [mac80211]
50Dec 15 14:36:41 User-PC kernel: [175576.124181] [<f82cc836>] ? ieee80211_rx_handlers+0xeb6/0x1aa0 [mac80211]
51Dec 15 14:36:41 User-PC kernel: [175576.124181] [<c04ff1f0>] ? __netif_receive_skb+0x380/0x5b0
52Dec 15 14:36:41 User-PC kernel: [175576.124181] [<c016e242>] ? sched_clock_local+0xb2/0x190
53Dec 15 14:36:41 User-PC kernel: [175576.124181] [<c012b688>] ? default_spin_lock_flags+0x8/0x10
54Dec 15 14:36:41 User-PC kernel: [175576.124181] [<c05d83df>] ? _raw_spin_lock_irqsave+0x2f/0x50
55Dec 15 14:36:41 User-PC kernel: [175576.124181] [<f82cd621>] ? ieee80211_prepare_and_rx_handle+0x201/0xa90 [mac80211]
56Dec 15 14:36:41 User-PC kernel: [175576.124181] [<f82ce154>] ? ieee80211_rx+0x2a4/0x830 [mac80211]
57Dec 15 14:36:41 User-PC kernel: [175576.124181] [<f815a8d6>] ? iwl_update_stats+0xa6/0x2a0 [iwlcore]
58Dec 15 14:36:41 User-PC kernel: [175576.124181] [<f8499212>] ? iwlagn_rx_reply_rx+0x292/0x3b0 [iwlagn]
59Dec 15 14:36:41 User-PC kernel: [175576.124181] [<c05d83df>] ? _raw_spin_lock_irqsave+0x2f/0x50
60Dec 15 14:36:41 User-PC kernel: [175576.124181] [<f8483697>] ? iwl_rx_handle+0xe7/0x350 [iwlagn]
61Dec 15 14:36:41 User-PC kernel: [175576.124181] [<f8486ab7>] ? iwl_irq_tasklet+0xf7/0x5c0 [iwlagn]
62Dec 15 14:36:41 User-PC kernel: [175576.124181] [<c01aece1>] ? __rcu_process_callbacks+0x201/0x2d0
63Dec 15 14:36:41 User-PC kernel: [175576.124181] [<c0150d05>] ? tasklet_action+0xc5/0x100
64Dec 15 14:36:41 User-PC kernel: [175576.124181] [<c0150a07>] ? __do_softirq+0x97/0x1d0
65Dec 15 14:36:41 User-PC kernel: [175576.124181] [<c05d910c>] ? nmi_stack_correct+0x2f/0x34
66Dec 15 14:36:41 User-PC kernel: [175576.124181] [<c0150970>] ? __do_softirq+0x0/0x1d0
67Dec 15 14:36:41 User-PC kernel: [175576.124181] <IRQ>
68Dec 15 14:36:41 User-PC kernel: [175576.124181] [<c01508f5>] ? irq_exit+0x65/0x70
69Dec 15 14:36:41 User-PC kernel: [175576.124181] [<c05df062>] ? do_IRQ+0x52/0xc0
70Dec 15 14:36:41 User-PC kernel: [175576.124181] [<c01036b0>] ? common_interrupt+0x30/0x38
71Dec 15 14:36:41 User-PC kernel: [175576.124181] [<c03a1fc2>] ? intel_idle+0xc2/0x160
72Dec 15 14:36:41 User-PC kernel: [175576.124181] [<c04daebb>] ? cpuidle_idle_call+0x6b/0x100
73Dec 15 14:36:41 User-PC kernel: [175576.124181] [<c0101dea>] ? cpu_idle+0x8a/0xf0
74Dec 15 14:36:41 User-PC kernel: [175576.124181] [<c05d2702>] ? start_secondary+0x1e8/0x1ee
75
76Cc: David Miller <davem@davemloft.net>
77Cc: Johannes Berg <johannes@sipsolutions.net>
78Cc: Stephen Hemminger <shemminger@vyatta.com>
79Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
80Signed-off-by: David S. Miller <davem@davemloft.net>
81---
82 net/bridge/br_multicast.c | 28 ++++++++++++++++++----------
83 1 files changed, 18 insertions(+), 10 deletions(-)
84
85diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
86index f19e347..543b326 100644
87--- a/net/bridge/br_multicast.c
88+++ b/net/bridge/br_multicast.c
89@@ -1430,7 +1430,7 @@ static int br_multicast_ipv6_rcv(struct net_bridge *br,
90 struct net_bridge_port *port,
91 struct sk_buff *skb)
92 {
93- struct sk_buff *skb2 = skb;
94+ struct sk_buff *skb2;
95 struct ipv6hdr *ip6h;
96 struct icmp6hdr *icmp6h;
97 u8 nexthdr;
98@@ -1469,15 +1469,15 @@ static int br_multicast_ipv6_rcv(struct net_bridge *br,
99 if (!skb2)
100 return -ENOMEM;
101
102+ err = -EINVAL;
103+ if (!pskb_may_pull(skb2, offset + sizeof(struct icmp6hdr)))
104+ goto out;
105+
106 len -= offset - skb_network_offset(skb2);
107
108 __skb_pull(skb2, offset);
109 skb_reset_transport_header(skb2);
110
111- err = -EINVAL;
112- if (!pskb_may_pull(skb2, sizeof(*icmp6h)))
113- goto out;
114-
115 icmp6h = icmp6_hdr(skb2);
116
117 switch (icmp6h->icmp6_type) {
118@@ -1516,7 +1516,12 @@ static int br_multicast_ipv6_rcv(struct net_bridge *br,
119 switch (icmp6h->icmp6_type) {
120 case ICMPV6_MGM_REPORT:
121 {
122- struct mld_msg *mld = (struct mld_msg *)icmp6h;
123+ struct mld_msg *mld;
124+ if (!pskb_may_pull(skb2, sizeof(*mld))) {
125+ err = -EINVAL;
126+ goto out;
127+ }
128+ mld = (struct mld_msg *)skb_transport_header(skb2);
129 BR_INPUT_SKB_CB(skb2)->mrouters_only = 1;
130 err = br_ip6_multicast_add_group(br, port, &mld->mld_mca);
131 break;
132@@ -1529,15 +1534,18 @@ static int br_multicast_ipv6_rcv(struct net_bridge *br,
133 break;
134 case ICMPV6_MGM_REDUCTION:
135 {
136- struct mld_msg *mld = (struct mld_msg *)icmp6h;
137+ struct mld_msg *mld;
138+ if (!pskb_may_pull(skb2, sizeof(*mld))) {
139+ err = -EINVAL;
140+ goto out;
141+ }
142+ mld = (struct mld_msg *)skb_transport_header(skb2);
143 br_ip6_multicast_leave_group(br, port, &mld->mld_mca);
144 }
145 }
146
147 out:
148- __skb_push(skb2, offset);
149- if (skb2 != skb)
150- kfree_skb(skb2);
151+ kfree_skb(skb2);
152 return err;
153 }
154 #endif
155--
1561.6.6.1
157
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0059-name_to_dev_t-must-not-call-__init-code.patch b/extras/recipes-kernel/linux/linux-omap/linus/0059-name_to_dev_t-must-not-call-__init-code.patch
new file mode 100644
index 00000000..26915acc
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0059-name_to_dev_t-must-not-call-__init-code.patch
@@ -0,0 +1,31 @@
1From edb8dd77b87534a3cc6bf4e2a234216d2cc68f89 Mon Sep 17 00:00:00 2001
2From: Jan Beulich <JBeulich@novell.com>
3Date: Mon, 3 Jan 2011 15:07:02 +0000
4Subject: [PATCH 59/65] name_to_dev_t() must not call __init code
5
6The function can't be __init itself (being called from some sysfs
7handler), and hence none of the functions it calls can be either.
8
9Signed-off-by: Jan Beulich <jbeulich@novell.com>
10Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
11Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12---
13 init/do_mounts.c | 2 +-
14 1 files changed, 1 insertions(+), 1 deletions(-)
15
16diff --git a/init/do_mounts.c b/init/do_mounts.c
17index 830aaec..2b54bef 100644
18--- a/init/do_mounts.c
19+++ b/init/do_mounts.c
20@@ -93,7 +93,7 @@ no_match:
21 *
22 * Returns the matching dev_t on success or 0 on failure.
23 */
24-static dev_t __init devt_from_partuuid(char *uuid_str)
25+static dev_t devt_from_partuuid(char *uuid_str)
26 {
27 dev_t res = 0;
28 struct device *dev = NULL;
29--
301.6.6.1
31
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0060-bridge-stp-ensure-mac-header-is-set.patch b/extras/recipes-kernel/linux/linux-omap/linus/0060-bridge-stp-ensure-mac-header-is-set.patch
new file mode 100644
index 00000000..ad0b8e1b
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0060-bridge-stp-ensure-mac-header-is-set.patch
@@ -0,0 +1,38 @@
1From ff26fe4db962b41b794fb81518b8e407093239d9 Mon Sep 17 00:00:00 2001
2From: Florian Westphal <fw@strlen.de>
3Date: Mon, 3 Jan 2011 04:16:28 +0000
4Subject: [PATCH 60/65] bridge: stp: ensure mac header is set
5
6commit bf9ae5386bca8836c16e69ab8fdbe46767d7452a
7(llc: use dev_hard_header) removed the
8skb_reset_mac_header call from llc_mac_hdr_init.
9
10This seems fine itself, but br_send_bpdu() invokes ebtables LOCAL_OUT.
11
12We oops in ebt_basic_match() because it assumes eth_hdr(skb) returns
13a meaningful result.
14
15Cc: acme@ghostprotocols.net
16References: https://bugzilla.kernel.org/show_bug.cgi?id=24532
17Signed-off-by: Florian Westphal <fw@strlen.de>
18Signed-off-by: David S. Miller <davem@davemloft.net>
19---
20 net/bridge/br_stp_bpdu.c | 2 ++
21 1 files changed, 2 insertions(+), 0 deletions(-)
22
23diff --git a/net/bridge/br_stp_bpdu.c b/net/bridge/br_stp_bpdu.c
24index 35cf270..e3d7aef 100644
25--- a/net/bridge/br_stp_bpdu.c
26+++ b/net/bridge/br_stp_bpdu.c
27@@ -50,6 +50,8 @@ static void br_send_bpdu(struct net_bridge_port *p,
28
29 llc_mac_hdr_init(skb, p->dev->dev_addr, p->br->group_addr);
30
31+ skb_reset_mac_header(skb);
32+
33 NF_HOOK(NFPROTO_BRIDGE, NF_BR_LOCAL_OUT, skb, NULL, skb->dev,
34 dev_queue_xmit);
35 }
36--
371.6.6.1
38
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0061-ima-fix-add-LSM-rule-bug.patch b/extras/recipes-kernel/linux/linux-omap/linus/0061-ima-fix-add-LSM-rule-bug.patch
new file mode 100644
index 00000000..5c37ce35
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0061-ima-fix-add-LSM-rule-bug.patch
@@ -0,0 +1,64 @@
1From 497d2c1cfa523a66bfea594791d8f2a50e5bb0aa Mon Sep 17 00:00:00 2001
2From: Mimi Zohar <zohar@linux.vnet.ibm.com>
3Date: Mon, 3 Jan 2011 14:59:10 -0800
4Subject: [PATCH 61/65] ima: fix add LSM rule bug
5
6If security_filter_rule_init() doesn't return a rule, then not everything
7is as fine as the return code implies.
8
9This bug only occurs when the LSM (eg. SELinux) is disabled at runtime.
10
11Adding an empty LSM rule causes ima_match_rules() to always succeed,
12ignoring any remaining rules.
13
14 default IMA TCB policy:
15 # PROC_SUPER_MAGIC
16 dont_measure fsmagic=0x9fa0
17 # SYSFS_MAGIC
18 dont_measure fsmagic=0x62656572
19 # DEBUGFS_MAGIC
20 dont_measure fsmagic=0x64626720
21 # TMPFS_MAGIC
22 dont_measure fsmagic=0x01021994
23 # SECURITYFS_MAGIC
24 dont_measure fsmagic=0x73636673
25
26 < LSM specific rule >
27 dont_measure obj_type=var_log_t
28
29 measure func=BPRM_CHECK
30 measure func=FILE_MMAP mask=MAY_EXEC
31 measure func=FILE_CHECK mask=MAY_READ uid=0
32
33Thus without the patch, with the boot parameters 'tcb selinux=0', adding
34the above 'dont_measure obj_type=var_log_t' rule to the default IMA TCB
35measurement policy, would result in nothing being measured. The patch
36prevents the default TCB policy from being replaced.
37
38Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
39Cc: James Morris <jmorris@namei.org>
40Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
41Cc: David Safford <safford@watson.ibm.com>
42Cc: <stable@kernel.org>
43Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
44Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
45---
46 security/integrity/ima/ima_policy.c | 2 ++
47 1 files changed, 2 insertions(+), 0 deletions(-)
48
49diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c
50index aef8c0a..d661afb 100644
51--- a/security/integrity/ima/ima_policy.c
52+++ b/security/integrity/ima/ima_policy.c
53@@ -253,6 +253,8 @@ static int ima_lsm_rule_init(struct ima_measure_rule_entry *entry,
54 result = security_filter_rule_init(entry->lsm[lsm_rule].type,
55 Audit_equal, args,
56 &entry->lsm[lsm_rule].rule);
57+ if (!entry->lsm[lsm_rule].rule)
58+ return -EINVAL;
59 return result;
60 }
61
62--
631.6.6.1
64
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0062-arch-mn10300-kernel-irq.c-fix-build.patch b/extras/recipes-kernel/linux/linux-omap/linus/0062-arch-mn10300-kernel-irq.c-fix-build.patch
new file mode 100644
index 00000000..ecbbaa02
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0062-arch-mn10300-kernel-irq.c-fix-build.patch
@@ -0,0 +1,31 @@
1From 942dd5c14797f41c9e6d960ae95940ccdb7cb044 Mon Sep 17 00:00:00 2001
2From: Andrew Morton <akpm@linux-foundation.org>
3Date: Mon, 3 Jan 2011 14:59:11 -0800
4Subject: [PATCH 62/65] arch/mn10300/kernel/irq.c: fix build
5
6Addresses https://bugzilla.kernel.org/show_bug.cgi?id=25702
7
8Reported-by: Martin Ettl <ettl.martin@gmx.de>
9Cc: David Howells <dhowells@redhat.com>
10Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12---
13 arch/mn10300/kernel/irq.c | 2 +-
14 1 files changed, 1 insertions(+), 1 deletions(-)
15
16diff --git a/arch/mn10300/kernel/irq.c b/arch/mn10300/kernel/irq.c
17index c2e4459..ac11754 100644
18--- a/arch/mn10300/kernel/irq.c
19+++ b/arch/mn10300/kernel/irq.c
20@@ -459,7 +459,7 @@ void migrate_irqs(void)
21 tmp = CROSS_GxICR(irq, new);
22
23 x &= GxICR_LEVEL | GxICR_ENABLE;
24- if (GxICR(irq) & GxICR_REQUEST) {
25+ if (GxICR(irq) & GxICR_REQUEST)
26 x |= GxICR_REQUEST | GxICR_DETECT;
27 CROSS_GxICR(irq, new) = x;
28 tmp = CROSS_GxICR(irq, new);
29--
301.6.6.1
31
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0063-remove-trim_fs-method-from-Documentation-filesystems.patch b/extras/recipes-kernel/linux/linux-omap/linus/0063-remove-trim_fs-method-from-Documentation-filesystems.patch
new file mode 100644
index 00000000..d7e9481b
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0063-remove-trim_fs-method-from-Documentation-filesystems.patch
@@ -0,0 +1,38 @@
1From 012cfd55bb9075c4697cc068ba0a8c0d0069433a Mon Sep 17 00:00:00 2001
2From: Christoph Hellwig <hch@lst.de>
3Date: Tue, 4 Jan 2011 07:14:24 +0100
4Subject: [PATCH 63/65] remove trim_fs method from Documentation/filesystems/Locking
5
6The ->trim_fs has been removed meanwhile, so remove it from the documentation
7as well.
8
9Signed-off-by: Christoph Hellwig <hch@lst.de>
10Reported-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
11Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12---
13 Documentation/filesystems/Locking | 2 --
14 1 files changed, 0 insertions(+), 2 deletions(-)
15
16diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
17index 7686e76..33fa3e5 100644
18--- a/Documentation/filesystems/Locking
19+++ b/Documentation/filesystems/Locking
20@@ -115,7 +115,6 @@ prototypes:
21 ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t);
22 ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t);
23 int (*bdev_try_to_free_page)(struct super_block*, struct page*, gfp_t);
24- int (*trim_fs) (struct super_block *, struct fstrim_range *);
25
26 locking rules:
27 All may block [not true, see below]
28@@ -138,7 +137,6 @@ show_options: no (namespace_sem)
29 quota_read: no (see below)
30 quota_write: no (see below)
31 bdev_try_to_free_page: no (see below)
32-trim_fs: no
33
34 ->statfs() has s_umount (shared) when called by ustat(2) (native or
35 compat), but that's an accident of bad API; s_umount is used to pin
36--
371.6.6.1
38
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0064-ipv4-route.c-respect-prefsrc-for-local-routes.patch b/extras/recipes-kernel/linux/linux-omap/linus/0064-ipv4-route.c-respect-prefsrc-for-local-routes.patch
new file mode 100644
index 00000000..56e00911
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0064-ipv4-route.c-respect-prefsrc-for-local-routes.patch
@@ -0,0 +1,57 @@
1From 1e3d23ed2eae8473568b34fdc323d2fec679616b Mon Sep 17 00:00:00 2001
2From: Joel Sing <jsing@google.com>
3Date: Mon, 3 Jan 2011 20:24:20 +0000
4Subject: [PATCH 64/65] ipv4/route.c: respect prefsrc for local routes
5
6The preferred source address is currently ignored for local routes,
7which results in all local connections having a src address that is the
8same as the local dst address. Fix this by respecting the preferred source
9address when it is provided for local routes.
10
11This bug can be demonstrated as follows:
12
13 # ifconfig dummy0 192.168.0.1
14 # ip route show table local | grep local.*dummy0
15 local 192.168.0.1 dev dummy0 proto kernel scope host src 192.168.0.1
16 # ip route change table local local 192.168.0.1 dev dummy0 \
17 proto kernel scope host src 127.0.0.1
18 # ip route show table local | grep local.*dummy0
19 local 192.168.0.1 dev dummy0 proto kernel scope host src 127.0.0.1
20
21We now establish a local connection and verify the source IP
22address selection:
23
24 # nc -l 192.168.0.1 3128 &
25 # nc 192.168.0.1 3128 &
26 # netstat -ant | grep 192.168.0.1:3128.*EST
27 tcp 0 0 192.168.0.1:3128 192.168.0.1:33228 ESTABLISHED
28 tcp 0 0 192.168.0.1:33228 192.168.0.1:3128 ESTABLISHED
29
30Signed-off-by: Joel Sing <jsing@google.com>
31Signed-off-by: David S. Miller <davem@davemloft.net>
32---
33 net/ipv4/route.c | 8 ++++++--
34 1 files changed, 6 insertions(+), 2 deletions(-)
35
36diff --git a/net/ipv4/route.c b/net/ipv4/route.c
37index df948b0..93bfd95 100644
38--- a/net/ipv4/route.c
39+++ b/net/ipv4/route.c
40@@ -2649,8 +2649,12 @@ static int ip_route_output_slow(struct net *net, struct rtable **rp,
41 }
42
43 if (res.type == RTN_LOCAL) {
44- if (!fl.fl4_src)
45- fl.fl4_src = fl.fl4_dst;
46+ if (!fl.fl4_src) {
47+ if (res.fi->fib_prefsrc)
48+ fl.fl4_src = res.fi->fib_prefsrc;
49+ else
50+ fl.fl4_src = fl.fl4_dst;
51+ }
52 dev_out = net->loopback_dev;
53 fl.oif = dev_out->ifindex;
54 res.fi = NULL;
55--
561.6.6.1
57
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0065-Linux-2.6.37.patch b/extras/recipes-kernel/linux/linux-omap/linus/0065-Linux-2.6.37.patch
new file mode 100644
index 00000000..f4f6c6b1
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0065-Linux-2.6.37.patch
@@ -0,0 +1,25 @@
1From 52aefa299da0c025c4e521f2a40a89c01aad5a17 Mon Sep 17 00:00:00 2001
2From: Linus Torvalds <torvalds@linux-foundation.org>
3Date: Tue, 4 Jan 2011 16:50:19 -0800
4Subject: [PATCH 65/65] Linux 2.6.37
5
6---
7 Makefile | 2 +-
8 1 files changed, 1 insertions(+), 1 deletions(-)
9
10diff --git a/Makefile b/Makefile
11index e7c41f1..74b2555 100644
12--- a/Makefile
13+++ b/Makefile
14@@ -1,7 +1,7 @@
15 VERSION = 2
16 PATCHLEVEL = 6
17 SUBLEVEL = 37
18-EXTRAVERSION = -rc8
19+EXTRAVERSION =
20 NAME = Flesh-Eating Bats with Fangs
21
22 # *DOCUMENTATION*
23--
241.6.6.1
25