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, 29 Jun 2022 11:09:36
Message-Id: 1656500958.c8258137b5caa0382575d3826dc2d09bef79c928.mpagano@gentoo
1 commit: c8258137b5caa0382575d3826dc2d09bef79c928
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jun 29 11:09:18 2022 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Wed Jun 29 11:09:18 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=c8258137
7
8 Linux patch 5.4.202
9
10 Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>
11
12 0000_README | 4 +
13 1201_linux-5.4.202.patch | 1638 ++++++++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 1642 insertions(+)
15
16 diff --git a/0000_README b/0000_README
17 index 7d5a5301..17c1b728 100644
18 --- a/0000_README
19 +++ b/0000_README
20 @@ -847,6 +847,10 @@ Patch: 1200_linux-5.4.201.patch
21 From: http://www.kernel.org
22 Desc: Linux 5.4.201
23
24 +Patch: 1201_linux-5.4.202.patch
25 +From: http://www.kernel.org
26 +Desc: Linux 5.4.202
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/1201_linux-5.4.202.patch b/1201_linux-5.4.202.patch
33 new file mode 100644
34 index 00000000..9814f67a
35 --- /dev/null
36 +++ b/1201_linux-5.4.202.patch
37 @@ -0,0 +1,1638 @@
38 +diff --git a/Documentation/ABI/testing/sysfs-bus-iio-vf610 b/Documentation/ABI/testing/sysfs-bus-iio-vf610
39 +index 308a6756d3bf3..491ead8044888 100644
40 +--- a/Documentation/ABI/testing/sysfs-bus-iio-vf610
41 ++++ b/Documentation/ABI/testing/sysfs-bus-iio-vf610
42 +@@ -1,4 +1,4 @@
43 +-What: /sys/bus/iio/devices/iio:deviceX/conversion_mode
44 ++What: /sys/bus/iio/devices/iio:deviceX/in_conversion_mode
45 + KernelVersion: 4.2
46 + Contact: linux-iio@×××××××××××.org
47 + Description:
48 +diff --git a/Makefile b/Makefile
49 +index 75be5870cc55f..021878dc23f9b 100644
50 +--- a/Makefile
51 ++++ b/Makefile
52 +@@ -1,7 +1,7 @@
53 + # SPDX-License-Identifier: GPL-2.0
54 + VERSION = 5
55 + PATCHLEVEL = 4
56 +-SUBLEVEL = 201
57 ++SUBLEVEL = 202
58 + EXTRAVERSION =
59 + NAME = Kleptomaniac Octopus
60 +
61 +@@ -1073,7 +1073,7 @@ PHONY += autoksyms_recursive
62 + ifdef CONFIG_TRIM_UNUSED_KSYMS
63 + autoksyms_recursive: descend modules.order
64 + $(Q)$(CONFIG_SHELL) $(srctree)/scripts/adjust_autoksyms.sh \
65 +- "$(MAKE) -f $(srctree)/Makefile vmlinux"
66 ++ "$(MAKE) -f $(srctree)/Makefile autoksyms_recursive"
67 + endif
68 +
69 + # For the kernel to actually contain only the needed exported symbols,
70 +diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi
71 +index bc488df315117..e9955ef12e02d 100644
72 +--- a/arch/arm/boot/dts/imx6qdl.dtsi
73 ++++ b/arch/arm/boot/dts/imx6qdl.dtsi
74 +@@ -766,7 +766,7 @@
75 + regulator-name = "vddpu";
76 + regulator-min-microvolt = <725000>;
77 + regulator-max-microvolt = <1450000>;
78 +- regulator-enable-ramp-delay = <150>;
79 ++ regulator-enable-ramp-delay = <380>;
80 + anatop-reg-offset = <0x140>;
81 + anatop-vol-bit-shift = <9>;
82 + anatop-vol-bit-width = <5>;
83 +diff --git a/arch/arm/mach-axxia/platsmp.c b/arch/arm/mach-axxia/platsmp.c
84 +index 512943eae30a5..2e203626eda52 100644
85 +--- a/arch/arm/mach-axxia/platsmp.c
86 ++++ b/arch/arm/mach-axxia/platsmp.c
87 +@@ -39,6 +39,7 @@ static int axxia_boot_secondary(unsigned int cpu, struct task_struct *idle)
88 + return -ENOENT;
89 +
90 + syscon = of_iomap(syscon_np, 0);
91 ++ of_node_put(syscon_np);
92 + if (!syscon)
93 + return -ENOMEM;
94 +
95 +diff --git a/arch/arm/mach-cns3xxx/core.c b/arch/arm/mach-cns3xxx/core.c
96 +index 1d61a7701c11f..d7e63f57b426a 100644
97 +--- a/arch/arm/mach-cns3xxx/core.c
98 ++++ b/arch/arm/mach-cns3xxx/core.c
99 +@@ -376,6 +376,7 @@ static void __init cns3xxx_init(void)
100 + /* De-Asscer SATA Reset */
101 + cns3xxx_pwr_soft_rst(CNS3XXX_PWR_SOFTWARE_RST(SATA));
102 + }
103 ++ of_node_put(dn);
104 +
105 + dn = of_find_compatible_node(NULL, NULL, "cavium,cns3420-sdhci");
106 + if (of_device_is_available(dn)) {
107 +@@ -389,6 +390,7 @@ static void __init cns3xxx_init(void)
108 + cns3xxx_pwr_clk_en(CNS3XXX_PWR_CLK_EN(SDIO));
109 + cns3xxx_pwr_soft_rst(CNS3XXX_PWR_SOFTWARE_RST(SDIO));
110 + }
111 ++ of_node_put(dn);
112 +
113 + pm_power_off = cns3xxx_power_off;
114 +
115 +diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
116 +index f226d4f57bf41..9025067ef6f57 100644
117 +--- a/arch/arm/mach-exynos/exynos.c
118 ++++ b/arch/arm/mach-exynos/exynos.c
119 +@@ -136,6 +136,7 @@ static void exynos_map_pmu(void)
120 + np = of_find_matching_node(NULL, exynos_dt_pmu_match);
121 + if (np)
122 + pmu_base_addr = of_iomap(np, 0);
123 ++ of_node_put(np);
124 + }
125 +
126 + static void __init exynos_init_irq(void)
127 +diff --git a/arch/mips/vr41xx/common/icu.c b/arch/mips/vr41xx/common/icu.c
128 +index 7b7f25b4b057e..9240bcdbe74e4 100644
129 +--- a/arch/mips/vr41xx/common/icu.c
130 ++++ b/arch/mips/vr41xx/common/icu.c
131 +@@ -640,8 +640,6 @@ static int icu_get_irq(unsigned int irq)
132 +
133 + printk(KERN_ERR "spurious ICU interrupt: %04x,%04x\n", pend1, pend2);
134 +
135 +- atomic_inc(&irq_err_count);
136 +-
137 + return -1;
138 + }
139 +
140 +diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
141 +index 0c29d6cb2c8df..c97c01c755665 100644
142 +--- a/arch/parisc/Kconfig
143 ++++ b/arch/parisc/Kconfig
144 +@@ -11,6 +11,7 @@ config PARISC
145 + select ARCH_WANT_FRAME_POINTERS
146 + select ARCH_HAS_ELF_RANDOMIZE
147 + select ARCH_HAS_STRICT_KERNEL_RWX
148 ++ select ARCH_HAS_STRICT_MODULE_RWX
149 + select ARCH_HAS_UBSAN_SANITIZE_ALL
150 + select ARCH_NO_SG_CHAIN
151 + select ARCH_SUPPORTS_MEMORY_FAILURE
152 +diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
153 +index 832663f214226..cf87573e6e785 100644
154 +--- a/arch/powerpc/kernel/process.c
155 ++++ b/arch/powerpc/kernel/process.c
156 +@@ -1719,7 +1719,7 @@ void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp)
157 + tm_reclaim_current(0);
158 + #endif
159 +
160 +- memset(regs->gpr, 0, sizeof(regs->gpr));
161 ++ memset(&regs->gpr[1], 0, sizeof(regs->gpr) - sizeof(regs->gpr[0]));
162 + regs->ctr = 0;
163 + regs->link = 0;
164 + regs->xer = 0;
165 +diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c
166 +index 9392661ac8a87..35e246e39705b 100644
167 +--- a/arch/powerpc/kernel/rtas.c
168 ++++ b/arch/powerpc/kernel/rtas.c
169 +@@ -988,7 +988,7 @@ static struct rtas_filter rtas_filters[] __ro_after_init = {
170 + { "get-time-of-day", -1, -1, -1, -1, -1 },
171 + { "ibm,get-vpd", -1, 0, -1, 1, 2 },
172 + { "ibm,lpar-perftools", -1, 2, 3, -1, -1 },
173 +- { "ibm,platform-dump", -1, 4, 5, -1, -1 },
174 ++ { "ibm,platform-dump", -1, 4, 5, -1, -1 }, /* Special cased */
175 + { "ibm,read-slot-reset-state", -1, -1, -1, -1, -1 },
176 + { "ibm,scan-log-dump", -1, 0, 1, -1, -1 },
177 + { "ibm,set-dynamic-indicator", -1, 2, -1, -1, -1 },
178 +@@ -1035,6 +1035,15 @@ static bool block_rtas_call(int token, int nargs,
179 + size = 1;
180 +
181 + end = base + size - 1;
182 ++
183 ++ /*
184 ++ * Special case for ibm,platform-dump - NULL buffer
185 ++ * address is used to indicate end of dump processing
186 ++ */
187 ++ if (!strcmp(f->name, "ibm,platform-dump") &&
188 ++ base == 0)
189 ++ return false;
190 ++
191 + if (!in_rmo_buf(base, end))
192 + goto err;
193 + }
194 +diff --git a/arch/powerpc/platforms/powernv/powernv.h b/arch/powerpc/platforms/powernv/powernv.h
195 +index 1aa51c4fa9045..4825e4cf4410d 100644
196 +--- a/arch/powerpc/platforms/powernv/powernv.h
197 ++++ b/arch/powerpc/platforms/powernv/powernv.h
198 +@@ -35,4 +35,6 @@ ssize_t memcons_copy(struct memcons *mc, char *to, loff_t pos, size_t count);
199 + u32 memcons_get_size(struct memcons *mc);
200 + struct memcons *memcons_init(struct device_node *node, const char *mc_prop_name);
201 +
202 ++void pnv_rng_init(void);
203 ++
204 + #endif /* _POWERNV_H */
205 +diff --git a/arch/powerpc/platforms/powernv/rng.c b/arch/powerpc/platforms/powernv/rng.c
206 +index 1c31863a9be6c..eba4142998b03 100644
207 +--- a/arch/powerpc/platforms/powernv/rng.c
208 ++++ b/arch/powerpc/platforms/powernv/rng.c
209 +@@ -17,6 +17,7 @@
210 + #include <asm/prom.h>
211 + #include <asm/machdep.h>
212 + #include <asm/smp.h>
213 ++#include "powernv.h"
214 +
215 + #define DARN_ERR 0xFFFFFFFFFFFFFFFFul
216 +
217 +@@ -28,7 +29,6 @@ struct powernv_rng {
218 +
219 + static DEFINE_PER_CPU(struct powernv_rng *, powernv_rng);
220 +
221 +-
222 + int powernv_hwrng_present(void)
223 + {
224 + struct powernv_rng *rng;
225 +@@ -98,9 +98,6 @@ static int initialise_darn(void)
226 + return 0;
227 + }
228 + }
229 +-
230 +- pr_warn("Unable to use DARN for get_random_seed()\n");
231 +-
232 + return -EIO;
233 + }
234 +
235 +@@ -163,32 +160,55 @@ static __init int rng_create(struct device_node *dn)
236 +
237 + rng_init_per_cpu(rng, dn);
238 +
239 +- pr_info_once("Registering arch random hook.\n");
240 +-
241 + ppc_md.get_random_seed = powernv_get_random_long;
242 +
243 + return 0;
244 + }
245 +
246 +-static __init int rng_init(void)
247 ++static int __init pnv_get_random_long_early(unsigned long *v)
248 + {
249 + struct device_node *dn;
250 +- int rc;
251 ++
252 ++ if (!slab_is_available())
253 ++ return 0;
254 ++
255 ++ if (cmpxchg(&ppc_md.get_random_seed, pnv_get_random_long_early,
256 ++ NULL) != pnv_get_random_long_early)
257 ++ return 0;
258 +
259 + for_each_compatible_node(dn, NULL, "ibm,power-rng") {
260 +- rc = rng_create(dn);
261 +- if (rc) {
262 +- pr_err("Failed creating rng for %pOF (%d).\n",
263 +- dn, rc);
264 ++ if (rng_create(dn))
265 + continue;
266 +- }
267 +-
268 + /* Create devices for hwrng driver */
269 + of_platform_device_create(dn, NULL, NULL);
270 + }
271 +
272 +- initialise_darn();
273 ++ if (!ppc_md.get_random_seed)
274 ++ return 0;
275 ++ return ppc_md.get_random_seed(v);
276 ++}
277 ++
278 ++void __init pnv_rng_init(void)
279 ++{
280 ++ struct device_node *dn;
281 +
282 ++ /* Prefer darn over the rest. */
283 ++ if (!initialise_darn())
284 ++ return;
285 ++
286 ++ dn = of_find_compatible_node(NULL, NULL, "ibm,power-rng");
287 ++ if (dn)
288 ++ ppc_md.get_random_seed = pnv_get_random_long_early;
289 ++
290 ++ of_node_put(dn);
291 ++}
292 ++
293 ++static int __init pnv_rng_late_init(void)
294 ++{
295 ++ unsigned long v;
296 ++ /* In case it wasn't called during init for some other reason. */
297 ++ if (ppc_md.get_random_seed == pnv_get_random_long_early)
298 ++ pnv_get_random_long_early(&v);
299 + return 0;
300 + }
301 +-machine_subsys_initcall(powernv, rng_init);
302 ++machine_subsys_initcall(powernv, pnv_rng_late_init);
303 +diff --git a/arch/powerpc/platforms/powernv/setup.c b/arch/powerpc/platforms/powernv/setup.c
304 +index 1b7b0d0c3ebdd..d9e26614d7ed8 100644
305 +--- a/arch/powerpc/platforms/powernv/setup.c
306 ++++ b/arch/powerpc/platforms/powernv/setup.c
307 +@@ -168,6 +168,8 @@ static void __init pnv_setup_arch(void)
308 + powersave_nap = 1;
309 +
310 + /* XXX PMCS */
311 ++
312 ++ pnv_rng_init();
313 + }
314 +
315 + static void __init pnv_init(void)
316 +diff --git a/arch/powerpc/platforms/pseries/pseries.h b/arch/powerpc/platforms/pseries/pseries.h
317 +index 13fa370a87e4e..5fd56230b01c5 100644
318 +--- a/arch/powerpc/platforms/pseries/pseries.h
319 ++++ b/arch/powerpc/platforms/pseries/pseries.h
320 +@@ -114,4 +114,6 @@ int dlpar_workqueue_init(void);
321 + void pseries_setup_rfi_flush(void);
322 + void pseries_lpar_read_hblkrm_characteristics(void);
323 +
324 ++void pseries_rng_init(void);
325 ++
326 + #endif /* _PSERIES_PSERIES_H */
327 +diff --git a/arch/powerpc/platforms/pseries/rng.c b/arch/powerpc/platforms/pseries/rng.c
328 +index 6268545947b83..6ddfdeaace9ef 100644
329 +--- a/arch/powerpc/platforms/pseries/rng.c
330 ++++ b/arch/powerpc/platforms/pseries/rng.c
331 +@@ -10,6 +10,7 @@
332 + #include <asm/archrandom.h>
333 + #include <asm/machdep.h>
334 + #include <asm/plpar_wrappers.h>
335 ++#include "pseries.h"
336 +
337 +
338 + static int pseries_get_random_long(unsigned long *v)
339 +@@ -24,19 +25,13 @@ static int pseries_get_random_long(unsigned long *v)
340 + return 0;
341 + }
342 +
343 +-static __init int rng_init(void)
344 ++void __init pseries_rng_init(void)
345 + {
346 + struct device_node *dn;
347 +
348 + dn = of_find_compatible_node(NULL, NULL, "ibm,random");
349 + if (!dn)
350 +- return -ENODEV;
351 +-
352 +- pr_info("Registering arch random hook.\n");
353 +-
354 ++ return;
355 + ppc_md.get_random_seed = pseries_get_random_long;
356 +-
357 + of_node_put(dn);
358 +- return 0;
359 + }
360 +-machine_subsys_initcall(pseries, rng_init);
361 +diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
362 +index 16b744646ea94..d5abb25865e36 100644
363 +--- a/arch/powerpc/platforms/pseries/setup.c
364 ++++ b/arch/powerpc/platforms/pseries/setup.c
365 +@@ -792,6 +792,8 @@ static void __init pSeries_setup_arch(void)
366 +
367 + if (swiotlb_force == SWIOTLB_FORCE)
368 + ppc_swiotlb_enable = 1;
369 ++
370 ++ pseries_rng_init();
371 + }
372 +
373 + static void pseries_panic(char *str)
374 +diff --git a/arch/s390/kernel/perf_cpum_cf.c b/arch/s390/kernel/perf_cpum_cf.c
375 +index 0eb1d1cc53a88..dddb32e53db8b 100644
376 +--- a/arch/s390/kernel/perf_cpum_cf.c
377 ++++ b/arch/s390/kernel/perf_cpum_cf.c
378 +@@ -292,6 +292,26 @@ static int __hw_perf_event_init(struct perf_event *event, unsigned int type)
379 + return err;
380 + }
381 +
382 ++/* Events CPU_CYLCES and INSTRUCTIONS can be submitted with two different
383 ++ * attribute::type values:
384 ++ * - PERF_TYPE_HARDWARE:
385 ++ * - pmu->type:
386 ++ * Handle both type of invocations identical. They address the same hardware.
387 ++ * The result is different when event modifiers exclude_kernel and/or
388 ++ * exclude_user are also set.
389 ++ */
390 ++static int cpumf_pmu_event_type(struct perf_event *event)
391 ++{
392 ++ u64 ev = event->attr.config;
393 ++
394 ++ if (cpumf_generic_events_basic[PERF_COUNT_HW_CPU_CYCLES] == ev ||
395 ++ cpumf_generic_events_basic[PERF_COUNT_HW_INSTRUCTIONS] == ev ||
396 ++ cpumf_generic_events_user[PERF_COUNT_HW_CPU_CYCLES] == ev ||
397 ++ cpumf_generic_events_user[PERF_COUNT_HW_INSTRUCTIONS] == ev)
398 ++ return PERF_TYPE_HARDWARE;
399 ++ return PERF_TYPE_RAW;
400 ++}
401 ++
402 + static int cpumf_pmu_event_init(struct perf_event *event)
403 + {
404 + unsigned int type = event->attr.type;
405 +@@ -301,7 +321,7 @@ static int cpumf_pmu_event_init(struct perf_event *event)
406 + err = __hw_perf_event_init(event, type);
407 + else if (event->pmu->type == type)
408 + /* Registered as unknown PMU */
409 +- err = __hw_perf_event_init(event, PERF_TYPE_RAW);
410 ++ err = __hw_perf_event_init(event, cpumf_pmu_event_type(event));
411 + else
412 + return -ENOENT;
413 +
414 +diff --git a/arch/xtensa/kernel/time.c b/arch/xtensa/kernel/time.c
415 +index 69db8c93c1f99..9b87a9b98727b 100644
416 +--- a/arch/xtensa/kernel/time.c
417 ++++ b/arch/xtensa/kernel/time.c
418 +@@ -160,6 +160,7 @@ static void __init calibrate_ccount(void)
419 + cpu = of_find_compatible_node(NULL, NULL, "cdns,xtensa-cpu");
420 + if (cpu) {
421 + clk = of_clk_get(cpu, 0);
422 ++ of_node_put(cpu);
423 + if (!IS_ERR(clk)) {
424 + ccount_freq = clk_get_rate(clk);
425 + return;
426 +diff --git a/arch/xtensa/platforms/xtfpga/setup.c b/arch/xtensa/platforms/xtfpga/setup.c
427 +index 4edccb4d4a5ff..340479a328dc3 100644
428 +--- a/arch/xtensa/platforms/xtfpga/setup.c
429 ++++ b/arch/xtensa/platforms/xtfpga/setup.c
430 +@@ -148,6 +148,7 @@ static int __init machine_setup(void)
431 +
432 + if ((eth = of_find_compatible_node(eth, NULL, "opencores,ethoc")))
433 + update_local_mac(eth);
434 ++ of_node_put(eth);
435 + return 0;
436 + }
437 + arch_initcall(machine_setup);
438 +diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c
439 +index 3d64c9331a82a..3c1e554df4eb2 100644
440 +--- a/drivers/base/regmap/regmap-irq.c
441 ++++ b/drivers/base/regmap/regmap-irq.c
442 +@@ -214,6 +214,7 @@ static void regmap_irq_enable(struct irq_data *data)
443 + struct regmap_irq_chip_data *d = irq_data_get_irq_chip_data(data);
444 + struct regmap *map = d->map;
445 + const struct regmap_irq *irq_data = irq_to_regmap_irq(d, data->hwirq);
446 ++ unsigned int reg = irq_data->reg_offset / map->reg_stride;
447 + unsigned int mask, type;
448 +
449 + type = irq_data->type.type_falling_val | irq_data->type.type_rising_val;
450 +@@ -230,14 +231,14 @@ static void regmap_irq_enable(struct irq_data *data)
451 + * at the corresponding offset in regmap_irq_set_type().
452 + */
453 + if (d->chip->type_in_mask && type)
454 +- mask = d->type_buf[irq_data->reg_offset / map->reg_stride];
455 ++ mask = d->type_buf[reg] & irq_data->mask;
456 + else
457 + mask = irq_data->mask;
458 +
459 + if (d->chip->clear_on_unmask)
460 + d->clear_status = true;
461 +
462 +- d->mask_buf[irq_data->reg_offset / map->reg_stride] &= ~mask;
463 ++ d->mask_buf[reg] &= ~mask;
464 + }
465 +
466 + static void regmap_irq_disable(struct irq_data *data)
467 +diff --git a/drivers/char/random.c b/drivers/char/random.c
468 +index 82f9ee4404069..1ef94d1125210 100644
469 +--- a/drivers/char/random.c
470 ++++ b/drivers/char/random.c
471 +@@ -88,7 +88,7 @@ static RAW_NOTIFIER_HEAD(random_ready_chain);
472 +
473 + /* Control how we warn userspace. */
474 + static struct ratelimit_state urandom_warning =
475 +- RATELIMIT_STATE_INIT("warn_urandom_randomness", HZ, 3);
476 ++ RATELIMIT_STATE_INIT_FLAGS("urandom_warning", HZ, 3, RATELIMIT_MSG_ON_RELEASE);
477 + static int ratelimit_disable __read_mostly =
478 + IS_ENABLED(CONFIG_WARN_ALL_UNSEEDED_RANDOM);
479 + module_param_named(ratelimit_disable, ratelimit_disable, int, 0644);
480 +@@ -450,7 +450,7 @@ static ssize_t get_random_bytes_user(struct iov_iter *iter)
481 +
482 + /*
483 + * Immediately overwrite the ChaCha key at index 4 with random
484 +- * bytes, in case userspace causes copy_to_user() below to sleep
485 ++ * bytes, in case userspace causes copy_to_iter() below to sleep
486 + * forever, so that we still retain forward secrecy in that case.
487 + */
488 + crng_make_state(chacha_state, (u8 *)&chacha_state[4], CHACHA_KEY_SIZE);
489 +@@ -996,7 +996,7 @@ void add_interrupt_randomness(int irq)
490 + if (new_count & MIX_INFLIGHT)
491 + return;
492 +
493 +- if (new_count < 64 && !time_is_before_jiffies(fast_pool->last + HZ))
494 ++ if (new_count < 1024 && !time_is_before_jiffies(fast_pool->last + HZ))
495 + return;
496 +
497 + if (unlikely(!fast_pool->mix.func))
498 +diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c
499 +index e553c6a937f69..c6e9b7bd7618c 100644
500 +--- a/drivers/dma-buf/udmabuf.c
501 ++++ b/drivers/dma-buf/udmabuf.c
502 +@@ -24,8 +24,11 @@ static vm_fault_t udmabuf_vm_fault(struct vm_fault *vmf)
503 + {
504 + struct vm_area_struct *vma = vmf->vma;
505 + struct udmabuf *ubuf = vma->vm_private_data;
506 ++ pgoff_t pgoff = vmf->pgoff;
507 +
508 +- vmf->page = ubuf->pages[vmf->pgoff];
509 ++ if (pgoff >= ubuf->pagecount)
510 ++ return VM_FAULT_SIGBUS;
511 ++ vmf->page = ubuf->pages[pgoff];
512 + get_page(vmf->page);
513 + return 0;
514 + }
515 +diff --git a/drivers/gpio/gpio-vr41xx.c b/drivers/gpio/gpio-vr41xx.c
516 +index 98cd715ccc33c..8d09b619c1669 100644
517 +--- a/drivers/gpio/gpio-vr41xx.c
518 ++++ b/drivers/gpio/gpio-vr41xx.c
519 +@@ -217,8 +217,6 @@ static int giu_get_irq(unsigned int irq)
520 + printk(KERN_ERR "spurious GIU interrupt: %04x(%04x),%04x(%04x)\n",
521 + maskl, pendl, maskh, pendh);
522 +
523 +- atomic_inc(&irq_err_count);
524 +-
525 + return -EINVAL;
526 + }
527 +
528 +diff --git a/drivers/gpio/gpio-winbond.c b/drivers/gpio/gpio-winbond.c
529 +index 7f8f5b02e31d5..4b61d975cc0ec 100644
530 +--- a/drivers/gpio/gpio-winbond.c
531 ++++ b/drivers/gpio/gpio-winbond.c
532 +@@ -385,12 +385,13 @@ static int winbond_gpio_get(struct gpio_chip *gc, unsigned int offset)
533 + unsigned long *base = gpiochip_get_data(gc);
534 + const struct winbond_gpio_info *info;
535 + bool val;
536 ++ int ret;
537 +
538 + winbond_gpio_get_info(&offset, &info);
539 +
540 +- val = winbond_sio_enter(*base);
541 +- if (val)
542 +- return val;
543 ++ ret = winbond_sio_enter(*base);
544 ++ if (ret)
545 ++ return ret;
546 +
547 + winbond_sio_select_logical(*base, info->dev);
548 +
549 +diff --git a/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c b/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c
550 +index 4f0c6d58e06fa..f0a5767b69f50 100644
551 +--- a/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c
552 ++++ b/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c
553 +@@ -245,6 +245,7 @@ static int mdp4_modeset_init_intf(struct mdp4_kms *mdp4_kms,
554 + encoder = mdp4_lcdc_encoder_init(dev, panel_node);
555 + if (IS_ERR(encoder)) {
556 + DRM_DEV_ERROR(dev->dev, "failed to construct LCDC encoder\n");
557 ++ of_node_put(panel_node);
558 + return PTR_ERR(encoder);
559 + }
560 +
561 +@@ -254,6 +255,7 @@ static int mdp4_modeset_init_intf(struct mdp4_kms *mdp4_kms,
562 + connector = mdp4_lvds_connector_init(dev, panel_node, encoder);
563 + if (IS_ERR(connector)) {
564 + DRM_DEV_ERROR(dev->dev, "failed to initialize LVDS connector\n");
565 ++ of_node_put(panel_node);
566 + return PTR_ERR(connector);
567 + }
568 +
569 +diff --git a/drivers/iio/accel/bma180.c b/drivers/iio/accel/bma180.c
570 +index acf1cc2bee07b..014788ea493ac 100644
571 +--- a/drivers/iio/accel/bma180.c
572 ++++ b/drivers/iio/accel/bma180.c
573 +@@ -793,11 +793,12 @@ static int bma180_probe(struct i2c_client *client,
574 + data->trig->dev.parent = &client->dev;
575 + data->trig->ops = &bma180_trigger_ops;
576 + iio_trigger_set_drvdata(data->trig, indio_dev);
577 +- indio_dev->trig = iio_trigger_get(data->trig);
578 +
579 + ret = iio_trigger_register(data->trig);
580 + if (ret)
581 + goto err_trigger_free;
582 ++
583 ++ indio_dev->trig = iio_trigger_get(data->trig);
584 + }
585 +
586 + ret = iio_triggered_buffer_setup(indio_dev, NULL,
587 +diff --git a/drivers/iio/accel/mma8452.c b/drivers/iio/accel/mma8452.c
588 +index eaaee6f2a978b..74942bfc676a1 100644
589 +--- a/drivers/iio/accel/mma8452.c
590 ++++ b/drivers/iio/accel/mma8452.c
591 +@@ -1489,10 +1489,14 @@ static int mma8452_reset(struct i2c_client *client)
592 + int i;
593 + int ret;
594 +
595 +- ret = i2c_smbus_write_byte_data(client, MMA8452_CTRL_REG2,
596 ++ /*
597 ++ * Find on fxls8471, after config reset bit, it reset immediately,
598 ++ * and will not give ACK, so here do not check the return value.
599 ++ * The following code will read the reset register, and check whether
600 ++ * this reset works.
601 ++ */
602 ++ i2c_smbus_write_byte_data(client, MMA8452_CTRL_REG2,
603 + MMA8452_CTRL_REG2_RST);
604 +- if (ret < 0)
605 +- return ret;
606 +
607 + for (i = 0; i < 10; i++) {
608 + usleep_range(100, 200);
609 +diff --git a/drivers/iio/accel/mxc4005.c b/drivers/iio/accel/mxc4005.c
610 +index d81b02642a0b3..110b7ea76ef2f 100644
611 +--- a/drivers/iio/accel/mxc4005.c
612 ++++ b/drivers/iio/accel/mxc4005.c
613 +@@ -462,8 +462,6 @@ static int mxc4005_probe(struct i2c_client *client,
614 + data->dready_trig->dev.parent = &client->dev;
615 + data->dready_trig->ops = &mxc4005_trigger_ops;
616 + iio_trigger_set_drvdata(data->dready_trig, indio_dev);
617 +- indio_dev->trig = data->dready_trig;
618 +- iio_trigger_get(indio_dev->trig);
619 + ret = devm_iio_trigger_register(&client->dev,
620 + data->dready_trig);
621 + if (ret) {
622 +@@ -471,6 +469,8 @@ static int mxc4005_probe(struct i2c_client *client,
623 + "failed to register trigger\n");
624 + return ret;
625 + }
626 ++
627 ++ indio_dev->trig = iio_trigger_get(data->dready_trig);
628 + }
629 +
630 + return devm_iio_device_register(&client->dev, indio_dev);
631 +diff --git a/drivers/iio/adc/axp288_adc.c b/drivers/iio/adc/axp288_adc.c
632 +index 8ea2aed6d6f5a..99ceaa09ef392 100644
633 +--- a/drivers/iio/adc/axp288_adc.c
634 ++++ b/drivers/iio/adc/axp288_adc.c
635 +@@ -196,6 +196,14 @@ static const struct dmi_system_id axp288_adc_ts_bias_override[] = {
636 + },
637 + .driver_data = (void *)(uintptr_t)AXP288_ADC_TS_BIAS_80UA,
638 + },
639 ++ {
640 ++ /* Nuvision Solo 10 Draw */
641 ++ .matches = {
642 ++ DMI_MATCH(DMI_SYS_VENDOR, "TMAX"),
643 ++ DMI_MATCH(DMI_PRODUCT_NAME, "TM101W610L"),
644 ++ },
645 ++ .driver_data = (void *)(uintptr_t)AXP288_ADC_TS_BIAS_80UA,
646 ++ },
647 + {}
648 + };
649 +
650 +diff --git a/drivers/iio/adc/stm32-adc-core.c b/drivers/iio/adc/stm32-adc-core.c
651 +index 14d6a537289cb..0ecec5a15fbf0 100644
652 +--- a/drivers/iio/adc/stm32-adc-core.c
653 ++++ b/drivers/iio/adc/stm32-adc-core.c
654 +@@ -815,7 +815,7 @@ static const struct stm32_adc_priv_cfg stm32h7_adc_priv_cfg = {
655 + static const struct stm32_adc_priv_cfg stm32mp1_adc_priv_cfg = {
656 + .regs = &stm32h7_adc_common_regs,
657 + .clk_sel = stm32h7_adc_clk_sel,
658 +- .max_clk_rate_hz = 40000000,
659 ++ .max_clk_rate_hz = 36000000,
660 + .has_syscfg = HAS_VBOOSTER | HAS_ANASWVDD,
661 + .num_irqs = 2,
662 + };
663 +diff --git a/drivers/iio/chemical/ccs811.c b/drivers/iio/chemical/ccs811.c
664 +index 7bf4e9a16a6ae..a2ee6bbda7f4d 100644
665 +--- a/drivers/iio/chemical/ccs811.c
666 ++++ b/drivers/iio/chemical/ccs811.c
667 +@@ -418,11 +418,11 @@ static int ccs811_probe(struct i2c_client *client,
668 + data->drdy_trig->dev.parent = &client->dev;
669 + data->drdy_trig->ops = &ccs811_trigger_ops;
670 + iio_trigger_set_drvdata(data->drdy_trig, indio_dev);
671 +- indio_dev->trig = data->drdy_trig;
672 +- iio_trigger_get(indio_dev->trig);
673 + ret = iio_trigger_register(data->drdy_trig);
674 + if (ret)
675 + goto err_poweroff;
676 ++
677 ++ indio_dev->trig = iio_trigger_get(data->drdy_trig);
678 + }
679 +
680 + ret = iio_triggered_buffer_setup(indio_dev, NULL,
681 +diff --git a/drivers/iio/gyro/mpu3050-core.c b/drivers/iio/gyro/mpu3050-core.c
682 +index 75db410b5054e..0f5de4afe33f6 100644
683 +--- a/drivers/iio/gyro/mpu3050-core.c
684 ++++ b/drivers/iio/gyro/mpu3050-core.c
685 +@@ -874,6 +874,7 @@ static int mpu3050_power_up(struct mpu3050 *mpu3050)
686 + ret = regmap_update_bits(mpu3050->map, MPU3050_PWR_MGM,
687 + MPU3050_PWR_MGM_SLEEP, 0);
688 + if (ret) {
689 ++ regulator_bulk_disable(ARRAY_SIZE(mpu3050->regs), mpu3050->regs);
690 + dev_err(mpu3050->dev, "error setting power mode\n");
691 + return ret;
692 + }
693 +diff --git a/drivers/iio/trigger/iio-trig-sysfs.c b/drivers/iio/trigger/iio-trig-sysfs.c
694 +index e09e58072872c..2277d6336ac06 100644
695 +--- a/drivers/iio/trigger/iio-trig-sysfs.c
696 ++++ b/drivers/iio/trigger/iio-trig-sysfs.c
697 +@@ -196,6 +196,7 @@ static int iio_sysfs_trigger_remove(int id)
698 + }
699 +
700 + iio_trigger_unregister(t->trig);
701 ++ irq_work_sync(&t->work);
702 + iio_trigger_free(t->trig);
703 +
704 + list_del(&t->l);
705 +diff --git a/drivers/md/dm-era-target.c b/drivers/md/dm-era-target.c
706 +index 6b0b3a13ab4a2..418f590b99b8d 100644
707 +--- a/drivers/md/dm-era-target.c
708 ++++ b/drivers/md/dm-era-target.c
709 +@@ -1397,7 +1397,7 @@ static void start_worker(struct era *era)
710 + static void stop_worker(struct era *era)
711 + {
712 + atomic_set(&era->suspended, 1);
713 +- flush_workqueue(era->wq);
714 ++ drain_workqueue(era->wq);
715 + }
716 +
717 + /*----------------------------------------------------------------
718 +@@ -1581,6 +1581,12 @@ static void era_postsuspend(struct dm_target *ti)
719 + }
720 +
721 + stop_worker(era);
722 ++
723 ++ r = metadata_commit(era->md);
724 ++ if (r) {
725 ++ DMERR("%s: metadata_commit failed", __func__);
726 ++ /* FIXME: fail mode */
727 ++ }
728 + }
729 +
730 + static int era_preresume(struct dm_target *ti)
731 +diff --git a/drivers/md/dm-log.c b/drivers/md/dm-log.c
732 +index 8b15f53cbdd95..fe3a9473f3387 100644
733 +--- a/drivers/md/dm-log.c
734 ++++ b/drivers/md/dm-log.c
735 +@@ -615,7 +615,7 @@ static int disk_resume(struct dm_dirty_log *log)
736 + log_clear_bit(lc, lc->clean_bits, i);
737 +
738 + /* clear any old bits -- device has shrunk */
739 +- for (i = lc->region_count; i % (sizeof(*lc->clean_bits) << BYTE_SHIFT); i++)
740 ++ for (i = lc->region_count; i % BITS_PER_LONG; i++)
741 + log_clear_bit(lc, lc->clean_bits, i);
742 +
743 + /* copy clean across to sync */
744 +diff --git a/drivers/mmc/host/sdhci-pci-o2micro.c b/drivers/mmc/host/sdhci-pci-o2micro.c
745 +index 41a2394313dd0..3170c19683c49 100644
746 +--- a/drivers/mmc/host/sdhci-pci-o2micro.c
747 ++++ b/drivers/mmc/host/sdhci-pci-o2micro.c
748 +@@ -145,6 +145,8 @@ static int sdhci_o2_get_cd(struct mmc_host *mmc)
749 +
750 + if (!(sdhci_readw(host, O2_PLL_DLL_WDT_CONTROL1) & O2_PLL_LOCK_STATUS))
751 + sdhci_o2_enable_internal_clock(host);
752 ++ else
753 ++ sdhci_o2_wait_card_detect_stable(host);
754 +
755 + return !!(sdhci_readl(host, SDHCI_PRESENT_STATE) & SDHCI_CARD_PRESENT);
756 + }
757 +diff --git a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
758 +index 02218c3b548f9..41f7dd58bdcf8 100644
759 +--- a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
760 ++++ b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
761 +@@ -682,7 +682,7 @@ static void gpmi_nfc_compute_timings(struct gpmi_nand_data *this,
762 + hw->timing0 = BF_GPMI_TIMING0_ADDRESS_SETUP(addr_setup_cycles) |
763 + BF_GPMI_TIMING0_DATA_HOLD(data_hold_cycles) |
764 + BF_GPMI_TIMING0_DATA_SETUP(data_setup_cycles);
765 +- hw->timing1 = BF_GPMI_TIMING1_BUSY_TIMEOUT(busy_timeout_cycles * 4096);
766 ++ hw->timing1 = BF_GPMI_TIMING1_BUSY_TIMEOUT(DIV_ROUND_UP(busy_timeout_cycles, 4096));
767 +
768 + /*
769 + * Derive NFC ideal delay from {3}:
770 +diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
771 +index d6ecd03b60452..246bcbd650b4b 100644
772 +--- a/drivers/net/bonding/bond_main.c
773 ++++ b/drivers/net/bonding/bond_main.c
774 +@@ -3071,9 +3071,11 @@ re_arm:
775 + if (!rtnl_trylock())
776 + return;
777 +
778 +- if (should_notify_peers)
779 ++ if (should_notify_peers) {
780 ++ bond->send_peer_notif--;
781 + call_netdevice_notifiers(NETDEV_NOTIFY_PEERS,
782 + bond->dev);
783 ++ }
784 + if (should_notify_rtnl) {
785 + bond_slave_state_notify(bond);
786 + bond_slave_link_notify(bond);
787 +diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c
788 +index fc9ff985a62bd..b297a3ca22fc8 100644
789 +--- a/drivers/net/ethernet/intel/ice/ice_ethtool.c
790 ++++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c
791 +@@ -2337,6 +2337,42 @@ ice_setup_autoneg(struct ice_port_info *p, struct ethtool_link_ksettings *ks,
792 + return err;
793 + }
794 +
795 ++/**
796 ++ * ice_set_phy_type_from_speed - set phy_types based on speeds
797 ++ * and advertised modes
798 ++ * @ks: ethtool link ksettings struct
799 ++ * @phy_type_low: pointer to the lower part of phy_type
800 ++ * @phy_type_high: pointer to the higher part of phy_type
801 ++ * @adv_link_speed: targeted link speeds bitmap
802 ++ */
803 ++static void
804 ++ice_set_phy_type_from_speed(const struct ethtool_link_ksettings *ks,
805 ++ u64 *phy_type_low, u64 *phy_type_high,
806 ++ u16 adv_link_speed)
807 ++{
808 ++ /* Handle 1000M speed in a special way because ice_update_phy_type
809 ++ * enables all link modes, but having mixed copper and optical
810 ++ * standards is not supported.
811 ++ */
812 ++ adv_link_speed &= ~ICE_AQ_LINK_SPEED_1000MB;
813 ++
814 ++ if (ethtool_link_ksettings_test_link_mode(ks, advertising,
815 ++ 1000baseT_Full))
816 ++ *phy_type_low |= ICE_PHY_TYPE_LOW_1000BASE_T |
817 ++ ICE_PHY_TYPE_LOW_1G_SGMII;
818 ++
819 ++ if (ethtool_link_ksettings_test_link_mode(ks, advertising,
820 ++ 1000baseKX_Full))
821 ++ *phy_type_low |= ICE_PHY_TYPE_LOW_1000BASE_KX;
822 ++
823 ++ if (ethtool_link_ksettings_test_link_mode(ks, advertising,
824 ++ 1000baseX_Full))
825 ++ *phy_type_low |= ICE_PHY_TYPE_LOW_1000BASE_SX |
826 ++ ICE_PHY_TYPE_LOW_1000BASE_LX;
827 ++
828 ++ ice_update_phy_type(phy_type_low, phy_type_high, adv_link_speed);
829 ++}
830 ++
831 + /**
832 + * ice_set_link_ksettings - Set Speed and Duplex
833 + * @netdev: network interface device structure
834 +@@ -2472,7 +2508,8 @@ ice_set_link_ksettings(struct net_device *netdev,
835 + adv_link_speed = curr_link_speed;
836 +
837 + /* Convert the advertise link speeds to their corresponded PHY_TYPE */
838 +- ice_update_phy_type(&phy_type_low, &phy_type_high, adv_link_speed);
839 ++ ice_set_phy_type_from_speed(ks, &phy_type_low, &phy_type_high,
840 ++ adv_link_speed);
841 +
842 + if (!autoneg_changed && adv_link_speed == curr_link_speed) {
843 + netdev_info(netdev, "Nothing changed, exiting without setting anything.\n");
844 +diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
845 +index 26c8d09ad4ddb..8734dfd001bbd 100644
846 +--- a/drivers/net/ethernet/intel/igb/igb_main.c
847 ++++ b/drivers/net/ethernet/intel/igb/igb_main.c
848 +@@ -9404,11 +9404,10 @@ static void igb_init_dmac(struct igb_adapter *adapter, u32 pba)
849 + struct e1000_hw *hw = &adapter->hw;
850 + u32 dmac_thr;
851 + u16 hwm;
852 ++ u32 reg;
853 +
854 + if (hw->mac.type > e1000_82580) {
855 + if (adapter->flags & IGB_FLAG_DMAC) {
856 +- u32 reg;
857 +-
858 + /* force threshold to 0. */
859 + wr32(E1000_DMCTXTH, 0);
860 +
861 +@@ -9441,7 +9440,6 @@ static void igb_init_dmac(struct igb_adapter *adapter, u32 pba)
862 + /* Disable BMC-to-OS Watchdog Enable */
863 + if (hw->mac.type != e1000_i354)
864 + reg &= ~E1000_DMACR_DC_BMC2OSW_EN;
865 +-
866 + wr32(E1000_DMACR, reg);
867 +
868 + /* no lower threshold to disable
869 +@@ -9458,12 +9456,12 @@ static void igb_init_dmac(struct igb_adapter *adapter, u32 pba)
870 + */
871 + wr32(E1000_DMCTXTH, (IGB_MIN_TXPBSIZE -
872 + (IGB_TX_BUF_4096 + adapter->max_frame_size)) >> 6);
873 ++ }
874 +
875 +- /* make low power state decision controlled
876 +- * by DMA coal
877 +- */
878 ++ if (hw->mac.type >= e1000_i210 ||
879 ++ (adapter->flags & IGB_FLAG_DMAC)) {
880 + reg = rd32(E1000_PCIEMISC);
881 +- reg &= ~E1000_PCIEMISC_LX_DECISION;
882 ++ reg |= E1000_PCIEMISC_LX_DECISION;
883 + wr32(E1000_PCIEMISC, reg);
884 + } /* endif adapter->dmac is not disabled */
885 + } else if (hw->mac.type == e1000_82580) {
886 +diff --git a/drivers/net/phy/aquantia_main.c b/drivers/net/phy/aquantia_main.c
887 +index 975789d9349dc..75d8351ee2506 100644
888 +--- a/drivers/net/phy/aquantia_main.c
889 ++++ b/drivers/net/phy/aquantia_main.c
890 +@@ -34,6 +34,8 @@
891 + #define MDIO_AN_VEND_PROV 0xc400
892 + #define MDIO_AN_VEND_PROV_1000BASET_FULL BIT(15)
893 + #define MDIO_AN_VEND_PROV_1000BASET_HALF BIT(14)
894 ++#define MDIO_AN_VEND_PROV_5000BASET_FULL BIT(11)
895 ++#define MDIO_AN_VEND_PROV_2500BASET_FULL BIT(10)
896 + #define MDIO_AN_VEND_PROV_DOWNSHIFT_EN BIT(4)
897 + #define MDIO_AN_VEND_PROV_DOWNSHIFT_MASK GENMASK(3, 0)
898 + #define MDIO_AN_VEND_PROV_DOWNSHIFT_DFLT 4
899 +@@ -230,9 +232,20 @@ static int aqr_config_aneg(struct phy_device *phydev)
900 + phydev->advertising))
901 + reg |= MDIO_AN_VEND_PROV_1000BASET_HALF;
902 +
903 ++ /* Handle the case when the 2.5G and 5G speeds are not advertised */
904 ++ if (linkmode_test_bit(ETHTOOL_LINK_MODE_2500baseT_Full_BIT,
905 ++ phydev->advertising))
906 ++ reg |= MDIO_AN_VEND_PROV_2500BASET_FULL;
907 ++
908 ++ if (linkmode_test_bit(ETHTOOL_LINK_MODE_5000baseT_Full_BIT,
909 ++ phydev->advertising))
910 ++ reg |= MDIO_AN_VEND_PROV_5000BASET_FULL;
911 ++
912 + ret = phy_modify_mmd_changed(phydev, MDIO_MMD_AN, MDIO_AN_VEND_PROV,
913 + MDIO_AN_VEND_PROV_1000BASET_HALF |
914 +- MDIO_AN_VEND_PROV_1000BASET_FULL, reg);
915 ++ MDIO_AN_VEND_PROV_1000BASET_FULL |
916 ++ MDIO_AN_VEND_PROV_2500BASET_FULL |
917 ++ MDIO_AN_VEND_PROV_5000BASET_FULL, reg);
918 + if (ret < 0)
919 + return ret;
920 + if (ret > 0)
921 +diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
922 +index 37c2cecd1e503..f4c03518d7d23 100644
923 +--- a/drivers/net/virtio_net.c
924 ++++ b/drivers/net/virtio_net.c
925 +@@ -2393,7 +2393,6 @@ static const struct ethtool_ops virtnet_ethtool_ops = {
926 + static void virtnet_freeze_down(struct virtio_device *vdev)
927 + {
928 + struct virtnet_info *vi = vdev->priv;
929 +- int i;
930 +
931 + /* Make sure no work handler is accessing the device */
932 + flush_work(&vi->config_work);
933 +@@ -2401,14 +2400,8 @@ static void virtnet_freeze_down(struct virtio_device *vdev)
934 + netif_tx_lock_bh(vi->dev);
935 + netif_device_detach(vi->dev);
936 + netif_tx_unlock_bh(vi->dev);
937 +- cancel_delayed_work_sync(&vi->refill);
938 +-
939 +- if (netif_running(vi->dev)) {
940 +- for (i = 0; i < vi->max_queue_pairs; i++) {
941 +- napi_disable(&vi->rq[i].napi);
942 +- virtnet_napi_tx_disable(&vi->sq[i].napi);
943 +- }
944 +- }
945 ++ if (netif_running(vi->dev))
946 ++ virtnet_close(vi->dev);
947 + }
948 +
949 + static int init_vqs(struct virtnet_info *vi);
950 +@@ -2416,7 +2409,7 @@ static int init_vqs(struct virtnet_info *vi);
951 + static int virtnet_restore_up(struct virtio_device *vdev)
952 + {
953 + struct virtnet_info *vi = vdev->priv;
954 +- int err, i;
955 ++ int err;
956 +
957 + err = init_vqs(vi);
958 + if (err)
959 +@@ -2425,15 +2418,9 @@ static int virtnet_restore_up(struct virtio_device *vdev)
960 + virtio_device_ready(vdev);
961 +
962 + if (netif_running(vi->dev)) {
963 +- for (i = 0; i < vi->curr_queue_pairs; i++)
964 +- if (!try_fill_recv(vi, &vi->rq[i], GFP_KERNEL))
965 +- schedule_delayed_work(&vi->refill, 0);
966 +-
967 +- for (i = 0; i < vi->max_queue_pairs; i++) {
968 +- virtnet_napi_enable(vi->rq[i].vq, &vi->rq[i].napi);
969 +- virtnet_napi_tx_enable(vi, vi->sq[i].vq,
970 +- &vi->sq[i].napi);
971 +- }
972 ++ err = virtnet_open(vi->dev);
973 ++ if (err)
974 ++ return err;
975 + }
976 +
977 + netif_tx_lock_bh(vi->dev);
978 +diff --git a/drivers/soc/bcm/brcmstb/pm/pm-arm.c b/drivers/soc/bcm/brcmstb/pm/pm-arm.c
979 +index b1062334e6089..c6ec7d95bcfcc 100644
980 +--- a/drivers/soc/bcm/brcmstb/pm/pm-arm.c
981 ++++ b/drivers/soc/bcm/brcmstb/pm/pm-arm.c
982 +@@ -780,6 +780,7 @@ static int brcmstb_pm_probe(struct platform_device *pdev)
983 + }
984 +
985 + ret = brcmstb_init_sram(dn);
986 ++ of_node_put(dn);
987 + if (ret) {
988 + pr_err("error setting up SRAM for PM\n");
989 + return ret;
990 +diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
991 +index d1ab8561e2581..c3df1660cb5c5 100644
992 +--- a/drivers/tty/vt/vt.c
993 ++++ b/drivers/tty/vt/vt.c
994 +@@ -4541,16 +4541,8 @@ static int con_font_get(struct vc_data *vc, struct console_font_op *op)
995 +
996 + if (op->data && font.charcount > op->charcount)
997 + rc = -ENOSPC;
998 +- if (!(op->flags & KD_FONT_FLAG_OLD)) {
999 +- if (font.width > op->width || font.height > op->height)
1000 +- rc = -ENOSPC;
1001 +- } else {
1002 +- if (font.width != 8)
1003 +- rc = -EIO;
1004 +- else if ((op->height && font.height > op->height) ||
1005 +- font.height > 32)
1006 +- rc = -ENOSPC;
1007 +- }
1008 ++ if (font.width > op->width || font.height > op->height)
1009 ++ rc = -ENOSPC;
1010 + if (rc)
1011 + goto out;
1012 +
1013 +@@ -4578,7 +4570,7 @@ static int con_font_set(struct vc_data *vc, struct console_font_op *op)
1014 + return -EINVAL;
1015 + if (op->charcount > 512)
1016 + return -EINVAL;
1017 +- if (op->width <= 0 || op->width > 32 || op->height > 32)
1018 ++ if (op->width <= 0 || op->width > 32 || !op->height || op->height > 32)
1019 + return -EINVAL;
1020 + size = (op->width+7)/8 * 32 * op->charcount;
1021 + if (size > max_font_size)
1022 +@@ -4588,31 +4580,6 @@ static int con_font_set(struct vc_data *vc, struct console_font_op *op)
1023 + if (IS_ERR(font.data))
1024 + return PTR_ERR(font.data);
1025 +
1026 +- if (!op->height) { /* Need to guess font height [compat] */
1027 +- int h, i;
1028 +- u8 *charmap = font.data;
1029 +-
1030 +- /*
1031 +- * If from KDFONTOP ioctl, don't allow things which can be done
1032 +- * in userland,so that we can get rid of this soon
1033 +- */
1034 +- if (!(op->flags & KD_FONT_FLAG_OLD)) {
1035 +- kfree(font.data);
1036 +- return -EINVAL;
1037 +- }
1038 +-
1039 +- for (h = 32; h > 0; h--)
1040 +- for (i = 0; i < op->charcount; i++)
1041 +- if (charmap[32*i+h-1])
1042 +- goto nonzero;
1043 +-
1044 +- kfree(font.data);
1045 +- return -EINVAL;
1046 +-
1047 +- nonzero:
1048 +- op->height = h;
1049 +- }
1050 +-
1051 + font.charcount = op->charcount;
1052 + font.width = op->width;
1053 + font.height = op->height;
1054 +diff --git a/drivers/tty/vt/vt_ioctl.c b/drivers/tty/vt/vt_ioctl.c
1055 +index 312857168dad3..f623b3859e980 100644
1056 +--- a/drivers/tty/vt/vt_ioctl.c
1057 ++++ b/drivers/tty/vt/vt_ioctl.c
1058 +@@ -241,48 +241,6 @@ int vt_waitactive(int n)
1059 + #define GPLAST 0x3df
1060 + #define GPNUM (GPLAST - GPFIRST + 1)
1061 +
1062 +-
1063 +-
1064 +-static inline int
1065 +-do_fontx_ioctl(struct vc_data *vc, int cmd, struct consolefontdesc __user *user_cfd, int perm, struct console_font_op *op)
1066 +-{
1067 +- struct consolefontdesc cfdarg;
1068 +- int i;
1069 +-
1070 +- if (copy_from_user(&cfdarg, user_cfd, sizeof(struct consolefontdesc)))
1071 +- return -EFAULT;
1072 +-
1073 +- switch (cmd) {
1074 +- case PIO_FONTX:
1075 +- if (!perm)
1076 +- return -EPERM;
1077 +- op->op = KD_FONT_OP_SET;
1078 +- op->flags = KD_FONT_FLAG_OLD;
1079 +- op->width = 8;
1080 +- op->height = cfdarg.charheight;
1081 +- op->charcount = cfdarg.charcount;
1082 +- op->data = cfdarg.chardata;
1083 +- return con_font_op(vc, op);
1084 +-
1085 +- case GIO_FONTX:
1086 +- op->op = KD_FONT_OP_GET;
1087 +- op->flags = KD_FONT_FLAG_OLD;
1088 +- op->width = 8;
1089 +- op->height = cfdarg.charheight;
1090 +- op->charcount = cfdarg.charcount;
1091 +- op->data = cfdarg.chardata;
1092 +- i = con_font_op(vc, op);
1093 +- if (i)
1094 +- return i;
1095 +- cfdarg.charheight = op->height;
1096 +- cfdarg.charcount = op->charcount;
1097 +- if (copy_to_user(user_cfd, &cfdarg, sizeof(struct consolefontdesc)))
1098 +- return -EFAULT;
1099 +- return 0;
1100 +- }
1101 +- return -EINVAL;
1102 +-}
1103 +-
1104 + static inline int
1105 + do_unimap_ioctl(int cmd, struct unimapdesc __user *user_ud, int perm, struct vc_data *vc)
1106 + {
1107 +@@ -919,30 +877,6 @@ int vt_ioctl(struct tty_struct *tty,
1108 + break;
1109 + }
1110 +
1111 +- case PIO_FONT: {
1112 +- if (!perm)
1113 +- return -EPERM;
1114 +- op.op = KD_FONT_OP_SET;
1115 +- op.flags = KD_FONT_FLAG_OLD | KD_FONT_FLAG_DONT_RECALC; /* Compatibility */
1116 +- op.width = 8;
1117 +- op.height = 0;
1118 +- op.charcount = 256;
1119 +- op.data = up;
1120 +- ret = con_font_op(vc, &op);
1121 +- break;
1122 +- }
1123 +-
1124 +- case GIO_FONT: {
1125 +- op.op = KD_FONT_OP_GET;
1126 +- op.flags = KD_FONT_FLAG_OLD;
1127 +- op.width = 8;
1128 +- op.height = 32;
1129 +- op.charcount = 256;
1130 +- op.data = up;
1131 +- ret = con_font_op(vc, &op);
1132 +- break;
1133 +- }
1134 +-
1135 + case PIO_CMAP:
1136 + if (!perm)
1137 + ret = -EPERM;
1138 +@@ -954,36 +888,6 @@ int vt_ioctl(struct tty_struct *tty,
1139 + ret = con_get_cmap(up);
1140 + break;
1141 +
1142 +- case PIO_FONTX:
1143 +- case GIO_FONTX:
1144 +- ret = do_fontx_ioctl(vc, cmd, up, perm, &op);
1145 +- break;
1146 +-
1147 +- case PIO_FONTRESET:
1148 +- {
1149 +- if (!perm)
1150 +- return -EPERM;
1151 +-
1152 +-#ifdef BROKEN_GRAPHICS_PROGRAMS
1153 +- /* With BROKEN_GRAPHICS_PROGRAMS defined, the default
1154 +- font is not saved. */
1155 +- ret = -ENOSYS;
1156 +- break;
1157 +-#else
1158 +- {
1159 +- op.op = KD_FONT_OP_SET_DEFAULT;
1160 +- op.data = NULL;
1161 +- ret = con_font_op(vc, &op);
1162 +- if (ret)
1163 +- break;
1164 +- console_lock();
1165 +- con_set_default_unimap(vc);
1166 +- console_unlock();
1167 +- break;
1168 +- }
1169 +-#endif
1170 +- }
1171 +-
1172 + case KDFONTOP: {
1173 + if (copy_from_user(&op, up, sizeof(op))) {
1174 + ret = -EFAULT;
1175 +@@ -1097,54 +1001,6 @@ void vc_SAK(struct work_struct *work)
1176 +
1177 + #ifdef CONFIG_COMPAT
1178 +
1179 +-struct compat_consolefontdesc {
1180 +- unsigned short charcount; /* characters in font (256 or 512) */
1181 +- unsigned short charheight; /* scan lines per character (1-32) */
1182 +- compat_caddr_t chardata; /* font data in expanded form */
1183 +-};
1184 +-
1185 +-static inline int
1186 +-compat_fontx_ioctl(struct vc_data *vc, int cmd,
1187 +- struct compat_consolefontdesc __user *user_cfd,
1188 +- int perm, struct console_font_op *op)
1189 +-{
1190 +- struct compat_consolefontdesc cfdarg;
1191 +- int i;
1192 +-
1193 +- if (copy_from_user(&cfdarg, user_cfd, sizeof(struct compat_consolefontdesc)))
1194 +- return -EFAULT;
1195 +-
1196 +- switch (cmd) {
1197 +- case PIO_FONTX:
1198 +- if (!perm)
1199 +- return -EPERM;
1200 +- op->op = KD_FONT_OP_SET;
1201 +- op->flags = KD_FONT_FLAG_OLD;
1202 +- op->width = 8;
1203 +- op->height = cfdarg.charheight;
1204 +- op->charcount = cfdarg.charcount;
1205 +- op->data = compat_ptr(cfdarg.chardata);
1206 +- return con_font_op(vc, op);
1207 +-
1208 +- case GIO_FONTX:
1209 +- op->op = KD_FONT_OP_GET;
1210 +- op->flags = KD_FONT_FLAG_OLD;
1211 +- op->width = 8;
1212 +- op->height = cfdarg.charheight;
1213 +- op->charcount = cfdarg.charcount;
1214 +- op->data = compat_ptr(cfdarg.chardata);
1215 +- i = con_font_op(vc, op);
1216 +- if (i)
1217 +- return i;
1218 +- cfdarg.charheight = op->height;
1219 +- cfdarg.charcount = op->charcount;
1220 +- if (copy_to_user(user_cfd, &cfdarg, sizeof(struct compat_consolefontdesc)))
1221 +- return -EFAULT;
1222 +- return 0;
1223 +- }
1224 +- return -EINVAL;
1225 +-}
1226 +-
1227 + struct compat_console_font_op {
1228 + compat_uint_t op; /* operation code KD_FONT_OP_* */
1229 + compat_uint_t flags; /* KD_FONT_FLAG_* */
1230 +@@ -1221,9 +1077,6 @@ long vt_compat_ioctl(struct tty_struct *tty,
1231 + /*
1232 + * these need special handlers for incompatible data structures
1233 + */
1234 +- case PIO_FONTX:
1235 +- case GIO_FONTX:
1236 +- return compat_fontx_ioctl(vc, cmd, up, perm, &op);
1237 +
1238 + case KDFONTOP:
1239 + return compat_kdfontop_ioctl(up, perm, &op, vc);
1240 +diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
1241 +index 8f18e7b6cadf4..21c299c85505d 100644
1242 +--- a/drivers/usb/chipidea/udc.c
1243 ++++ b/drivers/usb/chipidea/udc.c
1244 +@@ -921,6 +921,9 @@ isr_setup_status_complete(struct usb_ep *ep, struct usb_request *req)
1245 + struct ci_hdrc *ci = req->context;
1246 + unsigned long flags;
1247 +
1248 ++ if (req->status < 0)
1249 ++ return;
1250 ++
1251 + if (ci->setaddr) {
1252 + hw_usb_set_address(ci, ci->address);
1253 + ci->setaddr = false;
1254 +diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
1255 +index dd46c15c4853f..9c066d1c512b1 100644
1256 +--- a/drivers/usb/host/xhci-hub.c
1257 ++++ b/drivers/usb/host/xhci-hub.c
1258 +@@ -566,7 +566,7 @@ struct xhci_hub *xhci_get_rhub(struct usb_hcd *hcd)
1259 + * It will release and re-aquire the lock while calling ACPI
1260 + * method.
1261 + */
1262 +-static void xhci_set_port_power(struct xhci_hcd *xhci, struct usb_hcd *hcd,
1263 ++void xhci_set_port_power(struct xhci_hcd *xhci, struct usb_hcd *hcd,
1264 + u16 index, bool on, unsigned long *flags)
1265 + {
1266 + struct xhci_hub *rhub;
1267 +diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
1268 +index 2f59d447411b5..9fe35bb67731e 100644
1269 +--- a/drivers/usb/host/xhci.c
1270 ++++ b/drivers/usb/host/xhci.c
1271 +@@ -775,6 +775,8 @@ static void xhci_stop(struct usb_hcd *hcd)
1272 + void xhci_shutdown(struct usb_hcd *hcd)
1273 + {
1274 + struct xhci_hcd *xhci = hcd_to_xhci(hcd);
1275 ++ unsigned long flags;
1276 ++ int i;
1277 +
1278 + if (xhci->quirks & XHCI_SPURIOUS_REBOOT)
1279 + usb_disable_xhci_ports(to_pci_dev(hcd->self.sysdev));
1280 +@@ -790,12 +792,21 @@ void xhci_shutdown(struct usb_hcd *hcd)
1281 + del_timer_sync(&xhci->shared_hcd->rh_timer);
1282 + }
1283 +
1284 +- spin_lock_irq(&xhci->lock);
1285 ++ spin_lock_irqsave(&xhci->lock, flags);
1286 + xhci_halt(xhci);
1287 ++
1288 ++ /* Power off USB2 ports*/
1289 ++ for (i = 0; i < xhci->usb2_rhub.num_ports; i++)
1290 ++ xhci_set_port_power(xhci, xhci->main_hcd, i, false, &flags);
1291 ++
1292 ++ /* Power off USB3 ports*/
1293 ++ for (i = 0; i < xhci->usb3_rhub.num_ports; i++)
1294 ++ xhci_set_port_power(xhci, xhci->shared_hcd, i, false, &flags);
1295 ++
1296 + /* Workaround for spurious wakeups at shutdown with HSW */
1297 + if (xhci->quirks & XHCI_SPURIOUS_WAKEUP)
1298 + xhci_reset(xhci, XHCI_RESET_SHORT_USEC);
1299 +- spin_unlock_irq(&xhci->lock);
1300 ++ spin_unlock_irqrestore(&xhci->lock, flags);
1301 +
1302 + xhci_cleanup_msix(xhci);
1303 +
1304 +diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
1305 +index 4b05d767e08f7..a9031f4949842 100644
1306 +--- a/drivers/usb/host/xhci.h
1307 ++++ b/drivers/usb/host/xhci.h
1308 +@@ -2155,6 +2155,8 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex,
1309 + int xhci_hub_status_data(struct usb_hcd *hcd, char *buf);
1310 + int xhci_find_raw_port_number(struct usb_hcd *hcd, int port1);
1311 + struct xhci_hub *xhci_get_rhub(struct usb_hcd *hcd);
1312 ++void xhci_set_port_power(struct xhci_hcd *xhci, struct usb_hcd *hcd, u16 index,
1313 ++ bool on, unsigned long *flags);
1314 +
1315 + void xhci_hc_died(struct xhci_hcd *xhci);
1316 +
1317 +diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
1318 +index ec4fdb8140917..2317ed357d8ef 100644
1319 +--- a/drivers/usb/serial/option.c
1320 ++++ b/drivers/usb/serial/option.c
1321 +@@ -252,10 +252,12 @@ static void option_instat_callback(struct urb *urb);
1322 + #define QUECTEL_PRODUCT_EG95 0x0195
1323 + #define QUECTEL_PRODUCT_BG96 0x0296
1324 + #define QUECTEL_PRODUCT_EP06 0x0306
1325 ++#define QUECTEL_PRODUCT_EM05G 0x030a
1326 + #define QUECTEL_PRODUCT_EM12 0x0512
1327 + #define QUECTEL_PRODUCT_RM500Q 0x0800
1328 + #define QUECTEL_PRODUCT_EC200S_CN 0x6002
1329 + #define QUECTEL_PRODUCT_EC200T 0x6026
1330 ++#define QUECTEL_PRODUCT_RM500K 0x7001
1331 +
1332 + #define CMOTECH_VENDOR_ID 0x16d8
1333 + #define CMOTECH_PRODUCT_6001 0x6001
1334 +@@ -1134,6 +1136,8 @@ static const struct usb_device_id option_ids[] = {
1335 + { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EP06, 0xff, 0xff, 0xff),
1336 + .driver_info = RSVD(1) | RSVD(2) | RSVD(3) | RSVD(4) | NUMEP2 },
1337 + { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EP06, 0xff, 0, 0) },
1338 ++ { USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM05G, 0xff),
1339 ++ .driver_info = RSVD(6) | ZLP },
1340 + { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM12, 0xff, 0xff, 0xff),
1341 + .driver_info = RSVD(1) | RSVD(2) | RSVD(3) | RSVD(4) | NUMEP2 },
1342 + { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM12, 0xff, 0, 0) },
1343 +@@ -1147,6 +1151,7 @@ static const struct usb_device_id option_ids[] = {
1344 + .driver_info = ZLP },
1345 + { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200S_CN, 0xff, 0, 0) },
1346 + { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200T, 0xff, 0, 0) },
1347 ++ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500K, 0xff, 0x00, 0x00) },
1348 +
1349 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6001) },
1350 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CMU_300) },
1351 +@@ -1279,6 +1284,7 @@ static const struct usb_device_id option_ids[] = {
1352 + .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) },
1353 + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1231, 0xff), /* Telit LE910Cx (RNDIS) */
1354 + .driver_info = NCTRL(2) | RSVD(3) },
1355 ++ { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x1250, 0xff, 0x00, 0x00) }, /* Telit LE910Cx (rmnet) */
1356 + { USB_DEVICE(TELIT_VENDOR_ID, 0x1260),
1357 + .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) },
1358 + { USB_DEVICE(TELIT_VENDOR_ID, 0x1261),
1359 +diff --git a/drivers/xen/features.c b/drivers/xen/features.c
1360 +index 25c053b096051..2c306de228db3 100644
1361 +--- a/drivers/xen/features.c
1362 ++++ b/drivers/xen/features.c
1363 +@@ -29,6 +29,6 @@ void xen_setup_features(void)
1364 + if (HYPERVISOR_xen_version(XENVER_get_features, &fi) < 0)
1365 + break;
1366 + for (j = 0; j < 32; j++)
1367 +- xen_features[i * 32 + j] = !!(fi.submap & 1<<j);
1368 ++ xen_features[i * 32 + j] = !!(fi.submap & 1U << j);
1369 + }
1370 + }
1371 +diff --git a/fs/afs/inode.c b/fs/afs/inode.c
1372 +index 90eac3ec01cbc..622363af4c1bf 100644
1373 +--- a/fs/afs/inode.c
1374 ++++ b/fs/afs/inode.c
1375 +@@ -739,7 +739,8 @@ int afs_getattr(const struct path *path, struct kstat *stat,
1376 +
1377 + _enter("{ ino=%lu v=%u }", inode->i_ino, inode->i_generation);
1378 +
1379 +- if (!(query_flags & AT_STATX_DONT_SYNC) &&
1380 ++ if (vnode->volume &&
1381 ++ !(query_flags & AT_STATX_DONT_SYNC) &&
1382 + !test_bit(AFS_VNODE_CB_PROMISED, &vnode->flags)) {
1383 + key = afs_request_key(vnode->volume->cell);
1384 + if (IS_ERR(key))
1385 +diff --git a/include/linux/kd.h b/include/linux/kd.h
1386 +deleted file mode 100644
1387 +index b130a18f860f0..0000000000000
1388 +--- a/include/linux/kd.h
1389 ++++ /dev/null
1390 +@@ -1,8 +0,0 @@
1391 +-/* SPDX-License-Identifier: GPL-2.0 */
1392 +-#ifndef _LINUX_KD_H
1393 +-#define _LINUX_KD_H
1394 +-
1395 +-#include <uapi/linux/kd.h>
1396 +-
1397 +-#define KD_FONT_FLAG_OLD 0x80000000 /* Invoked via old interface [compat] */
1398 +-#endif /* _LINUX_KD_H */
1399 +diff --git a/include/linux/ratelimit.h b/include/linux/ratelimit.h
1400 +index 8ddf79e9207a9..1df12e8dde6f6 100644
1401 +--- a/include/linux/ratelimit.h
1402 ++++ b/include/linux/ratelimit.h
1403 +@@ -23,12 +23,16 @@ struct ratelimit_state {
1404 + unsigned long flags;
1405 + };
1406 +
1407 +-#define RATELIMIT_STATE_INIT(name, interval_init, burst_init) { \
1408 +- .lock = __RAW_SPIN_LOCK_UNLOCKED(name.lock), \
1409 +- .interval = interval_init, \
1410 +- .burst = burst_init, \
1411 ++#define RATELIMIT_STATE_INIT_FLAGS(name, interval_init, burst_init, flags_init) { \
1412 ++ .lock = __RAW_SPIN_LOCK_UNLOCKED(name.lock), \
1413 ++ .interval = interval_init, \
1414 ++ .burst = burst_init, \
1415 ++ .flags = flags_init, \
1416 + }
1417 +
1418 ++#define RATELIMIT_STATE_INIT(name, interval_init, burst_init) \
1419 ++ RATELIMIT_STATE_INIT_FLAGS(name, interval_init, burst_init, 0)
1420 ++
1421 + #define RATELIMIT_STATE_INIT_DISABLED \
1422 + RATELIMIT_STATE_INIT(ratelimit_state, 0, DEFAULT_RATELIMIT_BURST)
1423 +
1424 +diff --git a/include/trace/events/libata.h b/include/trace/events/libata.h
1425 +index ab69434e2329e..72e785a903b65 100644
1426 +--- a/include/trace/events/libata.h
1427 ++++ b/include/trace/events/libata.h
1428 +@@ -249,6 +249,7 @@ DECLARE_EVENT_CLASS(ata_qc_complete_template,
1429 + __entry->hob_feature = qc->result_tf.hob_feature;
1430 + __entry->nsect = qc->result_tf.nsect;
1431 + __entry->hob_nsect = qc->result_tf.hob_nsect;
1432 ++ __entry->flags = qc->flags;
1433 + ),
1434 +
1435 + TP_printk("ata_port=%u ata_dev=%u tag=%d flags=%s status=%s " \
1436 +diff --git a/net/core/filter.c b/net/core/filter.c
1437 +index b0df4ddbe30c3..eba96343c7af9 100644
1438 +--- a/net/core/filter.c
1439 ++++ b/net/core/filter.c
1440 +@@ -5313,10 +5313,21 @@ __bpf_sk_lookup(struct sk_buff *skb, struct bpf_sock_tuple *tuple, u32 len,
1441 + ifindex, proto, netns_id, flags);
1442 +
1443 + if (sk) {
1444 +- sk = sk_to_full_sk(sk);
1445 +- if (!sk_fullsock(sk)) {
1446 ++ struct sock *sk2 = sk_to_full_sk(sk);
1447 ++
1448 ++ /* sk_to_full_sk() may return (sk)->rsk_listener, so make sure the original sk
1449 ++ * sock refcnt is decremented to prevent a request_sock leak.
1450 ++ */
1451 ++ if (!sk_fullsock(sk2))
1452 ++ sk2 = NULL;
1453 ++ if (sk2 != sk) {
1454 + sock_gen_put(sk);
1455 +- return NULL;
1456 ++ /* Ensure there is no need to bump sk2 refcnt */
1457 ++ if (unlikely(sk2 && !sock_flag(sk2, SOCK_RCU_FREE))) {
1458 ++ WARN_ONCE(1, "Found non-RCU, unreferenced socket!");
1459 ++ return NULL;
1460 ++ }
1461 ++ sk = sk2;
1462 + }
1463 + }
1464 +
1465 +@@ -5350,10 +5361,21 @@ bpf_sk_lookup(struct sk_buff *skb, struct bpf_sock_tuple *tuple, u32 len,
1466 + flags);
1467 +
1468 + if (sk) {
1469 +- sk = sk_to_full_sk(sk);
1470 +- if (!sk_fullsock(sk)) {
1471 ++ struct sock *sk2 = sk_to_full_sk(sk);
1472 ++
1473 ++ /* sk_to_full_sk() may return (sk)->rsk_listener, so make sure the original sk
1474 ++ * sock refcnt is decremented to prevent a request_sock leak.
1475 ++ */
1476 ++ if (!sk_fullsock(sk2))
1477 ++ sk2 = NULL;
1478 ++ if (sk2 != sk) {
1479 + sock_gen_put(sk);
1480 +- return NULL;
1481 ++ /* Ensure there is no need to bump sk2 refcnt */
1482 ++ if (unlikely(sk2 && !sock_flag(sk2, SOCK_RCU_FREE))) {
1483 ++ WARN_ONCE(1, "Found non-RCU, unreferenced socket!");
1484 ++ return NULL;
1485 ++ }
1486 ++ sk = sk2;
1487 + }
1488 + }
1489 +
1490 +diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
1491 +index 614410a6db44b..52dbffb7bc2fd 100644
1492 +--- a/net/ipv4/ip_gre.c
1493 ++++ b/net/ipv4/ip_gre.c
1494 +@@ -497,7 +497,6 @@ static void erspan_fb_xmit(struct sk_buff *skb, struct net_device *dev)
1495 + int tunnel_hlen;
1496 + int version;
1497 + int nhoff;
1498 +- int thoff;
1499 +
1500 + tun_info = skb_tunnel_info(skb);
1501 + if (unlikely(!tun_info || !(tun_info->mode & IP_TUNNEL_INFO_TX) ||
1502 +@@ -531,10 +530,16 @@ static void erspan_fb_xmit(struct sk_buff *skb, struct net_device *dev)
1503 + (ntohs(ip_hdr(skb)->tot_len) > skb->len - nhoff))
1504 + truncate = true;
1505 +
1506 +- thoff = skb_transport_header(skb) - skb_mac_header(skb);
1507 +- if (skb->protocol == htons(ETH_P_IPV6) &&
1508 +- (ntohs(ipv6_hdr(skb)->payload_len) > skb->len - thoff))
1509 +- truncate = true;
1510 ++ if (skb->protocol == htons(ETH_P_IPV6)) {
1511 ++ int thoff;
1512 ++
1513 ++ if (skb_transport_header_was_set(skb))
1514 ++ thoff = skb_transport_header(skb) - skb_mac_header(skb);
1515 ++ else
1516 ++ thoff = nhoff + sizeof(struct ipv6hdr);
1517 ++ if (ntohs(ipv6_hdr(skb)->payload_len) > skb->len - thoff)
1518 ++ truncate = true;
1519 ++ }
1520 +
1521 + if (version == 1) {
1522 + erspan_build_header(skb, ntohl(tunnel_id_to_key32(key->tun_id)),
1523 +diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
1524 +index e550db28aabb5..4a6396d574a0d 100644
1525 +--- a/net/ipv6/ip6_gre.c
1526 ++++ b/net/ipv6/ip6_gre.c
1527 +@@ -927,7 +927,6 @@ static netdev_tx_t ip6erspan_tunnel_xmit(struct sk_buff *skb,
1528 + __be16 proto;
1529 + __u32 mtu;
1530 + int nhoff;
1531 +- int thoff;
1532 +
1533 + if (!pskb_inet_may_pull(skb))
1534 + goto tx_err;
1535 +@@ -948,10 +947,16 @@ static netdev_tx_t ip6erspan_tunnel_xmit(struct sk_buff *skb,
1536 + (ntohs(ip_hdr(skb)->tot_len) > skb->len - nhoff))
1537 + truncate = true;
1538 +
1539 +- thoff = skb_transport_header(skb) - skb_mac_header(skb);
1540 +- if (skb->protocol == htons(ETH_P_IPV6) &&
1541 +- (ntohs(ipv6_hdr(skb)->payload_len) > skb->len - thoff))
1542 +- truncate = true;
1543 ++ if (skb->protocol == htons(ETH_P_IPV6)) {
1544 ++ int thoff;
1545 ++
1546 ++ if (skb_transport_header_was_set(skb))
1547 ++ thoff = skb_transport_header(skb) - skb_mac_header(skb);
1548 ++ else
1549 ++ thoff = nhoff + sizeof(struct ipv6hdr);
1550 ++ if (ntohs(ipv6_hdr(skb)->payload_len) > skb->len - thoff)
1551 ++ truncate = true;
1552 ++ }
1553 +
1554 + if (skb_cow_head(skb, dev->needed_headroom ?: t->hlen))
1555 + goto tx_err;
1556 +diff --git a/net/openvswitch/flow.c b/net/openvswitch/flow.c
1557 +index 38147e6a20f53..989175ce81d4d 100644
1558 +--- a/net/openvswitch/flow.c
1559 ++++ b/net/openvswitch/flow.c
1560 +@@ -265,7 +265,7 @@ static int parse_ipv6hdr(struct sk_buff *skb, struct sw_flow_key *key)
1561 + if (flags & IP6_FH_F_FRAG) {
1562 + if (frag_off) {
1563 + key->ip.frag = OVS_FRAG_TYPE_LATER;
1564 +- key->ip.proto = nexthdr;
1565 ++ key->ip.proto = NEXTHDR_FRAGMENT;
1566 + return 0;
1567 + }
1568 + key->ip.frag = OVS_FRAG_TYPE_FIRST;
1569 +diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c
1570 +index f4101a920d1f9..1802f134aa407 100644
1571 +--- a/net/sched/sch_netem.c
1572 ++++ b/net/sched/sch_netem.c
1573 +@@ -1146,9 +1146,9 @@ static int netem_dump(struct Qdisc *sch, struct sk_buff *skb)
1574 + struct tc_netem_rate rate;
1575 + struct tc_netem_slot slot;
1576 +
1577 +- qopt.latency = min_t(psched_tdiff_t, PSCHED_NS2TICKS(q->latency),
1578 ++ qopt.latency = min_t(psched_time_t, PSCHED_NS2TICKS(q->latency),
1579 + UINT_MAX);
1580 +- qopt.jitter = min_t(psched_tdiff_t, PSCHED_NS2TICKS(q->jitter),
1581 ++ qopt.jitter = min_t(psched_time_t, PSCHED_NS2TICKS(q->jitter),
1582 + UINT_MAX);
1583 + qopt.limit = q->limit;
1584 + qopt.loss = q->loss;
1585 +diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
1586 +index 59011ddf8bb80..e5aeaf72dcdb8 100644
1587 +--- a/scripts/mod/modpost.c
1588 ++++ b/scripts/mod/modpost.c
1589 +@@ -1131,7 +1131,7 @@ static const struct sectioncheck sectioncheck[] = {
1590 + },
1591 + /* Do not export init/exit functions or data */
1592 + {
1593 +- .fromsec = { "__ksymtab*", NULL },
1594 ++ .fromsec = { "___ksymtab*", NULL },
1595 + .bad_tosec = { INIT_SECTIONS, EXIT_SECTIONS, NULL },
1596 + .mismatch = EXPORT_TO_INIT_EXIT,
1597 + .symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL },
1598 +diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
1599 +index c0b6881b06729..b81b0a1bada56 100644
1600 +--- a/sound/pci/hda/patch_conexant.c
1601 ++++ b/sound/pci/hda/patch_conexant.c
1602 +@@ -1048,11 +1048,11 @@ static int patch_conexant_auto(struct hda_codec *codec)
1603 + if (err < 0)
1604 + goto error;
1605 +
1606 +- err = snd_hda_gen_parse_auto_config(codec, &spec->gen.autocfg);
1607 ++ err = cx_auto_parse_beep(codec);
1608 + if (err < 0)
1609 + goto error;
1610 +
1611 +- err = cx_auto_parse_beep(codec);
1612 ++ err = snd_hda_gen_parse_auto_config(codec, &spec->gen.autocfg);
1613 + if (err < 0)
1614 + goto error;
1615 +
1616 +diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
1617 +index 8c37de7793463..804fc0d331b4f 100644
1618 +--- a/sound/pci/hda/patch_realtek.c
1619 ++++ b/sound/pci/hda/patch_realtek.c
1620 +@@ -2585,6 +2585,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
1621 + SND_PCI_QUIRK(0x1558, 0x67e1, "Clevo PB71[DE][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
1622 + SND_PCI_QUIRK(0x1558, 0x67e5, "Clevo PC70D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
1623 + SND_PCI_QUIRK(0x1558, 0x67f1, "Clevo PC70H[PRS]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
1624 ++ SND_PCI_QUIRK(0x1558, 0x67f5, "Clevo PD70PN[NRT]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
1625 + SND_PCI_QUIRK(0x1558, 0x70d1, "Clevo PC70[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
1626 + SND_PCI_QUIRK(0x1558, 0x7714, "Clevo X170SM", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
1627 + SND_PCI_QUIRK(0x1558, 0x7715, "Clevo X170KM-G", ALC1220_FIXUP_CLEVO_PB51ED),
1628 +@@ -9805,6 +9806,7 @@ enum {
1629 + ALC668_FIXUP_MIC_DET_COEF,
1630 + ALC897_FIXUP_LENOVO_HEADSET_MIC,
1631 + ALC897_FIXUP_HEADSET_MIC_PIN,
1632 ++ ALC897_FIXUP_HP_HSMIC_VERB,
1633 + };
1634 +
1635 + static const struct hda_fixup alc662_fixups[] = {
1636 +@@ -10224,6 +10226,13 @@ static const struct hda_fixup alc662_fixups[] = {
1637 + .chained = true,
1638 + .chain_id = ALC897_FIXUP_LENOVO_HEADSET_MIC
1639 + },
1640 ++ [ALC897_FIXUP_HP_HSMIC_VERB] = {
1641 ++ .type = HDA_FIXUP_PINS,
1642 ++ .v.pins = (const struct hda_pintbl[]) {
1643 ++ { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
1644 ++ { }
1645 ++ },
1646 ++ },
1647 + };
1648 +
1649 + static const struct snd_pci_quirk alc662_fixup_tbl[] = {
1650 +@@ -10249,6 +10258,7 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = {
1651 + SND_PCI_QUIRK(0x1028, 0x0698, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
1652 + SND_PCI_QUIRK(0x1028, 0x069f, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
1653 + SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800),
1654 ++ SND_PCI_QUIRK(0x103c, 0x8719, "HP", ALC897_FIXUP_HP_HSMIC_VERB),
1655 + SND_PCI_QUIRK(0x103c, 0x873e, "HP", ALC671_FIXUP_HP_HEADSET_MIC2),
1656 + SND_PCI_QUIRK(0x103c, 0x885f, "HP 288 Pro G8", ALC671_FIXUP_HP_HEADSET_MIC2),
1657 + SND_PCI_QUIRK(0x1043, 0x1080, "Asus UX501VW", ALC668_FIXUP_HEADSET_MODE),
1658 +diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
1659 +index a5c1a2c4eae4e..3edb4e25797de 100644
1660 +--- a/sound/pci/hda/patch_via.c
1661 ++++ b/sound/pci/hda/patch_via.c
1662 +@@ -520,11 +520,11 @@ static int via_parse_auto_config(struct hda_codec *codec)
1663 + if (err < 0)
1664 + return err;
1665 +
1666 +- err = snd_hda_gen_parse_auto_config(codec, &spec->gen.autocfg);
1667 ++ err = auto_parse_beep(codec);
1668 + if (err < 0)
1669 + return err;
1670 +
1671 +- err = auto_parse_beep(codec);
1672 ++ err = snd_hda_gen_parse_auto_config(codec, &spec->gen.autocfg);
1673 + if (err < 0)
1674 + return err;
1675 +