1 |
commit: 26fef560e07e6b1481f3dfc07e97794ca542aec1 |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jan 27 11:14:44 2021 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jan 27 11:14:44 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=26fef560 |
7 |
|
8 |
Linux patch 4.19.171 |
9 |
|
10 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
11 |
|
12 |
0000_README | 4 + |
13 |
1170_linux-4.19.171.patch | 1370 +++++++++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 1374 insertions(+) |
15 |
|
16 |
diff --git a/0000_README b/0000_README |
17 |
index a166692..1c1a372 100644 |
18 |
--- a/0000_README |
19 |
+++ b/0000_README |
20 |
@@ -719,6 +719,10 @@ Patch: 1169_linux-4.19.170.patch |
21 |
From: https://www.kernel.org |
22 |
Desc: Linux 4.19.170 |
23 |
|
24 |
+Patch: 1170_linux-4.19.171.patch |
25 |
+From: https://www.kernel.org |
26 |
+Desc: Linux 4.19.171 |
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/1170_linux-4.19.171.patch b/1170_linux-4.19.171.patch |
33 |
new file mode 100644 |
34 |
index 0000000..6c726b2 |
35 |
--- /dev/null |
36 |
+++ b/1170_linux-4.19.171.patch |
37 |
@@ -0,0 +1,1370 @@ |
38 |
+diff --git a/Makefile b/Makefile |
39 |
+index 7f56c62d31e8a..335b015c5c9ba 100644 |
40 |
+--- a/Makefile |
41 |
++++ b/Makefile |
42 |
+@@ -1,7 +1,7 @@ |
43 |
+ # SPDX-License-Identifier: GPL-2.0 |
44 |
+ VERSION = 4 |
45 |
+ PATCHLEVEL = 19 |
46 |
+-SUBLEVEL = 170 |
47 |
++SUBLEVEL = 171 |
48 |
+ EXTRAVERSION = |
49 |
+ NAME = "People's Front" |
50 |
+ |
51 |
+diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c |
52 |
+index 07060e5b58641..8aa901e20ca8e 100644 |
53 |
+--- a/arch/arm/xen/enlighten.c |
54 |
++++ b/arch/arm/xen/enlighten.c |
55 |
+@@ -405,7 +405,7 @@ static int __init xen_guest_init(void) |
56 |
+ } |
57 |
+ gnttab_init(); |
58 |
+ if (!xen_initial_domain()) |
59 |
+- xenbus_probe(NULL); |
60 |
++ xenbus_probe(); |
61 |
+ |
62 |
+ /* |
63 |
+ * Making sure board specific code will not set up ops for |
64 |
+diff --git a/arch/riscv/kernel/time.c b/arch/riscv/kernel/time.c |
65 |
+index 1911c8f6b8a69..15f4ab40e2221 100644 |
66 |
+--- a/arch/riscv/kernel/time.c |
67 |
++++ b/arch/riscv/kernel/time.c |
68 |
+@@ -12,6 +12,7 @@ |
69 |
+ * GNU General Public License for more details. |
70 |
+ */ |
71 |
+ |
72 |
++#include <linux/of_clk.h> |
73 |
+ #include <linux/clocksource.h> |
74 |
+ #include <linux/delay.h> |
75 |
+ #include <asm/sbi.h> |
76 |
+@@ -29,5 +30,7 @@ void __init time_init(void) |
77 |
+ riscv_timebase = prop; |
78 |
+ |
79 |
+ lpj_fine = riscv_timebase / HZ; |
80 |
++ |
81 |
++ of_clk_init(NULL); |
82 |
+ timer_probe(); |
83 |
+ } |
84 |
+diff --git a/arch/sh/drivers/dma/Kconfig b/arch/sh/drivers/dma/Kconfig |
85 |
+index d0de378beefe5..7d54f284ce10f 100644 |
86 |
+--- a/arch/sh/drivers/dma/Kconfig |
87 |
++++ b/arch/sh/drivers/dma/Kconfig |
88 |
+@@ -63,8 +63,7 @@ config PVR2_DMA |
89 |
+ |
90 |
+ config G2_DMA |
91 |
+ tristate "G2 Bus DMA support" |
92 |
+- depends on SH_DREAMCAST |
93 |
+- select SH_DMA_API |
94 |
++ depends on SH_DREAMCAST && SH_DMA_API |
95 |
+ help |
96 |
+ This enables support for the DMA controller for the Dreamcast's |
97 |
+ G2 bus. Drivers that want this will generally enable this on |
98 |
+diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c |
99 |
+index de9dc041d703e..d614cb72041e1 100644 |
100 |
+--- a/drivers/acpi/scan.c |
101 |
++++ b/drivers/acpi/scan.c |
102 |
+@@ -586,6 +586,8 @@ static int acpi_get_device_data(acpi_handle handle, struct acpi_device **device, |
103 |
+ if (!device) |
104 |
+ return -EINVAL; |
105 |
+ |
106 |
++ *device = NULL; |
107 |
++ |
108 |
+ status = acpi_get_data_full(handle, acpi_scan_drop_device, |
109 |
+ (void **)device, callback); |
110 |
+ if (ACPI_FAILURE(status) || !*device) { |
111 |
+diff --git a/drivers/base/core.c b/drivers/base/core.c |
112 |
+index 4818aaddd712e..f7f601858f10d 100644 |
113 |
+--- a/drivers/base/core.c |
114 |
++++ b/drivers/base/core.c |
115 |
+@@ -93,6 +93,16 @@ void device_links_read_unlock(int not_used) |
116 |
+ } |
117 |
+ #endif /* !CONFIG_SRCU */ |
118 |
+ |
119 |
++static bool device_is_ancestor(struct device *dev, struct device *target) |
120 |
++{ |
121 |
++ while (target->parent) { |
122 |
++ target = target->parent; |
123 |
++ if (dev == target) |
124 |
++ return true; |
125 |
++ } |
126 |
++ return false; |
127 |
++} |
128 |
++ |
129 |
+ /** |
130 |
+ * device_is_dependent - Check if one device depends on another one |
131 |
+ * @dev: Device to check dependencies for. |
132 |
+@@ -106,7 +116,12 @@ static int device_is_dependent(struct device *dev, void *target) |
133 |
+ struct device_link *link; |
134 |
+ int ret; |
135 |
+ |
136 |
+- if (dev == target) |
137 |
++ /* |
138 |
++ * The "ancestors" check is needed to catch the case when the target |
139 |
++ * device has not been completely initialized yet and it is still |
140 |
++ * missing from the list of children of its parent device. |
141 |
++ */ |
142 |
++ if (dev == target || device_is_ancestor(dev, target)) |
143 |
+ return 1; |
144 |
+ |
145 |
+ ret = device_for_each_child(dev, target, device_is_dependent); |
146 |
+diff --git a/drivers/clk/tegra/clk-tegra30.c b/drivers/clk/tegra/clk-tegra30.c |
147 |
+index e0aaecd98fbff..678019f86bc7a 100644 |
148 |
+--- a/drivers/clk/tegra/clk-tegra30.c |
149 |
++++ b/drivers/clk/tegra/clk-tegra30.c |
150 |
+@@ -1274,6 +1274,8 @@ static struct tegra_clk_init_table init_table[] __initdata = { |
151 |
+ { TEGRA30_CLK_I2S3_SYNC, TEGRA30_CLK_CLK_MAX, 24000000, 0 }, |
152 |
+ { TEGRA30_CLK_I2S4_SYNC, TEGRA30_CLK_CLK_MAX, 24000000, 0 }, |
153 |
+ { TEGRA30_CLK_VIMCLK_SYNC, TEGRA30_CLK_CLK_MAX, 24000000, 0 }, |
154 |
++ { TEGRA30_CLK_HDA, TEGRA30_CLK_PLL_P, 102000000, 0 }, |
155 |
++ { TEGRA30_CLK_HDA2CODEC_2X, TEGRA30_CLK_PLL_P, 48000000, 0 }, |
156 |
+ /* must be the last entry */ |
157 |
+ { TEGRA30_CLK_CLK_MAX, TEGRA30_CLK_CLK_MAX, 0, 0 }, |
158 |
+ }; |
159 |
+diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c |
160 |
+index d24a15484e31c..6060b69fa6182 100644 |
161 |
+--- a/drivers/gpu/drm/drm_atomic_helper.c |
162 |
++++ b/drivers/gpu/drm/drm_atomic_helper.c |
163 |
+@@ -2938,7 +2938,7 @@ int drm_atomic_helper_set_config(struct drm_mode_set *set, |
164 |
+ |
165 |
+ ret = handle_conflicting_encoders(state, true); |
166 |
+ if (ret) |
167 |
+- return ret; |
168 |
++ goto fail; |
169 |
+ |
170 |
+ ret = drm_atomic_commit(state); |
171 |
+ |
172 |
+diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c |
173 |
+index 1bb0a9f6fa730..fbe156302ee86 100644 |
174 |
+--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c |
175 |
++++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c |
176 |
+@@ -131,7 +131,7 @@ nv50_dmac_destroy(struct nv50_dmac *dmac) |
177 |
+ |
178 |
+ int |
179 |
+ nv50_dmac_create(struct nvif_device *device, struct nvif_object *disp, |
180 |
+- const s32 *oclass, u8 head, void *data, u32 size, u64 syncbuf, |
181 |
++ const s32 *oclass, u8 head, void *data, u32 size, s64 syncbuf, |
182 |
+ struct nv50_dmac *dmac) |
183 |
+ { |
184 |
+ struct nouveau_cli *cli = (void *)device->object.client; |
185 |
+@@ -166,7 +166,7 @@ nv50_dmac_create(struct nvif_device *device, struct nvif_object *disp, |
186 |
+ if (ret) |
187 |
+ return ret; |
188 |
+ |
189 |
+- if (!syncbuf) |
190 |
++ if (syncbuf < 0) |
191 |
+ return 0; |
192 |
+ |
193 |
+ ret = nvif_object_init(&dmac->base.user, 0xf0000000, NV_DMA_IN_MEMORY, |
194 |
+diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.h b/drivers/gpu/drm/nouveau/dispnv50/disp.h |
195 |
+index 66c125a6b0b3c..55205d23360c8 100644 |
196 |
+--- a/drivers/gpu/drm/nouveau/dispnv50/disp.h |
197 |
++++ b/drivers/gpu/drm/nouveau/dispnv50/disp.h |
198 |
+@@ -68,7 +68,7 @@ struct nv50_dmac { |
199 |
+ |
200 |
+ int nv50_dmac_create(struct nvif_device *device, struct nvif_object *disp, |
201 |
+ const s32 *oclass, u8 head, void *data, u32 size, |
202 |
+- u64 syncbuf, struct nv50_dmac *dmac); |
203 |
++ s64 syncbuf, struct nv50_dmac *dmac); |
204 |
+ void nv50_dmac_destroy(struct nv50_dmac *); |
205 |
+ |
206 |
+ u32 *evo_wait(struct nv50_dmac *, int nr); |
207 |
+diff --git a/drivers/gpu/drm/nouveau/dispnv50/wimmc37b.c b/drivers/gpu/drm/nouveau/dispnv50/wimmc37b.c |
208 |
+index f7dbd965e4e72..b49a212af4d8d 100644 |
209 |
+--- a/drivers/gpu/drm/nouveau/dispnv50/wimmc37b.c |
210 |
++++ b/drivers/gpu/drm/nouveau/dispnv50/wimmc37b.c |
211 |
+@@ -68,7 +68,7 @@ wimmc37b_init_(const struct nv50_wimm_func *func, struct nouveau_drm *drm, |
212 |
+ int ret; |
213 |
+ |
214 |
+ ret = nv50_dmac_create(&drm->client.device, &disp->disp->object, |
215 |
+- &oclass, 0, &args, sizeof(args), 0, |
216 |
++ &oclass, 0, &args, sizeof(args), -1, |
217 |
+ &wndw->wimm); |
218 |
+ if (ret) { |
219 |
+ NV_ERROR(drm, "wimm%04x allocation failed: %d\n", oclass, ret); |
220 |
+diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c |
221 |
+index 7deb81b6dbac6..4b571cc6bc70f 100644 |
222 |
+--- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c |
223 |
++++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c |
224 |
+@@ -75,7 +75,7 @@ shadow_image(struct nvkm_bios *bios, int idx, u32 offset, struct shadow *mthd) |
225 |
+ nvkm_debug(subdev, "%08x: type %02x, %d bytes\n", |
226 |
+ image.base, image.type, image.size); |
227 |
+ |
228 |
+- if (!shadow_fetch(bios, mthd, image.size)) { |
229 |
++ if (!shadow_fetch(bios, mthd, image.base + image.size)) { |
230 |
+ nvkm_debug(subdev, "%08x: fetch failed\n", image.base); |
231 |
+ return 0; |
232 |
+ } |
233 |
+diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c |
234 |
+index edb6148cbca04..d0e80ad526845 100644 |
235 |
+--- a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c |
236 |
++++ b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c |
237 |
+@@ -33,7 +33,7 @@ static void |
238 |
+ gm200_i2c_aux_fini(struct gm200_i2c_aux *aux) |
239 |
+ { |
240 |
+ struct nvkm_device *device = aux->base.pad->i2c->subdev.device; |
241 |
+- nvkm_mask(device, 0x00d954 + (aux->ch * 0x50), 0x00310000, 0x00000000); |
242 |
++ nvkm_mask(device, 0x00d954 + (aux->ch * 0x50), 0x00710000, 0x00000000); |
243 |
+ } |
244 |
+ |
245 |
+ static int |
246 |
+@@ -54,10 +54,10 @@ gm200_i2c_aux_init(struct gm200_i2c_aux *aux) |
247 |
+ AUX_ERR(&aux->base, "begin idle timeout %08x", ctrl); |
248 |
+ return -EBUSY; |
249 |
+ } |
250 |
+- } while (ctrl & 0x03010000); |
251 |
++ } while (ctrl & 0x07010000); |
252 |
+ |
253 |
+ /* set some magic, and wait up to 1ms for it to appear */ |
254 |
+- nvkm_mask(device, 0x00d954 + (aux->ch * 0x50), 0x00300000, ureq); |
255 |
++ nvkm_mask(device, 0x00d954 + (aux->ch * 0x50), 0x00700000, ureq); |
256 |
+ timeout = 1000; |
257 |
+ do { |
258 |
+ ctrl = nvkm_rd32(device, 0x00d954 + (aux->ch * 0x50)); |
259 |
+@@ -67,7 +67,7 @@ gm200_i2c_aux_init(struct gm200_i2c_aux *aux) |
260 |
+ gm200_i2c_aux_fini(aux); |
261 |
+ return -EBUSY; |
262 |
+ } |
263 |
+- } while ((ctrl & 0x03000000) != urep); |
264 |
++ } while ((ctrl & 0x07000000) != urep); |
265 |
+ |
266 |
+ return 0; |
267 |
+ } |
268 |
+diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gf100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gf100.c |
269 |
+index d80dbc8f09b20..55a4ea4393c62 100644 |
270 |
+--- a/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gf100.c |
271 |
++++ b/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gf100.c |
272 |
+@@ -22,6 +22,7 @@ |
273 |
+ * Authors: Ben Skeggs |
274 |
+ */ |
275 |
+ #include "priv.h" |
276 |
++#include <subdev/timer.h> |
277 |
+ |
278 |
+ static void |
279 |
+ gf100_ibus_intr_hub(struct nvkm_subdev *ibus, int i) |
280 |
+@@ -31,7 +32,6 @@ gf100_ibus_intr_hub(struct nvkm_subdev *ibus, int i) |
281 |
+ u32 data = nvkm_rd32(device, 0x122124 + (i * 0x0400)); |
282 |
+ u32 stat = nvkm_rd32(device, 0x122128 + (i * 0x0400)); |
283 |
+ nvkm_debug(ibus, "HUB%d: %06x %08x (%08x)\n", i, addr, data, stat); |
284 |
+- nvkm_mask(device, 0x122128 + (i * 0x0400), 0x00000200, 0x00000000); |
285 |
+ } |
286 |
+ |
287 |
+ static void |
288 |
+@@ -42,7 +42,6 @@ gf100_ibus_intr_rop(struct nvkm_subdev *ibus, int i) |
289 |
+ u32 data = nvkm_rd32(device, 0x124124 + (i * 0x0400)); |
290 |
+ u32 stat = nvkm_rd32(device, 0x124128 + (i * 0x0400)); |
291 |
+ nvkm_debug(ibus, "ROP%d: %06x %08x (%08x)\n", i, addr, data, stat); |
292 |
+- nvkm_mask(device, 0x124128 + (i * 0x0400), 0x00000200, 0x00000000); |
293 |
+ } |
294 |
+ |
295 |
+ static void |
296 |
+@@ -53,7 +52,6 @@ gf100_ibus_intr_gpc(struct nvkm_subdev *ibus, int i) |
297 |
+ u32 data = nvkm_rd32(device, 0x128124 + (i * 0x0400)); |
298 |
+ u32 stat = nvkm_rd32(device, 0x128128 + (i * 0x0400)); |
299 |
+ nvkm_debug(ibus, "GPC%d: %06x %08x (%08x)\n", i, addr, data, stat); |
300 |
+- nvkm_mask(device, 0x128128 + (i * 0x0400), 0x00000200, 0x00000000); |
301 |
+ } |
302 |
+ |
303 |
+ void |
304 |
+@@ -90,6 +88,12 @@ gf100_ibus_intr(struct nvkm_subdev *ibus) |
305 |
+ intr1 &= ~stat; |
306 |
+ } |
307 |
+ } |
308 |
++ |
309 |
++ nvkm_mask(device, 0x121c4c, 0x0000003f, 0x00000002); |
310 |
++ nvkm_msec(device, 2000, |
311 |
++ if (!(nvkm_rd32(device, 0x121c4c) & 0x0000003f)) |
312 |
++ break; |
313 |
++ ); |
314 |
+ } |
315 |
+ |
316 |
+ static int |
317 |
+diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gk104.c b/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gk104.c |
318 |
+index 9025ed1bd2a99..4caf3ef087e1d 100644 |
319 |
+--- a/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gk104.c |
320 |
++++ b/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gk104.c |
321 |
+@@ -22,6 +22,7 @@ |
322 |
+ * Authors: Ben Skeggs |
323 |
+ */ |
324 |
+ #include "priv.h" |
325 |
++#include <subdev/timer.h> |
326 |
+ |
327 |
+ static void |
328 |
+ gk104_ibus_intr_hub(struct nvkm_subdev *ibus, int i) |
329 |
+@@ -31,7 +32,6 @@ gk104_ibus_intr_hub(struct nvkm_subdev *ibus, int i) |
330 |
+ u32 data = nvkm_rd32(device, 0x122124 + (i * 0x0800)); |
331 |
+ u32 stat = nvkm_rd32(device, 0x122128 + (i * 0x0800)); |
332 |
+ nvkm_debug(ibus, "HUB%d: %06x %08x (%08x)\n", i, addr, data, stat); |
333 |
+- nvkm_mask(device, 0x122128 + (i * 0x0800), 0x00000200, 0x00000000); |
334 |
+ } |
335 |
+ |
336 |
+ static void |
337 |
+@@ -42,7 +42,6 @@ gk104_ibus_intr_rop(struct nvkm_subdev *ibus, int i) |
338 |
+ u32 data = nvkm_rd32(device, 0x124124 + (i * 0x0800)); |
339 |
+ u32 stat = nvkm_rd32(device, 0x124128 + (i * 0x0800)); |
340 |
+ nvkm_debug(ibus, "ROP%d: %06x %08x (%08x)\n", i, addr, data, stat); |
341 |
+- nvkm_mask(device, 0x124128 + (i * 0x0800), 0x00000200, 0x00000000); |
342 |
+ } |
343 |
+ |
344 |
+ static void |
345 |
+@@ -53,7 +52,6 @@ gk104_ibus_intr_gpc(struct nvkm_subdev *ibus, int i) |
346 |
+ u32 data = nvkm_rd32(device, 0x128124 + (i * 0x0800)); |
347 |
+ u32 stat = nvkm_rd32(device, 0x128128 + (i * 0x0800)); |
348 |
+ nvkm_debug(ibus, "GPC%d: %06x %08x (%08x)\n", i, addr, data, stat); |
349 |
+- nvkm_mask(device, 0x128128 + (i * 0x0800), 0x00000200, 0x00000000); |
350 |
+ } |
351 |
+ |
352 |
+ void |
353 |
+@@ -90,6 +88,12 @@ gk104_ibus_intr(struct nvkm_subdev *ibus) |
354 |
+ intr1 &= ~stat; |
355 |
+ } |
356 |
+ } |
357 |
++ |
358 |
++ nvkm_mask(device, 0x12004c, 0x0000003f, 0x00000002); |
359 |
++ nvkm_msec(device, 2000, |
360 |
++ if (!(nvkm_rd32(device, 0x12004c) & 0x0000003f)) |
361 |
++ break; |
362 |
++ ); |
363 |
+ } |
364 |
+ |
365 |
+ static int |
366 |
+diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c |
367 |
+index ee11ccaf0563c..cb51e248cb41b 100644 |
368 |
+--- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c |
369 |
++++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c |
370 |
+@@ -316,9 +316,9 @@ nvkm_mmu_vram(struct nvkm_mmu *mmu) |
371 |
+ { |
372 |
+ struct nvkm_device *device = mmu->subdev.device; |
373 |
+ struct nvkm_mm *mm = &device->fb->ram->vram; |
374 |
+- const u32 sizeN = nvkm_mm_heap_size(mm, NVKM_RAM_MM_NORMAL); |
375 |
+- const u32 sizeU = nvkm_mm_heap_size(mm, NVKM_RAM_MM_NOMAP); |
376 |
+- const u32 sizeM = nvkm_mm_heap_size(mm, NVKM_RAM_MM_MIXED); |
377 |
++ const u64 sizeN = nvkm_mm_heap_size(mm, NVKM_RAM_MM_NORMAL); |
378 |
++ const u64 sizeU = nvkm_mm_heap_size(mm, NVKM_RAM_MM_NOMAP); |
379 |
++ const u64 sizeM = nvkm_mm_heap_size(mm, NVKM_RAM_MM_MIXED); |
380 |
+ u8 type = NVKM_MEM_KIND * !!mmu->func->kind; |
381 |
+ u8 heap = NVKM_MEM_VRAM; |
382 |
+ int heapM, heapN, heapU; |
383 |
+diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h |
384 |
+index 6d118da1615d4..ab2be7a115d8f 100644 |
385 |
+--- a/drivers/hid/hid-ids.h |
386 |
++++ b/drivers/hid/hid-ids.h |
387 |
+@@ -386,6 +386,7 @@ |
388 |
+ #define USB_DEVICE_ID_TOSHIBA_CLICK_L9W 0x0401 |
389 |
+ #define USB_DEVICE_ID_HP_X2 0x074d |
390 |
+ #define USB_DEVICE_ID_HP_X2_10_COVER 0x0755 |
391 |
++#define USB_DEVICE_ID_ASUS_UX550_TOUCHSCREEN 0x2706 |
392 |
+ |
393 |
+ #define USB_VENDOR_ID_ELECOM 0x056e |
394 |
+ #define USB_DEVICE_ID_ELECOM_BM084 0x0061 |
395 |
+diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c |
396 |
+index 13deb9a676855..4dd151b2924e2 100644 |
397 |
+--- a/drivers/hid/hid-input.c |
398 |
++++ b/drivers/hid/hid-input.c |
399 |
+@@ -334,6 +334,8 @@ static const struct hid_device_id hid_battery_quirks[] = { |
400 |
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, |
401 |
+ USB_DEVICE_ID_LOGITECH_DINOVO_EDGE_KBD), |
402 |
+ HID_BATTERY_QUIRK_IGNORE }, |
403 |
++ { HID_USB_DEVICE(USB_VENDOR_ID_ELAN, USB_DEVICE_ID_ASUS_UX550_TOUCHSCREEN), |
404 |
++ HID_BATTERY_QUIRK_IGNORE }, |
405 |
+ {} |
406 |
+ }; |
407 |
+ |
408 |
+diff --git a/drivers/hwtracing/intel_th/pci.c b/drivers/hwtracing/intel_th/pci.c |
409 |
+index a775d7acfa470..2a16171033941 100644 |
410 |
+--- a/drivers/hwtracing/intel_th/pci.c |
411 |
++++ b/drivers/hwtracing/intel_th/pci.c |
412 |
+@@ -230,6 +230,11 @@ static const struct pci_device_id intel_th_pci_id_table[] = { |
413 |
+ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4b26), |
414 |
+ .driver_data = (kernel_ulong_t)&intel_th_2x, |
415 |
+ }, |
416 |
++ { |
417 |
++ /* Alder Lake-P */ |
418 |
++ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x51a6), |
419 |
++ .driver_data = (kernel_ulong_t)&intel_th_2x, |
420 |
++ }, |
421 |
+ { |
422 |
+ /* Emmitsburg PCH */ |
423 |
+ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x1bcc), |
424 |
+diff --git a/drivers/hwtracing/stm/heartbeat.c b/drivers/hwtracing/stm/heartbeat.c |
425 |
+index 7db42395e1316..825c59a77a0e0 100644 |
426 |
+--- a/drivers/hwtracing/stm/heartbeat.c |
427 |
++++ b/drivers/hwtracing/stm/heartbeat.c |
428 |
+@@ -64,7 +64,7 @@ static void stm_heartbeat_unlink(struct stm_source_data *data) |
429 |
+ |
430 |
+ static int stm_heartbeat_init(void) |
431 |
+ { |
432 |
+- int i, ret = -ENOMEM; |
433 |
++ int i, ret; |
434 |
+ |
435 |
+ if (nr_devs < 0 || nr_devs > STM_HEARTBEAT_MAX) |
436 |
+ return -EINVAL; |
437 |
+@@ -72,8 +72,10 @@ static int stm_heartbeat_init(void) |
438 |
+ for (i = 0; i < nr_devs; i++) { |
439 |
+ stm_heartbeat[i].data.name = |
440 |
+ kasprintf(GFP_KERNEL, "heartbeat.%d", i); |
441 |
+- if (!stm_heartbeat[i].data.name) |
442 |
++ if (!stm_heartbeat[i].data.name) { |
443 |
++ ret = -ENOMEM; |
444 |
+ goto fail_unregister; |
445 |
++ } |
446 |
+ |
447 |
+ stm_heartbeat[i].data.nr_chans = 1; |
448 |
+ stm_heartbeat[i].data.link = stm_heartbeat_link; |
449 |
+diff --git a/drivers/i2c/busses/i2c-octeon-core.c b/drivers/i2c/busses/i2c-octeon-core.c |
450 |
+index d9607905dc2f1..845eda70b8cab 100644 |
451 |
+--- a/drivers/i2c/busses/i2c-octeon-core.c |
452 |
++++ b/drivers/i2c/busses/i2c-octeon-core.c |
453 |
+@@ -347,7 +347,7 @@ static int octeon_i2c_read(struct octeon_i2c *i2c, int target, |
454 |
+ if (result) |
455 |
+ return result; |
456 |
+ if (recv_len && i == 0) { |
457 |
+- if (data[i] > I2C_SMBUS_BLOCK_MAX + 1) |
458 |
++ if (data[i] > I2C_SMBUS_BLOCK_MAX) |
459 |
+ return -EPROTO; |
460 |
+ length += data[i]; |
461 |
+ } |
462 |
+diff --git a/drivers/i2c/busses/i2c-tegra-bpmp.c b/drivers/i2c/busses/i2c-tegra-bpmp.c |
463 |
+index f6cd35d0a2ac0..240bd1e908927 100644 |
464 |
+--- a/drivers/i2c/busses/i2c-tegra-bpmp.c |
465 |
++++ b/drivers/i2c/busses/i2c-tegra-bpmp.c |
466 |
+@@ -91,7 +91,7 @@ static int tegra_bpmp_xlate_flags(u16 flags, u16 *out) |
467 |
+ flags &= ~I2C_M_RECV_LEN; |
468 |
+ } |
469 |
+ |
470 |
+- return (flags != 0) ? -EINVAL : 0; |
471 |
++ return 0; |
472 |
+ } |
473 |
+ |
474 |
+ /** |
475 |
+diff --git a/drivers/iio/dac/ad5504.c b/drivers/iio/dac/ad5504.c |
476 |
+index d9037ea59168e..97b9ce305a687 100644 |
477 |
+--- a/drivers/iio/dac/ad5504.c |
478 |
++++ b/drivers/iio/dac/ad5504.c |
479 |
+@@ -189,9 +189,9 @@ static ssize_t ad5504_write_dac_powerdown(struct iio_dev *indio_dev, |
480 |
+ return ret; |
481 |
+ |
482 |
+ if (pwr_down) |
483 |
+- st->pwr_down_mask |= (1 << chan->channel); |
484 |
+- else |
485 |
+ st->pwr_down_mask &= ~(1 << chan->channel); |
486 |
++ else |
487 |
++ st->pwr_down_mask |= (1 << chan->channel); |
488 |
+ |
489 |
+ ret = ad5504_spi_write(st, AD5504_ADDR_CTRL, |
490 |
+ AD5504_DAC_PWRDWN_MODE(st->pwr_down_mode) | |
491 |
+diff --git a/drivers/irqchip/irq-mips-cpu.c b/drivers/irqchip/irq-mips-cpu.c |
492 |
+index 66f97fde13d80..51e09f6c653c3 100644 |
493 |
+--- a/drivers/irqchip/irq-mips-cpu.c |
494 |
++++ b/drivers/irqchip/irq-mips-cpu.c |
495 |
+@@ -201,6 +201,13 @@ static int mips_cpu_ipi_alloc(struct irq_domain *domain, unsigned int virq, |
496 |
+ if (ret) |
497 |
+ return ret; |
498 |
+ |
499 |
++ ret = irq_domain_set_hwirq_and_chip(domain->parent, virq + i, hwirq, |
500 |
++ &mips_mt_cpu_irq_controller, |
501 |
++ NULL); |
502 |
++ |
503 |
++ if (ret) |
504 |
++ return ret; |
505 |
++ |
506 |
+ ret = irq_set_irq_type(virq + i, IRQ_TYPE_LEVEL_HIGH); |
507 |
+ if (ret) |
508 |
+ return ret; |
509 |
+diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c |
510 |
+index bb99b599de770..1917051b512f5 100644 |
511 |
+--- a/drivers/md/dm-integrity.c |
512 |
++++ b/drivers/md/dm-integrity.c |
513 |
+@@ -3515,6 +3515,12 @@ try_smaller_buffer: |
514 |
+ r = -ENOMEM; |
515 |
+ goto bad; |
516 |
+ } |
517 |
++ } else { |
518 |
++ if (ic->sb->flags & cpu_to_le32(SB_FLAG_RECALCULATING)) { |
519 |
++ ti->error = "Recalculate can only be specified with internal_hash"; |
520 |
++ r = -EINVAL; |
521 |
++ goto bad; |
522 |
++ } |
523 |
+ } |
524 |
+ |
525 |
+ ic->bufio = dm_bufio_client_create(ic->meta_dev ? ic->meta_dev->bdev : ic->dev->bdev, |
526 |
+diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c |
527 |
+index f849db3035a05..9164337424856 100644 |
528 |
+--- a/drivers/md/dm-table.c |
529 |
++++ b/drivers/md/dm-table.c |
530 |
+@@ -431,14 +431,23 @@ int dm_get_device(struct dm_target *ti, const char *path, fmode_t mode, |
531 |
+ { |
532 |
+ int r; |
533 |
+ dev_t dev; |
534 |
++ unsigned int major, minor; |
535 |
++ char dummy; |
536 |
+ struct dm_dev_internal *dd; |
537 |
+ struct dm_table *t = ti->table; |
538 |
+ |
539 |
+ BUG_ON(!t); |
540 |
+ |
541 |
+- dev = dm_get_dev_t(path); |
542 |
+- if (!dev) |
543 |
+- return -ENODEV; |
544 |
++ if (sscanf(path, "%u:%u%c", &major, &minor, &dummy) == 2) { |
545 |
++ /* Extract the major/minor numbers */ |
546 |
++ dev = MKDEV(major, minor); |
547 |
++ if (MAJOR(dev) != major || MINOR(dev) != minor) |
548 |
++ return -EOVERFLOW; |
549 |
++ } else { |
550 |
++ dev = dm_get_dev_t(path); |
551 |
++ if (!dev) |
552 |
++ return -ENODEV; |
553 |
++ } |
554 |
+ |
555 |
+ dd = find_device(&t->devices, dev); |
556 |
+ if (!dd) { |
557 |
+diff --git a/drivers/mmc/core/queue.c b/drivers/mmc/core/queue.c |
558 |
+index 9b31cd6b6062b..9aaf5a2d83c3b 100644 |
559 |
+--- a/drivers/mmc/core/queue.c |
560 |
++++ b/drivers/mmc/core/queue.c |
561 |
+@@ -364,8 +364,10 @@ static void mmc_setup_queue(struct mmc_queue *mq, struct mmc_card *card) |
562 |
+ min(host->max_blk_count, host->max_req_size / 512)); |
563 |
+ blk_queue_max_segments(mq->queue, host->max_segs); |
564 |
+ |
565 |
+- if (mmc_card_mmc(card)) |
566 |
++ if (mmc_card_mmc(card) && card->ext_csd.data_sector_size) { |
567 |
+ block_size = card->ext_csd.data_sector_size; |
568 |
++ WARN_ON(block_size != 512 && block_size != 4096); |
569 |
++ } |
570 |
+ |
571 |
+ blk_queue_logical_block_size(mq->queue, block_size); |
572 |
+ blk_queue_max_segment_size(mq->queue, |
573 |
+diff --git a/drivers/mmc/host/sdhci-xenon.c b/drivers/mmc/host/sdhci-xenon.c |
574 |
+index fafb02644efde..ca34fa424634f 100644 |
575 |
+--- a/drivers/mmc/host/sdhci-xenon.c |
576 |
++++ b/drivers/mmc/host/sdhci-xenon.c |
577 |
+@@ -170,7 +170,12 @@ static void xenon_reset_exit(struct sdhci_host *host, |
578 |
+ /* Disable tuning request and auto-retuning again */ |
579 |
+ xenon_retune_setup(host); |
580 |
+ |
581 |
+- xenon_set_acg(host, true); |
582 |
++ /* |
583 |
++ * The ACG should be turned off at the early init time, in order |
584 |
++ * to solve a possible issues with the 1.8V regulator stabilization. |
585 |
++ * The feature is enabled in later stage. |
586 |
++ */ |
587 |
++ xenon_set_acg(host, false); |
588 |
+ |
589 |
+ xenon_set_sdclk_off_idle(host, sdhc_id, false); |
590 |
+ |
591 |
+diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c |
592 |
+index f88590074569e..953c6fdc75cc4 100644 |
593 |
+--- a/drivers/net/can/dev.c |
594 |
++++ b/drivers/net/can/dev.c |
595 |
+@@ -579,11 +579,11 @@ static void can_restart(struct net_device *dev) |
596 |
+ } |
597 |
+ cf->can_id |= CAN_ERR_RESTARTED; |
598 |
+ |
599 |
+- netif_rx_ni(skb); |
600 |
+- |
601 |
+ stats->rx_packets++; |
602 |
+ stats->rx_bytes += cf->can_dlc; |
603 |
+ |
604 |
++ netif_rx_ni(skb); |
605 |
++ |
606 |
+ restart: |
607 |
+ netdev_dbg(dev, "restarted\n"); |
608 |
+ priv->can_stats.restarts++; |
609 |
+diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_fd.c b/drivers/net/can/usb/peak_usb/pcan_usb_fd.c |
610 |
+index 19600d35aac55..40ac37fe9dcde 100644 |
611 |
+--- a/drivers/net/can/usb/peak_usb/pcan_usb_fd.c |
612 |
++++ b/drivers/net/can/usb/peak_usb/pcan_usb_fd.c |
613 |
+@@ -520,11 +520,11 @@ static int pcan_usb_fd_decode_canmsg(struct pcan_usb_fd_if *usb_if, |
614 |
+ else |
615 |
+ memcpy(cfd->data, rm->d, cfd->len); |
616 |
+ |
617 |
+- peak_usb_netif_rx(skb, &usb_if->time_ref, le32_to_cpu(rm->ts_low)); |
618 |
+- |
619 |
+ netdev->stats.rx_packets++; |
620 |
+ netdev->stats.rx_bytes += cfd->len; |
621 |
+ |
622 |
++ peak_usb_netif_rx(skb, &usb_if->time_ref, le32_to_cpu(rm->ts_low)); |
623 |
++ |
624 |
+ return 0; |
625 |
+ } |
626 |
+ |
627 |
+@@ -586,11 +586,11 @@ static int pcan_usb_fd_decode_status(struct pcan_usb_fd_if *usb_if, |
628 |
+ if (!skb) |
629 |
+ return -ENOMEM; |
630 |
+ |
631 |
+- peak_usb_netif_rx(skb, &usb_if->time_ref, le32_to_cpu(sm->ts_low)); |
632 |
+- |
633 |
+ netdev->stats.rx_packets++; |
634 |
+ netdev->stats.rx_bytes += cf->can_dlc; |
635 |
+ |
636 |
++ peak_usb_netif_rx(skb, &usb_if->time_ref, le32_to_cpu(sm->ts_low)); |
637 |
++ |
638 |
+ return 0; |
639 |
+ } |
640 |
+ |
641 |
+diff --git a/drivers/net/can/vxcan.c b/drivers/net/can/vxcan.c |
642 |
+index ed6828821fbd3..ccd758ba3fb09 100644 |
643 |
+--- a/drivers/net/can/vxcan.c |
644 |
++++ b/drivers/net/can/vxcan.c |
645 |
+@@ -49,6 +49,7 @@ static netdev_tx_t vxcan_xmit(struct sk_buff *skb, struct net_device *dev) |
646 |
+ struct net_device *peer; |
647 |
+ struct canfd_frame *cfd = (struct canfd_frame *)skb->data; |
648 |
+ struct net_device_stats *peerstats, *srcstats = &dev->stats; |
649 |
++ u8 len; |
650 |
+ |
651 |
+ if (can_dropped_invalid_skb(dev, skb)) |
652 |
+ return NETDEV_TX_OK; |
653 |
+@@ -71,12 +72,13 @@ static netdev_tx_t vxcan_xmit(struct sk_buff *skb, struct net_device *dev) |
654 |
+ skb->dev = peer; |
655 |
+ skb->ip_summed = CHECKSUM_UNNECESSARY; |
656 |
+ |
657 |
++ len = cfd->len; |
658 |
+ if (netif_rx_ni(skb) == NET_RX_SUCCESS) { |
659 |
+ srcstats->tx_packets++; |
660 |
+- srcstats->tx_bytes += cfd->len; |
661 |
++ srcstats->tx_bytes += len; |
662 |
+ peerstats = &peer->stats; |
663 |
+ peerstats->rx_packets++; |
664 |
+- peerstats->rx_bytes += cfd->len; |
665 |
++ peerstats->rx_bytes += len; |
666 |
+ } |
667 |
+ |
668 |
+ out_unlock: |
669 |
+diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c |
670 |
+index 294be86420b6d..335ce1e849044 100644 |
671 |
+--- a/drivers/net/dsa/b53/b53_common.c |
672 |
++++ b/drivers/net/dsa/b53/b53_common.c |
673 |
+@@ -1142,7 +1142,7 @@ int b53_vlan_prepare(struct dsa_switch *ds, int port, |
674 |
+ if ((is5325(dev) || is5365(dev)) && vlan->vid_begin == 0) |
675 |
+ return -EOPNOTSUPP; |
676 |
+ |
677 |
+- if (vlan->vid_end > dev->num_vlans) |
678 |
++ if (vlan->vid_end >= dev->num_vlans) |
679 |
+ return -ERANGE; |
680 |
+ |
681 |
+ b53_enable_vlan(dev, true, dev->vlan_filtering_enabled); |
682 |
+diff --git a/drivers/net/ethernet/mscc/ocelot.c b/drivers/net/ethernet/mscc/ocelot.c |
683 |
+index a29a6a618110e..ea30da1c53f0f 100644 |
684 |
+--- a/drivers/net/ethernet/mscc/ocelot.c |
685 |
++++ b/drivers/net/ethernet/mscc/ocelot.c |
686 |
+@@ -1549,10 +1549,8 @@ static int ocelot_netdevice_event(struct notifier_block *unused, |
687 |
+ struct net_device *dev = netdev_notifier_info_to_dev(ptr); |
688 |
+ int ret = 0; |
689 |
+ |
690 |
+- if (!ocelot_netdevice_dev_check(dev)) |
691 |
+- return 0; |
692 |
+- |
693 |
+ if (event == NETDEV_PRECHANGEUPPER && |
694 |
++ ocelot_netdevice_dev_check(dev) && |
695 |
+ netif_is_lag_master(info->upper_dev)) { |
696 |
+ struct netdev_lag_upper_info *lag_upper_info = info->upper_info; |
697 |
+ struct netlink_ext_ack *extack; |
698 |
+diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c |
699 |
+index 441643670ac0e..9ac7b09badca6 100644 |
700 |
+--- a/drivers/net/ethernet/renesas/sh_eth.c |
701 |
++++ b/drivers/net/ethernet/renesas/sh_eth.c |
702 |
+@@ -2620,10 +2620,10 @@ static int sh_eth_close(struct net_device *ndev) |
703 |
+ /* Free all the skbuffs in the Rx queue and the DMA buffer. */ |
704 |
+ sh_eth_ring_free(ndev); |
705 |
+ |
706 |
+- pm_runtime_put_sync(&mdp->pdev->dev); |
707 |
+- |
708 |
+ mdp->is_opened = 0; |
709 |
+ |
710 |
++ pm_runtime_put(&mdp->pdev->dev); |
711 |
++ |
712 |
+ return 0; |
713 |
+ } |
714 |
+ |
715 |
+diff --git a/drivers/platform/x86/intel-vbtn.c b/drivers/platform/x86/intel-vbtn.c |
716 |
+index 36d6e72f50735..f5774372c3871 100644 |
717 |
+--- a/drivers/platform/x86/intel-vbtn.c |
718 |
++++ b/drivers/platform/x86/intel-vbtn.c |
719 |
+@@ -191,12 +191,6 @@ static const struct dmi_system_id dmi_switches_allow_list[] = { |
720 |
+ DMI_MATCH(DMI_PRODUCT_NAME, "Venue 11 Pro 7130"), |
721 |
+ }, |
722 |
+ }, |
723 |
+- { |
724 |
+- .matches = { |
725 |
+- DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), |
726 |
+- DMI_MATCH(DMI_PRODUCT_NAME, "HP Stream x360 Convertible PC 11"), |
727 |
+- }, |
728 |
+- }, |
729 |
+ { |
730 |
+ .matches = { |
731 |
+ DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), |
732 |
+diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c |
733 |
+index 83d25ee88f028..8877a21102f1d 100644 |
734 |
+--- a/drivers/scsi/megaraid/megaraid_sas_base.c |
735 |
++++ b/drivers/scsi/megaraid/megaraid_sas_base.c |
736 |
+@@ -7323,11 +7323,9 @@ megasas_mgmt_fw_ioctl(struct megasas_instance *instance, |
737 |
+ goto out; |
738 |
+ } |
739 |
+ |
740 |
++ /* always store 64 bits regardless of addressing */ |
741 |
+ sense_ptr = (void *)cmd->frame + ioc->sense_off; |
742 |
+- if (instance->consistent_mask_64bit) |
743 |
+- put_unaligned_le64(sense_handle, sense_ptr); |
744 |
+- else |
745 |
+- put_unaligned_le32(sense_handle, sense_ptr); |
746 |
++ put_unaligned_le64(sense_handle, sense_ptr); |
747 |
+ } |
748 |
+ |
749 |
+ /* |
750 |
+diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c |
751 |
+index eaa50328de90c..e201c163ea1c8 100644 |
752 |
+--- a/drivers/scsi/qedi/qedi_main.c |
753 |
++++ b/drivers/scsi/qedi/qedi_main.c |
754 |
+@@ -2129,7 +2129,7 @@ qedi_show_boot_tgt_info(struct qedi_ctx *qedi, int type, |
755 |
+ chap_name); |
756 |
+ break; |
757 |
+ case ISCSI_BOOT_TGT_CHAP_SECRET: |
758 |
+- rc = sprintf(buf, "%.*s\n", NVM_ISCSI_CFG_CHAP_NAME_MAX_LEN, |
759 |
++ rc = sprintf(buf, "%.*s\n", NVM_ISCSI_CFG_CHAP_PWD_MAX_LEN, |
760 |
+ chap_secret); |
761 |
+ break; |
762 |
+ case ISCSI_BOOT_TGT_REV_CHAP_NAME: |
763 |
+@@ -2137,7 +2137,7 @@ qedi_show_boot_tgt_info(struct qedi_ctx *qedi, int type, |
764 |
+ mchap_name); |
765 |
+ break; |
766 |
+ case ISCSI_BOOT_TGT_REV_CHAP_SECRET: |
767 |
+- rc = sprintf(buf, "%.*s\n", NVM_ISCSI_CFG_CHAP_NAME_MAX_LEN, |
768 |
++ rc = sprintf(buf, "%.*s\n", NVM_ISCSI_CFG_CHAP_PWD_MAX_LEN, |
769 |
+ mchap_secret); |
770 |
+ break; |
771 |
+ case ISCSI_BOOT_TGT_FLAGS: |
772 |
+diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c |
773 |
+index 40f478c4d118f..b18430efb00fb 100644 |
774 |
+--- a/drivers/scsi/ufs/ufshcd.c |
775 |
++++ b/drivers/scsi/ufs/ufshcd.c |
776 |
+@@ -5772,19 +5772,16 @@ static int ufshcd_eh_device_reset_handler(struct scsi_cmnd *cmd) |
777 |
+ { |
778 |
+ struct Scsi_Host *host; |
779 |
+ struct ufs_hba *hba; |
780 |
+- unsigned int tag; |
781 |
+ u32 pos; |
782 |
+ int err; |
783 |
+- u8 resp = 0xF; |
784 |
+- struct ufshcd_lrb *lrbp; |
785 |
++ u8 resp = 0xF, lun; |
786 |
+ unsigned long flags; |
787 |
+ |
788 |
+ host = cmd->device->host; |
789 |
+ hba = shost_priv(host); |
790 |
+- tag = cmd->request->tag; |
791 |
+ |
792 |
+- lrbp = &hba->lrb[tag]; |
793 |
+- err = ufshcd_issue_tm_cmd(hba, lrbp->lun, 0, UFS_LOGICAL_RESET, &resp); |
794 |
++ lun = ufshcd_scsi_to_upiu_lun(cmd->device->lun); |
795 |
++ err = ufshcd_issue_tm_cmd(hba, lun, 0, UFS_LOGICAL_RESET, &resp); |
796 |
+ if (err || resp != UPIU_TASK_MANAGEMENT_FUNC_COMPL) { |
797 |
+ if (!err) |
798 |
+ err = resp; |
799 |
+@@ -5793,7 +5790,7 @@ static int ufshcd_eh_device_reset_handler(struct scsi_cmnd *cmd) |
800 |
+ |
801 |
+ /* clear the commands that were pending for corresponding LUN */ |
802 |
+ for_each_set_bit(pos, &hba->outstanding_reqs, hba->nutrs) { |
803 |
+- if (hba->lrb[pos].lun == lrbp->lun) { |
804 |
++ if (hba->lrb[pos].lun == lun) { |
805 |
+ err = ufshcd_clear_cmd(hba, pos); |
806 |
+ if (err) |
807 |
+ break; |
808 |
+diff --git a/drivers/tty/serial/mvebu-uart.c b/drivers/tty/serial/mvebu-uart.c |
809 |
+index fb9d369e0f50c..330522be708fa 100644 |
810 |
+--- a/drivers/tty/serial/mvebu-uart.c |
811 |
++++ b/drivers/tty/serial/mvebu-uart.c |
812 |
+@@ -637,6 +637,14 @@ static void wait_for_xmitr(struct uart_port *port) |
813 |
+ (val & STAT_TX_RDY(port)), 1, 10000); |
814 |
+ } |
815 |
+ |
816 |
++static void wait_for_xmite(struct uart_port *port) |
817 |
++{ |
818 |
++ u32 val; |
819 |
++ |
820 |
++ readl_poll_timeout_atomic(port->membase + UART_STAT, val, |
821 |
++ (val & STAT_TX_EMP), 1, 10000); |
822 |
++} |
823 |
++ |
824 |
+ static void mvebu_uart_console_putchar(struct uart_port *port, int ch) |
825 |
+ { |
826 |
+ wait_for_xmitr(port); |
827 |
+@@ -664,7 +672,7 @@ static void mvebu_uart_console_write(struct console *co, const char *s, |
828 |
+ |
829 |
+ uart_console_write(port, s, count, mvebu_uart_console_putchar); |
830 |
+ |
831 |
+- wait_for_xmitr(port); |
832 |
++ wait_for_xmite(port); |
833 |
+ |
834 |
+ if (ier) |
835 |
+ writel(ier, port->membase + UART_CTRL(port)); |
836 |
+diff --git a/drivers/usb/gadget/udc/aspeed-vhub/epn.c b/drivers/usb/gadget/udc/aspeed-vhub/epn.c |
837 |
+index 5939eb1e97f20..ae853cf369662 100644 |
838 |
+--- a/drivers/usb/gadget/udc/aspeed-vhub/epn.c |
839 |
++++ b/drivers/usb/gadget/udc/aspeed-vhub/epn.c |
840 |
+@@ -420,7 +420,10 @@ static void ast_vhub_stop_active_req(struct ast_vhub_ep *ep, |
841 |
+ u32 state, reg, loops; |
842 |
+ |
843 |
+ /* Stop DMA activity */ |
844 |
+- writel(0, ep->epn.regs + AST_VHUB_EP_DMA_CTLSTAT); |
845 |
++ if (ep->epn.desc_mode) |
846 |
++ writel(VHUB_EP_DMA_CTRL_RESET, ep->epn.regs + AST_VHUB_EP_DMA_CTLSTAT); |
847 |
++ else |
848 |
++ writel(0, ep->epn.regs + AST_VHUB_EP_DMA_CTLSTAT); |
849 |
+ |
850 |
+ /* Wait for it to complete */ |
851 |
+ for (loops = 0; loops < 1000; loops++) { |
852 |
+diff --git a/drivers/usb/gadget/udc/bdc/Kconfig b/drivers/usb/gadget/udc/bdc/Kconfig |
853 |
+index c74ac25dddcd0..051091bd265bc 100644 |
854 |
+--- a/drivers/usb/gadget/udc/bdc/Kconfig |
855 |
++++ b/drivers/usb/gadget/udc/bdc/Kconfig |
856 |
+@@ -15,7 +15,7 @@ if USB_BDC_UDC |
857 |
+ comment "Platform Support" |
858 |
+ config USB_BDC_PCI |
859 |
+ tristate "BDC support for PCIe based platforms" |
860 |
+- depends on USB_PCI |
861 |
++ depends on USB_PCI && BROKEN |
862 |
+ default USB_BDC_UDC |
863 |
+ help |
864 |
+ Enable support for platforms which have BDC connected through PCIe, such as Lego3 FPGA platform. |
865 |
+diff --git a/drivers/usb/gadget/udc/core.c b/drivers/usb/gadget/udc/core.c |
866 |
+index 1a79a99551871..87a417d878b8a 100644 |
867 |
+--- a/drivers/usb/gadget/udc/core.c |
868 |
++++ b/drivers/usb/gadget/udc/core.c |
869 |
+@@ -1471,10 +1471,13 @@ static ssize_t soft_connect_store(struct device *dev, |
870 |
+ struct device_attribute *attr, const char *buf, size_t n) |
871 |
+ { |
872 |
+ struct usb_udc *udc = container_of(dev, struct usb_udc, dev); |
873 |
++ ssize_t ret; |
874 |
+ |
875 |
++ mutex_lock(&udc_lock); |
876 |
+ if (!udc->driver) { |
877 |
+ dev_err(dev, "soft-connect without a gadget driver\n"); |
878 |
+- return -EOPNOTSUPP; |
879 |
++ ret = -EOPNOTSUPP; |
880 |
++ goto out; |
881 |
+ } |
882 |
+ |
883 |
+ if (sysfs_streq(buf, "connect")) { |
884 |
+@@ -1486,10 +1489,14 @@ static ssize_t soft_connect_store(struct device *dev, |
885 |
+ usb_gadget_udc_stop(udc); |
886 |
+ } else { |
887 |
+ dev_err(dev, "unsupported command '%s'\n", buf); |
888 |
+- return -EINVAL; |
889 |
++ ret = -EINVAL; |
890 |
++ goto out; |
891 |
+ } |
892 |
+ |
893 |
+- return n; |
894 |
++ ret = n; |
895 |
++out: |
896 |
++ mutex_unlock(&udc_lock); |
897 |
++ return ret; |
898 |
+ } |
899 |
+ static DEVICE_ATTR_WO(soft_connect); |
900 |
+ |
901 |
+diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c |
902 |
+index caf9f6b1cd346..d9282ca7ae8c5 100644 |
903 |
+--- a/drivers/usb/host/ehci-hcd.c |
904 |
++++ b/drivers/usb/host/ehci-hcd.c |
905 |
+@@ -574,6 +574,7 @@ static int ehci_run (struct usb_hcd *hcd) |
906 |
+ struct ehci_hcd *ehci = hcd_to_ehci (hcd); |
907 |
+ u32 temp; |
908 |
+ u32 hcc_params; |
909 |
++ int rc; |
910 |
+ |
911 |
+ hcd->uses_new_polling = 1; |
912 |
+ |
913 |
+@@ -629,9 +630,20 @@ static int ehci_run (struct usb_hcd *hcd) |
914 |
+ down_write(&ehci_cf_port_reset_rwsem); |
915 |
+ ehci->rh_state = EHCI_RH_RUNNING; |
916 |
+ ehci_writel(ehci, FLAG_CF, &ehci->regs->configured_flag); |
917 |
++ |
918 |
++ /* Wait until HC become operational */ |
919 |
+ ehci_readl(ehci, &ehci->regs->command); /* unblock posted writes */ |
920 |
+ msleep(5); |
921 |
++ rc = ehci_handshake(ehci, &ehci->regs->status, STS_HALT, 0, 100 * 1000); |
922 |
++ |
923 |
+ up_write(&ehci_cf_port_reset_rwsem); |
924 |
++ |
925 |
++ if (rc) { |
926 |
++ ehci_err(ehci, "USB %x.%x, controller refused to start: %d\n", |
927 |
++ ((ehci->sbrn & 0xf0)>>4), (ehci->sbrn & 0x0f), rc); |
928 |
++ return rc; |
929 |
++ } |
930 |
++ |
931 |
+ ehci->last_periodic_enable = ktime_get_real(); |
932 |
+ |
933 |
+ temp = HC_VERSION(ehci, ehci_readl(ehci, &ehci->caps->hc_capbase)); |
934 |
+diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c |
935 |
+index 087402aec5cbe..9f9ab5ccea889 100644 |
936 |
+--- a/drivers/usb/host/ehci-hub.c |
937 |
++++ b/drivers/usb/host/ehci-hub.c |
938 |
+@@ -345,6 +345,9 @@ static int ehci_bus_suspend (struct usb_hcd *hcd) |
939 |
+ |
940 |
+ unlink_empty_async_suspended(ehci); |
941 |
+ |
942 |
++ /* Some Synopsys controllers mistakenly leave IAA turned on */ |
943 |
++ ehci_writel(ehci, STS_IAA, &ehci->regs->status); |
944 |
++ |
945 |
+ /* Any IAA cycle that started before the suspend is now invalid */ |
946 |
+ end_iaa_cycle(ehci); |
947 |
+ ehci_handle_start_intr_unlinks(ehci); |
948 |
+diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c |
949 |
+index 2a19d9a37a6aa..537bbcd47c463 100644 |
950 |
+--- a/drivers/usb/host/xhci-ring.c |
951 |
++++ b/drivers/usb/host/xhci-ring.c |
952 |
+@@ -2835,6 +2835,8 @@ static void queue_trb(struct xhci_hcd *xhci, struct xhci_ring *ring, |
953 |
+ trb->field[0] = cpu_to_le32(field1); |
954 |
+ trb->field[1] = cpu_to_le32(field2); |
955 |
+ trb->field[2] = cpu_to_le32(field3); |
956 |
++ /* make sure TRB is fully written before giving it to the controller */ |
957 |
++ wmb(); |
958 |
+ trb->field[3] = cpu_to_le32(field4); |
959 |
+ |
960 |
+ trace_xhci_queue_trb(ring, trb); |
961 |
+diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c |
962 |
+index fe37dacc695fc..dc9cd8c519cf2 100644 |
963 |
+--- a/drivers/usb/host/xhci-tegra.c |
964 |
++++ b/drivers/usb/host/xhci-tegra.c |
965 |
+@@ -578,6 +578,13 @@ static void tegra_xusb_mbox_handle(struct tegra_xusb *tegra, |
966 |
+ enable); |
967 |
+ if (err < 0) |
968 |
+ break; |
969 |
++ |
970 |
++ /* |
971 |
++ * wait 500us for LFPS detector to be disabled before |
972 |
++ * sending ACK |
973 |
++ */ |
974 |
++ if (!enable) |
975 |
++ usleep_range(500, 1000); |
976 |
+ } |
977 |
+ |
978 |
+ if (err < 0) { |
979 |
+diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c |
980 |
+index aca8456752797..8c08c7d46d3d0 100644 |
981 |
+--- a/drivers/xen/events/events_base.c |
982 |
++++ b/drivers/xen/events/events_base.c |
983 |
+@@ -1987,16 +1987,6 @@ static struct irq_chip xen_percpu_chip __read_mostly = { |
984 |
+ .irq_ack = ack_dynirq, |
985 |
+ }; |
986 |
+ |
987 |
+-int xen_set_callback_via(uint64_t via) |
988 |
+-{ |
989 |
+- struct xen_hvm_param a; |
990 |
+- a.domid = DOMID_SELF; |
991 |
+- a.index = HVM_PARAM_CALLBACK_IRQ; |
992 |
+- a.value = via; |
993 |
+- return HYPERVISOR_hvm_op(HVMOP_set_param, &a); |
994 |
+-} |
995 |
+-EXPORT_SYMBOL_GPL(xen_set_callback_via); |
996 |
+- |
997 |
+ #ifdef CONFIG_XEN_PVHVM |
998 |
+ /* Vector callbacks are better than PCI interrupts to receive event |
999 |
+ * channel notifications because we can receive vector callbacks on any |
1000 |
+diff --git a/drivers/xen/platform-pci.c b/drivers/xen/platform-pci.c |
1001 |
+index 5d7dcad0b0a0d..4cec8146609ad 100644 |
1002 |
+--- a/drivers/xen/platform-pci.c |
1003 |
++++ b/drivers/xen/platform-pci.c |
1004 |
+@@ -162,7 +162,6 @@ static int platform_pci_probe(struct pci_dev *pdev, |
1005 |
+ ret = gnttab_init(); |
1006 |
+ if (ret) |
1007 |
+ goto grant_out; |
1008 |
+- xenbus_probe(NULL); |
1009 |
+ return 0; |
1010 |
+ grant_out: |
1011 |
+ gnttab_free_auto_xlat_frames(); |
1012 |
+diff --git a/drivers/xen/xenbus/xenbus.h b/drivers/xen/xenbus/xenbus.h |
1013 |
+index 88516a8a9f932..a9bb5f91082d3 100644 |
1014 |
+--- a/drivers/xen/xenbus/xenbus.h |
1015 |
++++ b/drivers/xen/xenbus/xenbus.h |
1016 |
+@@ -115,6 +115,7 @@ int xenbus_probe_node(struct xen_bus_type *bus, |
1017 |
+ const char *type, |
1018 |
+ const char *nodename); |
1019 |
+ int xenbus_probe_devices(struct xen_bus_type *bus); |
1020 |
++void xenbus_probe(void); |
1021 |
+ |
1022 |
+ void xenbus_dev_changed(const char *node, struct xen_bus_type *bus); |
1023 |
+ |
1024 |
+diff --git a/drivers/xen/xenbus/xenbus_comms.c b/drivers/xen/xenbus/xenbus_comms.c |
1025 |
+index eb5151fc8efab..e5fda0256feb3 100644 |
1026 |
+--- a/drivers/xen/xenbus/xenbus_comms.c |
1027 |
++++ b/drivers/xen/xenbus/xenbus_comms.c |
1028 |
+@@ -57,16 +57,8 @@ DEFINE_MUTEX(xs_response_mutex); |
1029 |
+ static int xenbus_irq; |
1030 |
+ static struct task_struct *xenbus_task; |
1031 |
+ |
1032 |
+-static DECLARE_WORK(probe_work, xenbus_probe); |
1033 |
+- |
1034 |
+- |
1035 |
+ static irqreturn_t wake_waiting(int irq, void *unused) |
1036 |
+ { |
1037 |
+- if (unlikely(xenstored_ready == 0)) { |
1038 |
+- xenstored_ready = 1; |
1039 |
+- schedule_work(&probe_work); |
1040 |
+- } |
1041 |
+- |
1042 |
+ wake_up(&xb_waitq); |
1043 |
+ return IRQ_HANDLED; |
1044 |
+ } |
1045 |
+diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c |
1046 |
+index e6d0903459e11..14ccf13ab8fa1 100644 |
1047 |
+--- a/drivers/xen/xenbus/xenbus_probe.c |
1048 |
++++ b/drivers/xen/xenbus/xenbus_probe.c |
1049 |
+@@ -683,29 +683,76 @@ void unregister_xenstore_notifier(struct notifier_block *nb) |
1050 |
+ } |
1051 |
+ EXPORT_SYMBOL_GPL(unregister_xenstore_notifier); |
1052 |
+ |
1053 |
+-void xenbus_probe(struct work_struct *unused) |
1054 |
++void xenbus_probe(void) |
1055 |
+ { |
1056 |
+ xenstored_ready = 1; |
1057 |
+ |
1058 |
++ /* |
1059 |
++ * In the HVM case, xenbus_init() deferred its call to |
1060 |
++ * xs_init() in case callbacks were not operational yet. |
1061 |
++ * So do it now. |
1062 |
++ */ |
1063 |
++ if (xen_store_domain_type == XS_HVM) |
1064 |
++ xs_init(); |
1065 |
++ |
1066 |
+ /* Notify others that xenstore is up */ |
1067 |
+ blocking_notifier_call_chain(&xenstore_chain, 0, NULL); |
1068 |
+ } |
1069 |
+-EXPORT_SYMBOL_GPL(xenbus_probe); |
1070 |
+ |
1071 |
+-static int __init xenbus_probe_initcall(void) |
1072 |
++/* |
1073 |
++ * Returns true when XenStore init must be deferred in order to |
1074 |
++ * allow the PCI platform device to be initialised, before we |
1075 |
++ * can actually have event channel interrupts working. |
1076 |
++ */ |
1077 |
++static bool xs_hvm_defer_init_for_callback(void) |
1078 |
+ { |
1079 |
+- if (!xen_domain()) |
1080 |
+- return -ENODEV; |
1081 |
++#ifdef CONFIG_XEN_PVHVM |
1082 |
++ return xen_store_domain_type == XS_HVM && |
1083 |
++ !xen_have_vector_callback; |
1084 |
++#else |
1085 |
++ return false; |
1086 |
++#endif |
1087 |
++} |
1088 |
+ |
1089 |
+- if (xen_initial_domain() || xen_hvm_domain()) |
1090 |
+- return 0; |
1091 |
++static int __init xenbus_probe_initcall(void) |
1092 |
++{ |
1093 |
++ /* |
1094 |
++ * Probe XenBus here in the XS_PV case, and also XS_HVM unless we |
1095 |
++ * need to wait for the platform PCI device to come up. |
1096 |
++ */ |
1097 |
++ if (xen_store_domain_type == XS_PV || |
1098 |
++ (xen_store_domain_type == XS_HVM && |
1099 |
++ !xs_hvm_defer_init_for_callback())) |
1100 |
++ xenbus_probe(); |
1101 |
+ |
1102 |
+- xenbus_probe(NULL); |
1103 |
+ return 0; |
1104 |
+ } |
1105 |
+- |
1106 |
+ device_initcall(xenbus_probe_initcall); |
1107 |
+ |
1108 |
++int xen_set_callback_via(uint64_t via) |
1109 |
++{ |
1110 |
++ struct xen_hvm_param a; |
1111 |
++ int ret; |
1112 |
++ |
1113 |
++ a.domid = DOMID_SELF; |
1114 |
++ a.index = HVM_PARAM_CALLBACK_IRQ; |
1115 |
++ a.value = via; |
1116 |
++ |
1117 |
++ ret = HYPERVISOR_hvm_op(HVMOP_set_param, &a); |
1118 |
++ if (ret) |
1119 |
++ return ret; |
1120 |
++ |
1121 |
++ /* |
1122 |
++ * If xenbus_probe_initcall() deferred the xenbus_probe() |
1123 |
++ * due to the callback not functioning yet, we can do it now. |
1124 |
++ */ |
1125 |
++ if (!xenstored_ready && xs_hvm_defer_init_for_callback()) |
1126 |
++ xenbus_probe(); |
1127 |
++ |
1128 |
++ return ret; |
1129 |
++} |
1130 |
++EXPORT_SYMBOL_GPL(xen_set_callback_via); |
1131 |
++ |
1132 |
+ /* Set up event channel for xenstored which is run as a local process |
1133 |
+ * (this is normally used only in dom0) |
1134 |
+ */ |
1135 |
+@@ -818,11 +865,17 @@ static int __init xenbus_init(void) |
1136 |
+ break; |
1137 |
+ } |
1138 |
+ |
1139 |
+- /* Initialize the interface to xenstore. */ |
1140 |
+- err = xs_init(); |
1141 |
+- if (err) { |
1142 |
+- pr_warn("Error initializing xenstore comms: %i\n", err); |
1143 |
+- goto out_error; |
1144 |
++ /* |
1145 |
++ * HVM domains may not have a functional callback yet. In that |
1146 |
++ * case let xs_init() be called from xenbus_probe(), which will |
1147 |
++ * get invoked at an appropriate time. |
1148 |
++ */ |
1149 |
++ if (xen_store_domain_type != XS_HVM) { |
1150 |
++ err = xs_init(); |
1151 |
++ if (err) { |
1152 |
++ pr_warn("Error initializing xenstore comms: %i\n", err); |
1153 |
++ goto out_error; |
1154 |
++ } |
1155 |
+ } |
1156 |
+ |
1157 |
+ if ((xen_store_domain_type != XS_LOCAL) && |
1158 |
+diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c |
1159 |
+index 95b6a4ea18f7a..662711200eeba 100644 |
1160 |
+--- a/fs/btrfs/volumes.c |
1161 |
++++ b/fs/btrfs/volumes.c |
1162 |
+@@ -4011,6 +4011,8 @@ int btrfs_recover_balance(struct btrfs_fs_info *fs_info) |
1163 |
+ btrfs_warn(fs_info, |
1164 |
+ "balance: cannot set exclusive op status, resume manually"); |
1165 |
+ |
1166 |
++ btrfs_release_path(path); |
1167 |
++ |
1168 |
+ mutex_lock(&fs_info->balance_mutex); |
1169 |
+ BUG_ON(fs_info->balance_ctl); |
1170 |
+ spin_lock(&fs_info->balance_lock); |
1171 |
+diff --git a/include/xen/xenbus.h b/include/xen/xenbus.h |
1172 |
+index eba01ab5a55e0..fe9a9fa2ebc45 100644 |
1173 |
+--- a/include/xen/xenbus.h |
1174 |
++++ b/include/xen/xenbus.h |
1175 |
+@@ -187,7 +187,7 @@ void xs_suspend_cancel(void); |
1176 |
+ |
1177 |
+ struct work_struct; |
1178 |
+ |
1179 |
+-void xenbus_probe(struct work_struct *); |
1180 |
++void xenbus_probe(void); |
1181 |
+ |
1182 |
+ #define XENBUS_IS_ERR_READ(str) ({ \ |
1183 |
+ if (!IS_ERR(str) && strlen(str) == 0) { \ |
1184 |
+diff --git a/mm/kasan/kasan_init.c b/mm/kasan/kasan_init.c |
1185 |
+index 7a2a2f13f86f5..7a731c74be7da 100644 |
1186 |
+--- a/mm/kasan/kasan_init.c |
1187 |
++++ b/mm/kasan/kasan_init.c |
1188 |
+@@ -372,9 +372,10 @@ static void kasan_remove_pmd_table(pmd_t *pmd, unsigned long addr, |
1189 |
+ |
1190 |
+ if (kasan_pte_table(*pmd)) { |
1191 |
+ if (IS_ALIGNED(addr, PMD_SIZE) && |
1192 |
+- IS_ALIGNED(next, PMD_SIZE)) |
1193 |
++ IS_ALIGNED(next, PMD_SIZE)) { |
1194 |
+ pmd_clear(pmd); |
1195 |
+- continue; |
1196 |
++ continue; |
1197 |
++ } |
1198 |
+ } |
1199 |
+ pte = pte_offset_kernel(pmd, addr); |
1200 |
+ kasan_remove_pte_table(pte, addr, next); |
1201 |
+@@ -397,9 +398,10 @@ static void kasan_remove_pud_table(pud_t *pud, unsigned long addr, |
1202 |
+ |
1203 |
+ if (kasan_pmd_table(*pud)) { |
1204 |
+ if (IS_ALIGNED(addr, PUD_SIZE) && |
1205 |
+- IS_ALIGNED(next, PUD_SIZE)) |
1206 |
++ IS_ALIGNED(next, PUD_SIZE)) { |
1207 |
+ pud_clear(pud); |
1208 |
+- continue; |
1209 |
++ continue; |
1210 |
++ } |
1211 |
+ } |
1212 |
+ pmd = pmd_offset(pud, addr); |
1213 |
+ pmd_base = pmd_offset(pud, 0); |
1214 |
+@@ -423,9 +425,10 @@ static void kasan_remove_p4d_table(p4d_t *p4d, unsigned long addr, |
1215 |
+ |
1216 |
+ if (kasan_pud_table(*p4d)) { |
1217 |
+ if (IS_ALIGNED(addr, P4D_SIZE) && |
1218 |
+- IS_ALIGNED(next, P4D_SIZE)) |
1219 |
++ IS_ALIGNED(next, P4D_SIZE)) { |
1220 |
+ p4d_clear(p4d); |
1221 |
+- continue; |
1222 |
++ continue; |
1223 |
++ } |
1224 |
+ } |
1225 |
+ pud = pud_offset(p4d, addr); |
1226 |
+ kasan_remove_pud_table(pud, addr, next); |
1227 |
+@@ -457,9 +460,10 @@ void kasan_remove_zero_shadow(void *start, unsigned long size) |
1228 |
+ |
1229 |
+ if (kasan_p4d_table(*pgd)) { |
1230 |
+ if (IS_ALIGNED(addr, PGDIR_SIZE) && |
1231 |
+- IS_ALIGNED(next, PGDIR_SIZE)) |
1232 |
++ IS_ALIGNED(next, PGDIR_SIZE)) { |
1233 |
+ pgd_clear(pgd); |
1234 |
+- continue; |
1235 |
++ continue; |
1236 |
++ } |
1237 |
+ } |
1238 |
+ |
1239 |
+ p4d = p4d_offset(pgd, addr); |
1240 |
+@@ -483,7 +487,6 @@ int kasan_add_zero_shadow(void *start, unsigned long size) |
1241 |
+ |
1242 |
+ ret = kasan_populate_zero_shadow(shadow_start, shadow_end); |
1243 |
+ if (ret) |
1244 |
+- kasan_remove_zero_shadow(shadow_start, |
1245 |
+- size >> KASAN_SHADOW_SCALE_SHIFT); |
1246 |
++ kasan_remove_zero_shadow(start, size); |
1247 |
+ return ret; |
1248 |
+ } |
1249 |
+diff --git a/net/core/dev.c b/net/core/dev.c |
1250 |
+index c77d12a35f923..5d9800804d4a4 100644 |
1251 |
+--- a/net/core/dev.c |
1252 |
++++ b/net/core/dev.c |
1253 |
+@@ -8351,6 +8351,11 @@ static netdev_features_t netdev_fix_features(struct net_device *dev, |
1254 |
+ } |
1255 |
+ } |
1256 |
+ |
1257 |
++ if ((features & NETIF_F_HW_TLS_RX) && !(features & NETIF_F_RXCSUM)) { |
1258 |
++ netdev_dbg(dev, "Dropping TLS RX HW offload feature since no RXCSUM feature.\n"); |
1259 |
++ features &= ~NETIF_F_HW_TLS_RX; |
1260 |
++ } |
1261 |
++ |
1262 |
+ return features; |
1263 |
+ } |
1264 |
+ |
1265 |
+diff --git a/net/core/skbuff.c b/net/core/skbuff.c |
1266 |
+index 73f208466363b..4a9ab2596e782 100644 |
1267 |
+--- a/net/core/skbuff.c |
1268 |
++++ b/net/core/skbuff.c |
1269 |
+@@ -398,7 +398,11 @@ struct sk_buff *__netdev_alloc_skb(struct net_device *dev, unsigned int len, |
1270 |
+ |
1271 |
+ len += NET_SKB_PAD; |
1272 |
+ |
1273 |
+- if ((len > SKB_WITH_OVERHEAD(PAGE_SIZE)) || |
1274 |
++ /* If requested length is either too small or too big, |
1275 |
++ * we use kmalloc() for skb->head allocation. |
1276 |
++ */ |
1277 |
++ if (len <= SKB_WITH_OVERHEAD(1024) || |
1278 |
++ len > SKB_WITH_OVERHEAD(PAGE_SIZE) || |
1279 |
+ (gfp_mask & (__GFP_DIRECT_RECLAIM | GFP_DMA))) { |
1280 |
+ skb = __alloc_skb(len, gfp_mask, SKB_ALLOC_RX, NUMA_NO_NODE); |
1281 |
+ if (!skb) |
1282 |
+diff --git a/net/ipv4/netfilter/ipt_rpfilter.c b/net/ipv4/netfilter/ipt_rpfilter.c |
1283 |
+index 74b19a5c572e9..088320ce77a1b 100644 |
1284 |
+--- a/net/ipv4/netfilter/ipt_rpfilter.c |
1285 |
++++ b/net/ipv4/netfilter/ipt_rpfilter.c |
1286 |
+@@ -94,7 +94,7 @@ static bool rpfilter_mt(const struct sk_buff *skb, struct xt_action_param *par) |
1287 |
+ flow.daddr = iph->saddr; |
1288 |
+ flow.saddr = rpfilter_get_saddr(iph->daddr); |
1289 |
+ flow.flowi4_mark = info->flags & XT_RPFILTER_VALID_MARK ? skb->mark : 0; |
1290 |
+- flow.flowi4_tos = RT_TOS(iph->tos); |
1291 |
++ flow.flowi4_tos = iph->tos & IPTOS_RT_MASK; |
1292 |
+ flow.flowi4_scope = RT_SCOPE_UNIVERSE; |
1293 |
+ flow.flowi4_oif = l3mdev_master_ifindex_rcu(xt_in(par)); |
1294 |
+ |
1295 |
+diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c |
1296 |
+index 2aacf2b348348..110af0e7dc7b6 100644 |
1297 |
+--- a/net/ipv4/udp.c |
1298 |
++++ b/net/ipv4/udp.c |
1299 |
+@@ -2416,7 +2416,8 @@ int udp_v4_early_demux(struct sk_buff *skb) |
1300 |
+ */ |
1301 |
+ if (!inet_sk(sk)->inet_daddr && in_dev) |
1302 |
+ return ip_mc_validate_source(skb, iph->daddr, |
1303 |
+- iph->saddr, iph->tos, |
1304 |
++ iph->saddr, |
1305 |
++ iph->tos & IPTOS_RT_MASK, |
1306 |
+ skb->dev, in_dev, &itag); |
1307 |
+ } |
1308 |
+ return 0; |
1309 |
+diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c |
1310 |
+index 627cd24b7c0d0..76c097552ea74 100644 |
1311 |
+--- a/net/ipv6/addrconf.c |
1312 |
++++ b/net/ipv6/addrconf.c |
1313 |
+@@ -2395,8 +2395,9 @@ static void addrconf_add_mroute(struct net_device *dev) |
1314 |
+ .fc_ifindex = dev->ifindex, |
1315 |
+ .fc_dst_len = 8, |
1316 |
+ .fc_flags = RTF_UP, |
1317 |
+- .fc_type = RTN_UNICAST, |
1318 |
++ .fc_type = RTN_MULTICAST, |
1319 |
+ .fc_nlinfo.nl_net = dev_net(dev), |
1320 |
++ .fc_protocol = RTPROT_KERNEL, |
1321 |
+ }; |
1322 |
+ |
1323 |
+ ipv6_addr_set(&cfg.fc_dst, htonl(0xFF000000), 0, 0, 0); |
1324 |
+diff --git a/net/sched/cls_tcindex.c b/net/sched/cls_tcindex.c |
1325 |
+index 0d7a0aac8dbb1..e41bc5ecaa092 100644 |
1326 |
+--- a/net/sched/cls_tcindex.c |
1327 |
++++ b/net/sched/cls_tcindex.c |
1328 |
+@@ -339,9 +339,13 @@ tcindex_set_parms(struct net *net, struct tcf_proto *tp, unsigned long base, |
1329 |
+ if (tb[TCA_TCINDEX_MASK]) |
1330 |
+ cp->mask = nla_get_u16(tb[TCA_TCINDEX_MASK]); |
1331 |
+ |
1332 |
+- if (tb[TCA_TCINDEX_SHIFT]) |
1333 |
++ if (tb[TCA_TCINDEX_SHIFT]) { |
1334 |
+ cp->shift = nla_get_u32(tb[TCA_TCINDEX_SHIFT]); |
1335 |
+- |
1336 |
++ if (cp->shift > 16) { |
1337 |
++ err = -EINVAL; |
1338 |
++ goto errout; |
1339 |
++ } |
1340 |
++ } |
1341 |
+ if (!cp->hash) { |
1342 |
+ /* Hash not specified, use perfect hash if the upper limit |
1343 |
+ * of the hashing index is below the threshold. |
1344 |
+diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c |
1345 |
+index 39e319d04bb87..ed065c3432e5f 100644 |
1346 |
+--- a/net/sched/sch_api.c |
1347 |
++++ b/net/sched/sch_api.c |
1348 |
+@@ -398,7 +398,8 @@ struct qdisc_rate_table *qdisc_get_rtab(struct tc_ratespec *r, |
1349 |
+ { |
1350 |
+ struct qdisc_rate_table *rtab; |
1351 |
+ |
1352 |
+- if (tab == NULL || r->rate == 0 || r->cell_log == 0 || |
1353 |
++ if (tab == NULL || r->rate == 0 || |
1354 |
++ r->cell_log == 0 || r->cell_log >= 32 || |
1355 |
+ nla_len(tab) != TC_RTAB_SIZE) { |
1356 |
+ NL_SET_ERR_MSG(extack, "Invalid rate table parameters for searching"); |
1357 |
+ return NULL; |
1358 |
+diff --git a/sound/core/seq/oss/seq_oss_synth.c b/sound/core/seq/oss/seq_oss_synth.c |
1359 |
+index c939459172353..247b68790a522 100644 |
1360 |
+--- a/sound/core/seq/oss/seq_oss_synth.c |
1361 |
++++ b/sound/core/seq/oss/seq_oss_synth.c |
1362 |
+@@ -624,7 +624,8 @@ snd_seq_oss_synth_make_info(struct seq_oss_devinfo *dp, int dev, struct synth_in |
1363 |
+ |
1364 |
+ if (info->is_midi) { |
1365 |
+ struct midi_info minf; |
1366 |
+- snd_seq_oss_midi_make_info(dp, info->midi_mapped, &minf); |
1367 |
++ if (snd_seq_oss_midi_make_info(dp, info->midi_mapped, &minf)) |
1368 |
++ return -ENXIO; |
1369 |
+ inf->synth_type = SYNTH_TYPE_MIDI; |
1370 |
+ inf->synth_subtype = 0; |
1371 |
+ inf->nr_voices = 16; |
1372 |
+diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c |
1373 |
+index 11bf7ace5ab2d..efba9057b2b61 100644 |
1374 |
+--- a/sound/pci/hda/patch_via.c |
1375 |
++++ b/sound/pci/hda/patch_via.c |
1376 |
+@@ -126,6 +126,7 @@ static struct via_spec *via_new_spec(struct hda_codec *codec) |
1377 |
+ spec->codec_type = VT1708S; |
1378 |
+ spec->gen.indep_hp = 1; |
1379 |
+ spec->gen.keep_eapd_on = 1; |
1380 |
++ spec->gen.dac_min_mute = 1; |
1381 |
+ spec->gen.pcm_playback_hook = via_playback_pcm_hook; |
1382 |
+ spec->gen.add_stereo_mix_input = HDA_HINT_STEREO_MIX_AUTO; |
1383 |
+ codec->power_save_node = 1; |
1384 |
+diff --git a/sound/soc/intel/boards/haswell.c b/sound/soc/intel/boards/haswell.c |
1385 |
+index a4022983a7ce0..67eb4a446c3cb 100644 |
1386 |
+--- a/sound/soc/intel/boards/haswell.c |
1387 |
++++ b/sound/soc/intel/boards/haswell.c |
1388 |
+@@ -198,6 +198,7 @@ static struct platform_driver haswell_audio = { |
1389 |
+ .probe = haswell_audio_probe, |
1390 |
+ .driver = { |
1391 |
+ .name = "haswell-audio", |
1392 |
++ .pm = &snd_soc_pm_ops, |
1393 |
+ }, |
1394 |
+ }; |
1395 |
+ |
1396 |
+diff --git a/tools/testing/selftests/net/fib_tests.sh b/tools/testing/selftests/net/fib_tests.sh |
1397 |
+index 67048f922ff20..a5ba149761bf9 100755 |
1398 |
+--- a/tools/testing/selftests/net/fib_tests.sh |
1399 |
++++ b/tools/testing/selftests/net/fib_tests.sh |
1400 |
+@@ -987,7 +987,6 @@ ipv6_addr_metric_test() |
1401 |
+ |
1402 |
+ check_route6 "2001:db8:104::1 dev dummy2 proto kernel metric 260" |
1403 |
+ log_test $? 0 "Set metric with peer route on local side" |
1404 |
+- log_test $? 0 "User specified metric on local address" |
1405 |
+ check_route6 "2001:db8:104::2 dev dummy2 proto kernel metric 260" |
1406 |
+ log_test $? 0 "Set metric with peer route on peer side" |
1407 |
+ |