Contents of /trunk/kernel-magellan/patches-4.0/0106-4.0.7-all-fixes.patch
Parent Directory | Revision Log
Revision 2603 -
(show annotations)
(download)
Tue Jun 30 07:51:58 2015 UTC (9 years, 3 months ago) by niro
File size: 23824 byte(s)
Tue Jun 30 07:51:58 2015 UTC (9 years, 3 months ago) by niro
File size: 23824 byte(s)
-linux-4.0.7
1 | diff --git a/Makefile b/Makefile |
2 | index af6da040b952..bd76a8e94395 100644 |
3 | --- a/Makefile |
4 | +++ b/Makefile |
5 | @@ -1,6 +1,6 @@ |
6 | VERSION = 4 |
7 | PATCHLEVEL = 0 |
8 | -SUBLEVEL = 6 |
9 | +SUBLEVEL = 7 |
10 | EXTRAVERSION = |
11 | NAME = Hurr durr I'ma sheep |
12 | |
13 | diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h |
14 | index f70eca7ee705..0ef8d4b47102 100644 |
15 | --- a/arch/arm/mach-exynos/common.h |
16 | +++ b/arch/arm/mach-exynos/common.h |
17 | @@ -153,6 +153,8 @@ extern void exynos_enter_aftr(void); |
18 | |
19 | extern struct cpuidle_exynos_data cpuidle_coupled_exynos_data; |
20 | |
21 | +extern void exynos_set_delayed_reset_assertion(bool enable); |
22 | + |
23 | extern void s5p_init_cpu(void __iomem *cpuid_addr); |
24 | extern unsigned int samsung_rev(void); |
25 | extern void __iomem *cpu_boot_reg_base(void); |
26 | diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c |
27 | index 9e9dfdfad9d7..1081ff1f03c6 100644 |
28 | --- a/arch/arm/mach-exynos/exynos.c |
29 | +++ b/arch/arm/mach-exynos/exynos.c |
30 | @@ -166,6 +166,33 @@ static void __init exynos_init_io(void) |
31 | exynos_map_io(); |
32 | } |
33 | |
34 | +/* |
35 | + * Set or clear the USE_DELAYED_RESET_ASSERTION option. Used by smp code |
36 | + * and suspend. |
37 | + * |
38 | + * This is necessary only on Exynos4 SoCs. When system is running |
39 | + * USE_DELAYED_RESET_ASSERTION should be set so the ARM CLK clock down |
40 | + * feature could properly detect global idle state when secondary CPU is |
41 | + * powered down. |
42 | + * |
43 | + * However this should not be set when such system is going into suspend. |
44 | + */ |
45 | +void exynos_set_delayed_reset_assertion(bool enable) |
46 | +{ |
47 | + if (soc_is_exynos4()) { |
48 | + unsigned int tmp, core_id; |
49 | + |
50 | + for (core_id = 0; core_id < num_possible_cpus(); core_id++) { |
51 | + tmp = pmu_raw_readl(EXYNOS_ARM_CORE_OPTION(core_id)); |
52 | + if (enable) |
53 | + tmp |= S5P_USE_DELAYED_RESET_ASSERTION; |
54 | + else |
55 | + tmp &= ~(S5P_USE_DELAYED_RESET_ASSERTION); |
56 | + pmu_raw_writel(tmp, EXYNOS_ARM_CORE_OPTION(core_id)); |
57 | + } |
58 | + } |
59 | +} |
60 | + |
61 | static const struct of_device_id exynos_dt_pmu_match[] = { |
62 | { .compatible = "samsung,exynos3250-pmu" }, |
63 | { .compatible = "samsung,exynos4210-pmu" }, |
64 | diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c |
65 | index d2e9f12d12f1..d45e8cd23925 100644 |
66 | --- a/arch/arm/mach-exynos/platsmp.c |
67 | +++ b/arch/arm/mach-exynos/platsmp.c |
68 | @@ -34,30 +34,6 @@ |
69 | |
70 | extern void exynos4_secondary_startup(void); |
71 | |
72 | -/* |
73 | - * Set or clear the USE_DELAYED_RESET_ASSERTION option, set on Exynos4 SoCs |
74 | - * during hot-(un)plugging CPUx. |
75 | - * |
76 | - * The feature can be cleared safely during first boot of secondary CPU. |
77 | - * |
78 | - * Exynos4 SoCs require setting USE_DELAYED_RESET_ASSERTION during powering |
79 | - * down a CPU so the CPU idle clock down feature could properly detect global |
80 | - * idle state when CPUx is off. |
81 | - */ |
82 | -static void exynos_set_delayed_reset_assertion(u32 core_id, bool enable) |
83 | -{ |
84 | - if (soc_is_exynos4()) { |
85 | - unsigned int tmp; |
86 | - |
87 | - tmp = pmu_raw_readl(EXYNOS_ARM_CORE_OPTION(core_id)); |
88 | - if (enable) |
89 | - tmp |= S5P_USE_DELAYED_RESET_ASSERTION; |
90 | - else |
91 | - tmp &= ~(S5P_USE_DELAYED_RESET_ASSERTION); |
92 | - pmu_raw_writel(tmp, EXYNOS_ARM_CORE_OPTION(core_id)); |
93 | - } |
94 | -} |
95 | - |
96 | #ifdef CONFIG_HOTPLUG_CPU |
97 | static inline void cpu_leave_lowpower(u32 core_id) |
98 | { |
99 | @@ -73,8 +49,6 @@ static inline void cpu_leave_lowpower(u32 core_id) |
100 | : "=&r" (v) |
101 | : "Ir" (CR_C), "Ir" (0x40) |
102 | : "cc"); |
103 | - |
104 | - exynos_set_delayed_reset_assertion(core_id, false); |
105 | } |
106 | |
107 | static inline void platform_do_lowpower(unsigned int cpu, int *spurious) |
108 | @@ -87,14 +61,6 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious) |
109 | /* Turn the CPU off on next WFI instruction. */ |
110 | exynos_cpu_power_down(core_id); |
111 | |
112 | - /* |
113 | - * Exynos4 SoCs require setting |
114 | - * USE_DELAYED_RESET_ASSERTION so the CPU idle |
115 | - * clock down feature could properly detect |
116 | - * global idle state when CPUx is off. |
117 | - */ |
118 | - exynos_set_delayed_reset_assertion(core_id, true); |
119 | - |
120 | wfi(); |
121 | |
122 | if (pen_release == core_id) { |
123 | @@ -354,9 +320,6 @@ static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle) |
124 | udelay(10); |
125 | } |
126 | |
127 | - /* No harm if this is called during first boot of secondary CPU */ |
128 | - exynos_set_delayed_reset_assertion(core_id, false); |
129 | - |
130 | /* |
131 | * now the secondary core is starting up let it run its |
132 | * calibrations, then wait for it to finish |
133 | @@ -403,6 +366,8 @@ static void __init exynos_smp_prepare_cpus(unsigned int max_cpus) |
134 | |
135 | exynos_sysram_init(); |
136 | |
137 | + exynos_set_delayed_reset_assertion(true); |
138 | + |
139 | if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9) |
140 | scu_enable(scu_base_addr()); |
141 | |
142 | diff --git a/arch/arm/mach-exynos/suspend.c b/arch/arm/mach-exynos/suspend.c |
143 | index 318d127df147..582ef2df960d 100644 |
144 | --- a/arch/arm/mach-exynos/suspend.c |
145 | +++ b/arch/arm/mach-exynos/suspend.c |
146 | @@ -235,6 +235,8 @@ static void exynos_pm_enter_sleep_mode(void) |
147 | |
148 | static void exynos_pm_prepare(void) |
149 | { |
150 | + exynos_set_delayed_reset_assertion(false); |
151 | + |
152 | /* Set wake-up mask registers */ |
153 | exynos_pm_set_wakeup_mask(); |
154 | |
155 | @@ -383,6 +385,7 @@ early_wakeup: |
156 | |
157 | /* Clear SLEEP mode set in INFORM1 */ |
158 | pmu_raw_writel(0x0, S5P_INFORM1); |
159 | + exynos_set_delayed_reset_assertion(true); |
160 | } |
161 | |
162 | static void exynos3250_pm_resume(void) |
163 | diff --git a/arch/powerpc/kernel/idle_power7.S b/arch/powerpc/kernel/idle_power7.S |
164 | index 05adc8bbdef8..401d8d0085aa 100644 |
165 | --- a/arch/powerpc/kernel/idle_power7.S |
166 | +++ b/arch/powerpc/kernel/idle_power7.S |
167 | @@ -500,9 +500,11 @@ BEGIN_FTR_SECTION |
168 | CHECK_HMI_INTERRUPT |
169 | END_FTR_SECTION_IFSET(CPU_FTR_HVMODE) |
170 | ld r1,PACAR1(r13) |
171 | + ld r6,_CCR(r1) |
172 | ld r4,_MSR(r1) |
173 | ld r5,_NIP(r1) |
174 | addi r1,r1,INT_FRAME_SIZE |
175 | + mtcr r6 |
176 | mtspr SPRN_SRR1,r4 |
177 | mtspr SPRN_SRR0,r5 |
178 | rfid |
179 | diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c |
180 | index 4e3d5a9621fe..03189d86357d 100644 |
181 | --- a/arch/x86/kernel/kprobes/core.c |
182 | +++ b/arch/x86/kernel/kprobes/core.c |
183 | @@ -354,6 +354,7 @@ int __copy_instruction(u8 *dest, u8 *src) |
184 | { |
185 | struct insn insn; |
186 | kprobe_opcode_t buf[MAX_INSN_SIZE]; |
187 | + int length; |
188 | unsigned long recovered_insn = |
189 | recover_probed_instruction(buf, (unsigned long)src); |
190 | |
191 | @@ -361,16 +362,18 @@ int __copy_instruction(u8 *dest, u8 *src) |
192 | return 0; |
193 | kernel_insn_init(&insn, (void *)recovered_insn, MAX_INSN_SIZE); |
194 | insn_get_length(&insn); |
195 | + length = insn.length; |
196 | + |
197 | /* Another subsystem puts a breakpoint, failed to recover */ |
198 | if (insn.opcode.bytes[0] == BREAKPOINT_INSTRUCTION) |
199 | return 0; |
200 | - memcpy(dest, insn.kaddr, insn.length); |
201 | + memcpy(dest, insn.kaddr, length); |
202 | |
203 | #ifdef CONFIG_X86_64 |
204 | if (insn_rip_relative(&insn)) { |
205 | s64 newdisp; |
206 | u8 *disp; |
207 | - kernel_insn_init(&insn, dest, insn.length); |
208 | + kernel_insn_init(&insn, dest, length); |
209 | insn_get_displacement(&insn); |
210 | /* |
211 | * The copied instruction uses the %rip-relative addressing |
212 | @@ -394,7 +397,7 @@ int __copy_instruction(u8 *dest, u8 *src) |
213 | *(s32 *) disp = (s32) newdisp; |
214 | } |
215 | #endif |
216 | - return insn.length; |
217 | + return length; |
218 | } |
219 | |
220 | static int arch_copy_kprobe(struct kprobe *p) |
221 | diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c |
222 | index 4ee827d7bf36..3cb2b58fa26b 100644 |
223 | --- a/arch/x86/kvm/lapic.c |
224 | +++ b/arch/x86/kvm/lapic.c |
225 | @@ -1064,6 +1064,17 @@ static void update_divide_count(struct kvm_lapic *apic) |
226 | apic->divide_count); |
227 | } |
228 | |
229 | +static void apic_update_lvtt(struct kvm_lapic *apic) |
230 | +{ |
231 | + u32 timer_mode = kvm_apic_get_reg(apic, APIC_LVTT) & |
232 | + apic->lapic_timer.timer_mode_mask; |
233 | + |
234 | + if (apic->lapic_timer.timer_mode != timer_mode) { |
235 | + apic->lapic_timer.timer_mode = timer_mode; |
236 | + hrtimer_cancel(&apic->lapic_timer.timer); |
237 | + } |
238 | +} |
239 | + |
240 | static void apic_timer_expired(struct kvm_lapic *apic) |
241 | { |
242 | struct kvm_vcpu *vcpu = apic->vcpu; |
243 | @@ -1272,6 +1283,7 @@ static int apic_reg_write(struct kvm_lapic *apic, u32 reg, u32 val) |
244 | apic_set_reg(apic, APIC_LVTT + 0x10 * i, |
245 | lvt_val | APIC_LVT_MASKED); |
246 | } |
247 | + apic_update_lvtt(apic); |
248 | atomic_set(&apic->lapic_timer.pending, 0); |
249 | |
250 | } |
251 | @@ -1304,20 +1316,13 @@ static int apic_reg_write(struct kvm_lapic *apic, u32 reg, u32 val) |
252 | |
253 | break; |
254 | |
255 | - case APIC_LVTT: { |
256 | - u32 timer_mode = val & apic->lapic_timer.timer_mode_mask; |
257 | - |
258 | - if (apic->lapic_timer.timer_mode != timer_mode) { |
259 | - apic->lapic_timer.timer_mode = timer_mode; |
260 | - hrtimer_cancel(&apic->lapic_timer.timer); |
261 | - } |
262 | - |
263 | + case APIC_LVTT: |
264 | if (!kvm_apic_sw_enabled(apic)) |
265 | val |= APIC_LVT_MASKED; |
266 | val &= (apic_lvt_mask[0] | apic->lapic_timer.timer_mode_mask); |
267 | apic_set_reg(apic, APIC_LVTT, val); |
268 | + apic_update_lvtt(apic); |
269 | break; |
270 | - } |
271 | |
272 | case APIC_TMICT: |
273 | if (apic_lvtt_tscdeadline(apic)) |
274 | @@ -1552,7 +1557,7 @@ void kvm_lapic_reset(struct kvm_vcpu *vcpu) |
275 | |
276 | for (i = 0; i < APIC_LVT_NUM; i++) |
277 | apic_set_reg(apic, APIC_LVTT + 0x10 * i, APIC_LVT_MASKED); |
278 | - apic->lapic_timer.timer_mode = 0; |
279 | + apic_update_lvtt(apic); |
280 | apic_set_reg(apic, APIC_LVT0, |
281 | SET_APIC_DELIVERY_MODE(0, APIC_MODE_EXTINT)); |
282 | |
283 | @@ -1778,6 +1783,7 @@ void kvm_apic_post_state_restore(struct kvm_vcpu *vcpu, |
284 | |
285 | apic_update_ppr(apic); |
286 | hrtimer_cancel(&apic->lapic_timer.timer); |
287 | + apic_update_lvtt(apic); |
288 | update_divide_count(apic); |
289 | start_apic_timer(apic); |
290 | apic->irr_pending = true; |
291 | diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c |
292 | index 288547a3c566..f26ebc5e0be6 100644 |
293 | --- a/drivers/bluetooth/ath3k.c |
294 | +++ b/drivers/bluetooth/ath3k.c |
295 | @@ -80,6 +80,7 @@ static const struct usb_device_id ath3k_table[] = { |
296 | { USB_DEVICE(0x0489, 0xe057) }, |
297 | { USB_DEVICE(0x0489, 0xe056) }, |
298 | { USB_DEVICE(0x0489, 0xe05f) }, |
299 | + { USB_DEVICE(0x0489, 0xe076) }, |
300 | { USB_DEVICE(0x0489, 0xe078) }, |
301 | { USB_DEVICE(0x04c5, 0x1330) }, |
302 | { USB_DEVICE(0x04CA, 0x3004) }, |
303 | @@ -111,6 +112,7 @@ static const struct usb_device_id ath3k_table[] = { |
304 | { USB_DEVICE(0x13d3, 0x3408) }, |
305 | { USB_DEVICE(0x13d3, 0x3423) }, |
306 | { USB_DEVICE(0x13d3, 0x3432) }, |
307 | + { USB_DEVICE(0x13d3, 0x3474) }, |
308 | |
309 | /* Atheros AR5BBU12 with sflash firmware */ |
310 | { USB_DEVICE(0x0489, 0xE02C) }, |
311 | @@ -135,6 +137,7 @@ static const struct usb_device_id ath3k_blist_tbl[] = { |
312 | { USB_DEVICE(0x0489, 0xe056), .driver_info = BTUSB_ATH3012 }, |
313 | { USB_DEVICE(0x0489, 0xe057), .driver_info = BTUSB_ATH3012 }, |
314 | { USB_DEVICE(0x0489, 0xe05f), .driver_info = BTUSB_ATH3012 }, |
315 | + { USB_DEVICE(0x0489, 0xe076), .driver_info = BTUSB_ATH3012 }, |
316 | { USB_DEVICE(0x0489, 0xe078), .driver_info = BTUSB_ATH3012 }, |
317 | { USB_DEVICE(0x04c5, 0x1330), .driver_info = BTUSB_ATH3012 }, |
318 | { USB_DEVICE(0x04ca, 0x3004), .driver_info = BTUSB_ATH3012 }, |
319 | @@ -166,6 +169,7 @@ static const struct usb_device_id ath3k_blist_tbl[] = { |
320 | { USB_DEVICE(0x13d3, 0x3408), .driver_info = BTUSB_ATH3012 }, |
321 | { USB_DEVICE(0x13d3, 0x3423), .driver_info = BTUSB_ATH3012 }, |
322 | { USB_DEVICE(0x13d3, 0x3432), .driver_info = BTUSB_ATH3012 }, |
323 | + { USB_DEVICE(0x13d3, 0x3474), .driver_info = BTUSB_ATH3012 }, |
324 | |
325 | /* Atheros AR5BBU22 with sflash firmware */ |
326 | { USB_DEVICE(0x0489, 0xE036), .driver_info = BTUSB_ATH3012 }, |
327 | diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c |
328 | index 2c527da668ae..4fc415703ffc 100644 |
329 | --- a/drivers/bluetooth/btusb.c |
330 | +++ b/drivers/bluetooth/btusb.c |
331 | @@ -174,6 +174,7 @@ static const struct usb_device_id blacklist_table[] = { |
332 | { USB_DEVICE(0x0489, 0xe056), .driver_info = BTUSB_ATH3012 }, |
333 | { USB_DEVICE(0x0489, 0xe057), .driver_info = BTUSB_ATH3012 }, |
334 | { USB_DEVICE(0x0489, 0xe05f), .driver_info = BTUSB_ATH3012 }, |
335 | + { USB_DEVICE(0x0489, 0xe076), .driver_info = BTUSB_ATH3012 }, |
336 | { USB_DEVICE(0x0489, 0xe078), .driver_info = BTUSB_ATH3012 }, |
337 | { USB_DEVICE(0x04c5, 0x1330), .driver_info = BTUSB_ATH3012 }, |
338 | { USB_DEVICE(0x04ca, 0x3004), .driver_info = BTUSB_ATH3012 }, |
339 | @@ -205,6 +206,7 @@ static const struct usb_device_id blacklist_table[] = { |
340 | { USB_DEVICE(0x13d3, 0x3408), .driver_info = BTUSB_ATH3012 }, |
341 | { USB_DEVICE(0x13d3, 0x3423), .driver_info = BTUSB_ATH3012 }, |
342 | { USB_DEVICE(0x13d3, 0x3432), .driver_info = BTUSB_ATH3012 }, |
343 | + { USB_DEVICE(0x13d3, 0x3474), .driver_info = BTUSB_ATH3012 }, |
344 | |
345 | /* Atheros AR5BBU12 with sflash firmware */ |
346 | { USB_DEVICE(0x0489, 0xe02c), .driver_info = BTUSB_IGNORE }, |
347 | diff --git a/drivers/clk/at91/clk-pll.c b/drivers/clk/at91/clk-pll.c |
348 | index 6ec79dbc0840..cbbe40377ad6 100644 |
349 | --- a/drivers/clk/at91/clk-pll.c |
350 | +++ b/drivers/clk/at91/clk-pll.c |
351 | @@ -173,8 +173,7 @@ static long clk_pll_get_best_div_mul(struct clk_pll *pll, unsigned long rate, |
352 | int i = 0; |
353 | |
354 | /* Check if parent_rate is a valid input rate */ |
355 | - if (parent_rate < characteristics->input.min || |
356 | - parent_rate > characteristics->input.max) |
357 | + if (parent_rate < characteristics->input.min) |
358 | return -ERANGE; |
359 | |
360 | /* |
361 | @@ -187,6 +186,15 @@ static long clk_pll_get_best_div_mul(struct clk_pll *pll, unsigned long rate, |
362 | if (!mindiv) |
363 | mindiv = 1; |
364 | |
365 | + if (parent_rate > characteristics->input.max) { |
366 | + tmpdiv = DIV_ROUND_UP(parent_rate, characteristics->input.max); |
367 | + if (tmpdiv > PLL_DIV_MAX) |
368 | + return -ERANGE; |
369 | + |
370 | + if (tmpdiv > mindiv) |
371 | + mindiv = tmpdiv; |
372 | + } |
373 | + |
374 | /* |
375 | * Calculate the maximum divider which is limited by PLL register |
376 | * layout (limited by the MUL or DIV field size). |
377 | diff --git a/drivers/clk/at91/pmc.h b/drivers/clk/at91/pmc.h |
378 | index 69abb08cf146..eb8e5dc9076d 100644 |
379 | --- a/drivers/clk/at91/pmc.h |
380 | +++ b/drivers/clk/at91/pmc.h |
381 | @@ -121,7 +121,7 @@ extern void __init of_at91sam9x5_clk_smd_setup(struct device_node *np, |
382 | struct at91_pmc *pmc); |
383 | #endif |
384 | |
385 | -#if defined(CONFIG_HAVE_AT91_SMD) |
386 | +#if defined(CONFIG_HAVE_AT91_H32MX) |
387 | extern void __init of_sama5d4_clk_h32mx_setup(struct device_node *np, |
388 | struct at91_pmc *pmc); |
389 | #endif |
390 | diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c |
391 | index f347ab7eea95..08b0da23c4ab 100644 |
392 | --- a/drivers/crypto/caam/caamhash.c |
393 | +++ b/drivers/crypto/caam/caamhash.c |
394 | @@ -1543,6 +1543,8 @@ static int ahash_init(struct ahash_request *req) |
395 | |
396 | state->current_buf = 0; |
397 | state->buf_dma = 0; |
398 | + state->buflen_0 = 0; |
399 | + state->buflen_1 = 0; |
400 | |
401 | return 0; |
402 | } |
403 | diff --git a/drivers/crypto/caam/caamrng.c b/drivers/crypto/caam/caamrng.c |
404 | index ae31e555793c..a48dc251b14f 100644 |
405 | --- a/drivers/crypto/caam/caamrng.c |
406 | +++ b/drivers/crypto/caam/caamrng.c |
407 | @@ -56,7 +56,7 @@ |
408 | |
409 | /* Buffer, its dma address and lock */ |
410 | struct buf_data { |
411 | - u8 buf[RN_BUF_SIZE]; |
412 | + u8 buf[RN_BUF_SIZE] ____cacheline_aligned; |
413 | dma_addr_t addr; |
414 | struct completion filled; |
415 | u32 hw_desc[DESC_JOB_O_LEN]; |
416 | diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c |
417 | index ec4d932f8be4..169123a6ad0e 100644 |
418 | --- a/drivers/gpu/drm/i915/i915_drv.c |
419 | +++ b/drivers/gpu/drm/i915/i915_drv.c |
420 | @@ -693,6 +693,16 @@ static int i915_drm_resume(struct drm_device *dev) |
421 | intel_init_pch_refclk(dev); |
422 | drm_mode_config_reset(dev); |
423 | |
424 | + /* |
425 | + * Interrupts have to be enabled before any batches are run. |
426 | + * If not the GPU will hang. i915_gem_init_hw() will initiate |
427 | + * batches to update/restore the context. |
428 | + * |
429 | + * Modeset enabling in intel_modeset_init_hw() also needs |
430 | + * working interrupts. |
431 | + */ |
432 | + intel_runtime_pm_enable_interrupts(dev_priv); |
433 | + |
434 | mutex_lock(&dev->struct_mutex); |
435 | if (i915_gem_init_hw(dev)) { |
436 | DRM_ERROR("failed to re-initialize GPU, declaring wedged!\n"); |
437 | @@ -700,9 +710,6 @@ static int i915_drm_resume(struct drm_device *dev) |
438 | } |
439 | mutex_unlock(&dev->struct_mutex); |
440 | |
441 | - /* We need working interrupts for modeset enabling ... */ |
442 | - intel_runtime_pm_enable_interrupts(dev_priv); |
443 | - |
444 | intel_modeset_init_hw(dev); |
445 | |
446 | spin_lock_irq(&dev_priv->irq_lock); |
447 | diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c |
448 | index 7a628e4cb27a..9536ec390614 100644 |
449 | --- a/drivers/gpu/drm/i915/i915_gem.c |
450 | +++ b/drivers/gpu/drm/i915/i915_gem.c |
451 | @@ -2732,6 +2732,9 @@ void i915_gem_reset(struct drm_device *dev) |
452 | void |
453 | i915_gem_retire_requests_ring(struct intel_engine_cs *ring) |
454 | { |
455 | + if (list_empty(&ring->request_list)) |
456 | + return; |
457 | + |
458 | WARN_ON(i915_verify_lists(ring->dev)); |
459 | |
460 | /* Retire requests first as we use it above for the early return. |
461 | @@ -3088,8 +3091,8 @@ int i915_vma_unbind(struct i915_vma *vma) |
462 | } else if (vma->ggtt_view.pages) { |
463 | sg_free_table(vma->ggtt_view.pages); |
464 | kfree(vma->ggtt_view.pages); |
465 | - vma->ggtt_view.pages = NULL; |
466 | } |
467 | + vma->ggtt_view.pages = NULL; |
468 | } |
469 | |
470 | drm_mm_remove_node(&vma->node); |
471 | diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c |
472 | index 9872ba9abf1a..2ffeda3589c2 100644 |
473 | --- a/drivers/gpu/drm/mgag200/mgag200_mode.c |
474 | +++ b/drivers/gpu/drm/mgag200/mgag200_mode.c |
475 | @@ -1526,6 +1526,11 @@ static int mga_vga_mode_valid(struct drm_connector *connector, |
476 | return MODE_BANDWIDTH; |
477 | } |
478 | |
479 | + if ((mode->hdisplay % 8) != 0 || (mode->hsync_start % 8) != 0 || |
480 | + (mode->hsync_end % 8) != 0 || (mode->htotal % 8) != 0) { |
481 | + return MODE_H_ILLEGAL; |
482 | + } |
483 | + |
484 | if (mode->crtc_hdisplay > 2048 || mode->crtc_hsync_start > 4096 || |
485 | mode->crtc_hsync_end > 4096 || mode->crtc_htotal > 4096 || |
486 | mode->crtc_vdisplay > 2048 || mode->crtc_vsync_start > 4096 || |
487 | diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c |
488 | index 686411e4e4f6..b82f2dd1fc32 100644 |
489 | --- a/drivers/gpu/drm/radeon/radeon_kms.c |
490 | +++ b/drivers/gpu/drm/radeon/radeon_kms.c |
491 | @@ -547,6 +547,9 @@ static int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file |
492 | else |
493 | *value = 1; |
494 | break; |
495 | + case RADEON_INFO_VA_UNMAP_WORKING: |
496 | + *value = true; |
497 | + break; |
498 | default: |
499 | DRM_DEBUG_KMS("Invalid request %d\n", info->request); |
500 | return -EINVAL; |
501 | diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c |
502 | index 147029adb885..ac72ece70160 100644 |
503 | --- a/drivers/infiniband/ulp/isert/ib_isert.c |
504 | +++ b/drivers/infiniband/ulp/isert/ib_isert.c |
505 | @@ -2316,7 +2316,6 @@ isert_build_rdma_wr(struct isert_conn *isert_conn, struct isert_cmd *isert_cmd, |
506 | page_off = offset % PAGE_SIZE; |
507 | |
508 | send_wr->sg_list = ib_sge; |
509 | - send_wr->num_sge = sg_nents; |
510 | send_wr->wr_id = (uintptr_t)&isert_cmd->tx_desc; |
511 | /* |
512 | * Perform mapping of TCM scatterlist memory ib_sge dma_addr. |
513 | @@ -2336,14 +2335,17 @@ isert_build_rdma_wr(struct isert_conn *isert_conn, struct isert_cmd *isert_cmd, |
514 | ib_sge->addr, ib_sge->length, ib_sge->lkey); |
515 | page_off = 0; |
516 | data_left -= ib_sge->length; |
517 | + if (!data_left) |
518 | + break; |
519 | ib_sge++; |
520 | isert_dbg("Incrementing ib_sge pointer to %p\n", ib_sge); |
521 | } |
522 | |
523 | + send_wr->num_sge = ++i; |
524 | isert_dbg("Set outgoing sg_list: %p num_sg: %u from TCM SGLs\n", |
525 | send_wr->sg_list, send_wr->num_sge); |
526 | |
527 | - return sg_nents; |
528 | + return send_wr->num_sge; |
529 | } |
530 | |
531 | static int |
532 | @@ -3311,6 +3313,7 @@ static void isert_free_conn(struct iscsi_conn *conn) |
533 | { |
534 | struct isert_conn *isert_conn = conn->context; |
535 | |
536 | + isert_wait4flush(isert_conn); |
537 | isert_put_conn(isert_conn); |
538 | } |
539 | |
540 | diff --git a/drivers/md/dm.c b/drivers/md/dm.c |
541 | index 9b4e30a82e4a..beda011cb741 100644 |
542 | --- a/drivers/md/dm.c |
543 | +++ b/drivers/md/dm.c |
544 | @@ -1889,8 +1889,8 @@ static int map_request(struct dm_target *ti, struct request *rq, |
545 | dm_kill_unmapped_request(rq, r); |
546 | return r; |
547 | } |
548 | - if (IS_ERR(clone)) |
549 | - return DM_MAPIO_REQUEUE; |
550 | + if (r != DM_MAPIO_REMAPPED) |
551 | + return r; |
552 | if (setup_clone(clone, rq, tio, GFP_KERNEL)) { |
553 | /* -ENOMEM */ |
554 | ti->type->release_clone_rq(clone); |
555 | diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c |
556 | index 75345c1e8c34..5c91df5c1f4f 100644 |
557 | --- a/drivers/net/wireless/b43/main.c |
558 | +++ b/drivers/net/wireless/b43/main.c |
559 | @@ -5365,6 +5365,10 @@ static void b43_supported_bands(struct b43_wldev *dev, bool *have_2ghz_phy, |
560 | *have_5ghz_phy = true; |
561 | return; |
562 | case 0x4321: /* BCM4306 */ |
563 | + /* There are 14e4:4321 PCI devs with 2.4 GHz BCM4321 (N-PHY) */ |
564 | + if (dev->phy.type != B43_PHYTYPE_G) |
565 | + break; |
566 | + /* fall through */ |
567 | case 0x4313: /* BCM4311 */ |
568 | case 0x431a: /* BCM4318 */ |
569 | case 0x432a: /* BCM4321 */ |
570 | diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c |
571 | index 220c0fd059bb..50faef4f056f 100644 |
572 | --- a/drivers/usb/class/cdc-acm.c |
573 | +++ b/drivers/usb/class/cdc-acm.c |
574 | @@ -1468,6 +1468,11 @@ skip_countries: |
575 | goto alloc_fail8; |
576 | } |
577 | |
578 | + if (quirks & CLEAR_HALT_CONDITIONS) { |
579 | + usb_clear_halt(usb_dev, usb_rcvbulkpipe(usb_dev, epread->bEndpointAddress)); |
580 | + usb_clear_halt(usb_dev, usb_sndbulkpipe(usb_dev, epwrite->bEndpointAddress)); |
581 | + } |
582 | + |
583 | return 0; |
584 | alloc_fail8: |
585 | if (acm->country_codes) { |
586 | @@ -1747,6 +1752,10 @@ static const struct usb_device_id acm_ids[] = { |
587 | .driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */ |
588 | }, |
589 | |
590 | + { USB_DEVICE(0x2912, 0x0001), /* ATOL FPrint */ |
591 | + .driver_info = CLEAR_HALT_CONDITIONS, |
592 | + }, |
593 | + |
594 | /* Nokia S60 phones expose two ACM channels. The first is |
595 | * a modem and is picked up by the standard AT-command |
596 | * information below. The second is 'vendor-specific' but |
597 | diff --git a/drivers/usb/class/cdc-acm.h b/drivers/usb/class/cdc-acm.h |
598 | index ffeb3c83941f..b3b6c9db6fe5 100644 |
599 | --- a/drivers/usb/class/cdc-acm.h |
600 | +++ b/drivers/usb/class/cdc-acm.h |
601 | @@ -133,3 +133,4 @@ struct acm { |
602 | #define NO_DATA_INTERFACE BIT(4) |
603 | #define IGNORE_DEVICE BIT(5) |
604 | #define QUIRK_CONTROL_LINE_STATE BIT(6) |
605 | +#define CLEAR_HALT_CONDITIONS BIT(7) |
606 | diff --git a/include/uapi/drm/radeon_drm.h b/include/uapi/drm/radeon_drm.h |
607 | index 50d0fb41a3bf..76d2edea5bd1 100644 |
608 | --- a/include/uapi/drm/radeon_drm.h |
609 | +++ b/include/uapi/drm/radeon_drm.h |
610 | @@ -1034,6 +1034,7 @@ struct drm_radeon_cs { |
611 | #define RADEON_INFO_VRAM_USAGE 0x1e |
612 | #define RADEON_INFO_GTT_USAGE 0x1f |
613 | #define RADEON_INFO_ACTIVE_CU_COUNT 0x20 |
614 | +#define RADEON_INFO_VA_UNMAP_WORKING 0x25 |
615 | |
616 | struct drm_radeon_info { |
617 | uint32_t request; |
618 | diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c |
619 | index ced69da0ff55..7f2e97ce71a7 100644 |
620 | --- a/kernel/trace/trace_events_filter.c |
621 | +++ b/kernel/trace/trace_events_filter.c |
622 | @@ -1369,19 +1369,26 @@ static int check_preds(struct filter_parse_state *ps) |
623 | { |
624 | int n_normal_preds = 0, n_logical_preds = 0; |
625 | struct postfix_elt *elt; |
626 | + int cnt = 0; |
627 | |
628 | list_for_each_entry(elt, &ps->postfix, list) { |
629 | - if (elt->op == OP_NONE) |
630 | + if (elt->op == OP_NONE) { |
631 | + cnt++; |
632 | continue; |
633 | + } |
634 | |
635 | if (elt->op == OP_AND || elt->op == OP_OR) { |
636 | n_logical_preds++; |
637 | + cnt--; |
638 | continue; |
639 | } |
640 | + if (elt->op != OP_NOT) |
641 | + cnt--; |
642 | n_normal_preds++; |
643 | + WARN_ON_ONCE(cnt < 0); |
644 | } |
645 | |
646 | - if (!n_normal_preds || n_logical_preds >= n_normal_preds) { |
647 | + if (cnt != 1 || !n_normal_preds || n_logical_preds >= n_normal_preds) { |
648 | parse_error(ps, FILT_ERR_INVALID_FILTER, 0); |
649 | return -EINVAL; |
650 | } |
651 | diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c |
652 | index 87eff3173ce9..60b3100a2120 100644 |
653 | --- a/sound/pci/hda/patch_sigmatel.c |
654 | +++ b/sound/pci/hda/patch_sigmatel.c |
655 | @@ -100,6 +100,7 @@ enum { |
656 | STAC_HP_ENVY_BASS, |
657 | STAC_HP_BNB13_EQ, |
658 | STAC_HP_ENVY_TS_BASS, |
659 | + STAC_HP_ENVY_TS_DAC_BIND, |
660 | STAC_92HD83XXX_GPIO10_EAPD, |
661 | STAC_92HD83XXX_MODELS |
662 | }; |
663 | @@ -2170,6 +2171,22 @@ static void stac92hd83xxx_fixup_gpio10_eapd(struct hda_codec *codec, |
664 | spec->eapd_switch = 0; |
665 | } |
666 | |
667 | +static void hp_envy_ts_fixup_dac_bind(struct hda_codec *codec, |
668 | + const struct hda_fixup *fix, |
669 | + int action) |
670 | +{ |
671 | + struct sigmatel_spec *spec = codec->spec; |
672 | + static hda_nid_t preferred_pairs[] = { |
673 | + 0xd, 0x13, |
674 | + 0 |
675 | + }; |
676 | + |
677 | + if (action != HDA_FIXUP_ACT_PRE_PROBE) |
678 | + return; |
679 | + |
680 | + spec->gen.preferred_dacs = preferred_pairs; |
681 | +} |
682 | + |
683 | static const struct hda_verb hp_bnb13_eq_verbs[] = { |
684 | /* 44.1KHz base */ |
685 | { 0x22, 0x7A6, 0x3E }, |
686 | @@ -2685,6 +2702,12 @@ static const struct hda_fixup stac92hd83xxx_fixups[] = { |
687 | {} |
688 | }, |
689 | }, |
690 | + [STAC_HP_ENVY_TS_DAC_BIND] = { |
691 | + .type = HDA_FIXUP_FUNC, |
692 | + .v.func = hp_envy_ts_fixup_dac_bind, |
693 | + .chained = true, |
694 | + .chain_id = STAC_HP_ENVY_TS_BASS, |
695 | + }, |
696 | [STAC_92HD83XXX_GPIO10_EAPD] = { |
697 | .type = HDA_FIXUP_FUNC, |
698 | .v.func = stac92hd83xxx_fixup_gpio10_eapd, |
699 | @@ -2763,6 +2786,8 @@ static const struct snd_pci_quirk stac92hd83xxx_fixup_tbl[] = { |
700 | "HP bNB13", STAC_HP_BNB13_EQ), |
701 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x190e, |
702 | "HP ENVY TS", STAC_HP_ENVY_TS_BASS), |
703 | + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1967, |
704 | + "HP ENVY TS", STAC_HP_ENVY_TS_DAC_BIND), |
705 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1940, |
706 | "HP bNB13", STAC_HP_BNB13_EQ), |
707 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1941, |