Gentoo Archives: gentoo-commits

From: Mike Pagano <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/linux-patches:5.4 commit in: /
Date: Wed, 27 Jan 2021 11:13:44
Message-Id: 1611746004.4a4d4885cd76d1a2383dc1cac7c0b44cd685ea1f.mpagano@gentoo
1 commit: 4a4d4885cd76d1a2383dc1cac7c0b44cd685ea1f
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jan 27 11:13:24 2021 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 27 11:13:24 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=4a4d4885
7
8 Linux patch 5.4.93
9
10 Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>
11
12 0000_README | 4 +
13 1092_linux-5.4.93.patch | 2413 +++++++++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 2417 insertions(+)
15
16 diff --git a/0000_README b/0000_README
17 index 29bc2f5..e33ed0d 100644
18 --- a/0000_README
19 +++ b/0000_README
20 @@ -411,6 +411,10 @@ Patch: 1091_linux-5.4.92.patch
21 From: http://www.kernel.org
22 Desc: Linux 5.4.92
23
24 +Patch: 1092_linux-5.4.93.patch
25 +From: http://www.kernel.org
26 +Desc: Linux 5.4.93
27 +
28 Patch: 1500_XATTR_USER_PREFIX.patch
29 From: https://bugs.gentoo.org/show_bug.cgi?id=470644
30 Desc: Support for namespace user.pax.* on tmpfs.
31
32 diff --git a/1092_linux-5.4.93.patch b/1092_linux-5.4.93.patch
33 new file mode 100644
34 index 0000000..b35e765
35 --- /dev/null
36 +++ b/1092_linux-5.4.93.patch
37 @@ -0,0 +1,2413 @@
38 +diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
39 +index 74ba077e99e56..a19ae163c0589 100644
40 +--- a/Documentation/admin-guide/kernel-parameters.txt
41 ++++ b/Documentation/admin-guide/kernel-parameters.txt
42 +@@ -5452,6 +5452,10 @@
43 + This option is obsoleted by the "nopv" option, which
44 + has equivalent effect for XEN platform.
45 +
46 ++ xen_no_vector_callback
47 ++ [KNL,X86,XEN] Disable the vector callback for Xen
48 ++ event channel interrupts.
49 ++
50 + xen_scrub_pages= [XEN]
51 + Boolean option to control scrubbing pages before giving them back
52 + to Xen, for use by other domains. Can be also changed at runtime
53 +diff --git a/Makefile b/Makefile
54 +index 5bae2206a35e7..f8462f8d8a151 100644
55 +--- a/Makefile
56 ++++ b/Makefile
57 +@@ -1,7 +1,7 @@
58 + # SPDX-License-Identifier: GPL-2.0
59 + VERSION = 5
60 + PATCHLEVEL = 4
61 +-SUBLEVEL = 92
62 ++SUBLEVEL = 93
63 + EXTRAVERSION =
64 + NAME = Kleptomaniac Octopus
65 +
66 +diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c
67 +index dd6804a64f1a0..f45bff158fc20 100644
68 +--- a/arch/arm/xen/enlighten.c
69 ++++ b/arch/arm/xen/enlighten.c
70 +@@ -371,7 +371,7 @@ static int __init xen_guest_init(void)
71 + }
72 + gnttab_init();
73 + if (!xen_initial_domain())
74 +- xenbus_probe(NULL);
75 ++ xenbus_probe();
76 +
77 + /*
78 + * Making sure board specific code will not set up ops for
79 +diff --git a/arch/arm64/include/asm/atomic.h b/arch/arm64/include/asm/atomic.h
80 +index 9543b5e0534d2..6e0f48ddfc656 100644
81 +--- a/arch/arm64/include/asm/atomic.h
82 ++++ b/arch/arm64/include/asm/atomic.h
83 +@@ -17,7 +17,7 @@
84 + #include <asm/lse.h>
85 +
86 + #define ATOMIC_OP(op) \
87 +-static inline void arch_##op(int i, atomic_t *v) \
88 ++static __always_inline void arch_##op(int i, atomic_t *v) \
89 + { \
90 + __lse_ll_sc_body(op, i, v); \
91 + }
92 +@@ -32,7 +32,7 @@ ATOMIC_OP(atomic_sub)
93 + #undef ATOMIC_OP
94 +
95 + #define ATOMIC_FETCH_OP(name, op) \
96 +-static inline int arch_##op##name(int i, atomic_t *v) \
97 ++static __always_inline int arch_##op##name(int i, atomic_t *v) \
98 + { \
99 + return __lse_ll_sc_body(op##name, i, v); \
100 + }
101 +@@ -56,7 +56,7 @@ ATOMIC_FETCH_OPS(atomic_sub_return)
102 + #undef ATOMIC_FETCH_OPS
103 +
104 + #define ATOMIC64_OP(op) \
105 +-static inline void arch_##op(long i, atomic64_t *v) \
106 ++static __always_inline void arch_##op(long i, atomic64_t *v) \
107 + { \
108 + __lse_ll_sc_body(op, i, v); \
109 + }
110 +@@ -71,7 +71,7 @@ ATOMIC64_OP(atomic64_sub)
111 + #undef ATOMIC64_OP
112 +
113 + #define ATOMIC64_FETCH_OP(name, op) \
114 +-static inline long arch_##op##name(long i, atomic64_t *v) \
115 ++static __always_inline long arch_##op##name(long i, atomic64_t *v) \
116 + { \
117 + return __lse_ll_sc_body(op##name, i, v); \
118 + }
119 +@@ -94,7 +94,7 @@ ATOMIC64_FETCH_OPS(atomic64_sub_return)
120 + #undef ATOMIC64_FETCH_OP
121 + #undef ATOMIC64_FETCH_OPS
122 +
123 +-static inline long arch_atomic64_dec_if_positive(atomic64_t *v)
124 ++static __always_inline long arch_atomic64_dec_if_positive(atomic64_t *v)
125 + {
126 + return __lse_ll_sc_body(atomic64_dec_if_positive, v);
127 + }
128 +diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
129 +index 4def51c12e1bf..a4e576019d79c 100644
130 +--- a/arch/powerpc/kernel/vmlinux.lds.S
131 ++++ b/arch/powerpc/kernel/vmlinux.lds.S
132 +@@ -210,6 +210,12 @@ SECTIONS
133 + .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
134 + _sinittext = .;
135 + INIT_TEXT
136 ++
137 ++ /*
138 ++ *.init.text might be RO so we must ensure this section ends on
139 ++ * a page boundary.
140 ++ */
141 ++ . = ALIGN(PAGE_SIZE);
142 + _einittext = .;
143 + #ifdef CONFIG_PPC64
144 + *(.tramp.ftrace.init);
145 +@@ -223,21 +229,9 @@ SECTIONS
146 + EXIT_TEXT
147 + }
148 +
149 +- .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) {
150 +- INIT_DATA
151 +- }
152 +-
153 +- .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) {
154 +- INIT_SETUP(16)
155 +- }
156 ++ . = ALIGN(PAGE_SIZE);
157 +
158 +- .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) {
159 +- INIT_CALLS
160 +- }
161 +-
162 +- .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) {
163 +- CON_INITCALL
164 +- }
165 ++ INIT_DATA_SECTION(16)
166 +
167 + . = ALIGN(8);
168 + __ftr_fixup : AT(ADDR(__ftr_fixup) - LOAD_OFFSET) {
169 +@@ -265,9 +259,6 @@ SECTIONS
170 + __stop___fw_ftr_fixup = .;
171 + }
172 + #endif
173 +- .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) {
174 +- INIT_RAM_FS
175 +- }
176 +
177 + PERCPU_SECTION(L1_CACHE_BYTES)
178 +
179 +diff --git a/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts b/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts
180 +index 88cfcb96bf233..cc04e66752aac 100644
181 +--- a/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts
182 ++++ b/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts
183 +@@ -83,6 +83,7 @@
184 + phy-mode = "gmii";
185 + phy-handle = <&phy0>;
186 + phy0: ethernet-phy@0 {
187 ++ compatible = "ethernet-phy-id0007.0771";
188 + reg = <0>;
189 + };
190 + };
191 +diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig
192 +index 420a0dbef3866..3c656fe97e583 100644
193 +--- a/arch/riscv/configs/defconfig
194 ++++ b/arch/riscv/configs/defconfig
195 +@@ -62,6 +62,8 @@ CONFIG_HW_RANDOM=y
196 + CONFIG_HW_RANDOM_VIRTIO=y
197 + CONFIG_SPI=y
198 + CONFIG_SPI_SIFIVE=y
199 ++CONFIG_GPIOLIB=y
200 ++CONFIG_GPIO_SIFIVE=y
201 + # CONFIG_PTP_1588_CLOCK is not set
202 + CONFIG_DRM=y
203 + CONFIG_DRM_RADEON=y
204 +diff --git a/arch/riscv/kernel/time.c b/arch/riscv/kernel/time.c
205 +index 6a53c02e9c734..8aa70b519e04f 100644
206 +--- a/arch/riscv/kernel/time.c
207 ++++ b/arch/riscv/kernel/time.c
208 +@@ -4,6 +4,7 @@
209 + * Copyright (C) 2017 SiFive
210 + */
211 +
212 ++#include <linux/of_clk.h>
213 + #include <linux/clocksource.h>
214 + #include <linux/delay.h>
215 + #include <asm/sbi.h>
216 +@@ -24,5 +25,7 @@ void __init time_init(void)
217 + riscv_timebase = prop;
218 +
219 + lpj_fine = riscv_timebase / HZ;
220 ++
221 ++ of_clk_init(NULL);
222 + timer_probe();
223 + }
224 +diff --git a/arch/sh/drivers/dma/Kconfig b/arch/sh/drivers/dma/Kconfig
225 +index d0de378beefe5..7d54f284ce10f 100644
226 +--- a/arch/sh/drivers/dma/Kconfig
227 ++++ b/arch/sh/drivers/dma/Kconfig
228 +@@ -63,8 +63,7 @@ config PVR2_DMA
229 +
230 + config G2_DMA
231 + tristate "G2 Bus DMA support"
232 +- depends on SH_DREAMCAST
233 +- select SH_DMA_API
234 ++ depends on SH_DREAMCAST && SH_DMA_API
235 + help
236 + This enables support for the DMA controller for the Dreamcast's
237 + G2 bus. Drivers that want this will generally enable this on
238 +diff --git a/arch/x86/include/asm/fpu/api.h b/arch/x86/include/asm/fpu/api.h
239 +index b774c52e5411f..06e767bca0c14 100644
240 +--- a/arch/x86/include/asm/fpu/api.h
241 ++++ b/arch/x86/include/asm/fpu/api.h
242 +@@ -16,14 +16,25 @@
243 + * Use kernel_fpu_begin/end() if you intend to use FPU in kernel context. It
244 + * disables preemption so be careful if you intend to use it for long periods
245 + * of time.
246 +- * If you intend to use the FPU in softirq you need to check first with
247 ++ * If you intend to use the FPU in irq/softirq you need to check first with
248 + * irq_fpu_usable() if it is possible.
249 + */
250 +-extern void kernel_fpu_begin(void);
251 ++
252 ++/* Kernel FPU states to initialize in kernel_fpu_begin_mask() */
253 ++#define KFPU_387 _BITUL(0) /* 387 state will be initialized */
254 ++#define KFPU_MXCSR _BITUL(1) /* MXCSR will be initialized */
255 ++
256 ++extern void kernel_fpu_begin_mask(unsigned int kfpu_mask);
257 + extern void kernel_fpu_end(void);
258 + extern bool irq_fpu_usable(void);
259 + extern void fpregs_mark_activate(void);
260 +
261 ++/* Code that is unaware of kernel_fpu_begin_mask() can use this */
262 ++static inline void kernel_fpu_begin(void)
263 ++{
264 ++ kernel_fpu_begin_mask(KFPU_387 | KFPU_MXCSR);
265 ++}
266 ++
267 + /*
268 + * Use fpregs_lock() while editing CPU's FPU registers or fpu->state.
269 + * A context switch will (and softirq might) save CPU's FPU registers to
270 +diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h
271 +index 4b14d2318251e..f3459df117aa8 100644
272 +--- a/arch/x86/include/asm/topology.h
273 ++++ b/arch/x86/include/asm/topology.h
274 +@@ -110,6 +110,8 @@ extern const struct cpumask *cpu_coregroup_mask(int cpu);
275 + #define topology_die_id(cpu) (cpu_data(cpu).cpu_die_id)
276 + #define topology_core_id(cpu) (cpu_data(cpu).cpu_core_id)
277 +
278 ++extern unsigned int __max_die_per_package;
279 ++
280 + #ifdef CONFIG_SMP
281 + #define topology_die_cpumask(cpu) (per_cpu(cpu_die_map, cpu))
282 + #define topology_core_cpumask(cpu) (per_cpu(cpu_core_map, cpu))
283 +@@ -118,8 +120,6 @@ extern const struct cpumask *cpu_coregroup_mask(int cpu);
284 + extern unsigned int __max_logical_packages;
285 + #define topology_max_packages() (__max_logical_packages)
286 +
287 +-extern unsigned int __max_die_per_package;
288 +-
289 + static inline int topology_max_die_per_package(void)
290 + {
291 + return __max_die_per_package;
292 +diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
293 +index 52373921af2eb..753f3dfbc9c91 100644
294 +--- a/arch/x86/kernel/cpu/amd.c
295 ++++ b/arch/x86/kernel/cpu/amd.c
296 +@@ -545,12 +545,12 @@ static void bsp_init_amd(struct cpuinfo_x86 *c)
297 + u32 ecx;
298 +
299 + ecx = cpuid_ecx(0x8000001e);
300 +- nodes_per_socket = ((ecx >> 8) & 7) + 1;
301 ++ __max_die_per_package = nodes_per_socket = ((ecx >> 8) & 7) + 1;
302 + } else if (boot_cpu_has(X86_FEATURE_NODEID_MSR)) {
303 + u64 value;
304 +
305 + rdmsrl(MSR_FAM10H_NODE_ID, value);
306 +- nodes_per_socket = ((value >> 3) & 7) + 1;
307 ++ __max_die_per_package = nodes_per_socket = ((value >> 3) & 7) + 1;
308 + }
309 +
310 + if (!boot_cpu_has(X86_FEATURE_AMD_SSBD) &&
311 +diff --git a/arch/x86/kernel/cpu/topology.c b/arch/x86/kernel/cpu/topology.c
312 +index ee48c3fc8a65e..24da5ee4f0220 100644
313 +--- a/arch/x86/kernel/cpu/topology.c
314 ++++ b/arch/x86/kernel/cpu/topology.c
315 +@@ -25,10 +25,10 @@
316 + #define BITS_SHIFT_NEXT_LEVEL(eax) ((eax) & 0x1f)
317 + #define LEVEL_MAX_SIBLINGS(ebx) ((ebx) & 0xffff)
318 +
319 +-#ifdef CONFIG_SMP
320 + unsigned int __max_die_per_package __read_mostly = 1;
321 + EXPORT_SYMBOL(__max_die_per_package);
322 +
323 ++#ifdef CONFIG_SMP
324 + /*
325 + * Check if given CPUID extended toplogy "leaf" is implemented
326 + */
327 +diff --git a/arch/x86/kernel/fpu/core.c b/arch/x86/kernel/fpu/core.c
328 +index cd8839027f66d..8c9b202f3e6db 100644
329 +--- a/arch/x86/kernel/fpu/core.c
330 ++++ b/arch/x86/kernel/fpu/core.c
331 +@@ -82,7 +82,7 @@ bool irq_fpu_usable(void)
332 + }
333 + EXPORT_SYMBOL(irq_fpu_usable);
334 +
335 +-void kernel_fpu_begin(void)
336 ++void kernel_fpu_begin_mask(unsigned int kfpu_mask)
337 + {
338 + preempt_disable();
339 +
340 +@@ -102,13 +102,14 @@ void kernel_fpu_begin(void)
341 + }
342 + __cpu_invalidate_fpregs_state();
343 +
344 +- if (boot_cpu_has(X86_FEATURE_XMM))
345 ++ /* Put sane initial values into the control registers. */
346 ++ if (likely(kfpu_mask & KFPU_MXCSR) && boot_cpu_has(X86_FEATURE_XMM))
347 + ldmxcsr(MXCSR_DEFAULT);
348 +
349 +- if (boot_cpu_has(X86_FEATURE_FPU))
350 ++ if (unlikely(kfpu_mask & KFPU_387) && boot_cpu_has(X86_FEATURE_FPU))
351 + asm volatile ("fninit");
352 + }
353 +-EXPORT_SYMBOL_GPL(kernel_fpu_begin);
354 ++EXPORT_SYMBOL_GPL(kernel_fpu_begin_mask);
355 +
356 + void kernel_fpu_end(void)
357 + {
358 +diff --git a/arch/x86/lib/mmx_32.c b/arch/x86/lib/mmx_32.c
359 +index 4321fa02e18df..419365c48b2ad 100644
360 +--- a/arch/x86/lib/mmx_32.c
361 ++++ b/arch/x86/lib/mmx_32.c
362 +@@ -26,6 +26,16 @@
363 + #include <asm/fpu/api.h>
364 + #include <asm/asm.h>
365 +
366 ++/*
367 ++ * Use KFPU_387. MMX instructions are not affected by MXCSR,
368 ++ * but both AMD and Intel documentation states that even integer MMX
369 ++ * operations will result in #MF if an exception is pending in FCW.
370 ++ *
371 ++ * EMMS is not needed afterwards because, after calling kernel_fpu_end(),
372 ++ * any subsequent user of the 387 stack will reinitialize it using
373 ++ * KFPU_387.
374 ++ */
375 ++
376 + void *_mmx_memcpy(void *to, const void *from, size_t len)
377 + {
378 + void *p;
379 +@@ -37,7 +47,7 @@ void *_mmx_memcpy(void *to, const void *from, size_t len)
380 + p = to;
381 + i = len >> 6; /* len/64 */
382 +
383 +- kernel_fpu_begin();
384 ++ kernel_fpu_begin_mask(KFPU_387);
385 +
386 + __asm__ __volatile__ (
387 + "1: prefetch (%0)\n" /* This set is 28 bytes */
388 +@@ -127,7 +137,7 @@ static void fast_clear_page(void *page)
389 + {
390 + int i;
391 +
392 +- kernel_fpu_begin();
393 ++ kernel_fpu_begin_mask(KFPU_387);
394 +
395 + __asm__ __volatile__ (
396 + " pxor %%mm0, %%mm0\n" : :
397 +@@ -160,7 +170,7 @@ static void fast_copy_page(void *to, void *from)
398 + {
399 + int i;
400 +
401 +- kernel_fpu_begin();
402 ++ kernel_fpu_begin_mask(KFPU_387);
403 +
404 + /*
405 + * maybe the prefetch stuff can go before the expensive fnsave...
406 +@@ -247,7 +257,7 @@ static void fast_clear_page(void *page)
407 + {
408 + int i;
409 +
410 +- kernel_fpu_begin();
411 ++ kernel_fpu_begin_mask(KFPU_387);
412 +
413 + __asm__ __volatile__ (
414 + " pxor %%mm0, %%mm0\n" : :
415 +@@ -282,7 +292,7 @@ static void fast_copy_page(void *to, void *from)
416 + {
417 + int i;
418 +
419 +- kernel_fpu_begin();
420 ++ kernel_fpu_begin_mask(KFPU_387);
421 +
422 + __asm__ __volatile__ (
423 + "1: prefetch (%0)\n"
424 +diff --git a/arch/x86/xen/enlighten_hvm.c b/arch/x86/xen/enlighten_hvm.c
425 +index e138f7de52d20..6024fafed1642 100644
426 +--- a/arch/x86/xen/enlighten_hvm.c
427 ++++ b/arch/x86/xen/enlighten_hvm.c
428 +@@ -175,6 +175,8 @@ static int xen_cpu_dead_hvm(unsigned int cpu)
429 + return 0;
430 + }
431 +
432 ++static bool no_vector_callback __initdata;
433 ++
434 + static void __init xen_hvm_guest_init(void)
435 + {
436 + if (xen_pv_domain())
437 +@@ -194,7 +196,7 @@ static void __init xen_hvm_guest_init(void)
438 +
439 + xen_panic_handler_init();
440 +
441 +- if (xen_feature(XENFEAT_hvm_callback_vector))
442 ++ if (!no_vector_callback && xen_feature(XENFEAT_hvm_callback_vector))
443 + xen_have_vector_callback = 1;
444 +
445 + xen_hvm_smp_init();
446 +@@ -220,6 +222,13 @@ static __init int xen_parse_nopv(char *arg)
447 + }
448 + early_param("xen_nopv", xen_parse_nopv);
449 +
450 ++static __init int xen_parse_no_vector_callback(char *arg)
451 ++{
452 ++ no_vector_callback = true;
453 ++ return 0;
454 ++}
455 ++early_param("xen_no_vector_callback", xen_parse_no_vector_callback);
456 ++
457 + bool __init xen_hvm_need_lapic(void)
458 + {
459 + if (xen_pv_domain())
460 +diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
461 +index 6c8c9509e03d1..8887a72712d4b 100644
462 +--- a/drivers/acpi/scan.c
463 ++++ b/drivers/acpi/scan.c
464 +@@ -587,6 +587,8 @@ static int acpi_get_device_data(acpi_handle handle, struct acpi_device **device,
465 + if (!device)
466 + return -EINVAL;
467 +
468 ++ *device = NULL;
469 ++
470 + status = acpi_get_data_full(handle, acpi_scan_drop_device,
471 + (void **)device, callback);
472 + if (ACPI_FAILURE(status) || !*device) {
473 +diff --git a/drivers/base/core.c b/drivers/base/core.c
474 +index c5edb00938f69..a119479fe3f42 100644
475 +--- a/drivers/base/core.c
476 ++++ b/drivers/base/core.c
477 +@@ -106,6 +106,16 @@ int device_links_read_lock_held(void)
478 + #endif
479 + #endif /* !CONFIG_SRCU */
480 +
481 ++static bool device_is_ancestor(struct device *dev, struct device *target)
482 ++{
483 ++ while (target->parent) {
484 ++ target = target->parent;
485 ++ if (dev == target)
486 ++ return true;
487 ++ }
488 ++ return false;
489 ++}
490 ++
491 + /**
492 + * device_is_dependent - Check if one device depends on another one
493 + * @dev: Device to check dependencies for.
494 +@@ -119,7 +129,12 @@ static int device_is_dependent(struct device *dev, void *target)
495 + struct device_link *link;
496 + int ret;
497 +
498 +- if (dev == target)
499 ++ /*
500 ++ * The "ancestors" check is needed to catch the case when the target
501 ++ * device has not been completely initialized yet and it is still
502 ++ * missing from the list of children of its parent device.
503 ++ */
504 ++ if (dev == target || device_is_ancestor(dev, target))
505 + return 1;
506 +
507 + ret = device_for_each_child(dev, target, device_is_dependent);
508 +diff --git a/drivers/clk/tegra/clk-tegra30.c b/drivers/clk/tegra/clk-tegra30.c
509 +index 7b4c6a488527d..501929d9f70ed 100644
510 +--- a/drivers/clk/tegra/clk-tegra30.c
511 ++++ b/drivers/clk/tegra/clk-tegra30.c
512 +@@ -1263,6 +1263,8 @@ static struct tegra_clk_init_table init_table[] __initdata = {
513 + { TEGRA30_CLK_I2S3_SYNC, TEGRA30_CLK_CLK_MAX, 24000000, 0 },
514 + { TEGRA30_CLK_I2S4_SYNC, TEGRA30_CLK_CLK_MAX, 24000000, 0 },
515 + { TEGRA30_CLK_VIMCLK_SYNC, TEGRA30_CLK_CLK_MAX, 24000000, 0 },
516 ++ { TEGRA30_CLK_HDA, TEGRA30_CLK_PLL_P, 102000000, 0 },
517 ++ { TEGRA30_CLK_HDA2CODEC_2X, TEGRA30_CLK_PLL_P, 48000000, 0 },
518 + /* must be the last entry */
519 + { TEGRA30_CLK_CLK_MAX, TEGRA30_CLK_CLK_MAX, 0, 0 },
520 + };
521 +diff --git a/drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h b/drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h
522 +index 74a9fe8e0cfb9..8c54f0be51bab 100644
523 +--- a/drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h
524 ++++ b/drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h
525 +@@ -44,7 +44,7 @@ enum psp_gfx_crtl_cmd_id
526 + GFX_CTRL_CMD_ID_DISABLE_INT = 0x00060000, /* disable PSP-to-Gfx interrupt */
527 + GFX_CTRL_CMD_ID_MODE1_RST = 0x00070000, /* trigger the Mode 1 reset */
528 + GFX_CTRL_CMD_ID_GBR_IH_SET = 0x00080000, /* set Gbr IH_RB_CNTL registers */
529 +- GFX_CTRL_CMD_ID_CONSUME_CMD = 0x000A0000, /* send interrupt to psp for updating write pointer of vf */
530 ++ GFX_CTRL_CMD_ID_CONSUME_CMD = 0x00090000, /* send interrupt to psp for updating write pointer of vf */
531 + GFX_CTRL_CMD_ID_DESTROY_GPCOM_RING = 0x000C0000, /* destroy GPCOM ring */
532 +
533 + GFX_CTRL_CMD_ID_MAX = 0x000F0000, /* max command ID */
534 +diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c
535 +index a549c7c717ddc..f0b001b3af578 100644
536 +--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c
537 ++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c
538 +@@ -113,7 +113,7 @@ int amdgpu_dm_crtc_configure_crc_source(struct drm_crtc *crtc,
539 + mutex_lock(&adev->dm.dc_lock);
540 +
541 + /* Enable CRTC CRC generation if necessary. */
542 +- if (dm_is_crc_source_crtc(source)) {
543 ++ if (dm_is_crc_source_crtc(source) || source == AMDGPU_DM_PIPE_CRC_SOURCE_NONE) {
544 + if (!dc_stream_configure_crc(stream_state->ctx->dc,
545 + stream_state, enable, enable)) {
546 + ret = -EINVAL;
547 +diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
548 +index 2dd2cd87cdbb3..5e906ea6df67d 100644
549 +--- a/drivers/gpu/drm/drm_atomic_helper.c
550 ++++ b/drivers/gpu/drm/drm_atomic_helper.c
551 +@@ -2948,7 +2948,7 @@ int drm_atomic_helper_set_config(struct drm_mode_set *set,
552 +
553 + ret = handle_conflicting_encoders(state, true);
554 + if (ret)
555 +- return ret;
556 ++ goto fail;
557 +
558 + ret = drm_atomic_commit(state);
559 +
560 +diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c
561 +index 4b5c7b0ed7148..8fdb271354061 100644
562 +--- a/drivers/gpu/drm/drm_syncobj.c
563 ++++ b/drivers/gpu/drm/drm_syncobj.c
564 +@@ -326,19 +326,18 @@ int drm_syncobj_find_fence(struct drm_file *file_private,
565 + return -ENOENT;
566 +
567 + *fence = drm_syncobj_fence_get(syncobj);
568 +- drm_syncobj_put(syncobj);
569 +
570 + if (*fence) {
571 + ret = dma_fence_chain_find_seqno(fence, point);
572 + if (!ret)
573 +- return 0;
574 ++ goto out;
575 + dma_fence_put(*fence);
576 + } else {
577 + ret = -EINVAL;
578 + }
579 +
580 + if (!(flags & DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT))
581 +- return ret;
582 ++ goto out;
583 +
584 + memset(&wait, 0, sizeof(wait));
585 + wait.task = current;
586 +@@ -370,6 +369,9 @@ int drm_syncobj_find_fence(struct drm_file *file_private,
587 + if (wait.node.next)
588 + drm_syncobj_remove_wait(syncobj, &wait);
589 +
590 ++out:
591 ++ drm_syncobj_put(syncobj);
592 ++
593 + return ret;
594 + }
595 + EXPORT_SYMBOL(drm_syncobj_find_fence);
596 +diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
597 +index 2fa491f826824..398068b173891 100644
598 +--- a/drivers/gpu/drm/i915/gt/intel_lrc.c
599 ++++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
600 +@@ -2245,6 +2245,9 @@ err:
601 + static void lrc_destroy_wa_ctx(struct intel_engine_cs *engine)
602 + {
603 + i915_vma_unpin_and_release(&engine->wa_ctx.vma, 0);
604 ++
605 ++ /* Called on error unwind, clear all flags to prevent further use */
606 ++ memset(&engine->wa_ctx, 0, sizeof(engine->wa_ctx));
607 + }
608 +
609 + typedef u32 *(*wa_bb_func_t)(struct intel_engine_cs *engine, u32 *batch);
610 +diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
611 +index ee2b1e1199e09..daa79d39201f9 100644
612 +--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
613 ++++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
614 +@@ -132,7 +132,7 @@ nv50_dmac_destroy(struct nv50_dmac *dmac)
615 +
616 + int
617 + nv50_dmac_create(struct nvif_device *device, struct nvif_object *disp,
618 +- const s32 *oclass, u8 head, void *data, u32 size, u64 syncbuf,
619 ++ const s32 *oclass, u8 head, void *data, u32 size, s64 syncbuf,
620 + struct nv50_dmac *dmac)
621 + {
622 + struct nouveau_cli *cli = (void *)device->object.client;
623 +@@ -167,7 +167,7 @@ nv50_dmac_create(struct nvif_device *device, struct nvif_object *disp,
624 + if (ret)
625 + return ret;
626 +
627 +- if (!syncbuf)
628 ++ if (syncbuf < 0)
629 + return 0;
630 +
631 + ret = nvif_object_init(&dmac->base.user, 0xf0000000, NV_DMA_IN_MEMORY,
632 +diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.h b/drivers/gpu/drm/nouveau/dispnv50/disp.h
633 +index 7c41b0599d1ac..284068fa6d007 100644
634 +--- a/drivers/gpu/drm/nouveau/dispnv50/disp.h
635 ++++ b/drivers/gpu/drm/nouveau/dispnv50/disp.h
636 +@@ -70,7 +70,7 @@ struct nv50_dmac {
637 +
638 + int nv50_dmac_create(struct nvif_device *device, struct nvif_object *disp,
639 + const s32 *oclass, u8 head, void *data, u32 size,
640 +- u64 syncbuf, struct nv50_dmac *dmac);
641 ++ s64 syncbuf, struct nv50_dmac *dmac);
642 + void nv50_dmac_destroy(struct nv50_dmac *);
643 +
644 + u32 *evo_wait(struct nv50_dmac *, int nr);
645 +diff --git a/drivers/gpu/drm/nouveau/dispnv50/wimmc37b.c b/drivers/gpu/drm/nouveau/dispnv50/wimmc37b.c
646 +index f7dbd965e4e72..b49a212af4d8d 100644
647 +--- a/drivers/gpu/drm/nouveau/dispnv50/wimmc37b.c
648 ++++ b/drivers/gpu/drm/nouveau/dispnv50/wimmc37b.c
649 +@@ -68,7 +68,7 @@ wimmc37b_init_(const struct nv50_wimm_func *func, struct nouveau_drm *drm,
650 + int ret;
651 +
652 + ret = nv50_dmac_create(&drm->client.device, &disp->disp->object,
653 +- &oclass, 0, &args, sizeof(args), 0,
654 ++ &oclass, 0, &args, sizeof(args), -1,
655 + &wndw->wimm);
656 + if (ret) {
657 + NV_ERROR(drm, "wimm%04x allocation failed: %d\n", oclass, ret);
658 +diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c
659 +index 7deb81b6dbac6..4b571cc6bc70f 100644
660 +--- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c
661 ++++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c
662 +@@ -75,7 +75,7 @@ shadow_image(struct nvkm_bios *bios, int idx, u32 offset, struct shadow *mthd)
663 + nvkm_debug(subdev, "%08x: type %02x, %d bytes\n",
664 + image.base, image.type, image.size);
665 +
666 +- if (!shadow_fetch(bios, mthd, image.size)) {
667 ++ if (!shadow_fetch(bios, mthd, image.base + image.size)) {
668 + nvkm_debug(subdev, "%08x: fetch failed\n", image.base);
669 + return 0;
670 + }
671 +diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c
672 +index edb6148cbca04..d0e80ad526845 100644
673 +--- a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c
674 ++++ b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c
675 +@@ -33,7 +33,7 @@ static void
676 + gm200_i2c_aux_fini(struct gm200_i2c_aux *aux)
677 + {
678 + struct nvkm_device *device = aux->base.pad->i2c->subdev.device;
679 +- nvkm_mask(device, 0x00d954 + (aux->ch * 0x50), 0x00310000, 0x00000000);
680 ++ nvkm_mask(device, 0x00d954 + (aux->ch * 0x50), 0x00710000, 0x00000000);
681 + }
682 +
683 + static int
684 +@@ -54,10 +54,10 @@ gm200_i2c_aux_init(struct gm200_i2c_aux *aux)
685 + AUX_ERR(&aux->base, "begin idle timeout %08x", ctrl);
686 + return -EBUSY;
687 + }
688 +- } while (ctrl & 0x03010000);
689 ++ } while (ctrl & 0x07010000);
690 +
691 + /* set some magic, and wait up to 1ms for it to appear */
692 +- nvkm_mask(device, 0x00d954 + (aux->ch * 0x50), 0x00300000, ureq);
693 ++ nvkm_mask(device, 0x00d954 + (aux->ch * 0x50), 0x00700000, ureq);
694 + timeout = 1000;
695 + do {
696 + ctrl = nvkm_rd32(device, 0x00d954 + (aux->ch * 0x50));
697 +@@ -67,7 +67,7 @@ gm200_i2c_aux_init(struct gm200_i2c_aux *aux)
698 + gm200_i2c_aux_fini(aux);
699 + return -EBUSY;
700 + }
701 +- } while ((ctrl & 0x03000000) != urep);
702 ++ } while ((ctrl & 0x07000000) != urep);
703 +
704 + return 0;
705 + }
706 +diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gf100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gf100.c
707 +index d80dbc8f09b20..55a4ea4393c62 100644
708 +--- a/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gf100.c
709 ++++ b/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gf100.c
710 +@@ -22,6 +22,7 @@
711 + * Authors: Ben Skeggs
712 + */
713 + #include "priv.h"
714 ++#include <subdev/timer.h>
715 +
716 + static void
717 + gf100_ibus_intr_hub(struct nvkm_subdev *ibus, int i)
718 +@@ -31,7 +32,6 @@ gf100_ibus_intr_hub(struct nvkm_subdev *ibus, int i)
719 + u32 data = nvkm_rd32(device, 0x122124 + (i * 0x0400));
720 + u32 stat = nvkm_rd32(device, 0x122128 + (i * 0x0400));
721 + nvkm_debug(ibus, "HUB%d: %06x %08x (%08x)\n", i, addr, data, stat);
722 +- nvkm_mask(device, 0x122128 + (i * 0x0400), 0x00000200, 0x00000000);
723 + }
724 +
725 + static void
726 +@@ -42,7 +42,6 @@ gf100_ibus_intr_rop(struct nvkm_subdev *ibus, int i)
727 + u32 data = nvkm_rd32(device, 0x124124 + (i * 0x0400));
728 + u32 stat = nvkm_rd32(device, 0x124128 + (i * 0x0400));
729 + nvkm_debug(ibus, "ROP%d: %06x %08x (%08x)\n", i, addr, data, stat);
730 +- nvkm_mask(device, 0x124128 + (i * 0x0400), 0x00000200, 0x00000000);
731 + }
732 +
733 + static void
734 +@@ -53,7 +52,6 @@ gf100_ibus_intr_gpc(struct nvkm_subdev *ibus, int i)
735 + u32 data = nvkm_rd32(device, 0x128124 + (i * 0x0400));
736 + u32 stat = nvkm_rd32(device, 0x128128 + (i * 0x0400));
737 + nvkm_debug(ibus, "GPC%d: %06x %08x (%08x)\n", i, addr, data, stat);
738 +- nvkm_mask(device, 0x128128 + (i * 0x0400), 0x00000200, 0x00000000);
739 + }
740 +
741 + void
742 +@@ -90,6 +88,12 @@ gf100_ibus_intr(struct nvkm_subdev *ibus)
743 + intr1 &= ~stat;
744 + }
745 + }
746 ++
747 ++ nvkm_mask(device, 0x121c4c, 0x0000003f, 0x00000002);
748 ++ nvkm_msec(device, 2000,
749 ++ if (!(nvkm_rd32(device, 0x121c4c) & 0x0000003f))
750 ++ break;
751 ++ );
752 + }
753 +
754 + static int
755 +diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gk104.c b/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gk104.c
756 +index 9025ed1bd2a99..4caf3ef087e1d 100644
757 +--- a/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gk104.c
758 ++++ b/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gk104.c
759 +@@ -22,6 +22,7 @@
760 + * Authors: Ben Skeggs
761 + */
762 + #include "priv.h"
763 ++#include <subdev/timer.h>
764 +
765 + static void
766 + gk104_ibus_intr_hub(struct nvkm_subdev *ibus, int i)
767 +@@ -31,7 +32,6 @@ gk104_ibus_intr_hub(struct nvkm_subdev *ibus, int i)
768 + u32 data = nvkm_rd32(device, 0x122124 + (i * 0x0800));
769 + u32 stat = nvkm_rd32(device, 0x122128 + (i * 0x0800));
770 + nvkm_debug(ibus, "HUB%d: %06x %08x (%08x)\n", i, addr, data, stat);
771 +- nvkm_mask(device, 0x122128 + (i * 0x0800), 0x00000200, 0x00000000);
772 + }
773 +
774 + static void
775 +@@ -42,7 +42,6 @@ gk104_ibus_intr_rop(struct nvkm_subdev *ibus, int i)
776 + u32 data = nvkm_rd32(device, 0x124124 + (i * 0x0800));
777 + u32 stat = nvkm_rd32(device, 0x124128 + (i * 0x0800));
778 + nvkm_debug(ibus, "ROP%d: %06x %08x (%08x)\n", i, addr, data, stat);
779 +- nvkm_mask(device, 0x124128 + (i * 0x0800), 0x00000200, 0x00000000);
780 + }
781 +
782 + static void
783 +@@ -53,7 +52,6 @@ gk104_ibus_intr_gpc(struct nvkm_subdev *ibus, int i)
784 + u32 data = nvkm_rd32(device, 0x128124 + (i * 0x0800));
785 + u32 stat = nvkm_rd32(device, 0x128128 + (i * 0x0800));
786 + nvkm_debug(ibus, "GPC%d: %06x %08x (%08x)\n", i, addr, data, stat);
787 +- nvkm_mask(device, 0x128128 + (i * 0x0800), 0x00000200, 0x00000000);
788 + }
789 +
790 + void
791 +@@ -90,6 +88,12 @@ gk104_ibus_intr(struct nvkm_subdev *ibus)
792 + intr1 &= ~stat;
793 + }
794 + }
795 ++
796 ++ nvkm_mask(device, 0x12004c, 0x0000003f, 0x00000002);
797 ++ nvkm_msec(device, 2000,
798 ++ if (!(nvkm_rd32(device, 0x12004c) & 0x0000003f))
799 ++ break;
800 ++ );
801 + }
802 +
803 + static int
804 +diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
805 +index ee11ccaf0563c..cb51e248cb41b 100644
806 +--- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
807 ++++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
808 +@@ -316,9 +316,9 @@ nvkm_mmu_vram(struct nvkm_mmu *mmu)
809 + {
810 + struct nvkm_device *device = mmu->subdev.device;
811 + struct nvkm_mm *mm = &device->fb->ram->vram;
812 +- const u32 sizeN = nvkm_mm_heap_size(mm, NVKM_RAM_MM_NORMAL);
813 +- const u32 sizeU = nvkm_mm_heap_size(mm, NVKM_RAM_MM_NOMAP);
814 +- const u32 sizeM = nvkm_mm_heap_size(mm, NVKM_RAM_MM_MIXED);
815 ++ const u64 sizeN = nvkm_mm_heap_size(mm, NVKM_RAM_MM_NORMAL);
816 ++ const u64 sizeU = nvkm_mm_heap_size(mm, NVKM_RAM_MM_NOMAP);
817 ++ const u64 sizeM = nvkm_mm_heap_size(mm, NVKM_RAM_MM_MIXED);
818 + u8 type = NVKM_MEM_KIND * !!mmu->func->kind;
819 + u8 heap = NVKM_MEM_VRAM;
820 + int heapM, heapN, heapU;
821 +diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
822 +index 2aa810665a78c..33183933337af 100644
823 +--- a/drivers/hid/hid-ids.h
824 ++++ b/drivers/hid/hid-ids.h
825 +@@ -393,6 +393,7 @@
826 + #define USB_DEVICE_ID_TOSHIBA_CLICK_L9W 0x0401
827 + #define USB_DEVICE_ID_HP_X2 0x074d
828 + #define USB_DEVICE_ID_HP_X2_10_COVER 0x0755
829 ++#define USB_DEVICE_ID_ASUS_UX550_TOUCHSCREEN 0x2706
830 +
831 + #define USB_VENDOR_ID_ELECOM 0x056e
832 + #define USB_DEVICE_ID_ELECOM_BM084 0x0061
833 +diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
834 +index b2da8476d0d30..ec08895e7b1dc 100644
835 +--- a/drivers/hid/hid-input.c
836 ++++ b/drivers/hid/hid-input.c
837 +@@ -322,6 +322,8 @@ static const struct hid_device_id hid_battery_quirks[] = {
838 + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH,
839 + USB_DEVICE_ID_LOGITECH_DINOVO_EDGE_KBD),
840 + HID_BATTERY_QUIRK_IGNORE },
841 ++ { HID_USB_DEVICE(USB_VENDOR_ID_ELAN, USB_DEVICE_ID_ASUS_UX550_TOUCHSCREEN),
842 ++ HID_BATTERY_QUIRK_IGNORE },
843 + {}
844 + };
845 +
846 +diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
847 +index 54d811fdcdb44..e5550a5bf49d0 100644
848 +--- a/drivers/hid/hid-logitech-dj.c
849 ++++ b/drivers/hid/hid-logitech-dj.c
850 +@@ -1862,6 +1862,10 @@ static const struct hid_device_id logi_dj_receivers[] = {
851 + HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH,
852 + 0xc531),
853 + .driver_data = recvr_type_gaming_hidpp},
854 ++ { /* Logitech G602 receiver (0xc537) */
855 ++ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH,
856 ++ 0xc537),
857 ++ .driver_data = recvr_type_gaming_hidpp},
858 + { /* Logitech lightspeed receiver (0xc539) */
859 + HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH,
860 + USB_DEVICE_ID_LOGITECH_NANO_RECEIVER_LIGHTSPEED_1),
861 +diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
862 +index 128d8f4319b9f..d91e6679afb18 100644
863 +--- a/drivers/hid/hid-multitouch.c
864 ++++ b/drivers/hid/hid-multitouch.c
865 +@@ -2084,6 +2084,10 @@ static const struct hid_device_id mt_devices[] = {
866 + HID_DEVICE(BUS_I2C, HID_GROUP_MULTITOUCH_WIN_8,
867 + USB_VENDOR_ID_SYNAPTICS, 0xce08) },
868 +
869 ++ { .driver_data = MT_CLS_WIN_8_FORCE_MULTI_INPUT,
870 ++ HID_DEVICE(BUS_I2C, HID_GROUP_MULTITOUCH_WIN_8,
871 ++ USB_VENDOR_ID_SYNAPTICS, 0xce09) },
872 ++
873 + /* TopSeed panels */
874 + { .driver_data = MT_CLS_TOPSEED,
875 + MT_USB_DEVICE(USB_VENDOR_ID_TOPSEED2,
876 +diff --git a/drivers/hwtracing/intel_th/pci.c b/drivers/hwtracing/intel_th/pci.c
877 +index 21fdf0b935166..d7d99acac52f2 100644
878 +--- a/drivers/hwtracing/intel_th/pci.c
879 ++++ b/drivers/hwtracing/intel_th/pci.c
880 +@@ -258,6 +258,11 @@ static const struct pci_device_id intel_th_pci_id_table[] = {
881 + PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4b26),
882 + .driver_data = (kernel_ulong_t)&intel_th_2x,
883 + },
884 ++ {
885 ++ /* Alder Lake-P */
886 ++ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x51a6),
887 ++ .driver_data = (kernel_ulong_t)&intel_th_2x,
888 ++ },
889 + {
890 + /* Emmitsburg PCH */
891 + PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x1bcc),
892 +diff --git a/drivers/hwtracing/stm/heartbeat.c b/drivers/hwtracing/stm/heartbeat.c
893 +index 3e7df1c0477f7..81d7b21d31ec2 100644
894 +--- a/drivers/hwtracing/stm/heartbeat.c
895 ++++ b/drivers/hwtracing/stm/heartbeat.c
896 +@@ -64,7 +64,7 @@ static void stm_heartbeat_unlink(struct stm_source_data *data)
897 +
898 + static int stm_heartbeat_init(void)
899 + {
900 +- int i, ret = -ENOMEM;
901 ++ int i, ret;
902 +
903 + if (nr_devs < 0 || nr_devs > STM_HEARTBEAT_MAX)
904 + return -EINVAL;
905 +@@ -72,8 +72,10 @@ static int stm_heartbeat_init(void)
906 + for (i = 0; i < nr_devs; i++) {
907 + stm_heartbeat[i].data.name =
908 + kasprintf(GFP_KERNEL, "heartbeat.%d", i);
909 +- if (!stm_heartbeat[i].data.name)
910 ++ if (!stm_heartbeat[i].data.name) {
911 ++ ret = -ENOMEM;
912 + goto fail_unregister;
913 ++ }
914 +
915 + stm_heartbeat[i].data.nr_chans = 1;
916 + stm_heartbeat[i].data.link = stm_heartbeat_link;
917 +diff --git a/drivers/i2c/busses/i2c-octeon-core.c b/drivers/i2c/busses/i2c-octeon-core.c
918 +index d9607905dc2f1..845eda70b8cab 100644
919 +--- a/drivers/i2c/busses/i2c-octeon-core.c
920 ++++ b/drivers/i2c/busses/i2c-octeon-core.c
921 +@@ -347,7 +347,7 @@ static int octeon_i2c_read(struct octeon_i2c *i2c, int target,
922 + if (result)
923 + return result;
924 + if (recv_len && i == 0) {
925 +- if (data[i] > I2C_SMBUS_BLOCK_MAX + 1)
926 ++ if (data[i] > I2C_SMBUS_BLOCK_MAX)
927 + return -EPROTO;
928 + length += data[i];
929 + }
930 +diff --git a/drivers/i2c/busses/i2c-tegra-bpmp.c b/drivers/i2c/busses/i2c-tegra-bpmp.c
931 +index ec7a7e917eddb..c0c7d01473f2b 100644
932 +--- a/drivers/i2c/busses/i2c-tegra-bpmp.c
933 ++++ b/drivers/i2c/busses/i2c-tegra-bpmp.c
934 +@@ -80,7 +80,7 @@ static int tegra_bpmp_xlate_flags(u16 flags, u16 *out)
935 + flags &= ~I2C_M_RECV_LEN;
936 + }
937 +
938 +- return (flags != 0) ? -EINVAL : 0;
939 ++ return 0;
940 + }
941 +
942 + /**
943 +diff --git a/drivers/iio/dac/ad5504.c b/drivers/iio/dac/ad5504.c
944 +index c64e6898ff20a..d1ffc8cb08ed6 100644
945 +--- a/drivers/iio/dac/ad5504.c
946 ++++ b/drivers/iio/dac/ad5504.c
947 +@@ -188,9 +188,9 @@ static ssize_t ad5504_write_dac_powerdown(struct iio_dev *indio_dev,
948 + return ret;
949 +
950 + if (pwr_down)
951 +- st->pwr_down_mask |= (1 << chan->channel);
952 +- else
953 + st->pwr_down_mask &= ~(1 << chan->channel);
954 ++ else
955 ++ st->pwr_down_mask |= (1 << chan->channel);
956 +
957 + ret = ad5504_spi_write(st, AD5504_ADDR_CTRL,
958 + AD5504_DAC_PWRDWN_MODE(st->pwr_down_mode) |
959 +diff --git a/drivers/irqchip/irq-mips-cpu.c b/drivers/irqchip/irq-mips-cpu.c
960 +index 95d4fd8f7a968..0bbb0b2d0dd5f 100644
961 +--- a/drivers/irqchip/irq-mips-cpu.c
962 ++++ b/drivers/irqchip/irq-mips-cpu.c
963 +@@ -197,6 +197,13 @@ static int mips_cpu_ipi_alloc(struct irq_domain *domain, unsigned int virq,
964 + if (ret)
965 + return ret;
966 +
967 ++ ret = irq_domain_set_hwirq_and_chip(domain->parent, virq + i, hwirq,
968 ++ &mips_mt_cpu_irq_controller,
969 ++ NULL);
970 ++
971 ++ if (ret)
972 ++ return ret;
973 ++
974 + ret = irq_set_irq_type(virq + i, IRQ_TYPE_LEVEL_HIGH);
975 + if (ret)
976 + return ret;
977 +diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c
978 +index a2ebc75af8c79..4714aa936b2a2 100644
979 +--- a/drivers/lightnvm/core.c
980 ++++ b/drivers/lightnvm/core.c
981 +@@ -849,11 +849,10 @@ static int nvm_bb_chunk_sense(struct nvm_dev *dev, struct ppa_addr ppa)
982 + rqd.ppa_addr = generic_to_dev_addr(dev, ppa);
983 +
984 + ret = nvm_submit_io_sync_raw(dev, &rqd);
985 ++ __free_page(page);
986 + if (ret)
987 + return ret;
988 +
989 +- __free_page(page);
990 +-
991 + return rqd.error;
992 + }
993 +
994 +diff --git a/drivers/md/Kconfig b/drivers/md/Kconfig
995 +index aa98953f4462e..7dd6e98257c72 100644
996 +--- a/drivers/md/Kconfig
997 ++++ b/drivers/md/Kconfig
998 +@@ -565,6 +565,7 @@ config DM_INTEGRITY
999 + select BLK_DEV_INTEGRITY
1000 + select DM_BUFIO
1001 + select CRYPTO
1002 ++ select CRYPTO_SKCIPHER
1003 + select ASYNC_XOR
1004 + ---help---
1005 + This device-mapper target emulates a block device that has
1006 +diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c
1007 +index 25efe382e78fa..57f66f2ad98dc 100644
1008 +--- a/drivers/md/dm-integrity.c
1009 ++++ b/drivers/md/dm-integrity.c
1010 +@@ -4059,6 +4059,12 @@ try_smaller_buffer:
1011 + r = -ENOMEM;
1012 + goto bad;
1013 + }
1014 ++ } else {
1015 ++ if (ic->sb->flags & cpu_to_le32(SB_FLAG_RECALCULATING)) {
1016 ++ ti->error = "Recalculate can only be specified with internal_hash";
1017 ++ r = -EINVAL;
1018 ++ goto bad;
1019 ++ }
1020 + }
1021 +
1022 + ic->bufio = dm_bufio_client_create(ic->meta_dev ? ic->meta_dev->bdev : ic->dev->bdev,
1023 +diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
1024 +index 6dd56afa048c2..98be040cf958c 100644
1025 +--- a/drivers/md/dm-table.c
1026 ++++ b/drivers/md/dm-table.c
1027 +@@ -428,14 +428,23 @@ int dm_get_device(struct dm_target *ti, const char *path, fmode_t mode,
1028 + {
1029 + int r;
1030 + dev_t dev;
1031 ++ unsigned int major, minor;
1032 ++ char dummy;
1033 + struct dm_dev_internal *dd;
1034 + struct dm_table *t = ti->table;
1035 +
1036 + BUG_ON(!t);
1037 +
1038 +- dev = dm_get_dev_t(path);
1039 +- if (!dev)
1040 +- return -ENODEV;
1041 ++ if (sscanf(path, "%u:%u%c", &major, &minor, &dummy) == 2) {
1042 ++ /* Extract the major/minor numbers */
1043 ++ dev = MKDEV(major, minor);
1044 ++ if (MAJOR(dev) != major || MINOR(dev) != minor)
1045 ++ return -EOVERFLOW;
1046 ++ } else {
1047 ++ dev = dm_get_dev_t(path);
1048 ++ if (!dev)
1049 ++ return -ENODEV;
1050 ++ }
1051 +
1052 + dd = find_device(&t->devices, dev);
1053 + if (!dd) {
1054 +diff --git a/drivers/mmc/core/queue.c b/drivers/mmc/core/queue.c
1055 +index 81b8d5ede484e..9cee10e44e2fc 100644
1056 +--- a/drivers/mmc/core/queue.c
1057 ++++ b/drivers/mmc/core/queue.c
1058 +@@ -370,8 +370,10 @@ static void mmc_setup_queue(struct mmc_queue *mq, struct mmc_card *card)
1059 + "merging was advertised but not possible");
1060 + blk_queue_max_segments(mq->queue, mmc_get_max_segments(host));
1061 +
1062 +- if (mmc_card_mmc(card))
1063 ++ if (mmc_card_mmc(card) && card->ext_csd.data_sector_size) {
1064 + block_size = card->ext_csd.data_sector_size;
1065 ++ WARN_ON(block_size != 512 && block_size != 4096);
1066 ++ }
1067 +
1068 + blk_queue_logical_block_size(mq->queue, block_size);
1069 + /*
1070 +diff --git a/drivers/mmc/host/sdhci-xenon.c b/drivers/mmc/host/sdhci-xenon.c
1071 +index 4703cd540c7fd..5f57e78e5f13f 100644
1072 +--- a/drivers/mmc/host/sdhci-xenon.c
1073 ++++ b/drivers/mmc/host/sdhci-xenon.c
1074 +@@ -167,7 +167,12 @@ static void xenon_reset_exit(struct sdhci_host *host,
1075 + /* Disable tuning request and auto-retuning again */
1076 + xenon_retune_setup(host);
1077 +
1078 +- xenon_set_acg(host, true);
1079 ++ /*
1080 ++ * The ACG should be turned off at the early init time, in order
1081 ++ * to solve a possible issues with the 1.8V regulator stabilization.
1082 ++ * The feature is enabled in later stage.
1083 ++ */
1084 ++ xenon_set_acg(host, false);
1085 +
1086 + xenon_set_sdclk_off_idle(host, sdhc_id, false);
1087 +
1088 +diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c
1089 +index 5b8791135de13..247aeacb3a440 100644
1090 +--- a/drivers/net/can/dev.c
1091 ++++ b/drivers/net/can/dev.c
1092 +@@ -567,11 +567,11 @@ static void can_restart(struct net_device *dev)
1093 + }
1094 + cf->can_id |= CAN_ERR_RESTARTED;
1095 +
1096 +- netif_rx_ni(skb);
1097 +-
1098 + stats->rx_packets++;
1099 + stats->rx_bytes += cf->can_dlc;
1100 +
1101 ++ netif_rx_ni(skb);
1102 ++
1103 + restart:
1104 + netdev_dbg(dev, "restarted\n");
1105 + priv->can_stats.restarts++;
1106 +diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_fd.c b/drivers/net/can/usb/peak_usb/pcan_usb_fd.c
1107 +index dee3e689b54da..96bbdef672bc9 100644
1108 +--- a/drivers/net/can/usb/peak_usb/pcan_usb_fd.c
1109 ++++ b/drivers/net/can/usb/peak_usb/pcan_usb_fd.c
1110 +@@ -512,11 +512,11 @@ static int pcan_usb_fd_decode_canmsg(struct pcan_usb_fd_if *usb_if,
1111 + else
1112 + memcpy(cfd->data, rm->d, cfd->len);
1113 +
1114 +- peak_usb_netif_rx(skb, &usb_if->time_ref, le32_to_cpu(rm->ts_low));
1115 +-
1116 + netdev->stats.rx_packets++;
1117 + netdev->stats.rx_bytes += cfd->len;
1118 +
1119 ++ peak_usb_netif_rx(skb, &usb_if->time_ref, le32_to_cpu(rm->ts_low));
1120 ++
1121 + return 0;
1122 + }
1123 +
1124 +@@ -578,11 +578,11 @@ static int pcan_usb_fd_decode_status(struct pcan_usb_fd_if *usb_if,
1125 + if (!skb)
1126 + return -ENOMEM;
1127 +
1128 +- peak_usb_netif_rx(skb, &usb_if->time_ref, le32_to_cpu(sm->ts_low));
1129 +-
1130 + netdev->stats.rx_packets++;
1131 + netdev->stats.rx_bytes += cf->can_dlc;
1132 +
1133 ++ peak_usb_netif_rx(skb, &usb_if->time_ref, le32_to_cpu(sm->ts_low));
1134 ++
1135 + return 0;
1136 + }
1137 +
1138 +diff --git a/drivers/net/can/vxcan.c b/drivers/net/can/vxcan.c
1139 +index d6ba9426be4de..b1baa4ac1d537 100644
1140 +--- a/drivers/net/can/vxcan.c
1141 ++++ b/drivers/net/can/vxcan.c
1142 +@@ -39,6 +39,7 @@ static netdev_tx_t vxcan_xmit(struct sk_buff *skb, struct net_device *dev)
1143 + struct net_device *peer;
1144 + struct canfd_frame *cfd = (struct canfd_frame *)skb->data;
1145 + struct net_device_stats *peerstats, *srcstats = &dev->stats;
1146 ++ u8 len;
1147 +
1148 + if (can_dropped_invalid_skb(dev, skb))
1149 + return NETDEV_TX_OK;
1150 +@@ -61,12 +62,13 @@ static netdev_tx_t vxcan_xmit(struct sk_buff *skb, struct net_device *dev)
1151 + skb->dev = peer;
1152 + skb->ip_summed = CHECKSUM_UNNECESSARY;
1153 +
1154 ++ len = cfd->len;
1155 + if (netif_rx_ni(skb) == NET_RX_SUCCESS) {
1156 + srcstats->tx_packets++;
1157 +- srcstats->tx_bytes += cfd->len;
1158 ++ srcstats->tx_bytes += len;
1159 + peerstats = &peer->stats;
1160 + peerstats->rx_packets++;
1161 +- peerstats->rx_bytes += cfd->len;
1162 ++ peerstats->rx_bytes += len;
1163 + }
1164 +
1165 + out_unlock:
1166 +diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
1167 +index 4bd66ba72c03c..0b1223f360d97 100644
1168 +--- a/drivers/net/dsa/b53/b53_common.c
1169 ++++ b/drivers/net/dsa/b53/b53_common.c
1170 +@@ -1330,7 +1330,7 @@ int b53_vlan_prepare(struct dsa_switch *ds, int port,
1171 + if ((is5325(dev) || is5365(dev)) && vlan->vid_begin == 0)
1172 + return -EOPNOTSUPP;
1173 +
1174 +- if (vlan->vid_end > dev->num_vlans)
1175 ++ if (vlan->vid_end >= dev->num_vlans)
1176 + return -ERANGE;
1177 +
1178 + b53_enable_vlan(dev, true, ds->vlan_filtering);
1179 +diff --git a/drivers/net/dsa/mv88e6xxx/global1_vtu.c b/drivers/net/dsa/mv88e6xxx/global1_vtu.c
1180 +index c51c01345223d..fcfda1a1cecfc 100644
1181 +--- a/drivers/net/dsa/mv88e6xxx/global1_vtu.c
1182 ++++ b/drivers/net/dsa/mv88e6xxx/global1_vtu.c
1183 +@@ -351,6 +351,10 @@ int mv88e6250_g1_vtu_getnext(struct mv88e6xxx_chip *chip,
1184 + if (err)
1185 + return err;
1186 +
1187 ++ err = mv88e6185_g1_stu_data_read(chip, entry);
1188 ++ if (err)
1189 ++ return err;
1190 ++
1191 + /* VTU DBNum[3:0] are located in VTU Operation 3:0
1192 + * VTU DBNum[5:4] are located in VTU Operation 9:8
1193 + */
1194 +diff --git a/drivers/net/ethernet/mscc/ocelot.c b/drivers/net/ethernet/mscc/ocelot.c
1195 +index da1fd0e08c36e..6030c90d50ccb 100644
1196 +--- a/drivers/net/ethernet/mscc/ocelot.c
1197 ++++ b/drivers/net/ethernet/mscc/ocelot.c
1198 +@@ -1716,10 +1716,8 @@ static int ocelot_netdevice_event(struct notifier_block *unused,
1199 + struct net_device *dev = netdev_notifier_info_to_dev(ptr);
1200 + int ret = 0;
1201 +
1202 +- if (!ocelot_netdevice_dev_check(dev))
1203 +- return 0;
1204 +-
1205 + if (event == NETDEV_PRECHANGEUPPER &&
1206 ++ ocelot_netdevice_dev_check(dev) &&
1207 + netif_is_lag_master(info->upper_dev)) {
1208 + struct netdev_lag_upper_info *lag_upper_info = info->upper_info;
1209 + struct netlink_ext_ack *extack;
1210 +diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
1211 +index 8aa1b1bda96d1..18f86e441570c 100644
1212 +--- a/drivers/net/ethernet/renesas/sh_eth.c
1213 ++++ b/drivers/net/ethernet/renesas/sh_eth.c
1214 +@@ -2640,10 +2640,10 @@ static int sh_eth_close(struct net_device *ndev)
1215 + /* Free all the skbuffs in the Rx queue and the DMA buffer. */
1216 + sh_eth_ring_free(ndev);
1217 +
1218 +- pm_runtime_put_sync(&mdp->pdev->dev);
1219 +-
1220 + mdp->is_opened = 0;
1221 +
1222 ++ pm_runtime_put(&mdp->pdev->dev);
1223 ++
1224 + return 0;
1225 + }
1226 +
1227 +diff --git a/drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c b/drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c
1228 +index bb07024d22edc..0a745769e7127 100644
1229 +--- a/drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c
1230 ++++ b/drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c
1231 +@@ -334,7 +334,7 @@ FUNC_GROUP_DECL(RMII4, F24, E23, E24, E25, C25, C24, B26, B25, B24);
1232 +
1233 + #define D22 40
1234 + SIG_EXPR_LIST_DECL_SESG(D22, SD1CLK, SD1, SIG_DESC_SET(SCU414, 8));
1235 +-SIG_EXPR_LIST_DECL_SEMG(D22, PWM8, PWM8G0, PWM8, SIG_DESC_SET(SCU414, 8));
1236 ++SIG_EXPR_LIST_DECL_SEMG(D22, PWM8, PWM8G0, PWM8, SIG_DESC_SET(SCU4B4, 8));
1237 + PIN_DECL_2(D22, GPIOF0, SD1CLK, PWM8);
1238 + GROUP_DECL(PWM8G0, D22);
1239 +
1240 +diff --git a/drivers/pinctrl/pinctrl-ingenic.c b/drivers/pinctrl/pinctrl-ingenic.c
1241 +index 8bd0a078bfc47..61e7d938d4c5c 100644
1242 +--- a/drivers/pinctrl/pinctrl-ingenic.c
1243 ++++ b/drivers/pinctrl/pinctrl-ingenic.c
1244 +@@ -1378,7 +1378,7 @@ static inline bool ingenic_gpio_get_value(struct ingenic_gpio_chip *jzgc,
1245 + static void ingenic_gpio_set_value(struct ingenic_gpio_chip *jzgc,
1246 + u8 offset, int value)
1247 + {
1248 +- if (jzgc->jzpc->version >= ID_JZ4760)
1249 ++ if (jzgc->jzpc->version >= ID_JZ4770)
1250 + ingenic_gpio_set_bit(jzgc, JZ4760_GPIO_PAT0, offset, !!value);
1251 + else
1252 + ingenic_gpio_set_bit(jzgc, JZ4740_GPIO_DATA, offset, !!value);
1253 +@@ -1389,7 +1389,7 @@ static void irq_set_type(struct ingenic_gpio_chip *jzgc,
1254 + {
1255 + u8 reg1, reg2;
1256 +
1257 +- if (jzgc->jzpc->version >= ID_JZ4760) {
1258 ++ if (jzgc->jzpc->version >= ID_JZ4770) {
1259 + reg1 = JZ4760_GPIO_PAT1;
1260 + reg2 = JZ4760_GPIO_PAT0;
1261 + } else {
1262 +@@ -1464,7 +1464,7 @@ static void ingenic_gpio_irq_enable(struct irq_data *irqd)
1263 + struct ingenic_gpio_chip *jzgc = gpiochip_get_data(gc);
1264 + int irq = irqd->hwirq;
1265 +
1266 +- if (jzgc->jzpc->version >= ID_JZ4760)
1267 ++ if (jzgc->jzpc->version >= ID_JZ4770)
1268 + ingenic_gpio_set_bit(jzgc, JZ4760_GPIO_INT, irq, true);
1269 + else
1270 + ingenic_gpio_set_bit(jzgc, JZ4740_GPIO_SELECT, irq, true);
1271 +@@ -1480,7 +1480,7 @@ static void ingenic_gpio_irq_disable(struct irq_data *irqd)
1272 +
1273 + ingenic_gpio_irq_mask(irqd);
1274 +
1275 +- if (jzgc->jzpc->version >= ID_JZ4760)
1276 ++ if (jzgc->jzpc->version >= ID_JZ4770)
1277 + ingenic_gpio_set_bit(jzgc, JZ4760_GPIO_INT, irq, false);
1278 + else
1279 + ingenic_gpio_set_bit(jzgc, JZ4740_GPIO_SELECT, irq, false);
1280 +@@ -1505,7 +1505,7 @@ static void ingenic_gpio_irq_ack(struct irq_data *irqd)
1281 + irq_set_type(jzgc, irq, IRQ_TYPE_LEVEL_HIGH);
1282 + }
1283 +
1284 +- if (jzgc->jzpc->version >= ID_JZ4760)
1285 ++ if (jzgc->jzpc->version >= ID_JZ4770)
1286 + ingenic_gpio_set_bit(jzgc, JZ4760_GPIO_FLAG, irq, false);
1287 + else
1288 + ingenic_gpio_set_bit(jzgc, JZ4740_GPIO_DATA, irq, true);
1289 +@@ -1562,7 +1562,7 @@ static void ingenic_gpio_irq_handler(struct irq_desc *desc)
1290 +
1291 + chained_irq_enter(irq_chip, desc);
1292 +
1293 +- if (jzgc->jzpc->version >= ID_JZ4760)
1294 ++ if (jzgc->jzpc->version >= ID_JZ4770)
1295 + flag = ingenic_gpio_read_reg(jzgc, JZ4760_GPIO_FLAG);
1296 + else
1297 + flag = ingenic_gpio_read_reg(jzgc, JZ4740_GPIO_FLAG);
1298 +@@ -1643,7 +1643,7 @@ static int ingenic_gpio_get_direction(struct gpio_chip *gc, unsigned int offset)
1299 + struct ingenic_pinctrl *jzpc = jzgc->jzpc;
1300 + unsigned int pin = gc->base + offset;
1301 +
1302 +- if (jzpc->version >= ID_JZ4760)
1303 ++ if (jzpc->version >= ID_JZ4770)
1304 + return ingenic_get_pin_config(jzpc, pin, JZ4760_GPIO_INT) ||
1305 + ingenic_get_pin_config(jzpc, pin, JZ4760_GPIO_PAT1);
1306 +
1307 +@@ -1676,7 +1676,7 @@ static int ingenic_pinmux_set_pin_fn(struct ingenic_pinctrl *jzpc,
1308 + ingenic_shadow_config_pin(jzpc, pin, JZ4760_GPIO_PAT1, func & 0x2);
1309 + ingenic_shadow_config_pin(jzpc, pin, JZ4760_GPIO_PAT0, func & 0x1);
1310 + ingenic_shadow_config_pin_load(jzpc, pin);
1311 +- } else if (jzpc->version >= ID_JZ4760) {
1312 ++ } else if (jzpc->version >= ID_JZ4770) {
1313 + ingenic_config_pin(jzpc, pin, JZ4760_GPIO_INT, false);
1314 + ingenic_config_pin(jzpc, pin, GPIO_MSK, false);
1315 + ingenic_config_pin(jzpc, pin, JZ4760_GPIO_PAT1, func & 0x2);
1316 +@@ -1684,7 +1684,7 @@ static int ingenic_pinmux_set_pin_fn(struct ingenic_pinctrl *jzpc,
1317 + } else {
1318 + ingenic_config_pin(jzpc, pin, JZ4740_GPIO_FUNC, true);
1319 + ingenic_config_pin(jzpc, pin, JZ4740_GPIO_TRIG, func & 0x2);
1320 +- ingenic_config_pin(jzpc, pin, JZ4740_GPIO_SELECT, func > 0);
1321 ++ ingenic_config_pin(jzpc, pin, JZ4740_GPIO_SELECT, func & 0x1);
1322 + }
1323 +
1324 + return 0;
1325 +@@ -1734,7 +1734,7 @@ static int ingenic_pinmux_gpio_set_direction(struct pinctrl_dev *pctldev,
1326 + ingenic_shadow_config_pin(jzpc, pin, GPIO_MSK, true);
1327 + ingenic_shadow_config_pin(jzpc, pin, JZ4760_GPIO_PAT1, input);
1328 + ingenic_shadow_config_pin_load(jzpc, pin);
1329 +- } else if (jzpc->version >= ID_JZ4760) {
1330 ++ } else if (jzpc->version >= ID_JZ4770) {
1331 + ingenic_config_pin(jzpc, pin, JZ4760_GPIO_INT, false);
1332 + ingenic_config_pin(jzpc, pin, GPIO_MSK, true);
1333 + ingenic_config_pin(jzpc, pin, JZ4760_GPIO_PAT1, input);
1334 +@@ -1764,7 +1764,7 @@ static int ingenic_pinconf_get(struct pinctrl_dev *pctldev,
1335 + unsigned int offt = pin / PINS_PER_GPIO_CHIP;
1336 + bool pull;
1337 +
1338 +- if (jzpc->version >= ID_JZ4760)
1339 ++ if (jzpc->version >= ID_JZ4770)
1340 + pull = !ingenic_get_pin_config(jzpc, pin, JZ4760_GPIO_PEN);
1341 + else
1342 + pull = !ingenic_get_pin_config(jzpc, pin, JZ4740_GPIO_PULL_DIS);
1343 +@@ -1796,7 +1796,7 @@ static int ingenic_pinconf_get(struct pinctrl_dev *pctldev,
1344 + static void ingenic_set_bias(struct ingenic_pinctrl *jzpc,
1345 + unsigned int pin, bool enabled)
1346 + {
1347 +- if (jzpc->version >= ID_JZ4760)
1348 ++ if (jzpc->version >= ID_JZ4770)
1349 + ingenic_config_pin(jzpc, pin, JZ4760_GPIO_PEN, !enabled);
1350 + else
1351 + ingenic_config_pin(jzpc, pin, JZ4740_GPIO_PULL_DIS, !enabled);
1352 +diff --git a/drivers/platform/x86/i2c-multi-instantiate.c b/drivers/platform/x86/i2c-multi-instantiate.c
1353 +index ffb8d5d1eb5ff..f85a5c720507b 100644
1354 +--- a/drivers/platform/x86/i2c-multi-instantiate.c
1355 ++++ b/drivers/platform/x86/i2c-multi-instantiate.c
1356 +@@ -166,13 +166,29 @@ static const struct i2c_inst_data bsg2150_data[] = {
1357 + {}
1358 + };
1359 +
1360 +-static const struct i2c_inst_data int3515_data[] = {
1361 +- { "tps6598x", IRQ_RESOURCE_APIC, 0 },
1362 +- { "tps6598x", IRQ_RESOURCE_APIC, 1 },
1363 +- { "tps6598x", IRQ_RESOURCE_APIC, 2 },
1364 +- { "tps6598x", IRQ_RESOURCE_APIC, 3 },
1365 +- {}
1366 +-};
1367 ++/*
1368 ++ * Device with _HID INT3515 (TI PD controllers) has some unresolved interrupt
1369 ++ * issues. The most common problem seen is interrupt flood.
1370 ++ *
1371 ++ * There are at least two known causes. Firstly, on some boards, the
1372 ++ * I2CSerialBus resource index does not match the Interrupt resource, i.e. they
1373 ++ * are not one-to-one mapped like in the array below. Secondly, on some boards
1374 ++ * the IRQ line from the PD controller is not actually connected at all. But the
1375 ++ * interrupt flood is also seen on some boards where those are not a problem, so
1376 ++ * there are some other problems as well.
1377 ++ *
1378 ++ * Because of the issues with the interrupt, the device is disabled for now. If
1379 ++ * you wish to debug the issues, uncomment the below, and add an entry for the
1380 ++ * INT3515 device to the i2c_multi_instance_ids table.
1381 ++ *
1382 ++ * static const struct i2c_inst_data int3515_data[] = {
1383 ++ * { "tps6598x", IRQ_RESOURCE_APIC, 0 },
1384 ++ * { "tps6598x", IRQ_RESOURCE_APIC, 1 },
1385 ++ * { "tps6598x", IRQ_RESOURCE_APIC, 2 },
1386 ++ * { "tps6598x", IRQ_RESOURCE_APIC, 3 },
1387 ++ * { }
1388 ++ * };
1389 ++ */
1390 +
1391 + /*
1392 + * Note new device-ids must also be added to i2c_multi_instantiate_ids in
1393 +@@ -181,7 +197,6 @@ static const struct i2c_inst_data int3515_data[] = {
1394 + static const struct acpi_device_id i2c_multi_inst_acpi_ids[] = {
1395 + { "BSG1160", (unsigned long)bsg1160_data },
1396 + { "BSG2150", (unsigned long)bsg2150_data },
1397 +- { "INT3515", (unsigned long)int3515_data },
1398 + { }
1399 + };
1400 + MODULE_DEVICE_TABLE(acpi, i2c_multi_inst_acpi_ids);
1401 +diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
1402 +index 7598cd46cf606..5b81bafa5c165 100644
1403 +--- a/drivers/platform/x86/ideapad-laptop.c
1404 ++++ b/drivers/platform/x86/ideapad-laptop.c
1405 +@@ -92,6 +92,7 @@ struct ideapad_private {
1406 + struct dentry *debug;
1407 + unsigned long cfg;
1408 + bool has_hw_rfkill_switch;
1409 ++ bool has_touchpad_switch;
1410 + const char *fnesc_guid;
1411 + };
1412 +
1413 +@@ -535,7 +536,9 @@ static umode_t ideapad_is_visible(struct kobject *kobj,
1414 + } else if (attr == &dev_attr_fn_lock.attr) {
1415 + supported = acpi_has_method(priv->adev->handle, "HALS") &&
1416 + acpi_has_method(priv->adev->handle, "SALS");
1417 +- } else
1418 ++ } else if (attr == &dev_attr_touchpad.attr)
1419 ++ supported = priv->has_touchpad_switch;
1420 ++ else
1421 + supported = true;
1422 +
1423 + return supported ? attr->mode : 0;
1424 +@@ -867,6 +870,9 @@ static void ideapad_sync_touchpad_state(struct ideapad_private *priv)
1425 + {
1426 + unsigned long value;
1427 +
1428 ++ if (!priv->has_touchpad_switch)
1429 ++ return;
1430 ++
1431 + /* Without reading from EC touchpad LED doesn't switch state */
1432 + if (!read_ec_data(priv->adev->handle, VPCCMD_R_TOUCHPAD, &value)) {
1433 + /* Some IdeaPads don't really turn off touchpad - they only
1434 +@@ -989,6 +995,9 @@ static int ideapad_acpi_add(struct platform_device *pdev)
1435 + priv->platform_device = pdev;
1436 + priv->has_hw_rfkill_switch = dmi_check_system(hw_rfkill_list);
1437 +
1438 ++ /* Most ideapads with ELAN0634 touchpad don't use EC touchpad switch */
1439 ++ priv->has_touchpad_switch = !acpi_dev_present("ELAN0634", NULL, -1);
1440 ++
1441 + ret = ideapad_sysfs_init(priv);
1442 + if (ret)
1443 + return ret;
1444 +@@ -1006,6 +1015,10 @@ static int ideapad_acpi_add(struct platform_device *pdev)
1445 + if (!priv->has_hw_rfkill_switch)
1446 + write_ec_cmd(priv->adev->handle, VPCCMD_W_RF, 1);
1447 +
1448 ++ /* The same for Touchpad */
1449 ++ if (!priv->has_touchpad_switch)
1450 ++ write_ec_cmd(priv->adev->handle, VPCCMD_W_TOUCHPAD, 1);
1451 ++
1452 + for (i = 0; i < IDEAPAD_RFKILL_DEV_NUM; i++)
1453 + if (test_bit(ideapad_rfk_data[i].cfgbit, &priv->cfg))
1454 + ideapad_register_rfkill(priv, i);
1455 +diff --git a/drivers/platform/x86/intel-vbtn.c b/drivers/platform/x86/intel-vbtn.c
1456 +index bc8b0098d4f32..37035dca469cf 100644
1457 +--- a/drivers/platform/x86/intel-vbtn.c
1458 ++++ b/drivers/platform/x86/intel-vbtn.c
1459 +@@ -191,12 +191,6 @@ static const struct dmi_system_id dmi_switches_allow_list[] = {
1460 + DMI_MATCH(DMI_PRODUCT_NAME, "Venue 11 Pro 7130"),
1461 + },
1462 + },
1463 +- {
1464 +- .matches = {
1465 +- DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
1466 +- DMI_MATCH(DMI_PRODUCT_NAME, "HP Stream x360 Convertible PC 11"),
1467 +- },
1468 +- },
1469 + {
1470 + .matches = {
1471 + DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
1472 +diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
1473 +index 4a23dd8b7f9aa..b9c1f722f1ded 100644
1474 +--- a/drivers/scsi/megaraid/megaraid_sas_base.c
1475 ++++ b/drivers/scsi/megaraid/megaraid_sas_base.c
1476 +@@ -8174,11 +8174,9 @@ megasas_mgmt_fw_ioctl(struct megasas_instance *instance,
1477 + goto out;
1478 + }
1479 +
1480 ++ /* always store 64 bits regardless of addressing */
1481 + sense_ptr = (void *)cmd->frame + ioc->sense_off;
1482 +- if (instance->consistent_mask_64bit)
1483 +- put_unaligned_le64(sense_handle, sense_ptr);
1484 +- else
1485 +- put_unaligned_le32(sense_handle, sense_ptr);
1486 ++ put_unaligned_le64(sense_handle, sense_ptr);
1487 + }
1488 +
1489 + /*
1490 +diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c
1491 +index 35c96ea2653be..fdd966fea7f6a 100644
1492 +--- a/drivers/scsi/qedi/qedi_main.c
1493 ++++ b/drivers/scsi/qedi/qedi_main.c
1494 +@@ -2175,7 +2175,7 @@ qedi_show_boot_tgt_info(struct qedi_ctx *qedi, int type,
1495 + chap_name);
1496 + break;
1497 + case ISCSI_BOOT_TGT_CHAP_SECRET:
1498 +- rc = sprintf(buf, "%.*s\n", NVM_ISCSI_CFG_CHAP_NAME_MAX_LEN,
1499 ++ rc = sprintf(buf, "%.*s\n", NVM_ISCSI_CFG_CHAP_PWD_MAX_LEN,
1500 + chap_secret);
1501 + break;
1502 + case ISCSI_BOOT_TGT_REV_CHAP_NAME:
1503 +@@ -2183,7 +2183,7 @@ qedi_show_boot_tgt_info(struct qedi_ctx *qedi, int type,
1504 + mchap_name);
1505 + break;
1506 + case ISCSI_BOOT_TGT_REV_CHAP_SECRET:
1507 +- rc = sprintf(buf, "%.*s\n", NVM_ISCSI_CFG_CHAP_NAME_MAX_LEN,
1508 ++ rc = sprintf(buf, "%.*s\n", NVM_ISCSI_CFG_CHAP_PWD_MAX_LEN,
1509 + mchap_secret);
1510 + break;
1511 + case ISCSI_BOOT_TGT_FLAGS:
1512 +diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
1513 +index 6a2f8bacfacea..f55249766d224 100644
1514 +--- a/drivers/scsi/sd.c
1515 ++++ b/drivers/scsi/sd.c
1516 +@@ -934,8 +934,10 @@ static blk_status_t sd_setup_write_zeroes_cmnd(struct scsi_cmnd *cmd)
1517 + }
1518 + }
1519 +
1520 +- if (sdp->no_write_same)
1521 ++ if (sdp->no_write_same) {
1522 ++ rq->rq_flags |= RQF_QUIET;
1523 + return BLK_STS_TARGET;
1524 ++ }
1525 +
1526 + if (sdkp->ws16 || lba > 0xffffffff || nr_blocks > 0xffff)
1527 + return sd_setup_write_same16_cmnd(cmd, false);
1528 +diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
1529 +index b888117f4ecd3..476ef8044ae59 100644
1530 +--- a/drivers/scsi/ufs/ufshcd.c
1531 ++++ b/drivers/scsi/ufs/ufshcd.c
1532 +@@ -5980,19 +5980,16 @@ static int ufshcd_eh_device_reset_handler(struct scsi_cmnd *cmd)
1533 + {
1534 + struct Scsi_Host *host;
1535 + struct ufs_hba *hba;
1536 +- unsigned int tag;
1537 + u32 pos;
1538 + int err;
1539 +- u8 resp = 0xF;
1540 +- struct ufshcd_lrb *lrbp;
1541 ++ u8 resp = 0xF, lun;
1542 + unsigned long flags;
1543 +
1544 + host = cmd->device->host;
1545 + hba = shost_priv(host);
1546 +- tag = cmd->request->tag;
1547 +
1548 +- lrbp = &hba->lrb[tag];
1549 +- err = ufshcd_issue_tm_cmd(hba, lrbp->lun, 0, UFS_LOGICAL_RESET, &resp);
1550 ++ lun = ufshcd_scsi_to_upiu_lun(cmd->device->lun);
1551 ++ err = ufshcd_issue_tm_cmd(hba, lun, 0, UFS_LOGICAL_RESET, &resp);
1552 + if (err || resp != UPIU_TASK_MANAGEMENT_FUNC_COMPL) {
1553 + if (!err)
1554 + err = resp;
1555 +@@ -6001,7 +5998,7 @@ static int ufshcd_eh_device_reset_handler(struct scsi_cmnd *cmd)
1556 +
1557 + /* clear the commands that were pending for corresponding LUN */
1558 + for_each_set_bit(pos, &hba->outstanding_reqs, hba->nutrs) {
1559 +- if (hba->lrb[pos].lun == lrbp->lun) {
1560 ++ if (hba->lrb[pos].lun == lun) {
1561 + err = ufshcd_clear_cmd(hba, pos);
1562 + if (err)
1563 + break;
1564 +diff --git a/drivers/tty/serial/mvebu-uart.c b/drivers/tty/serial/mvebu-uart.c
1565 +index 4e9a590712cb2..e006f40ffdc04 100644
1566 +--- a/drivers/tty/serial/mvebu-uart.c
1567 ++++ b/drivers/tty/serial/mvebu-uart.c
1568 +@@ -648,6 +648,14 @@ static void wait_for_xmitr(struct uart_port *port)
1569 + (val & STAT_TX_RDY(port)), 1, 10000);
1570 + }
1571 +
1572 ++static void wait_for_xmite(struct uart_port *port)
1573 ++{
1574 ++ u32 val;
1575 ++
1576 ++ readl_poll_timeout_atomic(port->membase + UART_STAT, val,
1577 ++ (val & STAT_TX_EMP), 1, 10000);
1578 ++}
1579 ++
1580 + static void mvebu_uart_console_putchar(struct uart_port *port, int ch)
1581 + {
1582 + wait_for_xmitr(port);
1583 +@@ -675,7 +683,7 @@ static void mvebu_uart_console_write(struct console *co, const char *s,
1584 +
1585 + uart_console_write(port, s, count, mvebu_uart_console_putchar);
1586 +
1587 +- wait_for_xmitr(port);
1588 ++ wait_for_xmite(port);
1589 +
1590 + if (ier)
1591 + writel(ier, port->membase + UART_CTRL(port));
1592 +diff --git a/drivers/tty/serial/sifive.c b/drivers/tty/serial/sifive.c
1593 +index b4343c6aa6512..6a2dc823ea828 100644
1594 +--- a/drivers/tty/serial/sifive.c
1595 ++++ b/drivers/tty/serial/sifive.c
1596 +@@ -973,6 +973,7 @@ static int sifive_serial_probe(struct platform_device *pdev)
1597 + /* Set up clock divider */
1598 + ssp->clkin_rate = clk_get_rate(ssp->clk);
1599 + ssp->baud_rate = SIFIVE_DEFAULT_BAUD_RATE;
1600 ++ ssp->port.uartclk = ssp->baud_rate * 16;
1601 + __ssp_update_div(ssp);
1602 +
1603 + platform_set_drvdata(pdev, ssp);
1604 +diff --git a/drivers/usb/gadget/udc/aspeed-vhub/epn.c b/drivers/usb/gadget/udc/aspeed-vhub/epn.c
1605 +index 7475c74aa5c5e..66d8884615f0e 100644
1606 +--- a/drivers/usb/gadget/udc/aspeed-vhub/epn.c
1607 ++++ b/drivers/usb/gadget/udc/aspeed-vhub/epn.c
1608 +@@ -420,7 +420,10 @@ static void ast_vhub_stop_active_req(struct ast_vhub_ep *ep,
1609 + u32 state, reg, loops;
1610 +
1611 + /* Stop DMA activity */
1612 +- writel(0, ep->epn.regs + AST_VHUB_EP_DMA_CTLSTAT);
1613 ++ if (ep->epn.desc_mode)
1614 ++ writel(VHUB_EP_DMA_CTRL_RESET, ep->epn.regs + AST_VHUB_EP_DMA_CTLSTAT);
1615 ++ else
1616 ++ writel(0, ep->epn.regs + AST_VHUB_EP_DMA_CTLSTAT);
1617 +
1618 + /* Wait for it to complete */
1619 + for (loops = 0; loops < 1000; loops++) {
1620 +diff --git a/drivers/usb/gadget/udc/bdc/Kconfig b/drivers/usb/gadget/udc/bdc/Kconfig
1621 +index 3e88c7670b2ed..fb01ff47b64cf 100644
1622 +--- a/drivers/usb/gadget/udc/bdc/Kconfig
1623 ++++ b/drivers/usb/gadget/udc/bdc/Kconfig
1624 +@@ -17,7 +17,7 @@ if USB_BDC_UDC
1625 + comment "Platform Support"
1626 + config USB_BDC_PCI
1627 + tristate "BDC support for PCIe based platforms"
1628 +- depends on USB_PCI
1629 ++ depends on USB_PCI && BROKEN
1630 + default USB_BDC_UDC
1631 + help
1632 + Enable support for platforms which have BDC connected through PCIe, such as Lego3 FPGA platform.
1633 +diff --git a/drivers/usb/gadget/udc/core.c b/drivers/usb/gadget/udc/core.c
1634 +index 0e7820158aaa9..e41f67cd3d469 100644
1635 +--- a/drivers/usb/gadget/udc/core.c
1636 ++++ b/drivers/usb/gadget/udc/core.c
1637 +@@ -1477,10 +1477,13 @@ static ssize_t soft_connect_store(struct device *dev,
1638 + struct device_attribute *attr, const char *buf, size_t n)
1639 + {
1640 + struct usb_udc *udc = container_of(dev, struct usb_udc, dev);
1641 ++ ssize_t ret;
1642 +
1643 ++ mutex_lock(&udc_lock);
1644 + if (!udc->driver) {
1645 + dev_err(dev, "soft-connect without a gadget driver\n");
1646 +- return -EOPNOTSUPP;
1647 ++ ret = -EOPNOTSUPP;
1648 ++ goto out;
1649 + }
1650 +
1651 + if (sysfs_streq(buf, "connect")) {
1652 +@@ -1491,10 +1494,14 @@ static ssize_t soft_connect_store(struct device *dev,
1653 + usb_gadget_udc_stop(udc);
1654 + } else {
1655 + dev_err(dev, "unsupported command '%s'\n", buf);
1656 +- return -EINVAL;
1657 ++ ret = -EINVAL;
1658 ++ goto out;
1659 + }
1660 +
1661 +- return n;
1662 ++ ret = n;
1663 ++out:
1664 ++ mutex_unlock(&udc_lock);
1665 ++ return ret;
1666 + }
1667 + static DEVICE_ATTR_WO(soft_connect);
1668 +
1669 +diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
1670 +index 0e5c56e065591..5c6ce1ef3f4b0 100644
1671 +--- a/drivers/usb/host/ehci-hcd.c
1672 ++++ b/drivers/usb/host/ehci-hcd.c
1673 +@@ -574,6 +574,7 @@ static int ehci_run (struct usb_hcd *hcd)
1674 + struct ehci_hcd *ehci = hcd_to_ehci (hcd);
1675 + u32 temp;
1676 + u32 hcc_params;
1677 ++ int rc;
1678 +
1679 + hcd->uses_new_polling = 1;
1680 +
1681 +@@ -629,9 +630,20 @@ static int ehci_run (struct usb_hcd *hcd)
1682 + down_write(&ehci_cf_port_reset_rwsem);
1683 + ehci->rh_state = EHCI_RH_RUNNING;
1684 + ehci_writel(ehci, FLAG_CF, &ehci->regs->configured_flag);
1685 ++
1686 ++ /* Wait until HC become operational */
1687 + ehci_readl(ehci, &ehci->regs->command); /* unblock posted writes */
1688 + msleep(5);
1689 ++ rc = ehci_handshake(ehci, &ehci->regs->status, STS_HALT, 0, 100 * 1000);
1690 ++
1691 + up_write(&ehci_cf_port_reset_rwsem);
1692 ++
1693 ++ if (rc) {
1694 ++ ehci_err(ehci, "USB %x.%x, controller refused to start: %d\n",
1695 ++ ((ehci->sbrn & 0xf0)>>4), (ehci->sbrn & 0x0f), rc);
1696 ++ return rc;
1697 ++ }
1698 ++
1699 + ehci->last_periodic_enable = ktime_get_real();
1700 +
1701 + temp = HC_VERSION(ehci, ehci_readl(ehci, &ehci->caps->hc_capbase));
1702 +diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
1703 +index 087402aec5cbe..9f9ab5ccea889 100644
1704 +--- a/drivers/usb/host/ehci-hub.c
1705 ++++ b/drivers/usb/host/ehci-hub.c
1706 +@@ -345,6 +345,9 @@ static int ehci_bus_suspend (struct usb_hcd *hcd)
1707 +
1708 + unlink_empty_async_suspended(ehci);
1709 +
1710 ++ /* Some Synopsys controllers mistakenly leave IAA turned on */
1711 ++ ehci_writel(ehci, STS_IAA, &ehci->regs->status);
1712 ++
1713 + /* Any IAA cycle that started before the suspend is now invalid */
1714 + end_iaa_cycle(ehci);
1715 + ehci_handle_start_intr_unlinks(ehci);
1716 +diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
1717 +index 49894541ea9a5..52e156c018042 100644
1718 +--- a/drivers/usb/host/xhci-ring.c
1719 ++++ b/drivers/usb/host/xhci-ring.c
1720 +@@ -2918,6 +2918,8 @@ static void queue_trb(struct xhci_hcd *xhci, struct xhci_ring *ring,
1721 + trb->field[0] = cpu_to_le32(field1);
1722 + trb->field[1] = cpu_to_le32(field2);
1723 + trb->field[2] = cpu_to_le32(field3);
1724 ++ /* make sure TRB is fully written before giving it to the controller */
1725 ++ wmb();
1726 + trb->field[3] = cpu_to_le32(field4);
1727 +
1728 + trace_xhci_queue_trb(ring, trb);
1729 +diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c
1730 +index b8e24ccba9f3e..6087b1fa530f8 100644
1731 +--- a/drivers/usb/host/xhci-tegra.c
1732 ++++ b/drivers/usb/host/xhci-tegra.c
1733 +@@ -562,6 +562,13 @@ static void tegra_xusb_mbox_handle(struct tegra_xusb *tegra,
1734 + enable);
1735 + if (err < 0)
1736 + break;
1737 ++
1738 ++ /*
1739 ++ * wait 500us for LFPS detector to be disabled before
1740 ++ * sending ACK
1741 ++ */
1742 ++ if (!enable)
1743 ++ usleep_range(500, 1000);
1744 + }
1745 +
1746 + if (err < 0) {
1747 +diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c
1748 +index 26df84c45db4e..7b94a6c316643 100644
1749 +--- a/drivers/xen/events/events_base.c
1750 ++++ b/drivers/xen/events/events_base.c
1751 +@@ -1988,16 +1988,6 @@ static struct irq_chip xen_percpu_chip __read_mostly = {
1752 + .irq_ack = ack_dynirq,
1753 + };
1754 +
1755 +-int xen_set_callback_via(uint64_t via)
1756 +-{
1757 +- struct xen_hvm_param a;
1758 +- a.domid = DOMID_SELF;
1759 +- a.index = HVM_PARAM_CALLBACK_IRQ;
1760 +- a.value = via;
1761 +- return HYPERVISOR_hvm_op(HVMOP_set_param, &a);
1762 +-}
1763 +-EXPORT_SYMBOL_GPL(xen_set_callback_via);
1764 +-
1765 + #ifdef CONFIG_XEN_PVHVM
1766 + /* Vector callbacks are better than PCI interrupts to receive event
1767 + * channel notifications because we can receive vector callbacks on any
1768 +diff --git a/drivers/xen/platform-pci.c b/drivers/xen/platform-pci.c
1769 +index 5e30602fdbad8..c45646450135f 100644
1770 +--- a/drivers/xen/platform-pci.c
1771 ++++ b/drivers/xen/platform-pci.c
1772 +@@ -149,7 +149,6 @@ static int platform_pci_probe(struct pci_dev *pdev,
1773 + ret = gnttab_init();
1774 + if (ret)
1775 + goto grant_out;
1776 +- xenbus_probe(NULL);
1777 + return 0;
1778 + grant_out:
1779 + gnttab_free_auto_xlat_frames();
1780 +diff --git a/drivers/xen/xenbus/xenbus.h b/drivers/xen/xenbus/xenbus.h
1781 +index 88516a8a9f932..a9bb5f91082d3 100644
1782 +--- a/drivers/xen/xenbus/xenbus.h
1783 ++++ b/drivers/xen/xenbus/xenbus.h
1784 +@@ -115,6 +115,7 @@ int xenbus_probe_node(struct xen_bus_type *bus,
1785 + const char *type,
1786 + const char *nodename);
1787 + int xenbus_probe_devices(struct xen_bus_type *bus);
1788 ++void xenbus_probe(void);
1789 +
1790 + void xenbus_dev_changed(const char *node, struct xen_bus_type *bus);
1791 +
1792 +diff --git a/drivers/xen/xenbus/xenbus_comms.c b/drivers/xen/xenbus/xenbus_comms.c
1793 +index eb5151fc8efab..e5fda0256feb3 100644
1794 +--- a/drivers/xen/xenbus/xenbus_comms.c
1795 ++++ b/drivers/xen/xenbus/xenbus_comms.c
1796 +@@ -57,16 +57,8 @@ DEFINE_MUTEX(xs_response_mutex);
1797 + static int xenbus_irq;
1798 + static struct task_struct *xenbus_task;
1799 +
1800 +-static DECLARE_WORK(probe_work, xenbus_probe);
1801 +-
1802 +-
1803 + static irqreturn_t wake_waiting(int irq, void *unused)
1804 + {
1805 +- if (unlikely(xenstored_ready == 0)) {
1806 +- xenstored_ready = 1;
1807 +- schedule_work(&probe_work);
1808 +- }
1809 +-
1810 + wake_up(&xb_waitq);
1811 + return IRQ_HANDLED;
1812 + }
1813 +diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c
1814 +index e6d0903459e11..14ccf13ab8fa1 100644
1815 +--- a/drivers/xen/xenbus/xenbus_probe.c
1816 ++++ b/drivers/xen/xenbus/xenbus_probe.c
1817 +@@ -683,29 +683,76 @@ void unregister_xenstore_notifier(struct notifier_block *nb)
1818 + }
1819 + EXPORT_SYMBOL_GPL(unregister_xenstore_notifier);
1820 +
1821 +-void xenbus_probe(struct work_struct *unused)
1822 ++void xenbus_probe(void)
1823 + {
1824 + xenstored_ready = 1;
1825 +
1826 ++ /*
1827 ++ * In the HVM case, xenbus_init() deferred its call to
1828 ++ * xs_init() in case callbacks were not operational yet.
1829 ++ * So do it now.
1830 ++ */
1831 ++ if (xen_store_domain_type == XS_HVM)
1832 ++ xs_init();
1833 ++
1834 + /* Notify others that xenstore is up */
1835 + blocking_notifier_call_chain(&xenstore_chain, 0, NULL);
1836 + }
1837 +-EXPORT_SYMBOL_GPL(xenbus_probe);
1838 +
1839 +-static int __init xenbus_probe_initcall(void)
1840 ++/*
1841 ++ * Returns true when XenStore init must be deferred in order to
1842 ++ * allow the PCI platform device to be initialised, before we
1843 ++ * can actually have event channel interrupts working.
1844 ++ */
1845 ++static bool xs_hvm_defer_init_for_callback(void)
1846 + {
1847 +- if (!xen_domain())
1848 +- return -ENODEV;
1849 ++#ifdef CONFIG_XEN_PVHVM
1850 ++ return xen_store_domain_type == XS_HVM &&
1851 ++ !xen_have_vector_callback;
1852 ++#else
1853 ++ return false;
1854 ++#endif
1855 ++}
1856 +
1857 +- if (xen_initial_domain() || xen_hvm_domain())
1858 +- return 0;
1859 ++static int __init xenbus_probe_initcall(void)
1860 ++{
1861 ++ /*
1862 ++ * Probe XenBus here in the XS_PV case, and also XS_HVM unless we
1863 ++ * need to wait for the platform PCI device to come up.
1864 ++ */
1865 ++ if (xen_store_domain_type == XS_PV ||
1866 ++ (xen_store_domain_type == XS_HVM &&
1867 ++ !xs_hvm_defer_init_for_callback()))
1868 ++ xenbus_probe();
1869 +
1870 +- xenbus_probe(NULL);
1871 + return 0;
1872 + }
1873 +-
1874 + device_initcall(xenbus_probe_initcall);
1875 +
1876 ++int xen_set_callback_via(uint64_t via)
1877 ++{
1878 ++ struct xen_hvm_param a;
1879 ++ int ret;
1880 ++
1881 ++ a.domid = DOMID_SELF;
1882 ++ a.index = HVM_PARAM_CALLBACK_IRQ;
1883 ++ a.value = via;
1884 ++
1885 ++ ret = HYPERVISOR_hvm_op(HVMOP_set_param, &a);
1886 ++ if (ret)
1887 ++ return ret;
1888 ++
1889 ++ /*
1890 ++ * If xenbus_probe_initcall() deferred the xenbus_probe()
1891 ++ * due to the callback not functioning yet, we can do it now.
1892 ++ */
1893 ++ if (!xenstored_ready && xs_hvm_defer_init_for_callback())
1894 ++ xenbus_probe();
1895 ++
1896 ++ return ret;
1897 ++}
1898 ++EXPORT_SYMBOL_GPL(xen_set_callback_via);
1899 ++
1900 + /* Set up event channel for xenstored which is run as a local process
1901 + * (this is normally used only in dom0)
1902 + */
1903 +@@ -818,11 +865,17 @@ static int __init xenbus_init(void)
1904 + break;
1905 + }
1906 +
1907 +- /* Initialize the interface to xenstore. */
1908 +- err = xs_init();
1909 +- if (err) {
1910 +- pr_warn("Error initializing xenstore comms: %i\n", err);
1911 +- goto out_error;
1912 ++ /*
1913 ++ * HVM domains may not have a functional callback yet. In that
1914 ++ * case let xs_init() be called from xenbus_probe(), which will
1915 ++ * get invoked at an appropriate time.
1916 ++ */
1917 ++ if (xen_store_domain_type != XS_HVM) {
1918 ++ err = xs_init();
1919 ++ if (err) {
1920 ++ pr_warn("Error initializing xenstore comms: %i\n", err);
1921 ++ goto out_error;
1922 ++ }
1923 + }
1924 +
1925 + if ((xen_store_domain_type != XS_LOCAL) &&
1926 +diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c
1927 +index ace49a999ecec..59e7a2ad440fc 100644
1928 +--- a/fs/btrfs/block-group.c
1929 ++++ b/fs/btrfs/block-group.c
1930 +@@ -2497,7 +2497,8 @@ again:
1931 + * Go through delayed refs for all the stuff we've just kicked off
1932 + * and then loop back (just once)
1933 + */
1934 +- ret = btrfs_run_delayed_refs(trans, 0);
1935 ++ if (!ret)
1936 ++ ret = btrfs_run_delayed_refs(trans, 0);
1937 + if (!ret && loops == 0) {
1938 + loops++;
1939 + spin_lock(&cur_trans->dirty_bgs_lock);
1940 +diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
1941 +index c0dd839e99b79..6317394f02b86 100644
1942 +--- a/fs/btrfs/extent-tree.c
1943 ++++ b/fs/btrfs/extent-tree.c
1944 +@@ -5390,7 +5390,15 @@ int btrfs_drop_snapshot(struct btrfs_root *root,
1945 + goto out_free;
1946 + }
1947 +
1948 +- trans = btrfs_start_transaction(tree_root, 0);
1949 ++ /*
1950 ++ * Use join to avoid potential EINTR from transaction
1951 ++ * start. See wait_reserve_ticket and the whole
1952 ++ * reservation callchain.
1953 ++ */
1954 ++ if (for_reloc)
1955 ++ trans = btrfs_join_transaction(tree_root);
1956 ++ else
1957 ++ trans = btrfs_start_transaction(tree_root, 0);
1958 + if (IS_ERR(trans)) {
1959 + err = PTR_ERR(trans);
1960 + goto out_free;
1961 +diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
1962 +index 903136ceac34a..ecdefa7262d2b 100644
1963 +--- a/fs/btrfs/send.c
1964 ++++ b/fs/btrfs/send.c
1965 +@@ -5519,6 +5519,21 @@ static int clone_range(struct send_ctx *sctx,
1966 + break;
1967 + offset += clone_len;
1968 + clone_root->offset += clone_len;
1969 ++
1970 ++ /*
1971 ++ * If we are cloning from the file we are currently processing,
1972 ++ * and using the send root as the clone root, we must stop once
1973 ++ * the current clone offset reaches the current eof of the file
1974 ++ * at the receiver, otherwise we would issue an invalid clone
1975 ++ * operation (source range going beyond eof) and cause the
1976 ++ * receiver to fail. So if we reach the current eof, bail out
1977 ++ * and fallback to a regular write.
1978 ++ */
1979 ++ if (clone_root->root == sctx->send_root &&
1980 ++ clone_root->ino == sctx->cur_ino &&
1981 ++ clone_root->offset >= sctx->cur_inode_next_write_offset)
1982 ++ break;
1983 ++
1984 + data_offset += clone_len;
1985 + next:
1986 + path->slots[0]++;
1987 +diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
1988 +index 67ffbe92944c6..db3b17bca11f5 100644
1989 +--- a/fs/btrfs/volumes.c
1990 ++++ b/fs/btrfs/volumes.c
1991 +@@ -4409,6 +4409,8 @@ int btrfs_recover_balance(struct btrfs_fs_info *fs_info)
1992 + btrfs_warn(fs_info,
1993 + "balance: cannot set exclusive op status, resume manually");
1994 +
1995 ++ btrfs_release_path(path);
1996 ++
1997 + mutex_lock(&fs_info->balance_mutex);
1998 + BUG_ON(fs_info->balance_ctl);
1999 + spin_lock(&fs_info->balance_lock);
2000 +diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
2001 +index 6d6de183915b5..4ffbf8f965814 100644
2002 +--- a/fs/cifs/transport.c
2003 ++++ b/fs/cifs/transport.c
2004 +@@ -339,7 +339,7 @@ __smb_send_rqst(struct TCP_Server_Info *server, int num_rqst,
2005 + if (ssocket == NULL)
2006 + return -EAGAIN;
2007 +
2008 +- if (signal_pending(current)) {
2009 ++ if (fatal_signal_pending(current)) {
2010 + cifs_dbg(FYI, "signal pending before send request\n");
2011 + return -ERESTARTSYS;
2012 + }
2013 +@@ -431,7 +431,7 @@ unmask:
2014 +
2015 + if (signal_pending(current) && (total_len != send_length)) {
2016 + cifs_dbg(FYI, "signal is pending after attempt to send\n");
2017 +- rc = -EINTR;
2018 ++ rc = -ERESTARTSYS;
2019 + }
2020 +
2021 + /* uncork it */
2022 +diff --git a/include/asm-generic/bitops/atomic.h b/include/asm-generic/bitops/atomic.h
2023 +index dd90c9792909d..0e7316a86240b 100644
2024 +--- a/include/asm-generic/bitops/atomic.h
2025 ++++ b/include/asm-generic/bitops/atomic.h
2026 +@@ -11,19 +11,19 @@
2027 + * See Documentation/atomic_bitops.txt for details.
2028 + */
2029 +
2030 +-static inline void set_bit(unsigned int nr, volatile unsigned long *p)
2031 ++static __always_inline void set_bit(unsigned int nr, volatile unsigned long *p)
2032 + {
2033 + p += BIT_WORD(nr);
2034 + atomic_long_or(BIT_MASK(nr), (atomic_long_t *)p);
2035 + }
2036 +
2037 +-static inline void clear_bit(unsigned int nr, volatile unsigned long *p)
2038 ++static __always_inline void clear_bit(unsigned int nr, volatile unsigned long *p)
2039 + {
2040 + p += BIT_WORD(nr);
2041 + atomic_long_andnot(BIT_MASK(nr), (atomic_long_t *)p);
2042 + }
2043 +
2044 +-static inline void change_bit(unsigned int nr, volatile unsigned long *p)
2045 ++static __always_inline void change_bit(unsigned int nr, volatile unsigned long *p)
2046 + {
2047 + p += BIT_WORD(nr);
2048 + atomic_long_xor(BIT_MASK(nr), (atomic_long_t *)p);
2049 +diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h
2050 +index c71eb294da954..6c8f8e5e33c3d 100644
2051 +--- a/include/net/inet_connection_sock.h
2052 ++++ b/include/net/inet_connection_sock.h
2053 +@@ -83,6 +83,8 @@ struct inet_connection_sock_af_ops {
2054 + * @icsk_ext_hdr_len: Network protocol overhead (IP/IPv6 options)
2055 + * @icsk_ack: Delayed ACK control data
2056 + * @icsk_mtup; MTU probing control data
2057 ++ * @icsk_probes_tstamp: Probe timestamp (cleared by non-zero window ack)
2058 ++ * @icsk_user_timeout: TCP_USER_TIMEOUT value
2059 + */
2060 + struct inet_connection_sock {
2061 + /* inet_sock has to be the first member! */
2062 +@@ -133,6 +135,7 @@ struct inet_connection_sock {
2063 +
2064 + u32 probe_timestamp;
2065 + } icsk_mtup;
2066 ++ u32 icsk_probes_tstamp;
2067 + u32 icsk_user_timeout;
2068 +
2069 + u64 icsk_ca_priv[104 / sizeof(u64)];
2070 +diff --git a/include/xen/xenbus.h b/include/xen/xenbus.h
2071 +index eba01ab5a55e0..fe9a9fa2ebc45 100644
2072 +--- a/include/xen/xenbus.h
2073 ++++ b/include/xen/xenbus.h
2074 +@@ -187,7 +187,7 @@ void xs_suspend_cancel(void);
2075 +
2076 + struct work_struct;
2077 +
2078 +-void xenbus_probe(struct work_struct *);
2079 ++void xenbus_probe(void);
2080 +
2081 + #define XENBUS_IS_ERR_READ(str) ({ \
2082 + if (!IS_ERR(str) && strlen(str) == 0) { \
2083 +diff --git a/mm/kasan/init.c b/mm/kasan/init.c
2084 +index ce45c491ebcdb..ee21e1c1150c6 100644
2085 +--- a/mm/kasan/init.c
2086 ++++ b/mm/kasan/init.c
2087 +@@ -388,9 +388,10 @@ static void kasan_remove_pmd_table(pmd_t *pmd, unsigned long addr,
2088 +
2089 + if (kasan_pte_table(*pmd)) {
2090 + if (IS_ALIGNED(addr, PMD_SIZE) &&
2091 +- IS_ALIGNED(next, PMD_SIZE))
2092 ++ IS_ALIGNED(next, PMD_SIZE)) {
2093 + pmd_clear(pmd);
2094 +- continue;
2095 ++ continue;
2096 ++ }
2097 + }
2098 + pte = pte_offset_kernel(pmd, addr);
2099 + kasan_remove_pte_table(pte, addr, next);
2100 +@@ -413,9 +414,10 @@ static void kasan_remove_pud_table(pud_t *pud, unsigned long addr,
2101 +
2102 + if (kasan_pmd_table(*pud)) {
2103 + if (IS_ALIGNED(addr, PUD_SIZE) &&
2104 +- IS_ALIGNED(next, PUD_SIZE))
2105 ++ IS_ALIGNED(next, PUD_SIZE)) {
2106 + pud_clear(pud);
2107 +- continue;
2108 ++ continue;
2109 ++ }
2110 + }
2111 + pmd = pmd_offset(pud, addr);
2112 + pmd_base = pmd_offset(pud, 0);
2113 +@@ -439,9 +441,10 @@ static void kasan_remove_p4d_table(p4d_t *p4d, unsigned long addr,
2114 +
2115 + if (kasan_pud_table(*p4d)) {
2116 + if (IS_ALIGNED(addr, P4D_SIZE) &&
2117 +- IS_ALIGNED(next, P4D_SIZE))
2118 ++ IS_ALIGNED(next, P4D_SIZE)) {
2119 + p4d_clear(p4d);
2120 +- continue;
2121 ++ continue;
2122 ++ }
2123 + }
2124 + pud = pud_offset(p4d, addr);
2125 + kasan_remove_pud_table(pud, addr, next);
2126 +@@ -473,9 +476,10 @@ void kasan_remove_zero_shadow(void *start, unsigned long size)
2127 +
2128 + if (kasan_p4d_table(*pgd)) {
2129 + if (IS_ALIGNED(addr, PGDIR_SIZE) &&
2130 +- IS_ALIGNED(next, PGDIR_SIZE))
2131 ++ IS_ALIGNED(next, PGDIR_SIZE)) {
2132 + pgd_clear(pgd);
2133 +- continue;
2134 ++ continue;
2135 ++ }
2136 + }
2137 +
2138 + p4d = p4d_offset(pgd, addr);
2139 +@@ -499,7 +503,6 @@ int kasan_add_zero_shadow(void *start, unsigned long size)
2140 +
2141 + ret = kasan_populate_early_shadow(shadow_start, shadow_end);
2142 + if (ret)
2143 +- kasan_remove_zero_shadow(shadow_start,
2144 +- size >> KASAN_SHADOW_SCALE_SHIFT);
2145 ++ kasan_remove_zero_shadow(start, size);
2146 + return ret;
2147 + }
2148 +diff --git a/net/core/dev.c b/net/core/dev.c
2149 +index 20c7fd7b8b4bc..ec66d13d2bdad 100644
2150 +--- a/net/core/dev.c
2151 ++++ b/net/core/dev.c
2152 +@@ -8692,6 +8692,11 @@ static netdev_features_t netdev_fix_features(struct net_device *dev,
2153 + }
2154 + }
2155 +
2156 ++ if ((features & NETIF_F_HW_TLS_RX) && !(features & NETIF_F_RXCSUM)) {
2157 ++ netdev_dbg(dev, "Dropping TLS RX HW offload feature since no RXCSUM feature.\n");
2158 ++ features &= ~NETIF_F_HW_TLS_RX;
2159 ++ }
2160 ++
2161 + return features;
2162 + }
2163 +
2164 +diff --git a/net/core/skbuff.c b/net/core/skbuff.c
2165 +index 961cb5a88c958..45117fa299837 100644
2166 +--- a/net/core/skbuff.c
2167 ++++ b/net/core/skbuff.c
2168 +@@ -431,7 +431,11 @@ struct sk_buff *__netdev_alloc_skb(struct net_device *dev, unsigned int len,
2169 +
2170 + len += NET_SKB_PAD;
2171 +
2172 +- if ((len > SKB_WITH_OVERHEAD(PAGE_SIZE)) ||
2173 ++ /* If requested length is either too small or too big,
2174 ++ * we use kmalloc() for skb->head allocation.
2175 ++ */
2176 ++ if (len <= SKB_WITH_OVERHEAD(1024) ||
2177 ++ len > SKB_WITH_OVERHEAD(PAGE_SIZE) ||
2178 + (gfp_mask & (__GFP_DIRECT_RECLAIM | GFP_DMA))) {
2179 + skb = __alloc_skb(len, gfp_mask, SKB_ALLOC_RX, NUMA_NO_NODE);
2180 + if (!skb)
2181 +diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
2182 +index 9745c52f49ca4..ac5c4f6cdefee 100644
2183 +--- a/net/ipv4/inet_connection_sock.c
2184 ++++ b/net/ipv4/inet_connection_sock.c
2185 +@@ -840,6 +840,7 @@ struct sock *inet_csk_clone_lock(const struct sock *sk,
2186 + newicsk->icsk_retransmits = 0;
2187 + newicsk->icsk_backoff = 0;
2188 + newicsk->icsk_probes_out = 0;
2189 ++ newicsk->icsk_probes_tstamp = 0;
2190 +
2191 + /* Deinitialize accept_queue to trap illegal accesses. */
2192 + memset(&newicsk->icsk_accept_queue, 0, sizeof(newicsk->icsk_accept_queue));
2193 +diff --git a/net/ipv4/netfilter/ipt_rpfilter.c b/net/ipv4/netfilter/ipt_rpfilter.c
2194 +index cc23f1ce239c2..8cd3224d913e0 100644
2195 +--- a/net/ipv4/netfilter/ipt_rpfilter.c
2196 ++++ b/net/ipv4/netfilter/ipt_rpfilter.c
2197 +@@ -76,7 +76,7 @@ static bool rpfilter_mt(const struct sk_buff *skb, struct xt_action_param *par)
2198 + flow.daddr = iph->saddr;
2199 + flow.saddr = rpfilter_get_saddr(iph->daddr);
2200 + flow.flowi4_mark = info->flags & XT_RPFILTER_VALID_MARK ? skb->mark : 0;
2201 +- flow.flowi4_tos = RT_TOS(iph->tos);
2202 ++ flow.flowi4_tos = iph->tos & IPTOS_RT_MASK;
2203 + flow.flowi4_scope = RT_SCOPE_UNIVERSE;
2204 + flow.flowi4_oif = l3mdev_master_ifindex_rcu(xt_in(par));
2205 +
2206 +diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
2207 +index d3ced6a39bcf1..6ddec8a23942b 100644
2208 +--- a/net/ipv4/tcp.c
2209 ++++ b/net/ipv4/tcp.c
2210 +@@ -2627,6 +2627,7 @@ int tcp_disconnect(struct sock *sk, int flags)
2211 + icsk->icsk_backoff = 0;
2212 + tp->snd_cwnd = 2;
2213 + icsk->icsk_probes_out = 0;
2214 ++ icsk->icsk_probes_tstamp = 0;
2215 + icsk->icsk_rto = TCP_TIMEOUT_INIT;
2216 + tp->snd_ssthresh = TCP_INFINITE_SSTHRESH;
2217 + tp->snd_cwnd = TCP_INIT_CWND;
2218 +diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
2219 +index adace90f49fac..7411a43134629 100644
2220 +--- a/net/ipv4/tcp_input.c
2221 ++++ b/net/ipv4/tcp_input.c
2222 +@@ -3286,6 +3286,7 @@ static void tcp_ack_probe(struct sock *sk)
2223 + return;
2224 + if (!after(TCP_SKB_CB(head)->end_seq, tcp_wnd_end(tp))) {
2225 + icsk->icsk_backoff = 0;
2226 ++ icsk->icsk_probes_tstamp = 0;
2227 + inet_csk_clear_xmit_timer(sk, ICSK_TIME_PROBE0);
2228 + /* Socket must be waked up by subsequent tcp_data_snd_check().
2229 + * This function is not for random using!
2230 +diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
2231 +index 87a5037a9cb3e..04acdca4bb0d5 100644
2232 +--- a/net/ipv4/tcp_ipv4.c
2233 ++++ b/net/ipv4/tcp_ipv4.c
2234 +@@ -1657,6 +1657,7 @@ int tcp_v4_early_demux(struct sk_buff *skb)
2235 + bool tcp_add_backlog(struct sock *sk, struct sk_buff *skb)
2236 + {
2237 + u32 limit = READ_ONCE(sk->sk_rcvbuf) + READ_ONCE(sk->sk_sndbuf);
2238 ++ u32 tail_gso_size, tail_gso_segs;
2239 + struct skb_shared_info *shinfo;
2240 + const struct tcphdr *th;
2241 + struct tcphdr *thtail;
2242 +@@ -1664,6 +1665,7 @@ bool tcp_add_backlog(struct sock *sk, struct sk_buff *skb)
2243 + unsigned int hdrlen;
2244 + bool fragstolen;
2245 + u32 gso_segs;
2246 ++ u32 gso_size;
2247 + int delta;
2248 +
2249 + /* In case all data was pulled from skb frags (in __pskb_pull_tail()),
2250 +@@ -1689,13 +1691,6 @@ bool tcp_add_backlog(struct sock *sk, struct sk_buff *skb)
2251 + */
2252 + th = (const struct tcphdr *)skb->data;
2253 + hdrlen = th->doff * 4;
2254 +- shinfo = skb_shinfo(skb);
2255 +-
2256 +- if (!shinfo->gso_size)
2257 +- shinfo->gso_size = skb->len - hdrlen;
2258 +-
2259 +- if (!shinfo->gso_segs)
2260 +- shinfo->gso_segs = 1;
2261 +
2262 + tail = sk->sk_backlog.tail;
2263 + if (!tail)
2264 +@@ -1718,6 +1713,15 @@ bool tcp_add_backlog(struct sock *sk, struct sk_buff *skb)
2265 + goto no_coalesce;
2266 +
2267 + __skb_pull(skb, hdrlen);
2268 ++
2269 ++ shinfo = skb_shinfo(skb);
2270 ++ gso_size = shinfo->gso_size ?: skb->len;
2271 ++ gso_segs = shinfo->gso_segs ?: 1;
2272 ++
2273 ++ shinfo = skb_shinfo(tail);
2274 ++ tail_gso_size = shinfo->gso_size ?: (tail->len - hdrlen);
2275 ++ tail_gso_segs = shinfo->gso_segs ?: 1;
2276 ++
2277 + if (skb_try_coalesce(tail, skb, &fragstolen, &delta)) {
2278 + TCP_SKB_CB(tail)->end_seq = TCP_SKB_CB(skb)->end_seq;
2279 +
2280 +@@ -1744,11 +1748,8 @@ bool tcp_add_backlog(struct sock *sk, struct sk_buff *skb)
2281 + }
2282 +
2283 + /* Not as strict as GRO. We only need to carry mss max value */
2284 +- skb_shinfo(tail)->gso_size = max(shinfo->gso_size,
2285 +- skb_shinfo(tail)->gso_size);
2286 +-
2287 +- gso_segs = skb_shinfo(tail)->gso_segs + shinfo->gso_segs;
2288 +- skb_shinfo(tail)->gso_segs = min_t(u32, gso_segs, 0xFFFF);
2289 ++ shinfo->gso_size = max(gso_size, tail_gso_size);
2290 ++ shinfo->gso_segs = min_t(u32, gso_segs + tail_gso_segs, 0xFFFF);
2291 +
2292 + sk->sk_backlog.len += delta;
2293 + __NET_INC_STATS(sock_net(sk),
2294 +diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
2295 +index 5e311e6a31d51..5da6ffce390c2 100644
2296 +--- a/net/ipv4/tcp_output.c
2297 ++++ b/net/ipv4/tcp_output.c
2298 +@@ -3835,6 +3835,7 @@ void tcp_send_probe0(struct sock *sk)
2299 + /* Cancel probe timer, if it is not required. */
2300 + icsk->icsk_probes_out = 0;
2301 + icsk->icsk_backoff = 0;
2302 ++ icsk->icsk_probes_tstamp = 0;
2303 + return;
2304 + }
2305 +
2306 +diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
2307 +index dd5a6317a8018..7fcd116fbd378 100644
2308 +--- a/net/ipv4/tcp_timer.c
2309 ++++ b/net/ipv4/tcp_timer.c
2310 +@@ -344,6 +344,7 @@ static void tcp_probe_timer(struct sock *sk)
2311 +
2312 + if (tp->packets_out || !skb) {
2313 + icsk->icsk_probes_out = 0;
2314 ++ icsk->icsk_probes_tstamp = 0;
2315 + return;
2316 + }
2317 +
2318 +@@ -355,13 +356,12 @@ static void tcp_probe_timer(struct sock *sk)
2319 + * corresponding system limit. We also implement similar policy when
2320 + * we use RTO to probe window in tcp_retransmit_timer().
2321 + */
2322 +- if (icsk->icsk_user_timeout) {
2323 +- u32 elapsed = tcp_model_timeout(sk, icsk->icsk_probes_out,
2324 +- tcp_probe0_base(sk));
2325 +-
2326 +- if (elapsed >= icsk->icsk_user_timeout)
2327 +- goto abort;
2328 +- }
2329 ++ if (!icsk->icsk_probes_tstamp)
2330 ++ icsk->icsk_probes_tstamp = tcp_jiffies32;
2331 ++ else if (icsk->icsk_user_timeout &&
2332 ++ (s32)(tcp_jiffies32 - icsk->icsk_probes_tstamp) >=
2333 ++ msecs_to_jiffies(icsk->icsk_user_timeout))
2334 ++ goto abort;
2335 +
2336 + max_probes = sock_net(sk)->ipv4.sysctl_tcp_retries2;
2337 + if (sock_flag(sk, SOCK_DEAD)) {
2338 +diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
2339 +index c7ff200d0bd41..994a150ae3e90 100644
2340 +--- a/net/ipv4/udp.c
2341 ++++ b/net/ipv4/udp.c
2342 +@@ -2495,7 +2495,8 @@ int udp_v4_early_demux(struct sk_buff *skb)
2343 + */
2344 + if (!inet_sk(sk)->inet_daddr && in_dev)
2345 + return ip_mc_validate_source(skb, iph->daddr,
2346 +- iph->saddr, iph->tos,
2347 ++ iph->saddr,
2348 ++ iph->tos & IPTOS_RT_MASK,
2349 + skb->dev, in_dev, &itag);
2350 + }
2351 + return 0;
2352 +diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
2353 +index 635b2482fa204..52feab2baeee5 100644
2354 +--- a/net/ipv6/addrconf.c
2355 ++++ b/net/ipv6/addrconf.c
2356 +@@ -2452,8 +2452,9 @@ static void addrconf_add_mroute(struct net_device *dev)
2357 + .fc_ifindex = dev->ifindex,
2358 + .fc_dst_len = 8,
2359 + .fc_flags = RTF_UP,
2360 +- .fc_type = RTN_UNICAST,
2361 ++ .fc_type = RTN_MULTICAST,
2362 + .fc_nlinfo.nl_net = dev_net(dev),
2363 ++ .fc_protocol = RTPROT_KERNEL,
2364 + };
2365 +
2366 + ipv6_addr_set(&cfg.fc_dst, htonl(0xFF000000), 0, 0, 0);
2367 +diff --git a/net/sched/cls_tcindex.c b/net/sched/cls_tcindex.c
2368 +index 61e95029c18f5..c9399e81c5059 100644
2369 +--- a/net/sched/cls_tcindex.c
2370 ++++ b/net/sched/cls_tcindex.c
2371 +@@ -366,9 +366,13 @@ tcindex_set_parms(struct net *net, struct tcf_proto *tp, unsigned long base,
2372 + if (tb[TCA_TCINDEX_MASK])
2373 + cp->mask = nla_get_u16(tb[TCA_TCINDEX_MASK]);
2374 +
2375 +- if (tb[TCA_TCINDEX_SHIFT])
2376 ++ if (tb[TCA_TCINDEX_SHIFT]) {
2377 + cp->shift = nla_get_u32(tb[TCA_TCINDEX_SHIFT]);
2378 +-
2379 ++ if (cp->shift > 16) {
2380 ++ err = -EINVAL;
2381 ++ goto errout;
2382 ++ }
2383 ++ }
2384 + if (!cp->hash) {
2385 + /* Hash not specified, use perfect hash if the upper limit
2386 + * of the hashing index is below the threshold.
2387 +diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
2388 +index 50794125bf024..b65a405f607b2 100644
2389 +--- a/net/sched/sch_api.c
2390 ++++ b/net/sched/sch_api.c
2391 +@@ -409,7 +409,8 @@ struct qdisc_rate_table *qdisc_get_rtab(struct tc_ratespec *r,
2392 + {
2393 + struct qdisc_rate_table *rtab;
2394 +
2395 +- if (tab == NULL || r->rate == 0 || r->cell_log == 0 ||
2396 ++ if (tab == NULL || r->rate == 0 ||
2397 ++ r->cell_log == 0 || r->cell_log >= 32 ||
2398 + nla_len(tab) != TC_RTAB_SIZE) {
2399 + NL_SET_ERR_MSG(extack, "Invalid rate table parameters for searching");
2400 + return NULL;
2401 +diff --git a/sound/core/seq/oss/seq_oss_synth.c b/sound/core/seq/oss/seq_oss_synth.c
2402 +index 11554d0412f06..1b8409ec2c97f 100644
2403 +--- a/sound/core/seq/oss/seq_oss_synth.c
2404 ++++ b/sound/core/seq/oss/seq_oss_synth.c
2405 +@@ -611,7 +611,8 @@ snd_seq_oss_synth_make_info(struct seq_oss_devinfo *dp, int dev, struct synth_in
2406 +
2407 + if (info->is_midi) {
2408 + struct midi_info minf;
2409 +- snd_seq_oss_midi_make_info(dp, info->midi_mapped, &minf);
2410 ++ if (snd_seq_oss_midi_make_info(dp, info->midi_mapped, &minf))
2411 ++ return -ENXIO;
2412 + inf->synth_type = SYNTH_TYPE_MIDI;
2413 + inf->synth_subtype = 0;
2414 + inf->nr_voices = 16;
2415 +diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
2416 +index 0ab40a8a68fb5..834367dd54e1b 100644
2417 +--- a/sound/pci/hda/patch_via.c
2418 ++++ b/sound/pci/hda/patch_via.c
2419 +@@ -113,6 +113,7 @@ static struct via_spec *via_new_spec(struct hda_codec *codec)
2420 + spec->codec_type = VT1708S;
2421 + spec->gen.indep_hp = 1;
2422 + spec->gen.keep_eapd_on = 1;
2423 ++ spec->gen.dac_min_mute = 1;
2424 + spec->gen.pcm_playback_hook = via_playback_pcm_hook;
2425 + spec->gen.add_stereo_mix_input = HDA_HINT_STEREO_MIX_AUTO;
2426 + codec->power_save_node = 1;
2427 +diff --git a/sound/soc/intel/boards/haswell.c b/sound/soc/intel/boards/haswell.c
2428 +index 3dadf9bff796a..cf47fd9cd506b 100644
2429 +--- a/sound/soc/intel/boards/haswell.c
2430 ++++ b/sound/soc/intel/boards/haswell.c
2431 +@@ -206,6 +206,7 @@ static struct platform_driver haswell_audio = {
2432 + .probe = haswell_audio_probe,
2433 + .driver = {
2434 + .name = "haswell-audio",
2435 ++ .pm = &snd_soc_pm_ops,
2436 + },
2437 + };
2438 +
2439 +diff --git a/tools/testing/selftests/net/fib_tests.sh b/tools/testing/selftests/net/fib_tests.sh
2440 +index 4811067d9b053..4e19a1c00ddd8 100755
2441 +--- a/tools/testing/selftests/net/fib_tests.sh
2442 ++++ b/tools/testing/selftests/net/fib_tests.sh
2443 +@@ -1055,7 +1055,6 @@ ipv6_addr_metric_test()
2444 +
2445 + check_route6 "2001:db8:104::1 dev dummy2 proto kernel metric 260"
2446 + log_test $? 0 "Set metric with peer route on local side"
2447 +- log_test $? 0 "User specified metric on local address"
2448 + check_route6 "2001:db8:104::2 dev dummy2 proto kernel metric 260"
2449 + log_test $? 0 "Set metric with peer route on peer side"
2450 +