Gentoo Archives: gentoo-commits

From: Mike Pagano <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/linux-patches:4.4 commit in: /
Date: Thu, 22 Feb 2018 23:20:44
Message-Id: 1519341630.072e2de5b688a827d6870a7de80ceff15cdad384.mpagano@gentoo
1 commit: 072e2de5b688a827d6870a7de80ceff15cdad384
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Thu Feb 22 23:20:30 2018 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Thu Feb 22 23:20:30 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=072e2de5
7
8 Linux patch 4.4.117
9
10 0000_README | 4 +
11 1116_linux-4.4.117.patch | 929 +++++++++++++++++++++++++++++++++++++++++++++++
12 2 files changed, 933 insertions(+)
13
14 diff --git a/0000_README b/0000_README
15 index 0996e2a..2d08c4f 100644
16 --- a/0000_README
17 +++ b/0000_README
18 @@ -507,6 +507,10 @@ Patch: 1115_linux-4.4.116.patch
19 From: http://www.kernel.org
20 Desc: Linux 4.4.116
21
22 +Patch: 1116_linux-4.4.117.patch
23 +From: http://www.kernel.org
24 +Desc: Linux 4.4.117
25 +
26 Patch: 1500_XATTR_USER_PREFIX.patch
27 From: https://bugs.gentoo.org/show_bug.cgi?id=470644
28 Desc: Support for namespace user.pax.* on tmpfs.
29
30 diff --git a/1116_linux-4.4.117.patch b/1116_linux-4.4.117.patch
31 new file mode 100644
32 index 0000000..a48cc7f
33 --- /dev/null
34 +++ b/1116_linux-4.4.117.patch
35 @@ -0,0 +1,929 @@
36 +diff --git a/Documentation/devicetree/bindings/dma/snps-dma.txt b/Documentation/devicetree/bindings/dma/snps-dma.txt
37 +index c261598164a7..17d43ca27f41 100644
38 +--- a/Documentation/devicetree/bindings/dma/snps-dma.txt
39 ++++ b/Documentation/devicetree/bindings/dma/snps-dma.txt
40 +@@ -58,6 +58,6 @@ Example:
41 + interrupts = <0 35 0x4>;
42 + status = "disabled";
43 + dmas = <&dmahost 12 0 1>,
44 +- <&dmahost 13 0 1 0>;
45 ++ <&dmahost 13 1 0>;
46 + dma-names = "rx", "rx";
47 + };
48 +diff --git a/Documentation/filesystems/ext4.txt b/Documentation/filesystems/ext4.txt
49 +index 6c0108eb0137..2139ea253142 100644
50 +--- a/Documentation/filesystems/ext4.txt
51 ++++ b/Documentation/filesystems/ext4.txt
52 +@@ -233,7 +233,7 @@ data_err=ignore(*) Just print an error message if an error occurs
53 + data_err=abort Abort the journal if an error occurs in a file
54 + data buffer in ordered mode.
55 +
56 +-grpid Give objects the same group ID as their creator.
57 ++grpid New objects have the group ID of their parent.
58 + bsdgroups
59 +
60 + nogrpid (*) New objects have the group ID of their creator.
61 +diff --git a/Makefile b/Makefile
62 +index 71acaecd7899..9f53ba1835ad 100644
63 +--- a/Makefile
64 ++++ b/Makefile
65 +@@ -1,6 +1,6 @@
66 + VERSION = 4
67 + PATCHLEVEL = 4
68 +-SUBLEVEL = 116
69 ++SUBLEVEL = 117
70 + EXTRAVERSION =
71 + NAME = Blurry Fish Butt
72 +
73 +diff --git a/arch/arm/boot/dts/s5pv210.dtsi b/arch/arm/boot/dts/s5pv210.dtsi
74 +index 8344a0ee2b86..b03fe747b98c 100644
75 +--- a/arch/arm/boot/dts/s5pv210.dtsi
76 ++++ b/arch/arm/boot/dts/s5pv210.dtsi
77 +@@ -461,6 +461,7 @@
78 + compatible = "samsung,exynos4210-ohci";
79 + reg = <0xec300000 0x100>;
80 + interrupts = <23>;
81 ++ interrupt-parent = <&vic1>;
82 + clocks = <&clocks CLK_USB_HOST>;
83 + clock-names = "usbhost";
84 + #address-cells = <1>;
85 +diff --git a/arch/arm/boot/dts/spear1310-evb.dts b/arch/arm/boot/dts/spear1310-evb.dts
86 +index e48857249ce7..3d83992efd90 100644
87 +--- a/arch/arm/boot/dts/spear1310-evb.dts
88 ++++ b/arch/arm/boot/dts/spear1310-evb.dts
89 +@@ -349,7 +349,7 @@
90 + spi0: spi@e0100000 {
91 + status = "okay";
92 + num-cs = <3>;
93 +- cs-gpios = <&gpio1 7 0>, <&spics 0>, <&spics 1>;
94 ++ cs-gpios = <&gpio1 7 0>, <&spics 0 0>, <&spics 1 0>;
95 +
96 + stmpe610@0 {
97 + compatible = "st,stmpe610";
98 +diff --git a/arch/arm/boot/dts/spear1340.dtsi b/arch/arm/boot/dts/spear1340.dtsi
99 +index df2232d767ed..6361cbfcbe5e 100644
100 +--- a/arch/arm/boot/dts/spear1340.dtsi
101 ++++ b/arch/arm/boot/dts/spear1340.dtsi
102 +@@ -141,8 +141,8 @@
103 + reg = <0xb4100000 0x1000>;
104 + interrupts = <0 105 0x4>;
105 + status = "disabled";
106 +- dmas = <&dwdma0 0x600 0 0 1>, /* 0xC << 11 */
107 +- <&dwdma0 0x680 0 1 0>; /* 0xD << 7 */
108 ++ dmas = <&dwdma0 12 0 1>,
109 ++ <&dwdma0 13 1 0>;
110 + dma-names = "tx", "rx";
111 + };
112 +
113 +diff --git a/arch/arm/boot/dts/spear13xx.dtsi b/arch/arm/boot/dts/spear13xx.dtsi
114 +index 14594ce8c18a..8fd8a3328acb 100644
115 +--- a/arch/arm/boot/dts/spear13xx.dtsi
116 ++++ b/arch/arm/boot/dts/spear13xx.dtsi
117 +@@ -100,7 +100,7 @@
118 + reg = <0xb2800000 0x1000>;
119 + interrupts = <0 29 0x4>;
120 + status = "disabled";
121 +- dmas = <&dwdma0 0 0 0 0>;
122 ++ dmas = <&dwdma0 0 0 0>;
123 + dma-names = "data";
124 + };
125 +
126 +@@ -288,8 +288,8 @@
127 + #size-cells = <0>;
128 + interrupts = <0 31 0x4>;
129 + status = "disabled";
130 +- dmas = <&dwdma0 0x2000 0 0 0>, /* 0x4 << 11 */
131 +- <&dwdma0 0x0280 0 0 0>; /* 0x5 << 7 */
132 ++ dmas = <&dwdma0 4 0 0>,
133 ++ <&dwdma0 5 0 0>;
134 + dma-names = "tx", "rx";
135 + };
136 +
137 +diff --git a/arch/arm/boot/dts/spear600.dtsi b/arch/arm/boot/dts/spear600.dtsi
138 +index 9f60a7b6a42b..bd379034993c 100644
139 +--- a/arch/arm/boot/dts/spear600.dtsi
140 ++++ b/arch/arm/boot/dts/spear600.dtsi
141 +@@ -194,6 +194,7 @@
142 + rtc@fc900000 {
143 + compatible = "st,spear600-rtc";
144 + reg = <0xfc900000 0x1000>;
145 ++ interrupt-parent = <&vic0>;
146 + interrupts = <10>;
147 + status = "disabled";
148 + };
149 +diff --git a/arch/arm/boot/dts/stih407.dtsi b/arch/arm/boot/dts/stih407.dtsi
150 +index d60f0d8add26..e4b508ce38a2 100644
151 +--- a/arch/arm/boot/dts/stih407.dtsi
152 ++++ b/arch/arm/boot/dts/stih407.dtsi
153 +@@ -8,6 +8,7 @@
154 + */
155 + #include "stih407-clock.dtsi"
156 + #include "stih407-family.dtsi"
157 ++#include <dt-bindings/gpio/gpio.h>
158 + / {
159 + soc {
160 + sti-display-subsystem {
161 +@@ -112,7 +113,7 @@
162 + <&clk_s_d2_quadfs 0>,
163 + <&clk_s_d2_quadfs 1>;
164 +
165 +- hdmi,hpd-gpio = <&pio5 3>;
166 ++ hdmi,hpd-gpio = <&pio5 3 GPIO_ACTIVE_LOW>;
167 + reset-names = "hdmi";
168 + resets = <&softreset STIH407_HDMI_TX_PHY_SOFTRESET>;
169 + ddc = <&hdmiddc>;
170 +diff --git a/arch/arm/boot/dts/stih410.dtsi b/arch/arm/boot/dts/stih410.dtsi
171 +index 40318869c733..3c32fb8cdcac 100644
172 +--- a/arch/arm/boot/dts/stih410.dtsi
173 ++++ b/arch/arm/boot/dts/stih410.dtsi
174 +@@ -9,6 +9,7 @@
175 + #include "stih410-clock.dtsi"
176 + #include "stih407-family.dtsi"
177 + #include "stih410-pinctrl.dtsi"
178 ++#include <dt-bindings/gpio/gpio.h>
179 + / {
180 + aliases {
181 + bdisp0 = &bdisp0;
182 +@@ -203,7 +204,7 @@
183 + <&clk_s_d2_quadfs 0>,
184 + <&clk_s_d2_quadfs 1>;
185 +
186 +- hdmi,hpd-gpio = <&pio5 3>;
187 ++ hdmi,hpd-gpio = <&pio5 3 GPIO_ACTIVE_LOW>;
188 + reset-names = "hdmi";
189 + resets = <&softreset STIH407_HDMI_TX_PHY_SOFTRESET>;
190 + ddc = <&hdmiddc>;
191 +diff --git a/arch/arm/mach-pxa/tosa-bt.c b/arch/arm/mach-pxa/tosa-bt.c
192 +index e0a53208880a..b59a7a2df4e3 100644
193 +--- a/arch/arm/mach-pxa/tosa-bt.c
194 ++++ b/arch/arm/mach-pxa/tosa-bt.c
195 +@@ -132,3 +132,7 @@ static struct platform_driver tosa_bt_driver = {
196 + },
197 + };
198 + module_platform_driver(tosa_bt_driver);
199 ++
200 ++MODULE_LICENSE("GPL");
201 ++MODULE_AUTHOR("Dmitry Baryshkov");
202 ++MODULE_DESCRIPTION("Bluetooth built-in chip control");
203 +diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c
204 +index 0176ebc97bfd..86f934255eb6 100644
205 +--- a/arch/s390/kernel/compat_linux.c
206 ++++ b/arch/s390/kernel/compat_linux.c
207 +@@ -110,7 +110,7 @@ COMPAT_SYSCALL_DEFINE2(s390_setregid16, u16, rgid, u16, egid)
208 +
209 + COMPAT_SYSCALL_DEFINE1(s390_setgid16, u16, gid)
210 + {
211 +- return sys_setgid((gid_t)gid);
212 ++ return sys_setgid(low2highgid(gid));
213 + }
214 +
215 + COMPAT_SYSCALL_DEFINE2(s390_setreuid16, u16, ruid, u16, euid)
216 +@@ -120,7 +120,7 @@ COMPAT_SYSCALL_DEFINE2(s390_setreuid16, u16, ruid, u16, euid)
217 +
218 + COMPAT_SYSCALL_DEFINE1(s390_setuid16, u16, uid)
219 + {
220 +- return sys_setuid((uid_t)uid);
221 ++ return sys_setuid(low2highuid(uid));
222 + }
223 +
224 + COMPAT_SYSCALL_DEFINE3(s390_setresuid16, u16, ruid, u16, euid, u16, suid)
225 +@@ -173,12 +173,12 @@ COMPAT_SYSCALL_DEFINE3(s390_getresgid16, u16 __user *, rgidp,
226 +
227 + COMPAT_SYSCALL_DEFINE1(s390_setfsuid16, u16, uid)
228 + {
229 +- return sys_setfsuid((uid_t)uid);
230 ++ return sys_setfsuid(low2highuid(uid));
231 + }
232 +
233 + COMPAT_SYSCALL_DEFINE1(s390_setfsgid16, u16, gid)
234 + {
235 +- return sys_setfsgid((gid_t)gid);
236 ++ return sys_setfsgid(low2highgid(gid));
237 + }
238 +
239 + static int groups16_to_user(u16 __user *grouplist, struct group_info *group_info)
240 +diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
241 +index 86bccb4bd4dc..9e77cea2a8ef 100644
242 +--- a/arch/x86/include/asm/processor.h
243 ++++ b/arch/x86/include/asm/processor.h
244 +@@ -113,7 +113,7 @@ struct cpuinfo_x86 {
245 + char x86_vendor_id[16];
246 + char x86_model_id[64];
247 + /* in KB - valid for CPUS which support this call: */
248 +- int x86_cache_size;
249 ++ unsigned int x86_cache_size;
250 + int x86_cache_alignment; /* In bytes */
251 + /* Cache QoS architectural values: */
252 + int x86_cache_max_rmid; /* max index */
253 +diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
254 +index f7f2ad3687ee..8eabbafff213 100644
255 +--- a/arch/x86/kernel/cpu/common.c
256 ++++ b/arch/x86/kernel/cpu/common.c
257 +@@ -955,7 +955,7 @@ static void identify_cpu(struct cpuinfo_x86 *c)
258 + int i;
259 +
260 + c->loops_per_jiffy = loops_per_jiffy;
261 +- c->x86_cache_size = -1;
262 ++ c->x86_cache_size = 0;
263 + c->x86_vendor = X86_VENDOR_UNKNOWN;
264 + c->x86_model = c->x86_mask = 0; /* So far unknown... */
265 + c->x86_vendor_id[0] = '\0'; /* Unset */
266 +diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c
267 +index 2c76a1801393..2f38a99cdb98 100644
268 +--- a/arch/x86/kernel/cpu/microcode/intel.c
269 ++++ b/arch/x86/kernel/cpu/microcode/intel.c
270 +@@ -1075,7 +1075,7 @@ static struct microcode_ops microcode_intel_ops = {
271 +
272 + static int __init calc_llc_size_per_core(struct cpuinfo_x86 *c)
273 + {
274 +- u64 llc_size = c->x86_cache_size * 1024;
275 ++ u64 llc_size = c->x86_cache_size * 1024ULL;
276 +
277 + do_div(llc_size, c->x86_max_cores);
278 +
279 +diff --git a/arch/x86/kernel/cpu/proc.c b/arch/x86/kernel/cpu/proc.c
280 +index 18ca99f2798b..935225c0375f 100644
281 +--- a/arch/x86/kernel/cpu/proc.c
282 ++++ b/arch/x86/kernel/cpu/proc.c
283 +@@ -87,8 +87,8 @@ static int show_cpuinfo(struct seq_file *m, void *v)
284 + }
285 +
286 + /* Cache size */
287 +- if (c->x86_cache_size >= 0)
288 +- seq_printf(m, "cache size\t: %d KB\n", c->x86_cache_size);
289 ++ if (c->x86_cache_size)
290 ++ seq_printf(m, "cache size\t: %u KB\n", c->x86_cache_size);
291 +
292 + show_cpuinfo_core(m, c, cpu);
293 + show_cpuinfo_misc(m, c);
294 +diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
295 +index 1049c3c9b877..2b71f2c03b9e 100644
296 +--- a/arch/x86/kvm/mmu.c
297 ++++ b/arch/x86/kvm/mmu.c
298 +@@ -4503,7 +4503,7 @@ void kvm_mmu_setup(struct kvm_vcpu *vcpu)
299 + typedef bool (*slot_level_handler) (struct kvm *kvm, unsigned long *rmap);
300 +
301 + /* The caller should hold mmu-lock before calling this function. */
302 +-static bool
303 ++static __always_inline bool
304 + slot_handle_level_range(struct kvm *kvm, struct kvm_memory_slot *memslot,
305 + slot_level_handler fn, int start_level, int end_level,
306 + gfn_t start_gfn, gfn_t end_gfn, bool lock_flush_tlb)
307 +@@ -4533,7 +4533,7 @@ slot_handle_level_range(struct kvm *kvm, struct kvm_memory_slot *memslot,
308 + return flush;
309 + }
310 +
311 +-static bool
312 ++static __always_inline bool
313 + slot_handle_level(struct kvm *kvm, struct kvm_memory_slot *memslot,
314 + slot_level_handler fn, int start_level, int end_level,
315 + bool lock_flush_tlb)
316 +@@ -4544,7 +4544,7 @@ slot_handle_level(struct kvm *kvm, struct kvm_memory_slot *memslot,
317 + lock_flush_tlb);
318 + }
319 +
320 +-static bool
321 ++static __always_inline bool
322 + slot_handle_all_level(struct kvm *kvm, struct kvm_memory_slot *memslot,
323 + slot_level_handler fn, bool lock_flush_tlb)
324 + {
325 +@@ -4552,7 +4552,7 @@ slot_handle_all_level(struct kvm *kvm, struct kvm_memory_slot *memslot,
326 + PT_MAX_HUGEPAGE_LEVEL, lock_flush_tlb);
327 + }
328 +
329 +-static bool
330 ++static __always_inline bool
331 + slot_handle_large_level(struct kvm *kvm, struct kvm_memory_slot *memslot,
332 + slot_level_handler fn, bool lock_flush_tlb)
333 + {
334 +@@ -4560,7 +4560,7 @@ slot_handle_large_level(struct kvm *kvm, struct kvm_memory_slot *memslot,
335 + PT_MAX_HUGEPAGE_LEVEL, lock_flush_tlb);
336 + }
337 +
338 +-static bool
339 ++static __always_inline bool
340 + slot_handle_leaf(struct kvm *kvm, struct kvm_memory_slot *memslot,
341 + slot_level_handler fn, bool lock_flush_tlb)
342 + {
343 +diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
344 +index ca848cc6a8fd..4f6fc1cfd7da 100644
345 +--- a/drivers/devfreq/devfreq.c
346 ++++ b/drivers/devfreq/devfreq.c
347 +@@ -583,7 +583,7 @@ struct devfreq *devm_devfreq_add_device(struct device *dev,
348 + devfreq = devfreq_add_device(dev, profile, governor_name, data);
349 + if (IS_ERR(devfreq)) {
350 + devres_free(ptr);
351 +- return ERR_PTR(-ENOMEM);
352 ++ return devfreq;
353 + }
354 +
355 + *ptr = devfreq;
356 +diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c b/drivers/gpu/drm/radeon/radeon_uvd.c
357 +index 6edcb5485092..b35ebabd6a9f 100644
358 +--- a/drivers/gpu/drm/radeon/radeon_uvd.c
359 ++++ b/drivers/gpu/drm/radeon/radeon_uvd.c
360 +@@ -946,7 +946,7 @@ int radeon_uvd_calc_upll_dividers(struct radeon_device *rdev,
361 + /* calc dclk divider with current vco freq */
362 + dclk_div = radeon_uvd_calc_upll_post_div(vco_freq, dclk,
363 + pd_min, pd_even);
364 +- if (vclk_div > pd_max)
365 ++ if (dclk_div > pd_max)
366 + break; /* vco is too big, it has to stop */
367 +
368 + /* calc score with current vco freq */
369 +diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c
370 +index 8763fb832b01..5a2a0b5db938 100644
371 +--- a/drivers/infiniband/hw/mlx4/main.c
372 ++++ b/drivers/infiniband/hw/mlx4/main.c
373 +@@ -2483,9 +2483,8 @@ err_steer_free_bitmap:
374 + kfree(ibdev->ib_uc_qpns_bitmap);
375 +
376 + err_steer_qp_release:
377 +- if (ibdev->steering_support == MLX4_STEERING_MODE_DEVICE_MANAGED)
378 +- mlx4_qp_release_range(dev, ibdev->steer_qpn_base,
379 +- ibdev->steer_qpn_count);
380 ++ mlx4_qp_release_range(dev, ibdev->steer_qpn_base,
381 ++ ibdev->steer_qpn_count);
382 + err_counter:
383 + for (i = 0; i < ibdev->num_ports; ++i)
384 + mlx4_ib_delete_counters_table(ibdev, &ibdev->counters_table[i]);
385 +@@ -2586,11 +2585,9 @@ static void mlx4_ib_remove(struct mlx4_dev *dev, void *ibdev_ptr)
386 + ibdev->iboe.nb.notifier_call = NULL;
387 + }
388 +
389 +- if (ibdev->steering_support == MLX4_STEERING_MODE_DEVICE_MANAGED) {
390 +- mlx4_qp_release_range(dev, ibdev->steer_qpn_base,
391 +- ibdev->steer_qpn_count);
392 +- kfree(ibdev->ib_uc_qpns_bitmap);
393 +- }
394 ++ mlx4_qp_release_range(dev, ibdev->steer_qpn_base,
395 ++ ibdev->steer_qpn_count);
396 ++ kfree(ibdev->ib_uc_qpns_bitmap);
397 +
398 + iounmap(ibdev->uar_map);
399 + for (p = 0; p < ibdev->num_ports; ++p)
400 +diff --git a/drivers/md/dm.c b/drivers/md/dm.c
401 +index 9ec6948e3b8b..3d9a80759d95 100644
402 +--- a/drivers/md/dm.c
403 ++++ b/drivers/md/dm.c
404 +@@ -974,7 +974,8 @@ static void dec_pending(struct dm_io *io, int error)
405 + } else {
406 + /* done with normal IO or empty flush */
407 + trace_block_bio_complete(md->queue, bio, io_error);
408 +- bio->bi_error = io_error;
409 ++ if (io_error)
410 ++ bio->bi_error = io_error;
411 + bio_endio(bio);
412 + }
413 + }
414 +diff --git a/drivers/media/tuners/r820t.c b/drivers/media/tuners/r820t.c
415 +index a7a8452e99d2..c1ce8d3ce877 100644
416 +--- a/drivers/media/tuners/r820t.c
417 ++++ b/drivers/media/tuners/r820t.c
418 +@@ -410,9 +410,11 @@ static int r820t_write(struct r820t_priv *priv, u8 reg, const u8 *val,
419 + return 0;
420 + }
421 +
422 +-static int r820t_write_reg(struct r820t_priv *priv, u8 reg, u8 val)
423 ++static inline int r820t_write_reg(struct r820t_priv *priv, u8 reg, u8 val)
424 + {
425 +- return r820t_write(priv, reg, &val, 1);
426 ++ u8 tmp = val; /* work around GCC PR81715 with asan-stack=1 */
427 ++
428 ++ return r820t_write(priv, reg, &tmp, 1);
429 + }
430 +
431 + static int r820t_read_cache_reg(struct r820t_priv *priv, int reg)
432 +@@ -425,17 +427,18 @@ static int r820t_read_cache_reg(struct r820t_priv *priv, int reg)
433 + return -EINVAL;
434 + }
435 +
436 +-static int r820t_write_reg_mask(struct r820t_priv *priv, u8 reg, u8 val,
437 ++static inline int r820t_write_reg_mask(struct r820t_priv *priv, u8 reg, u8 val,
438 + u8 bit_mask)
439 + {
440 ++ u8 tmp = val;
441 + int rc = r820t_read_cache_reg(priv, reg);
442 +
443 + if (rc < 0)
444 + return rc;
445 +
446 +- val = (rc & ~bit_mask) | (val & bit_mask);
447 ++ tmp = (rc & ~bit_mask) | (tmp & bit_mask);
448 +
449 +- return r820t_write(priv, reg, &val, 1);
450 ++ return r820t_write(priv, reg, &tmp, 1);
451 + }
452 +
453 + static int r820t_read(struct r820t_priv *priv, u8 reg, u8 *val, int len)
454 +diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c
455 +index 4f34e1b79705..ac92685dd4e5 100644
456 +--- a/drivers/net/ethernet/marvell/mvpp2.c
457 ++++ b/drivers/net/ethernet/marvell/mvpp2.c
458 +@@ -5666,6 +5666,7 @@ static void mvpp2_set_rx_mode(struct net_device *dev)
459 + int id = port->id;
460 + bool allmulti = dev->flags & IFF_ALLMULTI;
461 +
462 ++retry:
463 + mvpp2_prs_mac_promisc_set(priv, id, dev->flags & IFF_PROMISC);
464 + mvpp2_prs_mac_multi_set(priv, id, MVPP2_PE_MAC_MC_ALL, allmulti);
465 + mvpp2_prs_mac_multi_set(priv, id, MVPP2_PE_MAC_MC_IP6, allmulti);
466 +@@ -5673,9 +5674,13 @@ static void mvpp2_set_rx_mode(struct net_device *dev)
467 + /* Remove all port->id's mcast enries */
468 + mvpp2_prs_mcast_del_all(priv, id);
469 +
470 +- if (allmulti && !netdev_mc_empty(dev)) {
471 +- netdev_for_each_mc_addr(ha, dev)
472 +- mvpp2_prs_mac_da_accept(priv, id, ha->addr, true);
473 ++ if (!allmulti) {
474 ++ netdev_for_each_mc_addr(ha, dev) {
475 ++ if (mvpp2_prs_mac_da_accept(priv, id, ha->addr, true)) {
476 ++ allmulti = true;
477 ++ goto retry;
478 ++ }
479 ++ }
480 + }
481 + }
482 +
483 +diff --git a/drivers/net/ethernet/mellanox/mlx4/qp.c b/drivers/net/ethernet/mellanox/mlx4/qp.c
484 +index 168823dde79f..d8359ffba026 100644
485 +--- a/drivers/net/ethernet/mellanox/mlx4/qp.c
486 ++++ b/drivers/net/ethernet/mellanox/mlx4/qp.c
487 +@@ -280,6 +280,9 @@ void mlx4_qp_release_range(struct mlx4_dev *dev, int base_qpn, int cnt)
488 + u64 in_param = 0;
489 + int err;
490 +
491 ++ if (!cnt)
492 ++ return;
493 ++
494 + if (mlx4_is_mfunc(dev)) {
495 + set_param_l(&in_param, base_qpn);
496 + set_param_h(&in_param, cnt);
497 +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c
498 +index 738d541a2255..348ed1b0e58b 100644
499 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c
500 ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c
501 +@@ -1127,7 +1127,7 @@ static u8 _rtl8821ae_dbi_read(struct rtl_priv *rtlpriv, u16 addr)
502 + }
503 + if (0 == tmp) {
504 + read_addr = REG_DBI_RDATA + addr % 4;
505 +- ret = rtl_read_word(rtlpriv, read_addr);
506 ++ ret = rtl_read_byte(rtlpriv, read_addr);
507 + }
508 + return ret;
509 + }
510 +@@ -1169,7 +1169,8 @@ static void _rtl8821ae_enable_aspm_back_door(struct ieee80211_hw *hw)
511 + }
512 +
513 + tmp = _rtl8821ae_dbi_read(rtlpriv, 0x70f);
514 +- _rtl8821ae_dbi_write(rtlpriv, 0x70f, tmp | BIT(7));
515 ++ _rtl8821ae_dbi_write(rtlpriv, 0x70f, tmp | BIT(7) |
516 ++ ASPM_L1_LATENCY << 3);
517 +
518 + tmp = _rtl8821ae_dbi_read(rtlpriv, 0x719);
519 + _rtl8821ae_dbi_write(rtlpriv, 0x719, tmp | BIT(3) | BIT(4));
520 +diff --git a/drivers/net/wireless/realtek/rtlwifi/wifi.h b/drivers/net/wireless/realtek/rtlwifi/wifi.h
521 +index b6faf624480e..d676d055feda 100644
522 +--- a/drivers/net/wireless/realtek/rtlwifi/wifi.h
523 ++++ b/drivers/net/wireless/realtek/rtlwifi/wifi.h
524 +@@ -99,6 +99,7 @@
525 + #define RTL_USB_MAX_RX_COUNT 100
526 + #define QBSS_LOAD_SIZE 5
527 + #define MAX_WMMELE_LENGTH 64
528 ++#define ASPM_L1_LATENCY 7
529 +
530 + #define TOTAL_CAM_ENTRY 32
531 +
532 +diff --git a/drivers/rtc/rtc-opal.c b/drivers/rtc/rtc-opal.c
533 +index df39ce02a99d..229dd2fe8f45 100644
534 +--- a/drivers/rtc/rtc-opal.c
535 ++++ b/drivers/rtc/rtc-opal.c
536 +@@ -58,6 +58,7 @@ static void tm_to_opal(struct rtc_time *tm, u32 *y_m_d, u64 *h_m_s_ms)
537 + static int opal_get_rtc_time(struct device *dev, struct rtc_time *tm)
538 + {
539 + long rc = OPAL_BUSY;
540 ++ int retries = 10;
541 + u32 y_m_d;
542 + u64 h_m_s_ms;
543 + __be32 __y_m_d;
544 +@@ -67,8 +68,11 @@ static int opal_get_rtc_time(struct device *dev, struct rtc_time *tm)
545 + rc = opal_rtc_read(&__y_m_d, &__h_m_s_ms);
546 + if (rc == OPAL_BUSY_EVENT)
547 + opal_poll_events(NULL);
548 +- else
549 ++ else if (retries-- && (rc == OPAL_HARDWARE
550 ++ || rc == OPAL_INTERNAL_ERROR))
551 + msleep(10);
552 ++ else if (rc != OPAL_BUSY && rc != OPAL_BUSY_EVENT)
553 ++ break;
554 + }
555 +
556 + if (rc != OPAL_SUCCESS)
557 +@@ -84,6 +88,7 @@ static int opal_get_rtc_time(struct device *dev, struct rtc_time *tm)
558 + static int opal_set_rtc_time(struct device *dev, struct rtc_time *tm)
559 + {
560 + long rc = OPAL_BUSY;
561 ++ int retries = 10;
562 + u32 y_m_d = 0;
563 + u64 h_m_s_ms = 0;
564 +
565 +@@ -92,8 +97,11 @@ static int opal_set_rtc_time(struct device *dev, struct rtc_time *tm)
566 + rc = opal_rtc_write(y_m_d, h_m_s_ms);
567 + if (rc == OPAL_BUSY_EVENT)
568 + opal_poll_events(NULL);
569 +- else
570 ++ else if (retries-- && (rc == OPAL_HARDWARE
571 ++ || rc == OPAL_INTERNAL_ERROR))
572 + msleep(10);
573 ++ else if (rc != OPAL_BUSY && rc != OPAL_BUSY_EVENT)
574 ++ break;
575 + }
576 +
577 + return rc == OPAL_SUCCESS ? 0 : -EIO;
578 +diff --git a/drivers/video/console/dummycon.c b/drivers/video/console/dummycon.c
579 +index 0efc52f11ad0..b30e7d87804b 100644
580 +--- a/drivers/video/console/dummycon.c
581 ++++ b/drivers/video/console/dummycon.c
582 +@@ -68,7 +68,6 @@ const struct consw dummy_con = {
583 + .con_switch = DUMMY,
584 + .con_blank = DUMMY,
585 + .con_font_set = DUMMY,
586 +- .con_font_get = DUMMY,
587 + .con_font_default = DUMMY,
588 + .con_font_copy = DUMMY,
589 + .con_set_palette = DUMMY,
590 +diff --git a/drivers/video/fbdev/atmel_lcdfb.c b/drivers/video/fbdev/atmel_lcdfb.c
591 +index 19eb42b57d87..a6da82648c92 100644
592 +--- a/drivers/video/fbdev/atmel_lcdfb.c
593 ++++ b/drivers/video/fbdev/atmel_lcdfb.c
594 +@@ -1120,7 +1120,7 @@ static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo)
595 + goto put_display_node;
596 + }
597 +
598 +- timings_np = of_find_node_by_name(display_np, "display-timings");
599 ++ timings_np = of_get_child_by_name(display_np, "display-timings");
600 + if (!timings_np) {
601 + dev_err(dev, "failed to find display-timings node\n");
602 + ret = -ENODEV;
603 +@@ -1141,6 +1141,12 @@ static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo)
604 + fb_add_videomode(&fb_vm, &info->modelist);
605 + }
606 +
607 ++ /*
608 ++ * FIXME: Make sure we are not referencing any fields in display_np
609 ++ * and timings_np and drop our references to them before returning to
610 ++ * avoid leaking the nodes on probe deferral and driver unbind.
611 ++ */
612 ++
613 + return 0;
614 +
615 + put_timings_node:
616 +diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
617 +index 86d209fc4992..81b5a461d94e 100644
618 +--- a/fs/btrfs/inode.c
619 ++++ b/fs/btrfs/inode.c
620 +@@ -1292,8 +1292,11 @@ next_slot:
621 + leaf = path->nodes[0];
622 + if (path->slots[0] >= btrfs_header_nritems(leaf)) {
623 + ret = btrfs_next_leaf(root, path);
624 +- if (ret < 0)
625 ++ if (ret < 0) {
626 ++ if (cow_start != (u64)-1)
627 ++ cur_offset = cow_start;
628 + goto error;
629 ++ }
630 + if (ret > 0)
631 + break;
632 + leaf = path->nodes[0];
633 +diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
634 +index ee7832e2d39d..d6359af9789d 100644
635 +--- a/fs/btrfs/tree-log.c
636 ++++ b/fs/btrfs/tree-log.c
637 +@@ -26,6 +26,7 @@
638 + #include "print-tree.h"
639 + #include "backref.h"
640 + #include "hash.h"
641 ++#include "inode-map.h"
642 +
643 + /* magic values for the inode_only field in btrfs_log_inode:
644 + *
645 +@@ -2445,6 +2446,9 @@ static noinline int walk_down_log_tree(struct btrfs_trans_handle *trans,
646 + next);
647 + btrfs_wait_tree_block_writeback(next);
648 + btrfs_tree_unlock(next);
649 ++ } else {
650 ++ if (test_and_clear_bit(EXTENT_BUFFER_DIRTY, &next->bflags))
651 ++ clear_extent_buffer_dirty(next);
652 + }
653 +
654 + WARN_ON(root_owner !=
655 +@@ -2524,6 +2528,9 @@ static noinline int walk_up_log_tree(struct btrfs_trans_handle *trans,
656 + next);
657 + btrfs_wait_tree_block_writeback(next);
658 + btrfs_tree_unlock(next);
659 ++ } else {
660 ++ if (test_and_clear_bit(EXTENT_BUFFER_DIRTY, &next->bflags))
661 ++ clear_extent_buffer_dirty(next);
662 + }
663 +
664 + WARN_ON(root_owner != BTRFS_TREE_LOG_OBJECTID);
665 +@@ -2600,6 +2607,9 @@ static int walk_log_tree(struct btrfs_trans_handle *trans,
666 + clean_tree_block(trans, log->fs_info, next);
667 + btrfs_wait_tree_block_writeback(next);
668 + btrfs_tree_unlock(next);
669 ++ } else {
670 ++ if (test_and_clear_bit(EXTENT_BUFFER_DIRTY, &next->bflags))
671 ++ clear_extent_buffer_dirty(next);
672 + }
673 +
674 + WARN_ON(log->root_key.objectid !=
675 +@@ -5514,6 +5524,23 @@ again:
676 + path);
677 + }
678 +
679 ++ if (!ret && wc.stage == LOG_WALK_REPLAY_ALL) {
680 ++ struct btrfs_root *root = wc.replay_dest;
681 ++
682 ++ btrfs_release_path(path);
683 ++
684 ++ /*
685 ++ * We have just replayed everything, and the highest
686 ++ * objectid of fs roots probably has changed in case
687 ++ * some inode_item's got replayed.
688 ++ *
689 ++ * root->objectid_mutex is not acquired as log replay
690 ++ * could only happen during mount.
691 ++ */
692 ++ ret = btrfs_find_highest_objectid(root,
693 ++ &root->highest_objectid);
694 ++ }
695 ++
696 + key.offset = found_key.offset - 1;
697 + wc.replay_dest->log_root = NULL;
698 + free_extent_buffer(log->node);
699 +diff --git a/fs/ext4/super.c b/fs/ext4/super.c
700 +index 8bdb0cc2722f..742455292dfe 100644
701 +--- a/fs/ext4/super.c
702 ++++ b/fs/ext4/super.c
703 +@@ -688,6 +688,7 @@ __acquires(bitlock)
704 + }
705 +
706 + ext4_unlock_group(sb, grp);
707 ++ ext4_commit_super(sb, 1);
708 + ext4_handle_error(sb);
709 + /*
710 + * We only get here in the ERRORS_RO case; relocking the group
711 +diff --git a/fs/namei.c b/fs/namei.c
712 +index 3f96ae087488..844da20232b9 100644
713 +--- a/fs/namei.c
714 ++++ b/fs/namei.c
715 +@@ -2000,6 +2000,9 @@ static const char *path_init(struct nameidata *nd, unsigned flags)
716 + int retval = 0;
717 + const char *s = nd->name->name;
718 +
719 ++ if (!*s)
720 ++ flags &= ~LOOKUP_RCU;
721 ++
722 + nd->last_type = LAST_ROOT; /* if there are only slashes... */
723 + nd->flags = flags | LOOKUP_JUMPED | LOOKUP_PARENT;
724 + nd->depth = 0;
725 +diff --git a/include/linux/kaiser.h b/include/linux/kaiser.h
726 +index 58c55b1589d0..b56c19010480 100644
727 +--- a/include/linux/kaiser.h
728 ++++ b/include/linux/kaiser.h
729 +@@ -32,7 +32,7 @@ static inline void kaiser_init(void)
730 + {
731 + }
732 + static inline int kaiser_add_mapping(unsigned long addr,
733 +- unsigned long size, unsigned long flags)
734 ++ unsigned long size, u64 flags)
735 + {
736 + return 0;
737 + }
738 +diff --git a/mm/memory.c b/mm/memory.c
739 +index 9ac55172aa7b..31ca97f7ebbc 100644
740 +--- a/mm/memory.c
741 ++++ b/mm/memory.c
742 +@@ -72,7 +72,7 @@
743 +
744 + #include "internal.h"
745 +
746 +-#ifdef LAST_CPUPID_NOT_IN_PAGE_FLAGS
747 ++#if defined(LAST_CPUPID_NOT_IN_PAGE_FLAGS) && !defined(CONFIG_COMPILE_TEST)
748 + #warning Unfortunate NUMA and NUMA Balancing config, growing page-frame for last_cpupid.
749 + #endif
750 +
751 +diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c
752 +index 7bb9fe7a2c8e..167b943469ab 100644
753 +--- a/sound/core/seq/seq_clientmgr.c
754 ++++ b/sound/core/seq/seq_clientmgr.c
755 +@@ -1012,7 +1012,7 @@ static ssize_t snd_seq_write(struct file *file, const char __user *buf,
756 + {
757 + struct snd_seq_client *client = file->private_data;
758 + int written = 0, len;
759 +- int err = -EINVAL;
760 ++ int err;
761 + struct snd_seq_event event;
762 +
763 + if (!(snd_seq_file_flags(file) & SNDRV_SEQ_LFLG_OUTPUT))
764 +@@ -1027,11 +1027,15 @@ static ssize_t snd_seq_write(struct file *file, const char __user *buf,
765 +
766 + /* allocate the pool now if the pool is not allocated yet */
767 + if (client->pool->size > 0 && !snd_seq_write_pool_allocated(client)) {
768 +- if (snd_seq_pool_init(client->pool) < 0)
769 ++ mutex_lock(&client->ioctl_mutex);
770 ++ err = snd_seq_pool_init(client->pool);
771 ++ mutex_unlock(&client->ioctl_mutex);
772 ++ if (err < 0)
773 + return -ENOMEM;
774 + }
775 +
776 + /* only process whole events */
777 ++ err = -EINVAL;
778 + while (count >= sizeof(struct snd_seq_event)) {
779 + /* Read in the event header from the user */
780 + len = sizeof(event);
781 +@@ -2196,7 +2200,6 @@ static int snd_seq_do_ioctl(struct snd_seq_client *client, unsigned int cmd,
782 + void __user *arg)
783 + {
784 + struct seq_ioctl_table *p;
785 +- int ret;
786 +
787 + switch (cmd) {
788 + case SNDRV_SEQ_IOCTL_PVERSION:
789 +@@ -2210,12 +2213,8 @@ static int snd_seq_do_ioctl(struct snd_seq_client *client, unsigned int cmd,
790 + if (! arg)
791 + return -EFAULT;
792 + for (p = ioctl_tables; p->cmd; p++) {
793 +- if (p->cmd == cmd) {
794 +- mutex_lock(&client->ioctl_mutex);
795 +- ret = p->func(client, arg);
796 +- mutex_unlock(&client->ioctl_mutex);
797 +- return ret;
798 +- }
799 ++ if (p->cmd == cmd)
800 ++ return p->func(client, arg);
801 + }
802 + pr_debug("ALSA: seq unknown ioctl() 0x%x (type='%c', number=0x%02x)\n",
803 + cmd, _IOC_TYPE(cmd), _IOC_NR(cmd));
804 +@@ -2226,11 +2225,15 @@ static int snd_seq_do_ioctl(struct snd_seq_client *client, unsigned int cmd,
805 + static long snd_seq_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
806 + {
807 + struct snd_seq_client *client = file->private_data;
808 ++ long ret;
809 +
810 + if (snd_BUG_ON(!client))
811 + return -ENXIO;
812 +
813 +- return snd_seq_do_ioctl(client, cmd, (void __user *) arg);
814 ++ mutex_lock(&client->ioctl_mutex);
815 ++ ret = snd_seq_do_ioctl(client, cmd, (void __user *) arg);
816 ++ mutex_unlock(&client->ioctl_mutex);
817 ++ return ret;
818 + }
819 +
820 + #ifdef CONFIG_COMPAT
821 +diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
822 +index f14c1f288443..b302d056e5d3 100644
823 +--- a/sound/pci/hda/patch_realtek.c
824 ++++ b/sound/pci/hda/patch_realtek.c
825 +@@ -3130,6 +3130,19 @@ static void alc269_fixup_pincfg_no_hp_to_lineout(struct hda_codec *codec,
826 + spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;
827 + }
828 +
829 ++static void alc269_fixup_pincfg_U7x7_headset_mic(struct hda_codec *codec,
830 ++ const struct hda_fixup *fix,
831 ++ int action)
832 ++{
833 ++ unsigned int cfg_headphone = snd_hda_codec_get_pincfg(codec, 0x21);
834 ++ unsigned int cfg_headset_mic = snd_hda_codec_get_pincfg(codec, 0x19);
835 ++
836 ++ if (cfg_headphone && cfg_headset_mic == 0x411111f0)
837 ++ snd_hda_codec_set_pincfg(codec, 0x19,
838 ++ (cfg_headphone & ~AC_DEFCFG_DEVICE) |
839 ++ (AC_JACK_MIC_IN << AC_DEFCFG_DEVICE_SHIFT));
840 ++}
841 ++
842 + static void alc269_fixup_hweq(struct hda_codec *codec,
843 + const struct hda_fixup *fix, int action)
844 + {
845 +@@ -4782,6 +4795,7 @@ enum {
846 + ALC269_FIXUP_LIFEBOOK_EXTMIC,
847 + ALC269_FIXUP_LIFEBOOK_HP_PIN,
848 + ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT,
849 ++ ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC,
850 + ALC269_FIXUP_AMIC,
851 + ALC269_FIXUP_DMIC,
852 + ALC269VB_FIXUP_AMIC,
853 +@@ -4972,6 +4986,10 @@ static const struct hda_fixup alc269_fixups[] = {
854 + .type = HDA_FIXUP_FUNC,
855 + .v.func = alc269_fixup_pincfg_no_hp_to_lineout,
856 + },
857 ++ [ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC] = {
858 ++ .type = HDA_FIXUP_FUNC,
859 ++ .v.func = alc269_fixup_pincfg_U7x7_headset_mic,
860 ++ },
861 + [ALC269_FIXUP_AMIC] = {
862 + .type = HDA_FIXUP_PINS,
863 + .v.pins = (const struct hda_pintbl[]) {
864 +@@ -5687,6 +5705,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
865 + SND_PCI_QUIRK(0x10cf, 0x159f, "Lifebook E780", ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT),
866 + SND_PCI_QUIRK(0x10cf, 0x15dc, "Lifebook T731", ALC269_FIXUP_LIFEBOOK_HP_PIN),
867 + SND_PCI_QUIRK(0x10cf, 0x1757, "Lifebook E752", ALC269_FIXUP_LIFEBOOK_HP_PIN),
868 ++ SND_PCI_QUIRK(0x10cf, 0x1629, "Lifebook U7x7", ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC),
869 + SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC),
870 + SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC),
871 + SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_BXBT2807_MIC),
872 +@@ -5975,6 +5994,11 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
873 + {0x12, 0xb7a60130},
874 + {0x14, 0x90170110},
875 + {0x21, 0x02211020}),
876 ++ SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
877 ++ {0x12, 0x90a60130},
878 ++ {0x14, 0x90170110},
879 ++ {0x14, 0x01011020},
880 ++ {0x21, 0x0221101f}),
881 + SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
882 + ALC256_STANDARD_PINS),
883 + SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC280_FIXUP_HP_GPIO4,
884 +@@ -6031,6 +6055,10 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
885 + {0x12, 0x90a60120},
886 + {0x14, 0x90170110},
887 + {0x21, 0x0321101f}),
888 ++ SND_HDA_PIN_QUIRK(0x10ec0289, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
889 ++ {0x12, 0xb7a60130},
890 ++ {0x14, 0x90170110},
891 ++ {0x21, 0x04211020}),
892 + SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
893 + ALC290_STANDARD_PINS,
894 + {0x15, 0x04211040},
895 +diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
896 +index c9ae29068c7c..c5447ff078b3 100644
897 +--- a/sound/usb/mixer.c
898 ++++ b/sound/usb/mixer.c
899 +@@ -343,17 +343,20 @@ static int get_ctl_value_v2(struct usb_mixer_elem_info *cval, int request,
900 + int validx, int *value_ret)
901 + {
902 + struct snd_usb_audio *chip = cval->head.mixer->chip;
903 +- unsigned char buf[4 + 3 * sizeof(__u32)]; /* enough space for one range */
904 ++ /* enough space for one range */
905 ++ unsigned char buf[sizeof(__u16) + 3 * sizeof(__u32)];
906 + unsigned char *val;
907 +- int idx = 0, ret, size;
908 ++ int idx = 0, ret, val_size, size;
909 + __u8 bRequest;
910 +
911 ++ val_size = uac2_ctl_value_size(cval->val_type);
912 ++
913 + if (request == UAC_GET_CUR) {
914 + bRequest = UAC2_CS_CUR;
915 +- size = uac2_ctl_value_size(cval->val_type);
916 ++ size = val_size;
917 + } else {
918 + bRequest = UAC2_CS_RANGE;
919 +- size = sizeof(buf);
920 ++ size = sizeof(__u16) + 3 * val_size;
921 + }
922 +
923 + memset(buf, 0, sizeof(buf));
924 +@@ -386,16 +389,17 @@ error:
925 + val = buf + sizeof(__u16);
926 + break;
927 + case UAC_GET_MAX:
928 +- val = buf + sizeof(__u16) * 2;
929 ++ val = buf + sizeof(__u16) + val_size;
930 + break;
931 + case UAC_GET_RES:
932 +- val = buf + sizeof(__u16) * 3;
933 ++ val = buf + sizeof(__u16) + val_size * 2;
934 + break;
935 + default:
936 + return -EINVAL;
937 + }
938 +
939 +- *value_ret = convert_signed_value(cval, snd_usb_combine_bytes(val, sizeof(__u16)));
940 ++ *value_ret = convert_signed_value(cval,
941 ++ snd_usb_combine_bytes(val, val_size));
942 +
943 + return 0;
944 + }
945 +diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
946 +index 48afae053c56..8e8db4ddf365 100644
947 +--- a/sound/usb/pcm.c
948 ++++ b/sound/usb/pcm.c
949 +@@ -343,6 +343,15 @@ static int set_sync_ep_implicit_fb_quirk(struct snd_usb_substream *subs,
950 + ep = 0x81;
951 + iface = usb_ifnum_to_if(dev, 2);
952 +
953 ++ if (!iface || iface->num_altsetting == 0)
954 ++ return -EINVAL;
955 ++
956 ++ alts = &iface->altsetting[1];
957 ++ goto add_sync_ep;
958 ++ case USB_ID(0x1397, 0x0002):
959 ++ ep = 0x81;
960 ++ iface = usb_ifnum_to_if(dev, 1);
961 ++
962 + if (!iface || iface->num_altsetting == 0)
963 + return -EINVAL;
964 +