1 |
commit: aa50463fa5ba1eee5ee6ffa0711dd8cd7eb53412 |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jun 18 11:35:17 2021 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jun 18 11:35:17 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=aa50463f |
7 |
|
8 |
Linux patch 5.12.12 update to BMQ |
9 |
|
10 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
11 |
|
12 |
0000_README | 4 + |
13 |
1011_linux-5.12.12.patch | 1384 ++++++++++++++++++++++++++ |
14 |
5020_BMQ-and-PDS-io-scheduler-v5.12-r0.patch | 33 + |
15 |
3 files changed, 1421 insertions(+) |
16 |
|
17 |
diff --git a/0000_README b/0000_README |
18 |
index d850f88..07044b3 100644 |
19 |
--- a/0000_README |
20 |
+++ b/0000_README |
21 |
@@ -87,6 +87,10 @@ Patch: 1010_linux-5.12.11.patch |
22 |
From: http://www.kernel.org |
23 |
Desc: Linux 5.12.11 |
24 |
|
25 |
+Patch: 1011_linux-5.12.12.patch |
26 |
+From: http://www.kernel.org |
27 |
+Desc: Linux 5.12.12 |
28 |
+ |
29 |
Patch: 1500_XATTR_USER_PREFIX.patch |
30 |
From: https://bugs.gentoo.org/show_bug.cgi?id=470644 |
31 |
Desc: Support for namespace user.pax.* on tmpfs. |
32 |
|
33 |
diff --git a/1011_linux-5.12.12.patch b/1011_linux-5.12.12.patch |
34 |
new file mode 100644 |
35 |
index 0000000..9b730db |
36 |
--- /dev/null |
37 |
+++ b/1011_linux-5.12.12.patch |
38 |
@@ -0,0 +1,1384 @@ |
39 |
+diff --git a/Makefile b/Makefile |
40 |
+index 82ca490ce5f48..e0a252b644630 100644 |
41 |
+--- a/Makefile |
42 |
++++ b/Makefile |
43 |
+@@ -1,7 +1,7 @@ |
44 |
+ # SPDX-License-Identifier: GPL-2.0 |
45 |
+ VERSION = 5 |
46 |
+ PATCHLEVEL = 12 |
47 |
+-SUBLEVEL = 11 |
48 |
++SUBLEVEL = 12 |
49 |
+ EXTRAVERSION = |
50 |
+ NAME = Frozen Wasteland |
51 |
+ |
52 |
+diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c |
53 |
+index 2c1e2b32b9b36..a745d64d46995 100644 |
54 |
+--- a/arch/arm/mach-omap1/pm.c |
55 |
++++ b/arch/arm/mach-omap1/pm.c |
56 |
+@@ -655,9 +655,13 @@ static int __init omap_pm_init(void) |
57 |
+ irq = INT_7XX_WAKE_UP_REQ; |
58 |
+ else if (cpu_is_omap16xx()) |
59 |
+ irq = INT_1610_WAKE_UP_REQ; |
60 |
+- if (request_irq(irq, omap_wakeup_interrupt, 0, "peripheral wakeup", |
61 |
+- NULL)) |
62 |
+- pr_err("Failed to request irq %d (peripheral wakeup)\n", irq); |
63 |
++ else |
64 |
++ irq = -1; |
65 |
++ |
66 |
++ if (irq >= 0) { |
67 |
++ if (request_irq(irq, omap_wakeup_interrupt, 0, "peripheral wakeup", NULL)) |
68 |
++ pr_err("Failed to request irq %d (peripheral wakeup)\n", irq); |
69 |
++ } |
70 |
+ |
71 |
+ /* Program new power ramp-up time |
72 |
+ * (0 for most boards since we don't lower voltage when in deep sleep) |
73 |
+diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c |
74 |
+index 418a61ecb8275..5e86145db0e2a 100644 |
75 |
+--- a/arch/arm/mach-omap2/board-n8x0.c |
76 |
++++ b/arch/arm/mach-omap2/board-n8x0.c |
77 |
+@@ -322,6 +322,7 @@ static int n8x0_mmc_get_cover_state(struct device *dev, int slot) |
78 |
+ |
79 |
+ static void n8x0_mmc_callback(void *data, u8 card_mask) |
80 |
+ { |
81 |
++#ifdef CONFIG_MMC_OMAP |
82 |
+ int bit, *openp, index; |
83 |
+ |
84 |
+ if (board_is_n800()) { |
85 |
+@@ -339,7 +340,6 @@ static void n8x0_mmc_callback(void *data, u8 card_mask) |
86 |
+ else |
87 |
+ *openp = 0; |
88 |
+ |
89 |
+-#ifdef CONFIG_MMC_OMAP |
90 |
+ omap_mmc_notify_cover_event(mmc_device, index, *openp); |
91 |
+ #else |
92 |
+ pr_warn("MMC: notify cover event not available\n"); |
93 |
+diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile |
94 |
+index 1368d943f1f39..5243bf2327c02 100644 |
95 |
+--- a/arch/riscv/Makefile |
96 |
++++ b/arch/riscv/Makefile |
97 |
+@@ -38,6 +38,15 @@ else |
98 |
+ KBUILD_LDFLAGS += -melf32lriscv |
99 |
+ endif |
100 |
+ |
101 |
++ifeq ($(CONFIG_LD_IS_LLD),y) |
102 |
++ KBUILD_CFLAGS += -mno-relax |
103 |
++ KBUILD_AFLAGS += -mno-relax |
104 |
++ifneq ($(LLVM_IAS),1) |
105 |
++ KBUILD_CFLAGS += -Wa,-mno-relax |
106 |
++ KBUILD_AFLAGS += -Wa,-mno-relax |
107 |
++endif |
108 |
++endif |
109 |
++ |
110 |
+ # ISA string setting |
111 |
+ riscv-march-$(CONFIG_ARCH_RV32I) := rv32ima |
112 |
+ riscv-march-$(CONFIG_ARCH_RV64I) := rv64ima |
113 |
+diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c |
114 |
+index 4a901508e48e7..ddc7b86725cd7 100644 |
115 |
+--- a/drivers/bluetooth/btusb.c |
116 |
++++ b/drivers/bluetooth/btusb.c |
117 |
+@@ -388,6 +388,8 @@ static const struct usb_device_id blacklist_table[] = { |
118 |
+ /* Realtek 8822CE Bluetooth devices */ |
119 |
+ { USB_DEVICE(0x0bda, 0xb00c), .driver_info = BTUSB_REALTEK | |
120 |
+ BTUSB_WIDEBAND_SPEECH }, |
121 |
++ { USB_DEVICE(0x0bda, 0xc822), .driver_info = BTUSB_REALTEK | |
122 |
++ BTUSB_WIDEBAND_SPEECH }, |
123 |
+ |
124 |
+ /* Realtek 8852AE Bluetooth devices */ |
125 |
+ { USB_DEVICE(0x0bda, 0xc852), .driver_info = BTUSB_REALTEK | |
126 |
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c |
127 |
+index 8f4a8f8d81463..39b6c6bfab453 100644 |
128 |
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c |
129 |
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c |
130 |
+@@ -101,7 +101,8 @@ static int amdgpu_fru_read_eeprom(struct amdgpu_device *adev, uint32_t addrptr, |
131 |
+ int amdgpu_fru_get_product_info(struct amdgpu_device *adev) |
132 |
+ { |
133 |
+ unsigned char buff[34]; |
134 |
+- int addrptr = 0, size = 0; |
135 |
++ int addrptr, size; |
136 |
++ int len; |
137 |
+ |
138 |
+ if (!is_fru_eeprom_supported(adev)) |
139 |
+ return 0; |
140 |
+@@ -109,7 +110,7 @@ int amdgpu_fru_get_product_info(struct amdgpu_device *adev) |
141 |
+ /* If algo exists, it means that the i2c_adapter's initialized */ |
142 |
+ if (!adev->pm.smu_i2c.algo) { |
143 |
+ DRM_WARN("Cannot access FRU, EEPROM accessor not initialized"); |
144 |
+- return 0; |
145 |
++ return -ENODEV; |
146 |
+ } |
147 |
+ |
148 |
+ /* There's a lot of repetition here. This is due to the FRU having |
149 |
+@@ -128,7 +129,7 @@ int amdgpu_fru_get_product_info(struct amdgpu_device *adev) |
150 |
+ size = amdgpu_fru_read_eeprom(adev, addrptr, buff); |
151 |
+ if (size < 1) { |
152 |
+ DRM_ERROR("Failed to read FRU Manufacturer, ret:%d", size); |
153 |
+- return size; |
154 |
++ return -EINVAL; |
155 |
+ } |
156 |
+ |
157 |
+ /* Increment the addrptr by the size of the field, and 1 due to the |
158 |
+@@ -138,43 +139,45 @@ int amdgpu_fru_get_product_info(struct amdgpu_device *adev) |
159 |
+ size = amdgpu_fru_read_eeprom(adev, addrptr, buff); |
160 |
+ if (size < 1) { |
161 |
+ DRM_ERROR("Failed to read FRU product name, ret:%d", size); |
162 |
+- return size; |
163 |
++ return -EINVAL; |
164 |
+ } |
165 |
+ |
166 |
++ len = size; |
167 |
+ /* Product name should only be 32 characters. Any more, |
168 |
+ * and something could be wrong. Cap it at 32 to be safe |
169 |
+ */ |
170 |
+- if (size > 32) { |
171 |
++ if (len >= sizeof(adev->product_name)) { |
172 |
+ DRM_WARN("FRU Product Number is larger than 32 characters. This is likely a mistake"); |
173 |
+- size = 32; |
174 |
++ len = sizeof(adev->product_name) - 1; |
175 |
+ } |
176 |
+ /* Start at 2 due to buff using fields 0 and 1 for the address */ |
177 |
+- memcpy(adev->product_name, &buff[2], size); |
178 |
+- adev->product_name[size] = '\0'; |
179 |
++ memcpy(adev->product_name, &buff[2], len); |
180 |
++ adev->product_name[len] = '\0'; |
181 |
+ |
182 |
+ addrptr += size + 1; |
183 |
+ size = amdgpu_fru_read_eeprom(adev, addrptr, buff); |
184 |
+ if (size < 1) { |
185 |
+ DRM_ERROR("Failed to read FRU product number, ret:%d", size); |
186 |
+- return size; |
187 |
++ return -EINVAL; |
188 |
+ } |
189 |
+ |
190 |
++ len = size; |
191 |
+ /* Product number should only be 16 characters. Any more, |
192 |
+ * and something could be wrong. Cap it at 16 to be safe |
193 |
+ */ |
194 |
+- if (size > 16) { |
195 |
++ if (len >= sizeof(adev->product_number)) { |
196 |
+ DRM_WARN("FRU Product Number is larger than 16 characters. This is likely a mistake"); |
197 |
+- size = 16; |
198 |
++ len = sizeof(adev->product_number) - 1; |
199 |
+ } |
200 |
+- memcpy(adev->product_number, &buff[2], size); |
201 |
+- adev->product_number[size] = '\0'; |
202 |
++ memcpy(adev->product_number, &buff[2], len); |
203 |
++ adev->product_number[len] = '\0'; |
204 |
+ |
205 |
+ addrptr += size + 1; |
206 |
+ size = amdgpu_fru_read_eeprom(adev, addrptr, buff); |
207 |
+ |
208 |
+ if (size < 1) { |
209 |
+ DRM_ERROR("Failed to read FRU product version, ret:%d", size); |
210 |
+- return size; |
211 |
++ return -EINVAL; |
212 |
+ } |
213 |
+ |
214 |
+ addrptr += size + 1; |
215 |
+@@ -182,18 +185,19 @@ int amdgpu_fru_get_product_info(struct amdgpu_device *adev) |
216 |
+ |
217 |
+ if (size < 1) { |
218 |
+ DRM_ERROR("Failed to read FRU serial number, ret:%d", size); |
219 |
+- return size; |
220 |
++ return -EINVAL; |
221 |
+ } |
222 |
+ |
223 |
++ len = size; |
224 |
+ /* Serial number should only be 16 characters. Any more, |
225 |
+ * and something could be wrong. Cap it at 16 to be safe |
226 |
+ */ |
227 |
+- if (size > 16) { |
228 |
++ if (len >= sizeof(adev->serial)) { |
229 |
+ DRM_WARN("FRU Serial Number is larger than 16 characters. This is likely a mistake"); |
230 |
+- size = 16; |
231 |
++ len = sizeof(adev->serial) - 1; |
232 |
+ } |
233 |
+- memcpy(adev->serial, &buff[2], size); |
234 |
+- adev->serial[size] = '\0'; |
235 |
++ memcpy(adev->serial, &buff[2], len); |
236 |
++ adev->serial[len] = '\0'; |
237 |
+ |
238 |
+ return 0; |
239 |
+ } |
240 |
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h |
241 |
+index cb50ba445f8c8..0fd62a8e68c24 100644 |
242 |
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h |
243 |
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h |
244 |
+@@ -76,6 +76,7 @@ struct psp_ring |
245 |
+ uint64_t ring_mem_mc_addr; |
246 |
+ void *ring_mem_handle; |
247 |
+ uint32_t ring_size; |
248 |
++ uint32_t ring_wptr; |
249 |
+ }; |
250 |
+ |
251 |
+ /* More registers may will be supported */ |
252 |
+diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c |
253 |
+index c325d6f53a71e..d39735a89a252 100644 |
254 |
+--- a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c |
255 |
++++ b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c |
256 |
+@@ -720,7 +720,7 @@ static uint32_t psp_v11_0_ring_get_wptr(struct psp_context *psp) |
257 |
+ struct amdgpu_device *adev = psp->adev; |
258 |
+ |
259 |
+ if (amdgpu_sriov_vf(adev)) |
260 |
+- data = RREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_102); |
261 |
++ data = psp->km_ring.ring_wptr; |
262 |
+ else |
263 |
+ data = RREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_67); |
264 |
+ |
265 |
+@@ -734,6 +734,7 @@ static void psp_v11_0_ring_set_wptr(struct psp_context *psp, uint32_t value) |
266 |
+ if (amdgpu_sriov_vf(adev)) { |
267 |
+ WREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_102, value); |
268 |
+ WREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_101, GFX_CTRL_CMD_ID_CONSUME_CMD); |
269 |
++ psp->km_ring.ring_wptr = value; |
270 |
+ } else |
271 |
+ WREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_67, value); |
272 |
+ } |
273 |
+diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c b/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c |
274 |
+index f2e725f72d2f1..908664a5774bb 100644 |
275 |
+--- a/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c |
276 |
++++ b/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c |
277 |
+@@ -379,7 +379,7 @@ static uint32_t psp_v3_1_ring_get_wptr(struct psp_context *psp) |
278 |
+ struct amdgpu_device *adev = psp->adev; |
279 |
+ |
280 |
+ if (amdgpu_sriov_vf(adev)) |
281 |
+- data = RREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_102); |
282 |
++ data = psp->km_ring.ring_wptr; |
283 |
+ else |
284 |
+ data = RREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_67); |
285 |
+ return data; |
286 |
+@@ -394,6 +394,7 @@ static void psp_v3_1_ring_set_wptr(struct psp_context *psp, uint32_t value) |
287 |
+ /* send interrupt to PSP for SRIOV ring write pointer update */ |
288 |
+ WREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_101, |
289 |
+ GFX_CTRL_CMD_ID_CONSUME_CMD); |
290 |
++ psp->km_ring.ring_wptr = value; |
291 |
+ } else |
292 |
+ WREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_67, value); |
293 |
+ } |
294 |
+diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |
295 |
+index b63f55ea8758a..eed4946305834 100644 |
296 |
+--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |
297 |
++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |
298 |
+@@ -871,7 +871,8 @@ static int dm_dmub_hw_init(struct amdgpu_device *adev) |
299 |
+ abm->dmcu_is_running = dmcu->funcs->is_dmcu_initialized(dmcu); |
300 |
+ } |
301 |
+ |
302 |
+- adev->dm.dc->ctx->dmub_srv = dc_dmub_srv_create(adev->dm.dc, dmub_srv); |
303 |
++ if (!adev->dm.dc->ctx->dmub_srv) |
304 |
++ adev->dm.dc->ctx->dmub_srv = dc_dmub_srv_create(adev->dm.dc, dmub_srv); |
305 |
+ if (!adev->dm.dc->ctx->dmub_srv) { |
306 |
+ DRM_ERROR("Couldn't allocate DC DMUB server!\n"); |
307 |
+ return -ENOMEM; |
308 |
+@@ -1863,7 +1864,6 @@ static int dm_suspend(void *handle) |
309 |
+ |
310 |
+ amdgpu_dm_irq_suspend(adev); |
311 |
+ |
312 |
+- |
313 |
+ dc_set_power_state(dm->dc, DC_ACPI_CM_POWER_STATE_D3); |
314 |
+ |
315 |
+ return 0; |
316 |
+diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c |
317 |
+index bfbc23b76cd5a..3e3c898848bd8 100644 |
318 |
+--- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c |
319 |
++++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c |
320 |
+@@ -3231,7 +3231,7 @@ static noinline bool dcn20_validate_bandwidth_fp(struct dc *dc, |
321 |
+ voltage_supported = dcn20_validate_bandwidth_internal(dc, context, false); |
322 |
+ dummy_pstate_supported = context->bw_ctx.bw.dcn.clk.p_state_change_support; |
323 |
+ |
324 |
+- if (voltage_supported && dummy_pstate_supported) { |
325 |
++ if (voltage_supported && (dummy_pstate_supported || !(context->stream_count))) { |
326 |
+ context->bw_ctx.bw.dcn.clk.p_state_change_support = false; |
327 |
+ goto restore_dml_state; |
328 |
+ } |
329 |
+diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c |
330 |
+index 7b88261f57bb6..32c83f2e386ca 100644 |
331 |
+--- a/drivers/gpu/drm/tegra/sor.c |
332 |
++++ b/drivers/gpu/drm/tegra/sor.c |
333 |
+@@ -3125,21 +3125,21 @@ static int tegra_sor_init(struct host1x_client *client) |
334 |
+ if (err < 0) { |
335 |
+ dev_err(sor->dev, "failed to acquire SOR reset: %d\n", |
336 |
+ err); |
337 |
+- return err; |
338 |
++ goto rpm_put; |
339 |
+ } |
340 |
+ |
341 |
+ err = reset_control_assert(sor->rst); |
342 |
+ if (err < 0) { |
343 |
+ dev_err(sor->dev, "failed to assert SOR reset: %d\n", |
344 |
+ err); |
345 |
+- return err; |
346 |
++ goto rpm_put; |
347 |
+ } |
348 |
+ } |
349 |
+ |
350 |
+ err = clk_prepare_enable(sor->clk); |
351 |
+ if (err < 0) { |
352 |
+ dev_err(sor->dev, "failed to enable clock: %d\n", err); |
353 |
+- return err; |
354 |
++ goto rpm_put; |
355 |
+ } |
356 |
+ |
357 |
+ usleep_range(1000, 3000); |
358 |
+@@ -3150,7 +3150,7 @@ static int tegra_sor_init(struct host1x_client *client) |
359 |
+ dev_err(sor->dev, "failed to deassert SOR reset: %d\n", |
360 |
+ err); |
361 |
+ clk_disable_unprepare(sor->clk); |
362 |
+- return err; |
363 |
++ goto rpm_put; |
364 |
+ } |
365 |
+ |
366 |
+ reset_control_release(sor->rst); |
367 |
+@@ -3171,6 +3171,12 @@ static int tegra_sor_init(struct host1x_client *client) |
368 |
+ } |
369 |
+ |
370 |
+ return 0; |
371 |
++ |
372 |
++rpm_put: |
373 |
++ if (sor->rst) |
374 |
++ pm_runtime_put(sor->dev); |
375 |
++ |
376 |
++ return err; |
377 |
+ } |
378 |
+ |
379 |
+ static int tegra_sor_exit(struct host1x_client *client) |
380 |
+@@ -3916,17 +3922,10 @@ static int tegra_sor_probe(struct platform_device *pdev) |
381 |
+ platform_set_drvdata(pdev, sor); |
382 |
+ pm_runtime_enable(&pdev->dev); |
383 |
+ |
384 |
+- INIT_LIST_HEAD(&sor->client.list); |
385 |
++ host1x_client_init(&sor->client); |
386 |
+ sor->client.ops = &sor_client_ops; |
387 |
+ sor->client.dev = &pdev->dev; |
388 |
+ |
389 |
+- err = host1x_client_register(&sor->client); |
390 |
+- if (err < 0) { |
391 |
+- dev_err(&pdev->dev, "failed to register host1x client: %d\n", |
392 |
+- err); |
393 |
+- goto rpm_disable; |
394 |
+- } |
395 |
+- |
396 |
+ /* |
397 |
+ * On Tegra210 and earlier, provide our own implementation for the |
398 |
+ * pad output clock. |
399 |
+@@ -3938,13 +3937,13 @@ static int tegra_sor_probe(struct platform_device *pdev) |
400 |
+ sor->index); |
401 |
+ if (!name) { |
402 |
+ err = -ENOMEM; |
403 |
+- goto unregister; |
404 |
++ goto uninit; |
405 |
+ } |
406 |
+ |
407 |
+ err = host1x_client_resume(&sor->client); |
408 |
+ if (err < 0) { |
409 |
+ dev_err(sor->dev, "failed to resume: %d\n", err); |
410 |
+- goto unregister; |
411 |
++ goto uninit; |
412 |
+ } |
413 |
+ |
414 |
+ sor->clk_pad = tegra_clk_sor_pad_register(sor, name); |
415 |
+@@ -3955,14 +3954,20 @@ static int tegra_sor_probe(struct platform_device *pdev) |
416 |
+ err = PTR_ERR(sor->clk_pad); |
417 |
+ dev_err(sor->dev, "failed to register SOR pad clock: %d\n", |
418 |
+ err); |
419 |
+- goto unregister; |
420 |
++ goto uninit; |
421 |
++ } |
422 |
++ |
423 |
++ err = __host1x_client_register(&sor->client); |
424 |
++ if (err < 0) { |
425 |
++ dev_err(&pdev->dev, "failed to register host1x client: %d\n", |
426 |
++ err); |
427 |
++ goto uninit; |
428 |
+ } |
429 |
+ |
430 |
+ return 0; |
431 |
+ |
432 |
+-unregister: |
433 |
+- host1x_client_unregister(&sor->client); |
434 |
+-rpm_disable: |
435 |
++uninit: |
436 |
++ host1x_client_exit(&sor->client); |
437 |
+ pm_runtime_disable(&pdev->dev); |
438 |
+ remove: |
439 |
+ tegra_output_remove(&sor->output); |
440 |
+diff --git a/drivers/gpu/host1x/bus.c b/drivers/gpu/host1x/bus.c |
441 |
+index 68a766ff0e9d2..b98d746141a89 100644 |
442 |
+--- a/drivers/gpu/host1x/bus.c |
443 |
++++ b/drivers/gpu/host1x/bus.c |
444 |
+@@ -704,6 +704,29 @@ void host1x_driver_unregister(struct host1x_driver *driver) |
445 |
+ } |
446 |
+ EXPORT_SYMBOL(host1x_driver_unregister); |
447 |
+ |
448 |
++/** |
449 |
++ * __host1x_client_init() - initialize a host1x client |
450 |
++ * @client: host1x client |
451 |
++ * @key: lock class key for the client-specific mutex |
452 |
++ */ |
453 |
++void __host1x_client_init(struct host1x_client *client, struct lock_class_key *key) |
454 |
++{ |
455 |
++ INIT_LIST_HEAD(&client->list); |
456 |
++ __mutex_init(&client->lock, "host1x client lock", key); |
457 |
++ client->usecount = 0; |
458 |
++} |
459 |
++EXPORT_SYMBOL(__host1x_client_init); |
460 |
++ |
461 |
++/** |
462 |
++ * host1x_client_exit() - uninitialize a host1x client |
463 |
++ * @client: host1x client |
464 |
++ */ |
465 |
++void host1x_client_exit(struct host1x_client *client) |
466 |
++{ |
467 |
++ mutex_destroy(&client->lock); |
468 |
++} |
469 |
++EXPORT_SYMBOL(host1x_client_exit); |
470 |
++ |
471 |
+ /** |
472 |
+ * __host1x_client_register() - register a host1x client |
473 |
+ * @client: host1x client |
474 |
+@@ -716,16 +739,11 @@ EXPORT_SYMBOL(host1x_driver_unregister); |
475 |
+ * device and call host1x_device_init(), which will in turn call each client's |
476 |
+ * &host1x_client_ops.init implementation. |
477 |
+ */ |
478 |
+-int __host1x_client_register(struct host1x_client *client, |
479 |
+- struct lock_class_key *key) |
480 |
++int __host1x_client_register(struct host1x_client *client) |
481 |
+ { |
482 |
+ struct host1x *host1x; |
483 |
+ int err; |
484 |
+ |
485 |
+- INIT_LIST_HEAD(&client->list); |
486 |
+- __mutex_init(&client->lock, "host1x client lock", key); |
487 |
+- client->usecount = 0; |
488 |
+- |
489 |
+ mutex_lock(&devices_lock); |
490 |
+ |
491 |
+ list_for_each_entry(host1x, &devices, list) { |
492 |
+diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig |
493 |
+index 786b71ef7738a..c6a643f4fc5f5 100644 |
494 |
+--- a/drivers/hid/Kconfig |
495 |
++++ b/drivers/hid/Kconfig |
496 |
+@@ -93,11 +93,11 @@ menu "Special HID drivers" |
497 |
+ depends on HID |
498 |
+ |
499 |
+ config HID_A4TECH |
500 |
+- tristate "A4 tech mice" |
501 |
++ tristate "A4TECH mice" |
502 |
+ depends on HID |
503 |
+ default !EXPERT |
504 |
+ help |
505 |
+- Support for A4 tech X5 and WOP-35 / Trust 450L mice. |
506 |
++ Support for some A4TECH mice with two scroll wheels. |
507 |
+ |
508 |
+ config HID_ACCUTOUCH |
509 |
+ tristate "Accutouch touch device" |
510 |
+diff --git a/drivers/hid/hid-a4tech.c b/drivers/hid/hid-a4tech.c |
511 |
+index 3a8c4a5971f70..2cbc32dda7f74 100644 |
512 |
+--- a/drivers/hid/hid-a4tech.c |
513 |
++++ b/drivers/hid/hid-a4tech.c |
514 |
+@@ -147,6 +147,8 @@ static const struct hid_device_id a4_devices[] = { |
515 |
+ .driver_data = A4_2WHEEL_MOUSE_HACK_B8 }, |
516 |
+ { HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_RP_649), |
517 |
+ .driver_data = A4_2WHEEL_MOUSE_HACK_B8 }, |
518 |
++ { HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_NB_95), |
519 |
++ .driver_data = A4_2WHEEL_MOUSE_HACK_B8 }, |
520 |
+ { } |
521 |
+ }; |
522 |
+ MODULE_DEVICE_TABLE(hid, a4_devices); |
523 |
+diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c |
524 |
+index 2ab22b9259418..60606c11bdaf0 100644 |
525 |
+--- a/drivers/hid/hid-asus.c |
526 |
++++ b/drivers/hid/hid-asus.c |
527 |
+@@ -335,7 +335,7 @@ static int asus_raw_event(struct hid_device *hdev, |
528 |
+ if (drvdata->quirks & QUIRK_MEDION_E1239T) |
529 |
+ return asus_e1239t_event(drvdata, data, size); |
530 |
+ |
531 |
+- if (drvdata->quirks & QUIRK_ROG_NKEY_KEYBOARD) { |
532 |
++ if (drvdata->quirks & QUIRK_USE_KBD_BACKLIGHT) { |
533 |
+ /* |
534 |
+ * Skip these report ID, the device emits a continuous stream associated |
535 |
+ * with the AURA mode it is in which looks like an 'echo'. |
536 |
+@@ -355,6 +355,16 @@ static int asus_raw_event(struct hid_device *hdev, |
537 |
+ return -1; |
538 |
+ } |
539 |
+ } |
540 |
++ if (drvdata->quirks & QUIRK_ROG_NKEY_KEYBOARD) { |
541 |
++ /* |
542 |
++ * G713 and G733 send these codes on some keypresses, depending on |
543 |
++ * the key pressed it can trigger a shutdown event if not caught. |
544 |
++ */ |
545 |
++ if(data[0] == 0x02 && data[1] == 0x30) { |
546 |
++ return -1; |
547 |
++ } |
548 |
++ } |
549 |
++ |
550 |
+ } |
551 |
+ |
552 |
+ return 0; |
553 |
+diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c |
554 |
+index 097cb1ee31268..0f69f35f2957e 100644 |
555 |
+--- a/drivers/hid/hid-core.c |
556 |
++++ b/drivers/hid/hid-core.c |
557 |
+@@ -2005,6 +2005,9 @@ int hid_connect(struct hid_device *hdev, unsigned int connect_mask) |
558 |
+ case BUS_I2C: |
559 |
+ bus = "I2C"; |
560 |
+ break; |
561 |
++ case BUS_VIRTUAL: |
562 |
++ bus = "VIRTUAL"; |
563 |
++ break; |
564 |
+ default: |
565 |
+ bus = "<UNKNOWN>"; |
566 |
+ } |
567 |
+diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c |
568 |
+index d7eaf91003706..982737827b871 100644 |
569 |
+--- a/drivers/hid/hid-debug.c |
570 |
++++ b/drivers/hid/hid-debug.c |
571 |
+@@ -929,6 +929,7 @@ static const char *keys[KEY_MAX + 1] = { |
572 |
+ [KEY_APPSELECT] = "AppSelect", |
573 |
+ [KEY_SCREENSAVER] = "ScreenSaver", |
574 |
+ [KEY_VOICECOMMAND] = "VoiceCommand", |
575 |
++ [KEY_EMOJI_PICKER] = "EmojiPicker", |
576 |
+ [KEY_BRIGHTNESS_MIN] = "BrightnessMin", |
577 |
+ [KEY_BRIGHTNESS_MAX] = "BrightnessMax", |
578 |
+ [KEY_BRIGHTNESS_AUTO] = "BrightnessAuto", |
579 |
+diff --git a/drivers/hid/hid-gt683r.c b/drivers/hid/hid-gt683r.c |
580 |
+index 898871c8c768e..29ccb0accfba8 100644 |
581 |
+--- a/drivers/hid/hid-gt683r.c |
582 |
++++ b/drivers/hid/hid-gt683r.c |
583 |
+@@ -54,6 +54,7 @@ static const struct hid_device_id gt683r_led_id[] = { |
584 |
+ { HID_USB_DEVICE(USB_VENDOR_ID_MSI, USB_DEVICE_ID_MSI_GT683R_LED_PANEL) }, |
585 |
+ { } |
586 |
+ }; |
587 |
++MODULE_DEVICE_TABLE(hid, gt683r_led_id); |
588 |
+ |
589 |
+ static void gt683r_brightness_set(struct led_classdev *led_cdev, |
590 |
+ enum led_brightness brightness) |
591 |
+diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h |
592 |
+index ba338973e968d..03978111d9448 100644 |
593 |
+--- a/drivers/hid/hid-ids.h |
594 |
++++ b/drivers/hid/hid-ids.h |
595 |
+@@ -26,6 +26,7 @@ |
596 |
+ #define USB_DEVICE_ID_A4TECH_WCP32PU 0x0006 |
597 |
+ #define USB_DEVICE_ID_A4TECH_X5_005D 0x000a |
598 |
+ #define USB_DEVICE_ID_A4TECH_RP_649 0x001a |
599 |
++#define USB_DEVICE_ID_A4TECH_NB_95 0x022b |
600 |
+ |
601 |
+ #define USB_VENDOR_ID_AASHIMA 0x06d6 |
602 |
+ #define USB_DEVICE_ID_AASHIMA_GAMEPAD 0x0025 |
603 |
+@@ -749,6 +750,7 @@ |
604 |
+ #define USB_DEVICE_ID_LENOVO_X1_COVER 0x6085 |
605 |
+ #define USB_DEVICE_ID_LENOVO_X1_TAB 0x60a3 |
606 |
+ #define USB_DEVICE_ID_LENOVO_X1_TAB3 0x60b5 |
607 |
++#define USB_DEVICE_ID_LENOVO_OPTICAL_USB_MOUSE_600E 0x600e |
608 |
+ #define USB_DEVICE_ID_LENOVO_PIXART_USB_MOUSE_608D 0x608d |
609 |
+ #define USB_DEVICE_ID_LENOVO_PIXART_USB_MOUSE_6019 0x6019 |
610 |
+ #define USB_DEVICE_ID_LENOVO_PIXART_USB_MOUSE_602E 0x602e |
611 |
+@@ -1042,6 +1044,7 @@ |
612 |
+ #define USB_DEVICE_ID_SAITEK_X52 0x075c |
613 |
+ #define USB_DEVICE_ID_SAITEK_X52_2 0x0255 |
614 |
+ #define USB_DEVICE_ID_SAITEK_X52_PRO 0x0762 |
615 |
++#define USB_DEVICE_ID_SAITEK_X65 0x0b6a |
616 |
+ |
617 |
+ #define USB_VENDOR_ID_SAMSUNG 0x0419 |
618 |
+ #define USB_DEVICE_ID_SAMSUNG_IR_REMOTE 0x0001 |
619 |
+@@ -1152,6 +1155,7 @@ |
620 |
+ #define USB_DEVICE_ID_SYNAPTICS_DELL_K12A 0x2819 |
621 |
+ #define USB_DEVICE_ID_SYNAPTICS_ACER_SWITCH5_012 0x2968 |
622 |
+ #define USB_DEVICE_ID_SYNAPTICS_TP_V103 0x5710 |
623 |
++#define USB_DEVICE_ID_SYNAPTICS_DELL_K15A 0x6e21 |
624 |
+ #define USB_DEVICE_ID_SYNAPTICS_ACER_ONE_S1002 0x73f4 |
625 |
+ #define USB_DEVICE_ID_SYNAPTICS_ACER_ONE_S1003 0x73f5 |
626 |
+ #define USB_DEVICE_ID_SYNAPTICS_ACER_SWITCH5 0x81a7 |
627 |
+diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c |
628 |
+index 236bccd37760d..e982d8173c9c7 100644 |
629 |
+--- a/drivers/hid/hid-input.c |
630 |
++++ b/drivers/hid/hid-input.c |
631 |
+@@ -963,6 +963,9 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel |
632 |
+ |
633 |
+ case 0x0cd: map_key_clear(KEY_PLAYPAUSE); break; |
634 |
+ case 0x0cf: map_key_clear(KEY_VOICECOMMAND); break; |
635 |
++ |
636 |
++ case 0x0d9: map_key_clear(KEY_EMOJI_PICKER); break; |
637 |
++ |
638 |
+ case 0x0e0: map_abs_clear(ABS_VOLUME); break; |
639 |
+ case 0x0e2: map_key_clear(KEY_MUTE); break; |
640 |
+ case 0x0e5: map_key_clear(KEY_BASSBOOST); break; |
641 |
+diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c |
642 |
+index 55dcb8536286b..2e4fb76c45f3d 100644 |
643 |
+--- a/drivers/hid/hid-multitouch.c |
644 |
++++ b/drivers/hid/hid-multitouch.c |
645 |
+@@ -70,6 +70,7 @@ MODULE_LICENSE("GPL"); |
646 |
+ #define MT_QUIRK_WIN8_PTP_BUTTONS BIT(18) |
647 |
+ #define MT_QUIRK_SEPARATE_APP_REPORT BIT(19) |
648 |
+ #define MT_QUIRK_FORCE_MULTI_INPUT BIT(20) |
649 |
++#define MT_QUIRK_DISABLE_WAKEUP BIT(21) |
650 |
+ |
651 |
+ #define MT_INPUTMODE_TOUCHSCREEN 0x02 |
652 |
+ #define MT_INPUTMODE_TOUCHPAD 0x03 |
653 |
+@@ -191,6 +192,7 @@ static void mt_post_parse(struct mt_device *td, struct mt_application *app); |
654 |
+ #define MT_CLS_EXPORT_ALL_INPUTS 0x0013 |
655 |
+ /* reserved 0x0014 */ |
656 |
+ #define MT_CLS_WIN_8_FORCE_MULTI_INPUT 0x0015 |
657 |
++#define MT_CLS_WIN_8_DISABLE_WAKEUP 0x0016 |
658 |
+ |
659 |
+ /* vendor specific classes */ |
660 |
+ #define MT_CLS_3M 0x0101 |
661 |
+@@ -283,6 +285,15 @@ static const struct mt_class mt_classes[] = { |
662 |
+ MT_QUIRK_WIN8_PTP_BUTTONS | |
663 |
+ MT_QUIRK_FORCE_MULTI_INPUT, |
664 |
+ .export_all_inputs = true }, |
665 |
++ { .name = MT_CLS_WIN_8_DISABLE_WAKEUP, |
666 |
++ .quirks = MT_QUIRK_ALWAYS_VALID | |
667 |
++ MT_QUIRK_IGNORE_DUPLICATES | |
668 |
++ MT_QUIRK_HOVERING | |
669 |
++ MT_QUIRK_CONTACT_CNT_ACCURATE | |
670 |
++ MT_QUIRK_STICKY_FINGERS | |
671 |
++ MT_QUIRK_WIN8_PTP_BUTTONS | |
672 |
++ MT_QUIRK_DISABLE_WAKEUP, |
673 |
++ .export_all_inputs = true }, |
674 |
+ |
675 |
+ /* |
676 |
+ * vendor specific classes |
677 |
+@@ -763,7 +774,8 @@ static int mt_touch_input_mapping(struct hid_device *hdev, struct hid_input *hi, |
678 |
+ return 1; |
679 |
+ case HID_DG_CONFIDENCE: |
680 |
+ if ((cls->name == MT_CLS_WIN_8 || |
681 |
+- cls->name == MT_CLS_WIN_8_FORCE_MULTI_INPUT) && |
682 |
++ cls->name == MT_CLS_WIN_8_FORCE_MULTI_INPUT || |
683 |
++ cls->name == MT_CLS_WIN_8_DISABLE_WAKEUP) && |
684 |
+ (field->application == HID_DG_TOUCHPAD || |
685 |
+ field->application == HID_DG_TOUCHSCREEN)) |
686 |
+ app->quirks |= MT_QUIRK_CONFIDENCE; |
687 |
+@@ -1580,13 +1592,13 @@ static int mt_input_configured(struct hid_device *hdev, struct hid_input *hi) |
688 |
+ /* we do not set suffix = "Touchscreen" */ |
689 |
+ hi->input->name = hdev->name; |
690 |
+ break; |
691 |
+- case HID_DG_STYLUS: |
692 |
+- /* force BTN_STYLUS to allow tablet matching in udev */ |
693 |
+- __set_bit(BTN_STYLUS, hi->input->keybit); |
694 |
+- break; |
695 |
+ case HID_VD_ASUS_CUSTOM_MEDIA_KEYS: |
696 |
+ suffix = "Custom Media Keys"; |
697 |
+ break; |
698 |
++ case HID_DG_STYLUS: |
699 |
++ /* force BTN_STYLUS to allow tablet matching in udev */ |
700 |
++ __set_bit(BTN_STYLUS, hi->input->keybit); |
701 |
++ fallthrough; |
702 |
+ case HID_DG_PEN: |
703 |
+ suffix = "Stylus"; |
704 |
+ break; |
705 |
+@@ -1753,8 +1765,14 @@ static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id) |
706 |
+ #ifdef CONFIG_PM |
707 |
+ static int mt_suspend(struct hid_device *hdev, pm_message_t state) |
708 |
+ { |
709 |
++ struct mt_device *td = hid_get_drvdata(hdev); |
710 |
++ |
711 |
+ /* High latency is desirable for power savings during S3/S0ix */ |
712 |
+- mt_set_modes(hdev, HID_LATENCY_HIGH, true, true); |
713 |
++ if (td->mtclass.quirks & MT_QUIRK_DISABLE_WAKEUP) |
714 |
++ mt_set_modes(hdev, HID_LATENCY_HIGH, false, false); |
715 |
++ else |
716 |
++ mt_set_modes(hdev, HID_LATENCY_HIGH, true, true); |
717 |
++ |
718 |
+ return 0; |
719 |
+ } |
720 |
+ |
721 |
+@@ -1813,6 +1831,12 @@ static const struct hid_device_id mt_devices[] = { |
722 |
+ MT_USB_DEVICE(USB_VENDOR_ID_ANTON, |
723 |
+ USB_DEVICE_ID_ANTON_TOUCH_PAD) }, |
724 |
+ |
725 |
++ /* Asus T101HA */ |
726 |
++ { .driver_data = MT_CLS_WIN_8_DISABLE_WAKEUP, |
727 |
++ HID_DEVICE(BUS_USB, HID_GROUP_MULTITOUCH_WIN_8, |
728 |
++ USB_VENDOR_ID_ASUSTEK, |
729 |
++ USB_DEVICE_ID_ASUSTEK_T101HA_KEYBOARD) }, |
730 |
++ |
731 |
+ /* Asus T304UA */ |
732 |
+ { .driver_data = MT_CLS_ASUS, |
733 |
+ HID_DEVICE(BUS_USB, HID_GROUP_MULTITOUCH_WIN_8, |
734 |
+diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c |
735 |
+index 1a9daf03dbfae..bb2b60bc618f6 100644 |
736 |
+--- a/drivers/hid/hid-quirks.c |
737 |
++++ b/drivers/hid/hid-quirks.c |
738 |
+@@ -110,6 +110,7 @@ static const struct hid_device_id hid_quirks[] = { |
739 |
+ { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_PENSKETCH_M912), HID_QUIRK_MULTI_INPUT }, |
740 |
+ { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_M406XE), HID_QUIRK_MULTI_INPUT }, |
741 |
+ { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_PIXART_USB_OPTICAL_MOUSE_ID2), HID_QUIRK_ALWAYS_POLL }, |
742 |
++ { HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_OPTICAL_USB_MOUSE_600E), HID_QUIRK_ALWAYS_POLL }, |
743 |
+ { HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_PIXART_USB_MOUSE_608D), HID_QUIRK_ALWAYS_POLL }, |
744 |
+ { HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_PIXART_USB_MOUSE_6019), HID_QUIRK_ALWAYS_POLL }, |
745 |
+ { HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_PIXART_USB_MOUSE_602E), HID_QUIRK_ALWAYS_POLL }, |
746 |
+@@ -158,6 +159,7 @@ static const struct hid_device_id hid_quirks[] = { |
747 |
+ { HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_X52), HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE }, |
748 |
+ { HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_X52_2), HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE }, |
749 |
+ { HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_X52_PRO), HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE }, |
750 |
++ { HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_X65), HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE }, |
751 |
+ { HID_USB_DEVICE(USB_VENDOR_ID_SEMICO, USB_DEVICE_ID_SEMICO_USB_KEYKOARD2), HID_QUIRK_NO_INIT_REPORTS }, |
752 |
+ { HID_USB_DEVICE(USB_VENDOR_ID_SEMICO, USB_DEVICE_ID_SEMICO_USB_KEYKOARD), HID_QUIRK_NO_INIT_REPORTS }, |
753 |
+ { HID_USB_DEVICE(USB_VENDOR_ID_SENNHEISER, USB_DEVICE_ID_SENNHEISER_BTD500USB), HID_QUIRK_NOGET }, |
754 |
+@@ -176,6 +178,7 @@ static const struct hid_device_id hid_quirks[] = { |
755 |
+ { HID_USB_DEVICE(USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_QUAD_HD), HID_QUIRK_NO_INIT_REPORTS }, |
756 |
+ { HID_USB_DEVICE(USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_TP_V103), HID_QUIRK_NO_INIT_REPORTS }, |
757 |
+ { HID_USB_DEVICE(USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_DELL_K12A), HID_QUIRK_NO_INIT_REPORTS }, |
758 |
++ { HID_USB_DEVICE(USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_DELL_K15A), HID_QUIRK_NO_INIT_REPORTS }, |
759 |
+ { HID_USB_DEVICE(USB_VENDOR_ID_TOPMAX, USB_DEVICE_ID_TOPMAX_COBRAPAD), HID_QUIRK_BADPAD }, |
760 |
+ { HID_USB_DEVICE(USB_VENDOR_ID_TOUCHPACK, USB_DEVICE_ID_TOUCHPACK_RTS), HID_QUIRK_MULTI_INPUT }, |
761 |
+ { HID_USB_DEVICE(USB_VENDOR_ID_TPV, USB_DEVICE_ID_TPV_OPTICAL_TOUCHSCREEN_8882), HID_QUIRK_NOGET }, |
762 |
+@@ -211,6 +214,7 @@ static const struct hid_device_id hid_have_special_driver[] = { |
763 |
+ { HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU) }, |
764 |
+ { HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_X5_005D) }, |
765 |
+ { HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_RP_649) }, |
766 |
++ { HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_NB_95) }, |
767 |
+ #endif |
768 |
+ #if IS_ENABLED(CONFIG_HID_ACCUTOUCH) |
769 |
+ { HID_USB_DEVICE(USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_ACCUTOUCH_2216) }, |
770 |
+diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c |
771 |
+index 3dd7d32467378..f9983145d4e70 100644 |
772 |
+--- a/drivers/hid/hid-sensor-hub.c |
773 |
++++ b/drivers/hid/hid-sensor-hub.c |
774 |
+@@ -210,16 +210,21 @@ int sensor_hub_set_feature(struct hid_sensor_hub_device *hsdev, u32 report_id, |
775 |
+ buffer_size = buffer_size / sizeof(__s32); |
776 |
+ if (buffer_size) { |
777 |
+ for (i = 0; i < buffer_size; ++i) { |
778 |
+- hid_set_field(report->field[field_index], i, |
779 |
+- (__force __s32)cpu_to_le32(*buf32)); |
780 |
++ ret = hid_set_field(report->field[field_index], i, |
781 |
++ (__force __s32)cpu_to_le32(*buf32)); |
782 |
++ if (ret) |
783 |
++ goto done_proc; |
784 |
++ |
785 |
+ ++buf32; |
786 |
+ } |
787 |
+ } |
788 |
+ if (remaining_bytes) { |
789 |
+ value = 0; |
790 |
+ memcpy(&value, (u8 *)buf32, remaining_bytes); |
791 |
+- hid_set_field(report->field[field_index], i, |
792 |
+- (__force __s32)cpu_to_le32(value)); |
793 |
++ ret = hid_set_field(report->field[field_index], i, |
794 |
++ (__force __s32)cpu_to_le32(value)); |
795 |
++ if (ret) |
796 |
++ goto done_proc; |
797 |
+ } |
798 |
+ hid_hw_request(hsdev->hdev, report, HID_REQ_SET_REPORT); |
799 |
+ hid_hw_wait(hsdev->hdev); |
800 |
+diff --git a/drivers/hid/intel-ish-hid/ipc/hw-ish.h b/drivers/hid/intel-ish-hid/ipc/hw-ish.h |
801 |
+index 21b87e4003afc..07e3cbc86bef1 100644 |
802 |
+--- a/drivers/hid/intel-ish-hid/ipc/hw-ish.h |
803 |
++++ b/drivers/hid/intel-ish-hid/ipc/hw-ish.h |
804 |
+@@ -28,6 +28,8 @@ |
805 |
+ #define EHL_Ax_DEVICE_ID 0x4BB3 |
806 |
+ #define TGL_LP_DEVICE_ID 0xA0FC |
807 |
+ #define TGL_H_DEVICE_ID 0x43FC |
808 |
++#define ADL_S_DEVICE_ID 0x7AF8 |
809 |
++#define ADL_P_DEVICE_ID 0x51FC |
810 |
+ |
811 |
+ #define REVISION_ID_CHT_A0 0x6 |
812 |
+ #define REVISION_ID_CHT_Ax_SI 0x0 |
813 |
+diff --git a/drivers/hid/intel-ish-hid/ipc/pci-ish.c b/drivers/hid/intel-ish-hid/ipc/pci-ish.c |
814 |
+index 06081cf9b85a2..a6d5173ac0030 100644 |
815 |
+--- a/drivers/hid/intel-ish-hid/ipc/pci-ish.c |
816 |
++++ b/drivers/hid/intel-ish-hid/ipc/pci-ish.c |
817 |
+@@ -39,6 +39,8 @@ static const struct pci_device_id ish_pci_tbl[] = { |
818 |
+ {PCI_DEVICE(PCI_VENDOR_ID_INTEL, EHL_Ax_DEVICE_ID)}, |
819 |
+ {PCI_DEVICE(PCI_VENDOR_ID_INTEL, TGL_LP_DEVICE_ID)}, |
820 |
+ {PCI_DEVICE(PCI_VENDOR_ID_INTEL, TGL_H_DEVICE_ID)}, |
821 |
++ {PCI_DEVICE(PCI_VENDOR_ID_INTEL, ADL_S_DEVICE_ID)}, |
822 |
++ {PCI_DEVICE(PCI_VENDOR_ID_INTEL, ADL_P_DEVICE_ID)}, |
823 |
+ {0, } |
824 |
+ }; |
825 |
+ MODULE_DEVICE_TABLE(pci, ish_pci_tbl); |
826 |
+diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c |
827 |
+index 86257ce6d6198..4e9077363c962 100644 |
828 |
+--- a/drivers/hid/usbhid/hid-core.c |
829 |
++++ b/drivers/hid/usbhid/hid-core.c |
830 |
+@@ -374,7 +374,7 @@ static int hid_submit_ctrl(struct hid_device *hid) |
831 |
+ raw_report = usbhid->ctrl[usbhid->ctrltail].raw_report; |
832 |
+ dir = usbhid->ctrl[usbhid->ctrltail].dir; |
833 |
+ |
834 |
+- len = ((report->size - 1) >> 3) + 1 + (report->id > 0); |
835 |
++ len = hid_report_len(report); |
836 |
+ if (dir == USB_DIR_OUT) { |
837 |
+ usbhid->urbctrl->pipe = usb_sndctrlpipe(hid_to_usb_dev(hid), 0); |
838 |
+ usbhid->urbctrl->transfer_buffer_length = len; |
839 |
+diff --git a/drivers/hwmon/pmbus/q54sj108a2.c b/drivers/hwmon/pmbus/q54sj108a2.c |
840 |
+index aec512766c319..0976268b2670b 100644 |
841 |
+--- a/drivers/hwmon/pmbus/q54sj108a2.c |
842 |
++++ b/drivers/hwmon/pmbus/q54sj108a2.c |
843 |
+@@ -299,7 +299,7 @@ static int q54sj108a2_probe(struct i2c_client *client) |
844 |
+ dev_err(&client->dev, "Failed to read Manufacturer ID\n"); |
845 |
+ return ret; |
846 |
+ } |
847 |
+- if (ret != 5 || strncmp(buf, "DELTA", 5)) { |
848 |
++ if (ret != 6 || strncmp(buf, "DELTA", 5)) { |
849 |
+ buf[ret] = '\0'; |
850 |
+ dev_err(dev, "Unsupported Manufacturer ID '%s'\n", buf); |
851 |
+ return -ENODEV; |
852 |
+diff --git a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c |
853 |
+index c84c8bf2bc20e..fc99ad8e4a388 100644 |
854 |
+--- a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c |
855 |
++++ b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c |
856 |
+@@ -3815,6 +3815,7 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
857 |
+ dev_err(&pdev->dev, |
858 |
+ "invalid sram_size %dB or board span %ldB\n", |
859 |
+ mgp->sram_size, mgp->board_span); |
860 |
++ status = -EINVAL; |
861 |
+ goto abort_with_ioremap; |
862 |
+ } |
863 |
+ memcpy_fromio(mgp->eeprom_strings, |
864 |
+diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/init.c b/drivers/net/wireless/mediatek/mt76/mt7921/init.c |
865 |
+index 89a13b4a74a45..c0001e38fcce9 100644 |
866 |
+--- a/drivers/net/wireless/mediatek/mt76/mt7921/init.c |
867 |
++++ b/drivers/net/wireless/mediatek/mt76/mt7921/init.c |
868 |
+@@ -74,8 +74,8 @@ mt7921_init_wiphy(struct ieee80211_hw *hw) |
869 |
+ struct wiphy *wiphy = hw->wiphy; |
870 |
+ |
871 |
+ hw->queues = 4; |
872 |
+- hw->max_rx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF; |
873 |
+- hw->max_tx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF; |
874 |
++ hw->max_rx_aggregation_subframes = 64; |
875 |
++ hw->max_tx_aggregation_subframes = 128; |
876 |
+ |
877 |
+ phy->slottime = 9; |
878 |
+ |
879 |
+diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/main.c b/drivers/net/wireless/mediatek/mt76/mt7921/main.c |
880 |
+index ada943c7a9500..2c781b6f89e53 100644 |
881 |
+--- a/drivers/net/wireless/mediatek/mt76/mt7921/main.c |
882 |
++++ b/drivers/net/wireless/mediatek/mt76/mt7921/main.c |
883 |
+@@ -74,8 +74,7 @@ mt7921_init_he_caps(struct mt7921_phy *phy, enum nl80211_band band, |
884 |
+ IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_IN_2G; |
885 |
+ else if (band == NL80211_BAND_5GHZ) |
886 |
+ he_cap_elem->phy_cap_info[0] = |
887 |
+- IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G | |
888 |
+- IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G; |
889 |
++ IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G; |
890 |
+ |
891 |
+ he_cap_elem->phy_cap_info[1] = |
892 |
+ IEEE80211_HE_PHY_CAP1_LDPC_CODING_IN_PAYLOAD; |
893 |
+diff --git a/drivers/nvme/target/loop.c b/drivers/nvme/target/loop.c |
894 |
+index 14913a4588ecc..0f22f333ff247 100644 |
895 |
+--- a/drivers/nvme/target/loop.c |
896 |
++++ b/drivers/nvme/target/loop.c |
897 |
+@@ -261,7 +261,8 @@ static const struct blk_mq_ops nvme_loop_admin_mq_ops = { |
898 |
+ |
899 |
+ static void nvme_loop_destroy_admin_queue(struct nvme_loop_ctrl *ctrl) |
900 |
+ { |
901 |
+- clear_bit(NVME_LOOP_Q_LIVE, &ctrl->queues[0].flags); |
902 |
++ if (!test_and_clear_bit(NVME_LOOP_Q_LIVE, &ctrl->queues[0].flags)) |
903 |
++ return; |
904 |
+ nvmet_sq_destroy(&ctrl->queues[0].nvme_sq); |
905 |
+ blk_cleanup_queue(ctrl->ctrl.admin_q); |
906 |
+ blk_cleanup_queue(ctrl->ctrl.fabrics_q); |
907 |
+@@ -297,6 +298,7 @@ static void nvme_loop_destroy_io_queues(struct nvme_loop_ctrl *ctrl) |
908 |
+ clear_bit(NVME_LOOP_Q_LIVE, &ctrl->queues[i].flags); |
909 |
+ nvmet_sq_destroy(&ctrl->queues[i].nvme_sq); |
910 |
+ } |
911 |
++ ctrl->ctrl.queue_count = 1; |
912 |
+ } |
913 |
+ |
914 |
+ static int nvme_loop_init_io_queues(struct nvme_loop_ctrl *ctrl) |
915 |
+@@ -403,6 +405,7 @@ static int nvme_loop_configure_admin_queue(struct nvme_loop_ctrl *ctrl) |
916 |
+ return 0; |
917 |
+ |
918 |
+ out_cleanup_queue: |
919 |
++ clear_bit(NVME_LOOP_Q_LIVE, &ctrl->queues[0].flags); |
920 |
+ blk_cleanup_queue(ctrl->ctrl.admin_q); |
921 |
+ out_cleanup_fabrics_q: |
922 |
+ blk_cleanup_queue(ctrl->ctrl.fabrics_q); |
923 |
+@@ -460,8 +463,10 @@ static void nvme_loop_reset_ctrl_work(struct work_struct *work) |
924 |
+ nvme_loop_shutdown_ctrl(ctrl); |
925 |
+ |
926 |
+ if (!nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_CONNECTING)) { |
927 |
+- /* state change failure should never happen */ |
928 |
+- WARN_ON_ONCE(1); |
929 |
++ if (ctrl->ctrl.state != NVME_CTRL_DELETING && |
930 |
++ ctrl->ctrl.state != NVME_CTRL_DELETING_NOIO) |
931 |
++ /* state change failure for non-deleted ctrl? */ |
932 |
++ WARN_ON_ONCE(1); |
933 |
+ return; |
934 |
+ } |
935 |
+ |
936 |
+diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c |
937 |
+index e5076f09d5ed4..16a0470aedfc4 100644 |
938 |
+--- a/drivers/scsi/qedf/qedf_main.c |
939 |
++++ b/drivers/scsi/qedf/qedf_main.c |
940 |
+@@ -1827,22 +1827,20 @@ static int qedf_vport_create(struct fc_vport *vport, bool disabled) |
941 |
+ fcoe_wwn_to_str(vport->port_name, buf, sizeof(buf)); |
942 |
+ QEDF_WARN(&(base_qedf->dbg_ctx), "Failed to create vport, " |
943 |
+ "WWPN (0x%s) already exists.\n", buf); |
944 |
+- goto err1; |
945 |
++ return rc; |
946 |
+ } |
947 |
+ |
948 |
+ if (atomic_read(&base_qedf->link_state) != QEDF_LINK_UP) { |
949 |
+ QEDF_WARN(&(base_qedf->dbg_ctx), "Cannot create vport " |
950 |
+ "because link is not up.\n"); |
951 |
+- rc = -EIO; |
952 |
+- goto err1; |
953 |
++ return -EIO; |
954 |
+ } |
955 |
+ |
956 |
+ vn_port = libfc_vport_create(vport, sizeof(struct qedf_ctx)); |
957 |
+ if (!vn_port) { |
958 |
+ QEDF_WARN(&(base_qedf->dbg_ctx), "Could not create lport " |
959 |
+ "for vport.\n"); |
960 |
+- rc = -ENOMEM; |
961 |
+- goto err1; |
962 |
++ return -ENOMEM; |
963 |
+ } |
964 |
+ |
965 |
+ fcoe_wwn_to_str(vport->port_name, buf, sizeof(buf)); |
966 |
+@@ -1866,7 +1864,7 @@ static int qedf_vport_create(struct fc_vport *vport, bool disabled) |
967 |
+ if (rc) { |
968 |
+ QEDF_ERR(&(base_qedf->dbg_ctx), "Could not allocate memory " |
969 |
+ "for lport stats.\n"); |
970 |
+- goto err2; |
971 |
++ goto err; |
972 |
+ } |
973 |
+ |
974 |
+ fc_set_wwnn(vn_port, vport->node_name); |
975 |
+@@ -1884,7 +1882,7 @@ static int qedf_vport_create(struct fc_vport *vport, bool disabled) |
976 |
+ if (rc) { |
977 |
+ QEDF_WARN(&base_qedf->dbg_ctx, |
978 |
+ "Error adding Scsi_Host rc=0x%x.\n", rc); |
979 |
+- goto err2; |
980 |
++ goto err; |
981 |
+ } |
982 |
+ |
983 |
+ /* Set default dev_loss_tmo based on module parameter */ |
984 |
+@@ -1925,9 +1923,10 @@ static int qedf_vport_create(struct fc_vport *vport, bool disabled) |
985 |
+ vport_qedf->dbg_ctx.host_no = vn_port->host->host_no; |
986 |
+ vport_qedf->dbg_ctx.pdev = base_qedf->pdev; |
987 |
+ |
988 |
+-err2: |
989 |
++ return 0; |
990 |
++ |
991 |
++err: |
992 |
+ scsi_host_put(vn_port->host); |
993 |
+-err1: |
994 |
+ return rc; |
995 |
+ } |
996 |
+ |
997 |
+@@ -1968,8 +1967,7 @@ static int qedf_vport_destroy(struct fc_vport *vport) |
998 |
+ fc_lport_free_stats(vn_port); |
999 |
+ |
1000 |
+ /* Release Scsi_Host */ |
1001 |
+- if (vn_port->host) |
1002 |
+- scsi_host_put(vn_port->host); |
1003 |
++ scsi_host_put(vn_port->host); |
1004 |
+ |
1005 |
+ out: |
1006 |
+ return 0; |
1007 |
+diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c |
1008 |
+index d92cec12454cb..d33355ab6e145 100644 |
1009 |
+--- a/drivers/scsi/scsi_devinfo.c |
1010 |
++++ b/drivers/scsi/scsi_devinfo.c |
1011 |
+@@ -184,6 +184,7 @@ static struct { |
1012 |
+ {"HP", "C3323-300", "4269", BLIST_NOTQ}, |
1013 |
+ {"HP", "C5713A", NULL, BLIST_NOREPORTLUN}, |
1014 |
+ {"HP", "DISK-SUBSYSTEM", "*", BLIST_REPORTLUN2}, |
1015 |
++ {"HPE", "OPEN-", "*", BLIST_REPORTLUN2 | BLIST_TRY_VPD_PAGES}, |
1016 |
+ {"IBM", "AuSaV1S2", NULL, BLIST_FORCELUN}, |
1017 |
+ {"IBM", "ProFibre 4000R", "*", BLIST_SPARSELUN | BLIST_LARGELUN}, |
1018 |
+ {"IBM", "2105", NULL, BLIST_RETRY_HWERROR}, |
1019 |
+diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c |
1020 |
+index 9e8cd07179d71..28479addb2d1d 100644 |
1021 |
+--- a/drivers/target/target_core_transport.c |
1022 |
++++ b/drivers/target/target_core_transport.c |
1023 |
+@@ -2995,9 +2995,7 @@ __transport_wait_for_tasks(struct se_cmd *cmd, bool fabric_stop, |
1024 |
+ __releases(&cmd->t_state_lock) |
1025 |
+ __acquires(&cmd->t_state_lock) |
1026 |
+ { |
1027 |
+- |
1028 |
+- assert_spin_locked(&cmd->t_state_lock); |
1029 |
+- WARN_ON_ONCE(!irqs_disabled()); |
1030 |
++ lockdep_assert_held(&cmd->t_state_lock); |
1031 |
+ |
1032 |
+ if (fabric_stop) |
1033 |
+ cmd->transport_state |= CMD_T_FABRIC_STOP; |
1034 |
+diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c |
1035 |
+index 2d500f90cdacf..a86e6810237a1 100644 |
1036 |
+--- a/fs/gfs2/file.c |
1037 |
++++ b/fs/gfs2/file.c |
1038 |
+@@ -935,8 +935,11 @@ static ssize_t gfs2_file_write_iter(struct kiocb *iocb, struct iov_iter *from) |
1039 |
+ current->backing_dev_info = inode_to_bdi(inode); |
1040 |
+ buffered = iomap_file_buffered_write(iocb, from, &gfs2_iomap_ops); |
1041 |
+ current->backing_dev_info = NULL; |
1042 |
+- if (unlikely(buffered <= 0)) |
1043 |
++ if (unlikely(buffered <= 0)) { |
1044 |
++ if (!ret) |
1045 |
++ ret = buffered; |
1046 |
+ goto out_unlock; |
1047 |
++ } |
1048 |
+ |
1049 |
+ /* |
1050 |
+ * We need to ensure that the page cache pages are written to |
1051 |
+diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c |
1052 |
+index 7c2ba81213da0..4d70faa606dc4 100644 |
1053 |
+--- a/fs/gfs2/glock.c |
1054 |
++++ b/fs/gfs2/glock.c |
1055 |
+@@ -583,6 +583,16 @@ out_locked: |
1056 |
+ spin_unlock(&gl->gl_lockref.lock); |
1057 |
+ } |
1058 |
+ |
1059 |
++static bool is_system_glock(struct gfs2_glock *gl) |
1060 |
++{ |
1061 |
++ struct gfs2_sbd *sdp = gl->gl_name.ln_sbd; |
1062 |
++ struct gfs2_inode *m_ip = GFS2_I(sdp->sd_statfs_inode); |
1063 |
++ |
1064 |
++ if (gl == m_ip->i_gl) |
1065 |
++ return true; |
1066 |
++ return false; |
1067 |
++} |
1068 |
++ |
1069 |
+ /** |
1070 |
+ * do_xmote - Calls the DLM to change the state of a lock |
1071 |
+ * @gl: The lock state |
1072 |
+@@ -672,17 +682,25 @@ skip_inval: |
1073 |
+ * to see sd_log_error and withdraw, and in the meantime, requeue the |
1074 |
+ * work for later. |
1075 |
+ * |
1076 |
++ * We make a special exception for some system glocks, such as the |
1077 |
++ * system statfs inode glock, which needs to be granted before the |
1078 |
++ * gfs2_quotad daemon can exit, and that exit needs to finish before |
1079 |
++ * we can unmount the withdrawn file system. |
1080 |
++ * |
1081 |
+ * However, if we're just unlocking the lock (say, for unmount, when |
1082 |
+ * gfs2_gl_hash_clear calls clear_glock) and recovery is complete |
1083 |
+ * then it's okay to tell dlm to unlock it. |
1084 |
+ */ |
1085 |
+ if (unlikely(sdp->sd_log_error && !gfs2_withdrawn(sdp))) |
1086 |
+ gfs2_withdraw_delayed(sdp); |
1087 |
+- if (glock_blocked_by_withdraw(gl)) { |
1088 |
+- if (target != LM_ST_UNLOCKED || |
1089 |
+- test_bit(SDF_WITHDRAW_RECOVERY, &sdp->sd_flags)) { |
1090 |
++ if (glock_blocked_by_withdraw(gl) && |
1091 |
++ (target != LM_ST_UNLOCKED || |
1092 |
++ test_bit(SDF_WITHDRAW_RECOVERY, &sdp->sd_flags))) { |
1093 |
++ if (!is_system_glock(gl)) { |
1094 |
+ gfs2_glock_queue_work(gl, GL_GLOCK_DFT_HOLD); |
1095 |
+ goto out; |
1096 |
++ } else { |
1097 |
++ clear_bit(GLF_INVALIDATE_IN_PROGRESS, &gl->gl_flags); |
1098 |
+ } |
1099 |
+ } |
1100 |
+ |
1101 |
+@@ -1774,6 +1792,7 @@ __acquires(&lru_lock) |
1102 |
+ while(!list_empty(list)) { |
1103 |
+ gl = list_first_entry(list, struct gfs2_glock, gl_lru); |
1104 |
+ list_del_init(&gl->gl_lru); |
1105 |
++ clear_bit(GLF_LRU, &gl->gl_flags); |
1106 |
+ if (!spin_trylock(&gl->gl_lockref.lock)) { |
1107 |
+ add_back_to_lru: |
1108 |
+ list_add(&gl->gl_lru, &lru_list); |
1109 |
+@@ -1819,7 +1838,6 @@ static long gfs2_scan_glock_lru(int nr) |
1110 |
+ if (!test_bit(GLF_LOCK, &gl->gl_flags)) { |
1111 |
+ list_move(&gl->gl_lru, &dispose); |
1112 |
+ atomic_dec(&lru_count); |
1113 |
+- clear_bit(GLF_LRU, &gl->gl_flags); |
1114 |
+ freed++; |
1115 |
+ continue; |
1116 |
+ } |
1117 |
+diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c |
1118 |
+index 6410281546f92..47287a7056fe2 100644 |
1119 |
+--- a/fs/gfs2/log.c |
1120 |
++++ b/fs/gfs2/log.c |
1121 |
+@@ -923,10 +923,10 @@ static void log_write_header(struct gfs2_sbd *sdp, u32 flags) |
1122 |
+ } |
1123 |
+ |
1124 |
+ /** |
1125 |
+- * ail_drain - drain the ail lists after a withdraw |
1126 |
++ * gfs2_ail_drain - drain the ail lists after a withdraw |
1127 |
+ * @sdp: Pointer to GFS2 superblock |
1128 |
+ */ |
1129 |
+-static void ail_drain(struct gfs2_sbd *sdp) |
1130 |
++void gfs2_ail_drain(struct gfs2_sbd *sdp) |
1131 |
+ { |
1132 |
+ struct gfs2_trans *tr; |
1133 |
+ |
1134 |
+@@ -953,6 +953,7 @@ static void ail_drain(struct gfs2_sbd *sdp) |
1135 |
+ list_del(&tr->tr_list); |
1136 |
+ gfs2_trans_free(sdp, tr); |
1137 |
+ } |
1138 |
++ gfs2_drain_revokes(sdp); |
1139 |
+ spin_unlock(&sdp->sd_ail_lock); |
1140 |
+ } |
1141 |
+ |
1142 |
+@@ -1159,7 +1160,6 @@ out_withdraw: |
1143 |
+ if (tr && list_empty(&tr->tr_list)) |
1144 |
+ list_add(&tr->tr_list, &sdp->sd_ail1_list); |
1145 |
+ spin_unlock(&sdp->sd_ail_lock); |
1146 |
+- ail_drain(sdp); /* frees all transactions */ |
1147 |
+ tr = NULL; |
1148 |
+ goto out_end; |
1149 |
+ } |
1150 |
+diff --git a/fs/gfs2/log.h b/fs/gfs2/log.h |
1151 |
+index eea58015710e7..fc905c2af53ce 100644 |
1152 |
+--- a/fs/gfs2/log.h |
1153 |
++++ b/fs/gfs2/log.h |
1154 |
+@@ -93,5 +93,6 @@ extern int gfs2_logd(void *data); |
1155 |
+ extern void gfs2_add_revoke(struct gfs2_sbd *sdp, struct gfs2_bufdata *bd); |
1156 |
+ extern void gfs2_glock_remove_revoke(struct gfs2_glock *gl); |
1157 |
+ extern void gfs2_flush_revokes(struct gfs2_sbd *sdp); |
1158 |
++extern void gfs2_ail_drain(struct gfs2_sbd *sdp); |
1159 |
+ |
1160 |
+ #endif /* __LOG_DOT_H__ */ |
1161 |
+diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c |
1162 |
+index a82f4747aa8d5..ef44d325e5182 100644 |
1163 |
+--- a/fs/gfs2/lops.c |
1164 |
++++ b/fs/gfs2/lops.c |
1165 |
+@@ -882,7 +882,7 @@ static void revoke_lo_before_commit(struct gfs2_sbd *sdp, struct gfs2_trans *tr) |
1166 |
+ gfs2_log_write_page(sdp, page); |
1167 |
+ } |
1168 |
+ |
1169 |
+-static void revoke_lo_after_commit(struct gfs2_sbd *sdp, struct gfs2_trans *tr) |
1170 |
++void gfs2_drain_revokes(struct gfs2_sbd *sdp) |
1171 |
+ { |
1172 |
+ struct list_head *head = &sdp->sd_log_revokes; |
1173 |
+ struct gfs2_bufdata *bd; |
1174 |
+@@ -897,6 +897,11 @@ static void revoke_lo_after_commit(struct gfs2_sbd *sdp, struct gfs2_trans *tr) |
1175 |
+ } |
1176 |
+ } |
1177 |
+ |
1178 |
++static void revoke_lo_after_commit(struct gfs2_sbd *sdp, struct gfs2_trans *tr) |
1179 |
++{ |
1180 |
++ gfs2_drain_revokes(sdp); |
1181 |
++} |
1182 |
++ |
1183 |
+ static void revoke_lo_before_scan(struct gfs2_jdesc *jd, |
1184 |
+ struct gfs2_log_header_host *head, int pass) |
1185 |
+ { |
1186 |
+diff --git a/fs/gfs2/lops.h b/fs/gfs2/lops.h |
1187 |
+index 31b6dd0d2e5d8..f707601597dcc 100644 |
1188 |
+--- a/fs/gfs2/lops.h |
1189 |
++++ b/fs/gfs2/lops.h |
1190 |
+@@ -20,6 +20,7 @@ extern void gfs2_log_submit_bio(struct bio **biop, int opf); |
1191 |
+ extern void gfs2_pin(struct gfs2_sbd *sdp, struct buffer_head *bh); |
1192 |
+ extern int gfs2_find_jhead(struct gfs2_jdesc *jd, |
1193 |
+ struct gfs2_log_header_host *head, bool keep_cache); |
1194 |
++extern void gfs2_drain_revokes(struct gfs2_sbd *sdp); |
1195 |
+ static inline unsigned int buf_limit(struct gfs2_sbd *sdp) |
1196 |
+ { |
1197 |
+ return sdp->sd_ldptrs; |
1198 |
+diff --git a/fs/gfs2/util.c b/fs/gfs2/util.c |
1199 |
+index 4f034b87b4276..cffb346fb9b33 100644 |
1200 |
+--- a/fs/gfs2/util.c |
1201 |
++++ b/fs/gfs2/util.c |
1202 |
+@@ -130,6 +130,7 @@ static void signal_our_withdraw(struct gfs2_sbd *sdp) |
1203 |
+ if (test_bit(SDF_NORECOVERY, &sdp->sd_flags) || !sdp->sd_jdesc) |
1204 |
+ return; |
1205 |
+ |
1206 |
++ gfs2_ail_drain(sdp); /* frees all transactions */ |
1207 |
+ inode = sdp->sd_jdesc->jd_inode; |
1208 |
+ ip = GFS2_I(inode); |
1209 |
+ i_gl = ip->i_gl; |
1210 |
+diff --git a/include/linux/hid.h b/include/linux/hid.h |
1211 |
+index 3e33eb14118c8..5e79a21c696f1 100644 |
1212 |
+--- a/include/linux/hid.h |
1213 |
++++ b/include/linux/hid.h |
1214 |
+@@ -1164,8 +1164,7 @@ static inline void hid_hw_wait(struct hid_device *hdev) |
1215 |
+ */ |
1216 |
+ static inline u32 hid_report_len(struct hid_report *report) |
1217 |
+ { |
1218 |
+- /* equivalent to DIV_ROUND_UP(report->size, 8) + !!(report->id > 0) */ |
1219 |
+- return ((report->size - 1) >> 3) + 1 + (report->id > 0); |
1220 |
++ return DIV_ROUND_UP(report->size, 8) + (report->id > 0); |
1221 |
+ } |
1222 |
+ |
1223 |
+ int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, u32 size, |
1224 |
+diff --git a/include/linux/host1x.h b/include/linux/host1x.h |
1225 |
+index 9eb77c87a83b0..ed0005ce4285c 100644 |
1226 |
+--- a/include/linux/host1x.h |
1227 |
++++ b/include/linux/host1x.h |
1228 |
+@@ -320,12 +320,30 @@ static inline struct host1x_device *to_host1x_device(struct device *dev) |
1229 |
+ int host1x_device_init(struct host1x_device *device); |
1230 |
+ int host1x_device_exit(struct host1x_device *device); |
1231 |
+ |
1232 |
+-int __host1x_client_register(struct host1x_client *client, |
1233 |
+- struct lock_class_key *key); |
1234 |
+-#define host1x_client_register(class) \ |
1235 |
+- ({ \ |
1236 |
+- static struct lock_class_key __key; \ |
1237 |
+- __host1x_client_register(class, &__key); \ |
1238 |
++void __host1x_client_init(struct host1x_client *client, struct lock_class_key *key); |
1239 |
++void host1x_client_exit(struct host1x_client *client); |
1240 |
++ |
1241 |
++#define host1x_client_init(client) \ |
1242 |
++ ({ \ |
1243 |
++ static struct lock_class_key __key; \ |
1244 |
++ __host1x_client_init(client, &__key); \ |
1245 |
++ }) |
1246 |
++ |
1247 |
++int __host1x_client_register(struct host1x_client *client); |
1248 |
++ |
1249 |
++/* |
1250 |
++ * Note that this wrapper calls __host1x_client_init() for compatibility |
1251 |
++ * with existing callers. Callers that want to separately initialize and |
1252 |
++ * register a host1x client must first initialize using either of the |
1253 |
++ * __host1x_client_init() or host1x_client_init() functions and then use |
1254 |
++ * the low-level __host1x_client_register() function to avoid the client |
1255 |
++ * getting reinitialized. |
1256 |
++ */ |
1257 |
++#define host1x_client_register(client) \ |
1258 |
++ ({ \ |
1259 |
++ static struct lock_class_key __key; \ |
1260 |
++ __host1x_client_init(client, &__key); \ |
1261 |
++ __host1x_client_register(client); \ |
1262 |
+ }) |
1263 |
+ |
1264 |
+ int host1x_client_unregister(struct host1x_client *client); |
1265 |
+diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h |
1266 |
+index ee93428ced9a1..225ec87d4f228 100644 |
1267 |
+--- a/include/uapi/linux/input-event-codes.h |
1268 |
++++ b/include/uapi/linux/input-event-codes.h |
1269 |
+@@ -611,6 +611,7 @@ |
1270 |
+ #define KEY_VOICECOMMAND 0x246 /* Listening Voice Command */ |
1271 |
+ #define KEY_ASSISTANT 0x247 /* AL Context-aware desktop assistant */ |
1272 |
+ #define KEY_KBD_LAYOUT_NEXT 0x248 /* AC Next Keyboard Layout Select */ |
1273 |
++#define KEY_EMOJI_PICKER 0x249 /* Show/hide emoji picker (HUTRR101) */ |
1274 |
+ |
1275 |
+ #define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */ |
1276 |
+ #define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */ |
1277 |
+diff --git a/net/compat.c b/net/compat.c |
1278 |
+index ddd15af3a2837..210fc3b4d0d83 100644 |
1279 |
+--- a/net/compat.c |
1280 |
++++ b/net/compat.c |
1281 |
+@@ -177,7 +177,7 @@ int cmsghdr_from_user_compat_to_kern(struct msghdr *kmsg, struct sock *sk, |
1282 |
+ if (kcmlen > stackbuf_size) |
1283 |
+ kcmsg_base = kcmsg = sock_kmalloc(sk, kcmlen, GFP_KERNEL); |
1284 |
+ if (kcmsg == NULL) |
1285 |
+- return -ENOBUFS; |
1286 |
++ return -ENOMEM; |
1287 |
+ |
1288 |
+ /* Now copy them over neatly. */ |
1289 |
+ memset(kcmsg, 0, kcmlen); |
1290 |
+diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c |
1291 |
+index cd80ffed6d267..a9f9379750802 100644 |
1292 |
+--- a/net/core/fib_rules.c |
1293 |
++++ b/net/core/fib_rules.c |
1294 |
+@@ -1168,7 +1168,7 @@ static void notify_rule_change(int event, struct fib_rule *rule, |
1295 |
+ { |
1296 |
+ struct net *net; |
1297 |
+ struct sk_buff *skb; |
1298 |
+- int err = -ENOBUFS; |
1299 |
++ int err = -ENOMEM; |
1300 |
+ |
1301 |
+ net = ops->fro_net; |
1302 |
+ skb = nlmsg_new(fib_rule_nlmsg_size(ops, rule), GFP_KERNEL); |
1303 |
+diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c |
1304 |
+index 3485b16a7ff32..9ad046917b340 100644 |
1305 |
+--- a/net/core/rtnetlink.c |
1306 |
++++ b/net/core/rtnetlink.c |
1307 |
+@@ -4833,8 +4833,10 @@ static int rtnl_bridge_notify(struct net_device *dev) |
1308 |
+ if (err < 0) |
1309 |
+ goto errout; |
1310 |
+ |
1311 |
+- if (!skb->len) |
1312 |
++ if (!skb->len) { |
1313 |
++ err = -EINVAL; |
1314 |
+ goto errout; |
1315 |
++ } |
1316 |
+ |
1317 |
+ rtnl_notify(skb, net, 0, RTNLGRP_LINK, NULL, GFP_ATOMIC); |
1318 |
+ return 0; |
1319 |
+diff --git a/net/ieee802154/nl802154.c b/net/ieee802154/nl802154.c |
1320 |
+index 05f6bd89a7dd8..0cf2374c143bd 100644 |
1321 |
+--- a/net/ieee802154/nl802154.c |
1322 |
++++ b/net/ieee802154/nl802154.c |
1323 |
+@@ -1298,19 +1298,20 @@ ieee802154_llsec_parse_dev_addr(struct nlattr *nla, |
1324 |
+ if (!nla || nla_parse_nested_deprecated(attrs, NL802154_DEV_ADDR_ATTR_MAX, nla, nl802154_dev_addr_policy, NULL)) |
1325 |
+ return -EINVAL; |
1326 |
+ |
1327 |
+- if (!attrs[NL802154_DEV_ADDR_ATTR_PAN_ID] || |
1328 |
+- !attrs[NL802154_DEV_ADDR_ATTR_MODE] || |
1329 |
+- !(attrs[NL802154_DEV_ADDR_ATTR_SHORT] || |
1330 |
+- attrs[NL802154_DEV_ADDR_ATTR_EXTENDED])) |
1331 |
++ if (!attrs[NL802154_DEV_ADDR_ATTR_PAN_ID] || !attrs[NL802154_DEV_ADDR_ATTR_MODE]) |
1332 |
+ return -EINVAL; |
1333 |
+ |
1334 |
+ addr->pan_id = nla_get_le16(attrs[NL802154_DEV_ADDR_ATTR_PAN_ID]); |
1335 |
+ addr->mode = nla_get_u32(attrs[NL802154_DEV_ADDR_ATTR_MODE]); |
1336 |
+ switch (addr->mode) { |
1337 |
+ case NL802154_DEV_ADDR_SHORT: |
1338 |
++ if (!attrs[NL802154_DEV_ADDR_ATTR_SHORT]) |
1339 |
++ return -EINVAL; |
1340 |
+ addr->short_addr = nla_get_le16(attrs[NL802154_DEV_ADDR_ATTR_SHORT]); |
1341 |
+ break; |
1342 |
+ case NL802154_DEV_ADDR_EXTENDED: |
1343 |
++ if (!attrs[NL802154_DEV_ADDR_ATTR_EXTENDED]) |
1344 |
++ return -EINVAL; |
1345 |
+ addr->extended_addr = nla_get_le64(attrs[NL802154_DEV_ADDR_ATTR_EXTENDED]); |
1346 |
+ break; |
1347 |
+ default: |
1348 |
+diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c |
1349 |
+index bc2f6ca971520..816d8aad5a684 100644 |
1350 |
+--- a/net/ipv4/ipconfig.c |
1351 |
++++ b/net/ipv4/ipconfig.c |
1352 |
+@@ -886,7 +886,7 @@ static void __init ic_bootp_send_if(struct ic_device *d, unsigned long jiffies_d |
1353 |
+ |
1354 |
+ |
1355 |
+ /* |
1356 |
+- * Copy BOOTP-supplied string if not already set. |
1357 |
++ * Copy BOOTP-supplied string |
1358 |
+ */ |
1359 |
+ static int __init ic_bootp_string(char *dest, char *src, int len, int max) |
1360 |
+ { |
1361 |
+@@ -935,12 +935,15 @@ static void __init ic_do_bootp_ext(u8 *ext) |
1362 |
+ } |
1363 |
+ break; |
1364 |
+ case 12: /* Host name */ |
1365 |
+- ic_bootp_string(utsname()->nodename, ext+1, *ext, |
1366 |
+- __NEW_UTS_LEN); |
1367 |
+- ic_host_name_set = 1; |
1368 |
++ if (!ic_host_name_set) { |
1369 |
++ ic_bootp_string(utsname()->nodename, ext+1, *ext, |
1370 |
++ __NEW_UTS_LEN); |
1371 |
++ ic_host_name_set = 1; |
1372 |
++ } |
1373 |
+ break; |
1374 |
+ case 15: /* Domain name (DNS) */ |
1375 |
+- ic_bootp_string(ic_domain, ext+1, *ext, sizeof(ic_domain)); |
1376 |
++ if (!ic_domain[0]) |
1377 |
++ ic_bootp_string(ic_domain, ext+1, *ext, sizeof(ic_domain)); |
1378 |
+ break; |
1379 |
+ case 17: /* Root path */ |
1380 |
+ if (!root_server_path[0]) |
1381 |
+diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c |
1382 |
+index ff687b97b2d95..401901c8ad429 100644 |
1383 |
+--- a/net/x25/af_x25.c |
1384 |
++++ b/net/x25/af_x25.c |
1385 |
+@@ -536,7 +536,7 @@ static int x25_create(struct net *net, struct socket *sock, int protocol, |
1386 |
+ if (protocol) |
1387 |
+ goto out; |
1388 |
+ |
1389 |
+- rc = -ENOBUFS; |
1390 |
++ rc = -ENOMEM; |
1391 |
+ if ((sk = x25_alloc_socket(net, kern)) == NULL) |
1392 |
+ goto out; |
1393 |
+ |
1394 |
+diff --git a/sound/hda/intel-dsp-config.c b/sound/hda/intel-dsp-config.c |
1395 |
+index ab5ff7867eb99..d8be146793eee 100644 |
1396 |
+--- a/sound/hda/intel-dsp-config.c |
1397 |
++++ b/sound/hda/intel-dsp-config.c |
1398 |
+@@ -331,6 +331,10 @@ static const struct config_entry config_table[] = { |
1399 |
+ .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE, |
1400 |
+ .device = 0x51c8, |
1401 |
+ }, |
1402 |
++ { |
1403 |
++ .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE, |
1404 |
++ .device = 0x51cc, |
1405 |
++ }, |
1406 |
+ #endif |
1407 |
+ |
1408 |
+ }; |
1409 |
+diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c |
1410 |
+index 79ade335c8a09..470753b36c8a1 100644 |
1411 |
+--- a/sound/pci/hda/hda_intel.c |
1412 |
++++ b/sound/pci/hda/hda_intel.c |
1413 |
+@@ -2485,6 +2485,9 @@ static const struct pci_device_id azx_ids[] = { |
1414 |
+ /* Alderlake-P */ |
1415 |
+ { PCI_DEVICE(0x8086, 0x51c8), |
1416 |
+ .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, |
1417 |
++ /* Alderlake-M */ |
1418 |
++ { PCI_DEVICE(0x8086, 0x51cc), |
1419 |
++ .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, |
1420 |
+ /* Elkhart Lake */ |
1421 |
+ { PCI_DEVICE(0x8086, 0x4b55), |
1422 |
+ .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, |
1423 |
|
1424 |
diff --git a/5020_BMQ-and-PDS-io-scheduler-v5.12-r0.patch b/5020_BMQ-and-PDS-io-scheduler-v5.12-r0.patch |
1425 |
index 81f4c55..7eb05e6 100644 |
1426 |
--- a/5020_BMQ-and-PDS-io-scheduler-v5.12-r0.patch |
1427 |
+++ b/5020_BMQ-and-PDS-io-scheduler-v5.12-r0.patch |
1428 |
@@ -9803,3 +9803,36 @@ index 73ef12092250..24bf8ef1249a 100644 |
1429 |
}; |
1430 |
struct wakeup_test_data *x = data; |
1431 |
|
1432 |
+From b2dc217bab541a5e737b52137f1bcce0b1cc2ed5 Mon Sep 17 00:00:00 2001 |
1433 |
+From: Piotr Gorski <lucjan.lucjanov@×××××.com> |
1434 |
+Date: Mon, 14 Jun 2021 15:46:03 +0200 |
1435 |
+Subject: [PATCH] prjc: fix compilation error |
1436 |
+ |
1437 |
+Signed-off-by: Piotr Gorski <lucjan.lucjanov@×××××.com> |
1438 |
+--- |
1439 |
+ kernel/sched/pelt.h | 2 +- |
1440 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
1441 |
+ |
1442 |
+diff --git a/kernel/sched/pelt.h b/kernel/sched/pelt.h |
1443 |
+index bc722a476..26a33f76b 100644 |
1444 |
+--- a/kernel/sched/pelt.h |
1445 |
++++ b/kernel/sched/pelt.h |
1446 |
+@@ -44,6 +44,7 @@ static inline u32 get_pelt_divider(struct sched_avg *avg) |
1447 |
+ return LOAD_AVG_MAX - 1024 + avg->period_contrib; |
1448 |
+ } |
1449 |
+ |
1450 |
++#ifndef CONFIG_SCHED_ALT |
1451 |
+ static inline void cfs_se_util_change(struct sched_avg *avg) |
1452 |
+ { |
1453 |
+ unsigned int enqueued; |
1454 |
+@@ -61,7 +62,6 @@ static inline void cfs_se_util_change(struct sched_avg *avg) |
1455 |
+ WRITE_ONCE(avg->util_est.enqueued, enqueued); |
1456 |
+ } |
1457 |
+ |
1458 |
+-#ifndef CONFIG_SCHED_ALT |
1459 |
+ /* |
1460 |
+ * The clock_pelt scales the time to reflect the effective amount of |
1461 |
+ * computation done during the running delta time but then sync back to |
1462 |
+-- |
1463 |
+2.32.0 |
1464 |
+ |