Gentoo Archives: gentoo-commits

From: Mike Pagano <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/linux-patches:5.16 commit in: /
Date: Sun, 16 Jan 2022 10:20:22
Message-Id: 1642328404.4e5e1b080f2be5453274fb18361a359006b5f5ed.mpagano@gentoo
1 commit: 4e5e1b080f2be5453274fb18361a359006b5f5ed
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jan 16 10:20:04 2022 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Sun Jan 16 10:20:04 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=4e5e1b08
7
8 Linux patch 5.16.1
9
10 Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>
11
12 0000_README | 4 +
13 1000_linux-5.16.1.patch | 1121 +++++++++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 1125 insertions(+)
15
16 diff --git a/0000_README b/0000_README
17 index c012760e..4a1aa215 100644
18 --- a/0000_README
19 +++ b/0000_README
20 @@ -43,6 +43,10 @@ EXPERIMENTAL
21 Individual Patch Descriptions:
22 --------------------------------------------------------------------------
23
24 +Patch: 1000_linux-5.16.1.patch
25 +From: http://www.kernel.org
26 +Desc: Linux 5.16.1
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/1000_linux-5.16.1.patch b/1000_linux-5.16.1.patch
33 new file mode 100644
34 index 00000000..a6ba1125
35 --- /dev/null
36 +++ b/1000_linux-5.16.1.patch
37 @@ -0,0 +1,1121 @@
38 +diff --git a/Makefile b/Makefile
39 +index 08510230b42f3..fdbd06daf2af1 100644
40 +--- a/Makefile
41 ++++ b/Makefile
42 +@@ -1,7 +1,7 @@
43 + # SPDX-License-Identifier: GPL-2.0
44 + VERSION = 5
45 + PATCHLEVEL = 16
46 +-SUBLEVEL = 0
47 ++SUBLEVEL = 1
48 + EXTRAVERSION =
49 + NAME = Gobble Gobble
50 +
51 +diff --git a/arch/arm/boot/dts/exynos4210-i9100.dts b/arch/arm/boot/dts/exynos4210-i9100.dts
52 +index 19bb7dc98b339..21b791150697d 100644
53 +--- a/arch/arm/boot/dts/exynos4210-i9100.dts
54 ++++ b/arch/arm/boot/dts/exynos4210-i9100.dts
55 +@@ -828,7 +828,7 @@
56 + compatible = "brcm,bcm4330-bt";
57 +
58 + shutdown-gpios = <&gpl0 4 GPIO_ACTIVE_HIGH>;
59 +- reset-gpios = <&gpl1 0 GPIO_ACTIVE_HIGH>;
60 ++ reset-gpios = <&gpl1 0 GPIO_ACTIVE_LOW>;
61 + device-wakeup-gpios = <&gpx3 1 GPIO_ACTIVE_HIGH>;
62 + host-wakeup-gpios = <&gpx2 6 GPIO_ACTIVE_HIGH>;
63 + };
64 +diff --git a/arch/parisc/include/uapi/asm/pdc.h b/arch/parisc/include/uapi/asm/pdc.h
65 +index acc633c157221..e794e143ec5f8 100644
66 +--- a/arch/parisc/include/uapi/asm/pdc.h
67 ++++ b/arch/parisc/include/uapi/asm/pdc.h
68 +@@ -4,7 +4,7 @@
69 +
70 + /*
71 + * PDC return values ...
72 +- * All PDC calls return a subset of these errors.
73 ++ * All PDC calls return a subset of these errors.
74 + */
75 +
76 + #define PDC_WARN 3 /* Call completed with a warning */
77 +@@ -165,7 +165,7 @@
78 + #define PDC_PSW_GET_DEFAULTS 1 /* Return defaults */
79 + #define PDC_PSW_SET_DEFAULTS 2 /* Set default */
80 + #define PDC_PSW_ENDIAN_BIT 1 /* set for big endian */
81 +-#define PDC_PSW_WIDE_BIT 2 /* set for wide mode */
82 ++#define PDC_PSW_WIDE_BIT 2 /* set for wide mode */
83 +
84 + #define PDC_SYSTEM_MAP 22 /* find system modules */
85 + #define PDC_FIND_MODULE 0
86 +@@ -274,7 +274,7 @@
87 + #define PDC_PCI_PCI_INT_ROUTE_SIZE 13
88 + #define PDC_PCI_GET_INT_TBL_SIZE PDC_PCI_PCI_INT_ROUTE_SIZE
89 + #define PDC_PCI_PCI_INT_ROUTE 14
90 +-#define PDC_PCI_GET_INT_TBL PDC_PCI_PCI_INT_ROUTE
91 ++#define PDC_PCI_GET_INT_TBL PDC_PCI_PCI_INT_ROUTE
92 + #define PDC_PCI_READ_MON_TYPE 15
93 + #define PDC_PCI_WRITE_MON_TYPE 16
94 +
95 +@@ -345,7 +345,7 @@
96 +
97 + /* constants for PDC_CHASSIS */
98 + #define OSTAT_OFF 0
99 +-#define OSTAT_FLT 1
100 ++#define OSTAT_FLT 1
101 + #define OSTAT_TEST 2
102 + #define OSTAT_INIT 3
103 + #define OSTAT_SHUT 4
104 +@@ -403,7 +403,7 @@ struct zeropage {
105 + int vec_pad1[6];
106 +
107 + /* [0x040] reserved processor dependent */
108 +- int pad0[112];
109 ++ int pad0[112]; /* in QEMU pad0[0] holds "SeaBIOS\0" */
110 +
111 + /* [0x200] reserved */
112 + int pad1[84];
113 +@@ -691,6 +691,22 @@ struct pdc_hpmc_pim_20 { /* PDC_PIM */
114 + unsigned long long fr[32];
115 + };
116 +
117 ++struct pim_cpu_state_cf {
118 ++ union {
119 ++ unsigned int
120 ++ iqv : 1, /* IIA queue Valid */
121 ++ iqf : 1, /* IIA queue Failure */
122 ++ ipv : 1, /* IPRs Valid */
123 ++ grv : 1, /* GRs Valid */
124 ++ crv : 1, /* CRs Valid */
125 ++ srv : 1, /* SRs Valid */
126 ++ trv : 1, /* CR24 through CR31 valid */
127 ++ pad : 24, /* reserved */
128 ++ td : 1; /* TOC did not cause any damage to the system state */
129 ++ unsigned int val;
130 ++ };
131 ++};
132 ++
133 + struct pdc_toc_pim_11 {
134 + unsigned int gr[32];
135 + unsigned int cr[32];
136 +@@ -698,8 +714,7 @@ struct pdc_toc_pim_11 {
137 + unsigned int iasq_back;
138 + unsigned int iaoq_back;
139 + unsigned int check_type;
140 +- unsigned int hversion;
141 +- unsigned int cpu_state;
142 ++ struct pim_cpu_state_cf cpu_state;
143 + };
144 +
145 + struct pdc_toc_pim_20 {
146 +@@ -709,8 +724,7 @@ struct pdc_toc_pim_20 {
147 + unsigned long long iasq_back;
148 + unsigned long long iaoq_back;
149 + unsigned int check_type;
150 +- unsigned int hversion;
151 +- unsigned int cpu_state;
152 ++ struct pim_cpu_state_cf cpu_state;
153 + };
154 +
155 + #endif /* !defined(__ASSEMBLY__) */
156 +diff --git a/drivers/bluetooth/bfusb.c b/drivers/bluetooth/bfusb.c
157 +index 5a321b4076aab..cab93935cc7f1 100644
158 +--- a/drivers/bluetooth/bfusb.c
159 ++++ b/drivers/bluetooth/bfusb.c
160 +@@ -628,6 +628,9 @@ static int bfusb_probe(struct usb_interface *intf, const struct usb_device_id *i
161 + data->bulk_out_ep = bulk_out_ep->desc.bEndpointAddress;
162 + data->bulk_pkt_size = le16_to_cpu(bulk_out_ep->desc.wMaxPacketSize);
163 +
164 ++ if (!data->bulk_pkt_size)
165 ++ goto done;
166 ++
167 + rwlock_init(&data->lock);
168 +
169 + data->reassembly = NULL;
170 +diff --git a/drivers/bluetooth/btbcm.c b/drivers/bluetooth/btbcm.c
171 +index e4182acee488c..d9ceca7a7935c 100644
172 +--- a/drivers/bluetooth/btbcm.c
173 ++++ b/drivers/bluetooth/btbcm.c
174 +@@ -8,6 +8,7 @@
175 +
176 + #include <linux/module.h>
177 + #include <linux/firmware.h>
178 ++#include <linux/dmi.h>
179 + #include <asm/unaligned.h>
180 +
181 + #include <net/bluetooth/bluetooth.h>
182 +@@ -343,6 +344,52 @@ static struct sk_buff *btbcm_read_usb_product(struct hci_dev *hdev)
183 + return skb;
184 + }
185 +
186 ++static const struct dmi_system_id disable_broken_read_transmit_power[] = {
187 ++ {
188 ++ .matches = {
189 ++ DMI_MATCH(DMI_BOARD_VENDOR, "Apple Inc."),
190 ++ DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro16,1"),
191 ++ },
192 ++ },
193 ++ {
194 ++ .matches = {
195 ++ DMI_MATCH(DMI_BOARD_VENDOR, "Apple Inc."),
196 ++ DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro16,2"),
197 ++ },
198 ++ },
199 ++ {
200 ++ .matches = {
201 ++ DMI_MATCH(DMI_BOARD_VENDOR, "Apple Inc."),
202 ++ DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro16,4"),
203 ++ },
204 ++ },
205 ++ {
206 ++ .matches = {
207 ++ DMI_MATCH(DMI_BOARD_VENDOR, "Apple Inc."),
208 ++ DMI_MATCH(DMI_PRODUCT_NAME, "MacBookAir8,1"),
209 ++ },
210 ++ },
211 ++ {
212 ++ .matches = {
213 ++ DMI_MATCH(DMI_BOARD_VENDOR, "Apple Inc."),
214 ++ DMI_MATCH(DMI_PRODUCT_NAME, "MacBookAir8,2"),
215 ++ },
216 ++ },
217 ++ {
218 ++ .matches = {
219 ++ DMI_MATCH(DMI_BOARD_VENDOR, "Apple Inc."),
220 ++ DMI_MATCH(DMI_PRODUCT_NAME, "iMac20,1"),
221 ++ },
222 ++ },
223 ++ {
224 ++ .matches = {
225 ++ DMI_MATCH(DMI_BOARD_VENDOR, "Apple Inc."),
226 ++ DMI_MATCH(DMI_PRODUCT_NAME, "iMac20,2"),
227 ++ },
228 ++ },
229 ++ { }
230 ++};
231 ++
232 + static int btbcm_read_info(struct hci_dev *hdev)
233 + {
234 + struct sk_buff *skb;
235 +@@ -363,6 +410,10 @@ static int btbcm_read_info(struct hci_dev *hdev)
236 + bt_dev_info(hdev, "BCM: features 0x%2.2x", skb->data[1]);
237 + kfree_skb(skb);
238 +
239 ++ /* Read DMI and disable broken Read LE Min/Max Tx Power */
240 ++ if (dmi_first_match(disable_broken_read_transmit_power))
241 ++ set_bit(HCI_QUIRK_BROKEN_READ_TRANSMIT_POWER, &hdev->quirks);
242 ++
243 + return 0;
244 + }
245 +
246 +diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
247 +index 9359bff472965..b11567b0fd9ab 100644
248 +--- a/drivers/bluetooth/btintel.c
249 ++++ b/drivers/bluetooth/btintel.c
250 +@@ -2353,8 +2353,15 @@ static int btintel_setup_combined(struct hci_dev *hdev)
251 + * As a workaround, send HCI Reset command first which will reset the
252 + * number of completed commands and allow normal command processing
253 + * from now on.
254 ++ *
255 ++ * Regarding the INTEL_BROKEN_SHUTDOWN_LED flag, these devices maybe
256 ++ * in the SW_RFKILL ON state as a workaround of fixing LED issue during
257 ++ * the shutdown() procedure, and once the device is in SW_RFKILL ON
258 ++ * state, the only way to exit out of it is sending the HCI_Reset
259 ++ * command.
260 + */
261 +- if (btintel_test_flag(hdev, INTEL_BROKEN_INITIAL_NCMD)) {
262 ++ if (btintel_test_flag(hdev, INTEL_BROKEN_INITIAL_NCMD) ||
263 ++ btintel_test_flag(hdev, INTEL_BROKEN_SHUTDOWN_LED)) {
264 + skb = __hci_cmd_sync(hdev, HCI_OP_RESET, 0, NULL,
265 + HCI_INIT_TIMEOUT);
266 + if (IS_ERR(skb)) {
267 +@@ -2426,12 +2433,6 @@ static int btintel_setup_combined(struct hci_dev *hdev)
268 + set_bit(HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED,
269 + &hdev->quirks);
270 +
271 +- /* These devices have an issue with LED which doesn't
272 +- * go off immediately during shutdown. Set the flag
273 +- * here to send the LED OFF command during shutdown.
274 +- */
275 +- btintel_set_flag(hdev, INTEL_BROKEN_LED);
276 +-
277 + err = btintel_legacy_rom_setup(hdev, &ver);
278 + break;
279 + case 0x0b: /* SfP */
280 +@@ -2562,9 +2563,10 @@ static int btintel_shutdown_combined(struct hci_dev *hdev)
281 +
282 + /* Some platforms have an issue with BT LED when the interface is
283 + * down or BT radio is turned off, which takes 5 seconds to BT LED
284 +- * goes off. This command turns off the BT LED immediately.
285 ++ * goes off. As a workaround, sends HCI_Intel_SW_RFKILL to put the
286 ++ * device in the RFKILL ON state which turns off the BT LED immediately.
287 + */
288 +- if (btintel_test_flag(hdev, INTEL_BROKEN_LED)) {
289 ++ if (btintel_test_flag(hdev, INTEL_BROKEN_SHUTDOWN_LED)) {
290 + skb = __hci_cmd_sync(hdev, 0xfc3f, 0, NULL, HCI_INIT_TIMEOUT);
291 + if (IS_ERR(skb)) {
292 + ret = PTR_ERR(skb);
293 +diff --git a/drivers/bluetooth/btintel.h b/drivers/bluetooth/btintel.h
294 +index e500c0d7a7298..c9b24e9299e2a 100644
295 +--- a/drivers/bluetooth/btintel.h
296 ++++ b/drivers/bluetooth/btintel.h
297 +@@ -150,7 +150,7 @@ enum {
298 + INTEL_FIRMWARE_FAILED,
299 + INTEL_BOOTING,
300 + INTEL_BROKEN_INITIAL_NCMD,
301 +- INTEL_BROKEN_LED,
302 ++ INTEL_BROKEN_SHUTDOWN_LED,
303 + INTEL_ROM_LEGACY,
304 +
305 + __INTEL_NUM_FLAGS,
306 +diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
307 +index 75c83768c2573..c923c38658baa 100644
308 +--- a/drivers/bluetooth/btusb.c
309 ++++ b/drivers/bluetooth/btusb.c
310 +@@ -59,6 +59,7 @@ static struct usb_driver btusb_driver;
311 + #define BTUSB_WIDEBAND_SPEECH 0x400000
312 + #define BTUSB_VALID_LE_STATES 0x800000
313 + #define BTUSB_QCA_WCN6855 0x1000000
314 ++#define BTUSB_INTEL_BROKEN_SHUTDOWN_LED 0x2000000
315 + #define BTUSB_INTEL_BROKEN_INITIAL_NCMD 0x4000000
316 +
317 + static const struct usb_device_id btusb_table[] = {
318 +@@ -295,6 +296,24 @@ static const struct usb_device_id blacklist_table[] = {
319 + { USB_DEVICE(0x0cf3, 0xe600), .driver_info = BTUSB_QCA_WCN6855 |
320 + BTUSB_WIDEBAND_SPEECH |
321 + BTUSB_VALID_LE_STATES },
322 ++ { USB_DEVICE(0x0489, 0xe0cc), .driver_info = BTUSB_QCA_WCN6855 |
323 ++ BTUSB_WIDEBAND_SPEECH |
324 ++ BTUSB_VALID_LE_STATES },
325 ++ { USB_DEVICE(0x0489, 0xe0d6), .driver_info = BTUSB_QCA_WCN6855 |
326 ++ BTUSB_WIDEBAND_SPEECH |
327 ++ BTUSB_VALID_LE_STATES },
328 ++ { USB_DEVICE(0x0489, 0xe0e3), .driver_info = BTUSB_QCA_WCN6855 |
329 ++ BTUSB_WIDEBAND_SPEECH |
330 ++ BTUSB_VALID_LE_STATES },
331 ++ { USB_DEVICE(0x10ab, 0x9309), .driver_info = BTUSB_QCA_WCN6855 |
332 ++ BTUSB_WIDEBAND_SPEECH |
333 ++ BTUSB_VALID_LE_STATES },
334 ++ { USB_DEVICE(0x10ab, 0x9409), .driver_info = BTUSB_QCA_WCN6855 |
335 ++ BTUSB_WIDEBAND_SPEECH |
336 ++ BTUSB_VALID_LE_STATES },
337 ++ { USB_DEVICE(0x0489, 0xe0d0), .driver_info = BTUSB_QCA_WCN6855 |
338 ++ BTUSB_WIDEBAND_SPEECH |
339 ++ BTUSB_VALID_LE_STATES },
340 +
341 + /* Broadcom BCM2035 */
342 + { USB_DEVICE(0x0a5c, 0x2009), .driver_info = BTUSB_BCM92035 },
343 +@@ -365,10 +384,13 @@ static const struct usb_device_id blacklist_table[] = {
344 + { USB_DEVICE(0x8087, 0x0033), .driver_info = BTUSB_INTEL_COMBINED },
345 + { USB_DEVICE(0x8087, 0x07da), .driver_info = BTUSB_CSR },
346 + { USB_DEVICE(0x8087, 0x07dc), .driver_info = BTUSB_INTEL_COMBINED |
347 +- BTUSB_INTEL_BROKEN_INITIAL_NCMD },
348 +- { USB_DEVICE(0x8087, 0x0a2a), .driver_info = BTUSB_INTEL_COMBINED },
349 ++ BTUSB_INTEL_BROKEN_INITIAL_NCMD |
350 ++ BTUSB_INTEL_BROKEN_SHUTDOWN_LED },
351 ++ { USB_DEVICE(0x8087, 0x0a2a), .driver_info = BTUSB_INTEL_COMBINED |
352 ++ BTUSB_INTEL_BROKEN_SHUTDOWN_LED },
353 + { USB_DEVICE(0x8087, 0x0a2b), .driver_info = BTUSB_INTEL_COMBINED },
354 +- { USB_DEVICE(0x8087, 0x0aa7), .driver_info = BTUSB_INTEL_COMBINED },
355 ++ { USB_DEVICE(0x8087, 0x0aa7), .driver_info = BTUSB_INTEL_COMBINED |
356 ++ BTUSB_INTEL_BROKEN_SHUTDOWN_LED },
357 + { USB_DEVICE(0x8087, 0x0aaa), .driver_info = BTUSB_INTEL_COMBINED },
358 +
359 + /* Other Intel Bluetooth devices */
360 +@@ -384,6 +406,8 @@ static const struct usb_device_id blacklist_table[] = {
361 + /* Realtek 8852AE Bluetooth devices */
362 + { USB_DEVICE(0x0bda, 0xc852), .driver_info = BTUSB_REALTEK |
363 + BTUSB_WIDEBAND_SPEECH },
364 ++ { USB_DEVICE(0x0bda, 0x385a), .driver_info = BTUSB_REALTEK |
365 ++ BTUSB_WIDEBAND_SPEECH },
366 + { USB_DEVICE(0x0bda, 0x4852), .driver_info = BTUSB_REALTEK |
367 + BTUSB_WIDEBAND_SPEECH },
368 + { USB_DEVICE(0x04c5, 0x165c), .driver_info = BTUSB_REALTEK |
369 +@@ -423,6 +447,14 @@ static const struct usb_device_id blacklist_table[] = {
370 + BTUSB_WIDEBAND_SPEECH |
371 + BTUSB_VALID_LE_STATES },
372 +
373 ++ /* MediaTek MT7922A Bluetooth devices */
374 ++ { USB_DEVICE(0x0489, 0xe0d8), .driver_info = BTUSB_MEDIATEK |
375 ++ BTUSB_WIDEBAND_SPEECH |
376 ++ BTUSB_VALID_LE_STATES },
377 ++ { USB_DEVICE(0x0489, 0xe0d9), .driver_info = BTUSB_MEDIATEK |
378 ++ BTUSB_WIDEBAND_SPEECH |
379 ++ BTUSB_VALID_LE_STATES },
380 ++
381 + /* Additional Realtek 8723AE Bluetooth devices */
382 + { USB_DEVICE(0x0930, 0x021d), .driver_info = BTUSB_REALTEK },
383 + { USB_DEVICE(0x13d3, 0x3394), .driver_info = BTUSB_REALTEK },
384 +@@ -2236,7 +2268,7 @@ static int btusb_set_bdaddr_mtk(struct hci_dev *hdev, const bdaddr_t *bdaddr)
385 + struct sk_buff *skb;
386 + long ret;
387 +
388 +- skb = __hci_cmd_sync(hdev, 0xfc1a, sizeof(bdaddr), bdaddr, HCI_INIT_TIMEOUT);
389 ++ skb = __hci_cmd_sync(hdev, 0xfc1a, 6, bdaddr, HCI_INIT_TIMEOUT);
390 + if (IS_ERR(skb)) {
391 + ret = PTR_ERR(skb);
392 + bt_dev_err(hdev, "changing Mediatek device address failed (%ld)",
393 +@@ -2265,6 +2297,7 @@ static void btusb_mtk_wmt_recv(struct urb *urb)
394 + skb = bt_skb_alloc(HCI_WMT_MAX_EVENT_SIZE, GFP_ATOMIC);
395 + if (!skb) {
396 + hdev->stat.err_rx++;
397 ++ kfree(urb->setup_packet);
398 + return;
399 + }
400 +
401 +@@ -2285,6 +2318,7 @@ static void btusb_mtk_wmt_recv(struct urb *urb)
402 + data->evt_skb = skb_clone(skb, GFP_ATOMIC);
403 + if (!data->evt_skb) {
404 + kfree_skb(skb);
405 ++ kfree(urb->setup_packet);
406 + return;
407 + }
408 + }
409 +@@ -2293,6 +2327,7 @@ static void btusb_mtk_wmt_recv(struct urb *urb)
410 + if (err < 0) {
411 + kfree_skb(data->evt_skb);
412 + data->evt_skb = NULL;
413 ++ kfree(urb->setup_packet);
414 + return;
415 + }
416 +
417 +@@ -2303,6 +2338,7 @@ static void btusb_mtk_wmt_recv(struct urb *urb)
418 + wake_up_bit(&data->flags,
419 + BTUSB_TX_WAIT_VND_EVT);
420 + }
421 ++ kfree(urb->setup_packet);
422 + return;
423 + } else if (urb->status == -ENOENT) {
424 + /* Avoid suspend failed when usb_kill_urb */
425 +@@ -2323,6 +2359,7 @@ static void btusb_mtk_wmt_recv(struct urb *urb)
426 + usb_anchor_urb(urb, &data->ctrl_anchor);
427 + err = usb_submit_urb(urb, GFP_ATOMIC);
428 + if (err < 0) {
429 ++ kfree(urb->setup_packet);
430 + /* -EPERM: urb is being killed;
431 + * -ENODEV: device got disconnected
432 + */
433 +@@ -2877,6 +2914,7 @@ static int btusb_mtk_setup(struct hci_dev *hdev)
434 + }
435 +
436 + hci_set_msft_opcode(hdev, 0xFD30);
437 ++ hci_set_aosp_capable(hdev);
438 + goto done;
439 + default:
440 + bt_dev_err(hdev, "Unsupported hardware variant (%08x)",
441 +@@ -3857,6 +3895,9 @@ static int btusb_probe(struct usb_interface *intf,
442 +
443 + if (id->driver_info & BTUSB_INTEL_BROKEN_INITIAL_NCMD)
444 + btintel_set_flag(hdev, INTEL_BROKEN_INITIAL_NCMD);
445 ++
446 ++ if (id->driver_info & BTUSB_INTEL_BROKEN_SHUTDOWN_LED)
447 ++ btintel_set_flag(hdev, INTEL_BROKEN_SHUTDOWN_LED);
448 + }
449 +
450 + if (id->driver_info & BTUSB_MARVELL)
451 +diff --git a/drivers/char/random.c b/drivers/char/random.c
452 +index 605969ed0f965..7470ee24db2f9 100644
453 +--- a/drivers/char/random.c
454 ++++ b/drivers/char/random.c
455 +@@ -461,6 +461,7 @@ static struct crng_state primary_crng = {
456 + * its value (from 0->1->2).
457 + */
458 + static int crng_init = 0;
459 ++static bool crng_need_final_init = false;
460 + #define crng_ready() (likely(crng_init > 1))
461 + static int crng_init_cnt = 0;
462 + static unsigned long crng_global_init_time = 0;
463 +@@ -828,6 +829,36 @@ static void __init crng_initialize_primary(struct crng_state *crng)
464 + crng->init_time = jiffies - CRNG_RESEED_INTERVAL - 1;
465 + }
466 +
467 ++static void crng_finalize_init(struct crng_state *crng)
468 ++{
469 ++ if (crng != &primary_crng || crng_init >= 2)
470 ++ return;
471 ++ if (!system_wq) {
472 ++ /* We can't call numa_crng_init until we have workqueues,
473 ++ * so mark this for processing later. */
474 ++ crng_need_final_init = true;
475 ++ return;
476 ++ }
477 ++
478 ++ invalidate_batched_entropy();
479 ++ numa_crng_init();
480 ++ crng_init = 2;
481 ++ process_random_ready_list();
482 ++ wake_up_interruptible(&crng_init_wait);
483 ++ kill_fasync(&fasync, SIGIO, POLL_IN);
484 ++ pr_notice("crng init done\n");
485 ++ if (unseeded_warning.missed) {
486 ++ pr_notice("%d get_random_xx warning(s) missed due to ratelimiting\n",
487 ++ unseeded_warning.missed);
488 ++ unseeded_warning.missed = 0;
489 ++ }
490 ++ if (urandom_warning.missed) {
491 ++ pr_notice("%d urandom warning(s) missed due to ratelimiting\n",
492 ++ urandom_warning.missed);
493 ++ urandom_warning.missed = 0;
494 ++ }
495 ++}
496 ++
497 + #ifdef CONFIG_NUMA
498 + static void do_numa_crng_init(struct work_struct *work)
499 + {
500 +@@ -843,8 +874,8 @@ static void do_numa_crng_init(struct work_struct *work)
501 + crng_initialize_secondary(crng);
502 + pool[i] = crng;
503 + }
504 +- mb();
505 +- if (cmpxchg(&crng_node_pool, NULL, pool)) {
506 ++ /* pairs with READ_ONCE() in select_crng() */
507 ++ if (cmpxchg_release(&crng_node_pool, NULL, pool) != NULL) {
508 + for_each_node(i)
509 + kfree(pool[i]);
510 + kfree(pool);
511 +@@ -857,8 +888,26 @@ static void numa_crng_init(void)
512 + {
513 + schedule_work(&numa_crng_init_work);
514 + }
515 ++
516 ++static struct crng_state *select_crng(void)
517 ++{
518 ++ struct crng_state **pool;
519 ++ int nid = numa_node_id();
520 ++
521 ++ /* pairs with cmpxchg_release() in do_numa_crng_init() */
522 ++ pool = READ_ONCE(crng_node_pool);
523 ++ if (pool && pool[nid])
524 ++ return pool[nid];
525 ++
526 ++ return &primary_crng;
527 ++}
528 + #else
529 + static void numa_crng_init(void) {}
530 ++
531 ++static struct crng_state *select_crng(void)
532 ++{
533 ++ return &primary_crng;
534 ++}
535 + #endif
536 +
537 + /*
538 +@@ -962,38 +1011,23 @@ static void crng_reseed(struct crng_state *crng, struct entropy_store *r)
539 + crng->state[i+4] ^= buf.key[i] ^ rv;
540 + }
541 + memzero_explicit(&buf, sizeof(buf));
542 +- crng->init_time = jiffies;
543 ++ WRITE_ONCE(crng->init_time, jiffies);
544 + spin_unlock_irqrestore(&crng->lock, flags);
545 +- if (crng == &primary_crng && crng_init < 2) {
546 +- invalidate_batched_entropy();
547 +- numa_crng_init();
548 +- crng_init = 2;
549 +- process_random_ready_list();
550 +- wake_up_interruptible(&crng_init_wait);
551 +- kill_fasync(&fasync, SIGIO, POLL_IN);
552 +- pr_notice("crng init done\n");
553 +- if (unseeded_warning.missed) {
554 +- pr_notice("%d get_random_xx warning(s) missed due to ratelimiting\n",
555 +- unseeded_warning.missed);
556 +- unseeded_warning.missed = 0;
557 +- }
558 +- if (urandom_warning.missed) {
559 +- pr_notice("%d urandom warning(s) missed due to ratelimiting\n",
560 +- urandom_warning.missed);
561 +- urandom_warning.missed = 0;
562 +- }
563 +- }
564 ++ crng_finalize_init(crng);
565 + }
566 +
567 + static void _extract_crng(struct crng_state *crng,
568 + __u8 out[CHACHA_BLOCK_SIZE])
569 + {
570 +- unsigned long v, flags;
571 +-
572 +- if (crng_ready() &&
573 +- (time_after(crng_global_init_time, crng->init_time) ||
574 +- time_after(jiffies, crng->init_time + CRNG_RESEED_INTERVAL)))
575 +- crng_reseed(crng, crng == &primary_crng ? &input_pool : NULL);
576 ++ unsigned long v, flags, init_time;
577 ++
578 ++ if (crng_ready()) {
579 ++ init_time = READ_ONCE(crng->init_time);
580 ++ if (time_after(READ_ONCE(crng_global_init_time), init_time) ||
581 ++ time_after(jiffies, init_time + CRNG_RESEED_INTERVAL))
582 ++ crng_reseed(crng, crng == &primary_crng ?
583 ++ &input_pool : NULL);
584 ++ }
585 + spin_lock_irqsave(&crng->lock, flags);
586 + if (arch_get_random_long(&v))
587 + crng->state[14] ^= v;
588 +@@ -1005,15 +1039,7 @@ static void _extract_crng(struct crng_state *crng,
589 +
590 + static void extract_crng(__u8 out[CHACHA_BLOCK_SIZE])
591 + {
592 +- struct crng_state *crng = NULL;
593 +-
594 +-#ifdef CONFIG_NUMA
595 +- if (crng_node_pool)
596 +- crng = crng_node_pool[numa_node_id()];
597 +- if (crng == NULL)
598 +-#endif
599 +- crng = &primary_crng;
600 +- _extract_crng(crng, out);
601 ++ _extract_crng(select_crng(), out);
602 + }
603 +
604 + /*
605 +@@ -1042,15 +1068,7 @@ static void _crng_backtrack_protect(struct crng_state *crng,
606 +
607 + static void crng_backtrack_protect(__u8 tmp[CHACHA_BLOCK_SIZE], int used)
608 + {
609 +- struct crng_state *crng = NULL;
610 +-
611 +-#ifdef CONFIG_NUMA
612 +- if (crng_node_pool)
613 +- crng = crng_node_pool[numa_node_id()];
614 +- if (crng == NULL)
615 +-#endif
616 +- crng = &primary_crng;
617 +- _crng_backtrack_protect(crng, tmp, used);
618 ++ _crng_backtrack_protect(select_crng(), tmp, used);
619 + }
620 +
621 + static ssize_t extract_crng_user(void __user *buf, size_t nbytes)
622 +@@ -1775,6 +1793,8 @@ static void __init init_std_data(struct entropy_store *r)
623 + int __init rand_initialize(void)
624 + {
625 + init_std_data(&input_pool);
626 ++ if (crng_need_final_init)
627 ++ crng_finalize_init(&primary_crng);
628 + crng_initialize_primary(&primary_crng);
629 + crng_global_init_time = jiffies;
630 + if (ratelimit_disable) {
631 +@@ -1949,7 +1969,7 @@ static long random_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
632 + if (crng_init < 2)
633 + return -ENODATA;
634 + crng_reseed(&primary_crng, &input_pool);
635 +- crng_global_init_time = jiffies - 1;
636 ++ WRITE_ONCE(crng_global_init_time, jiffies - 1);
637 + return 0;
638 + default:
639 + return -EINVAL;
640 +@@ -2283,7 +2303,8 @@ void add_hwgenerator_randomness(const char *buffer, size_t count,
641 + * We'll be woken up again once below random_write_wakeup_thresh,
642 + * or when the calling thread is about to terminate.
643 + */
644 +- wait_event_interruptible(random_write_wait, kthread_should_stop() ||
645 ++ wait_event_interruptible(random_write_wait,
646 ++ !system_wq || kthread_should_stop() ||
647 + ENTROPY_BITS(&input_pool) <= random_write_wakeup_bits);
648 + mix_pool_bytes(poolp, buffer, count);
649 + credit_entropy_bits(poolp, entropy);
650 +diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
651 +index ecbb3d1416321..201477ca408a5 100644
652 +--- a/drivers/gpu/drm/i915/intel_pm.c
653 ++++ b/drivers/gpu/drm/i915/intel_pm.c
654 +@@ -3062,9 +3062,9 @@ static void snb_wm_latency_quirk(struct drm_i915_private *dev_priv)
655 + * The BIOS provided WM memory latency values are often
656 + * inadequate for high resolution displays. Adjust them.
657 + */
658 +- changed = ilk_increase_wm_latency(dev_priv, dev_priv->wm.pri_latency, 12) |
659 +- ilk_increase_wm_latency(dev_priv, dev_priv->wm.spr_latency, 12) |
660 +- ilk_increase_wm_latency(dev_priv, dev_priv->wm.cur_latency, 12);
661 ++ changed = ilk_increase_wm_latency(dev_priv, dev_priv->wm.pri_latency, 12);
662 ++ changed |= ilk_increase_wm_latency(dev_priv, dev_priv->wm.spr_latency, 12);
663 ++ changed |= ilk_increase_wm_latency(dev_priv, dev_priv->wm.cur_latency, 12);
664 +
665 + if (!changed)
666 + return;
667 +diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
668 +index 7c007426e0827..058d28a0344b1 100644
669 +--- a/drivers/media/usb/uvc/uvc_driver.c
670 ++++ b/drivers/media/usb/uvc/uvc_driver.c
671 +@@ -2193,7 +2193,6 @@ int uvc_register_video_device(struct uvc_device *dev,
672 + const struct v4l2_file_operations *fops,
673 + const struct v4l2_ioctl_ops *ioctl_ops)
674 + {
675 +- const char *name;
676 + int ret;
677 +
678 + /* Initialize the video buffers queue. */
679 +@@ -2222,20 +2221,16 @@ int uvc_register_video_device(struct uvc_device *dev,
680 + case V4L2_BUF_TYPE_VIDEO_CAPTURE:
681 + default:
682 + vdev->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING;
683 +- name = "Video Capture";
684 + break;
685 + case V4L2_BUF_TYPE_VIDEO_OUTPUT:
686 + vdev->device_caps = V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_STREAMING;
687 +- name = "Video Output";
688 + break;
689 + case V4L2_BUF_TYPE_META_CAPTURE:
690 + vdev->device_caps = V4L2_CAP_META_CAPTURE | V4L2_CAP_STREAMING;
691 +- name = "Metadata";
692 + break;
693 + }
694 +
695 +- snprintf(vdev->name, sizeof(vdev->name), "%s %u", name,
696 +- stream->header.bTerminalLink);
697 ++ strscpy(vdev->name, dev->name, sizeof(vdev->name));
698 +
699 + /*
700 + * Set the driver data before calling video_register_device, otherwise
701 +diff --git a/drivers/mfd/intel-lpss-acpi.c b/drivers/mfd/intel-lpss-acpi.c
702 +index 3f1d976eb67cb..f2ea6540a01e1 100644
703 +--- a/drivers/mfd/intel-lpss-acpi.c
704 ++++ b/drivers/mfd/intel-lpss-acpi.c
705 +@@ -136,6 +136,7 @@ static int intel_lpss_acpi_probe(struct platform_device *pdev)
706 + {
707 + struct intel_lpss_platform_info *info;
708 + const struct acpi_device_id *id;
709 ++ int ret;
710 +
711 + id = acpi_match_device(intel_lpss_acpi_ids, &pdev->dev);
712 + if (!id)
713 +@@ -149,10 +150,14 @@ static int intel_lpss_acpi_probe(struct platform_device *pdev)
714 + info->mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
715 + info->irq = platform_get_irq(pdev, 0);
716 +
717 ++ ret = intel_lpss_probe(&pdev->dev, info);
718 ++ if (ret)
719 ++ return ret;
720 ++
721 + pm_runtime_set_active(&pdev->dev);
722 + pm_runtime_enable(&pdev->dev);
723 +
724 +- return intel_lpss_probe(&pdev->dev, info);
725 ++ return 0;
726 + }
727 +
728 + static int intel_lpss_acpi_remove(struct platform_device *pdev)
729 +diff --git a/drivers/mfd/intel-lpss-pci.c b/drivers/mfd/intel-lpss-pci.c
730 +index a872b4485eacf..f70464ce8e3d7 100644
731 +--- a/drivers/mfd/intel-lpss-pci.c
732 ++++ b/drivers/mfd/intel-lpss-pci.c
733 +@@ -254,7 +254,7 @@ static const struct pci_device_id intel_lpss_pci_ids[] = {
734 + { PCI_VDEVICE(INTEL, 0x34eb), (kernel_ulong_t)&bxt_i2c_info },
735 + { PCI_VDEVICE(INTEL, 0x34fb), (kernel_ulong_t)&spt_info },
736 + /* ICL-N */
737 +- { PCI_VDEVICE(INTEL, 0x38a8), (kernel_ulong_t)&bxt_uart_info },
738 ++ { PCI_VDEVICE(INTEL, 0x38a8), (kernel_ulong_t)&spt_uart_info },
739 + /* TGL-H */
740 + { PCI_VDEVICE(INTEL, 0x43a7), (kernel_ulong_t)&bxt_uart_info },
741 + { PCI_VDEVICE(INTEL, 0x43a8), (kernel_ulong_t)&bxt_uart_info },
742 +diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
743 +index 6f9877546830b..ed53276f6ad90 100644
744 +--- a/drivers/mmc/host/sdhci-pci-core.c
745 ++++ b/drivers/mmc/host/sdhci-pci-core.c
746 +@@ -1866,6 +1866,7 @@ static const struct pci_device_id pci_ids[] = {
747 + SDHCI_PCI_DEVICE(INTEL, JSL_SD, intel_byt_sd),
748 + SDHCI_PCI_DEVICE(INTEL, LKF_EMMC, intel_glk_emmc),
749 + SDHCI_PCI_DEVICE(INTEL, LKF_SD, intel_byt_sd),
750 ++ SDHCI_PCI_DEVICE(INTEL, ADL_EMMC, intel_glk_emmc),
751 + SDHCI_PCI_DEVICE(O2, 8120, o2),
752 + SDHCI_PCI_DEVICE(O2, 8220, o2),
753 + SDHCI_PCI_DEVICE(O2, 8221, o2),
754 +diff --git a/drivers/mmc/host/sdhci-pci.h b/drivers/mmc/host/sdhci-pci.h
755 +index 5e3193278ff99..3661a224fb04a 100644
756 +--- a/drivers/mmc/host/sdhci-pci.h
757 ++++ b/drivers/mmc/host/sdhci-pci.h
758 +@@ -59,6 +59,7 @@
759 + #define PCI_DEVICE_ID_INTEL_JSL_SD 0x4df8
760 + #define PCI_DEVICE_ID_INTEL_LKF_EMMC 0x98c4
761 + #define PCI_DEVICE_ID_INTEL_LKF_SD 0x98f8
762 ++#define PCI_DEVICE_ID_INTEL_ADL_EMMC 0x54c4
763 +
764 + #define PCI_DEVICE_ID_SYSKONNECT_8000 0x8000
765 + #define PCI_DEVICE_ID_VIA_95D0 0x95d0
766 +diff --git a/drivers/net/can/usb/gs_usb.c b/drivers/net/can/usb/gs_usb.c
767 +index 1b400de00f517..4d43aca2ff568 100644
768 +--- a/drivers/net/can/usb/gs_usb.c
769 ++++ b/drivers/net/can/usb/gs_usb.c
770 +@@ -321,7 +321,7 @@ static void gs_usb_receive_bulk_callback(struct urb *urb)
771 +
772 + /* device reports out of range channel id */
773 + if (hf->channel >= GS_MAX_INTF)
774 +- goto resubmit_urb;
775 ++ goto device_detach;
776 +
777 + dev = usbcan->canch[hf->channel];
778 +
779 +@@ -406,6 +406,7 @@ static void gs_usb_receive_bulk_callback(struct urb *urb)
780 +
781 + /* USB failure take down all interfaces */
782 + if (rc == -ENODEV) {
783 ++ device_detach:
784 + for (rc = 0; rc < GS_MAX_INTF; rc++) {
785 + if (usbcan->canch[rc])
786 + netif_device_detach(usbcan->canch[rc]->netdev);
787 +@@ -507,6 +508,8 @@ static netdev_tx_t gs_can_start_xmit(struct sk_buff *skb,
788 +
789 + hf->echo_id = idx;
790 + hf->channel = dev->channel;
791 ++ hf->flags = 0;
792 ++ hf->reserved = 0;
793 +
794 + cf = (struct can_frame *)skb->data;
795 +
796 +diff --git a/drivers/net/veth.c b/drivers/net/veth.c
797 +index 2acdb8ad6c713..ecbc09cbe2590 100644
798 +--- a/drivers/net/veth.c
799 ++++ b/drivers/net/veth.c
800 +@@ -342,7 +342,6 @@ static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev)
801 + */
802 + use_napi = rcu_access_pointer(rq->napi) &&
803 + veth_skb_is_eligible_for_gro(dev, rcv, skb);
804 +- skb_record_rx_queue(skb, rxq);
805 + }
806 +
807 + skb_tx_timestamp(skb);
808 +diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c
809 +index 5ae2ef4680d6c..04238c29419b5 100644
810 +--- a/drivers/net/wireless/ath/ath11k/wmi.c
811 ++++ b/drivers/net/wireless/ath/ath11k/wmi.c
812 +@@ -2069,7 +2069,7 @@ int ath11k_wmi_send_scan_start_cmd(struct ath11k *ar,
813 + void *ptr;
814 + int i, ret, len;
815 + u32 *tmp_ptr;
816 +- u8 extraie_len_with_pad = 0;
817 ++ u16 extraie_len_with_pad = 0;
818 + struct hint_short_ssid *s_ssid = NULL;
819 + struct hint_bssid *hint_bssid = NULL;
820 +
821 +@@ -2088,7 +2088,7 @@ int ath11k_wmi_send_scan_start_cmd(struct ath11k *ar,
822 + len += sizeof(*bssid) * params->num_bssid;
823 +
824 + len += TLV_HDR_SIZE;
825 +- if (params->extraie.len)
826 ++ if (params->extraie.len && params->extraie.len <= 0xFFFF)
827 + extraie_len_with_pad =
828 + roundup(params->extraie.len, sizeof(u32));
829 + len += extraie_len_with_pad;
830 +@@ -2195,7 +2195,7 @@ int ath11k_wmi_send_scan_start_cmd(struct ath11k *ar,
831 + FIELD_PREP(WMI_TLV_LEN, len);
832 + ptr += TLV_HDR_SIZE;
833 +
834 +- if (params->extraie.len)
835 ++ if (extraie_len_with_pad)
836 + memcpy(ptr, params->extraie.ptr,
837 + params->extraie.len);
838 +
839 +diff --git a/drivers/platform/x86/intel/hid.c b/drivers/platform/x86/intel/hid.c
840 +index 13f8cf70b9aee..41a2a026f1568 100644
841 +--- a/drivers/platform/x86/intel/hid.c
842 ++++ b/drivers/platform/x86/intel/hid.c
843 +@@ -106,6 +106,13 @@ static const struct dmi_system_id button_array_table[] = {
844 + DMI_MATCH(DMI_PRODUCT_NAME, "Surface Go 3"),
845 + },
846 + },
847 ++ {
848 ++ .ident = "Microsoft Surface Go 3",
849 ++ .matches = {
850 ++ DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
851 ++ DMI_MATCH(DMI_PRODUCT_NAME, "Surface Go 3"),
852 ++ },
853 ++ },
854 + { }
855 + };
856 +
857 +diff --git a/drivers/staging/greybus/audio_topology.c b/drivers/staging/greybus/audio_topology.c
858 +index 1e613d42d8237..7f7d558b76d04 100644
859 +--- a/drivers/staging/greybus/audio_topology.c
860 ++++ b/drivers/staging/greybus/audio_topology.c
861 +@@ -974,6 +974,44 @@ static int gbaudio_widget_event(struct snd_soc_dapm_widget *w,
862 + return ret;
863 + }
864 +
865 ++static const struct snd_soc_dapm_widget gbaudio_widgets[] = {
866 ++ [snd_soc_dapm_spk] = SND_SOC_DAPM_SPK(NULL, gbcodec_event_spk),
867 ++ [snd_soc_dapm_hp] = SND_SOC_DAPM_HP(NULL, gbcodec_event_hp),
868 ++ [snd_soc_dapm_mic] = SND_SOC_DAPM_MIC(NULL, gbcodec_event_int_mic),
869 ++ [snd_soc_dapm_output] = SND_SOC_DAPM_OUTPUT(NULL),
870 ++ [snd_soc_dapm_input] = SND_SOC_DAPM_INPUT(NULL),
871 ++ [snd_soc_dapm_switch] = SND_SOC_DAPM_SWITCH_E(NULL, SND_SOC_NOPM,
872 ++ 0, 0, NULL,
873 ++ gbaudio_widget_event,
874 ++ SND_SOC_DAPM_PRE_PMU |
875 ++ SND_SOC_DAPM_POST_PMD),
876 ++ [snd_soc_dapm_pga] = SND_SOC_DAPM_PGA_E(NULL, SND_SOC_NOPM,
877 ++ 0, 0, NULL, 0,
878 ++ gbaudio_widget_event,
879 ++ SND_SOC_DAPM_PRE_PMU |
880 ++ SND_SOC_DAPM_POST_PMD),
881 ++ [snd_soc_dapm_mixer] = SND_SOC_DAPM_MIXER_E(NULL, SND_SOC_NOPM,
882 ++ 0, 0, NULL, 0,
883 ++ gbaudio_widget_event,
884 ++ SND_SOC_DAPM_PRE_PMU |
885 ++ SND_SOC_DAPM_POST_PMD),
886 ++ [snd_soc_dapm_mux] = SND_SOC_DAPM_MUX_E(NULL, SND_SOC_NOPM,
887 ++ 0, 0, NULL,
888 ++ gbaudio_widget_event,
889 ++ SND_SOC_DAPM_PRE_PMU |
890 ++ SND_SOC_DAPM_POST_PMD),
891 ++ [snd_soc_dapm_aif_in] = SND_SOC_DAPM_AIF_IN_E(NULL, NULL, 0,
892 ++ SND_SOC_NOPM, 0, 0,
893 ++ gbaudio_widget_event,
894 ++ SND_SOC_DAPM_PRE_PMU |
895 ++ SND_SOC_DAPM_POST_PMD),
896 ++ [snd_soc_dapm_aif_out] = SND_SOC_DAPM_AIF_OUT_E(NULL, NULL, 0,
897 ++ SND_SOC_NOPM, 0, 0,
898 ++ gbaudio_widget_event,
899 ++ SND_SOC_DAPM_PRE_PMU |
900 ++ SND_SOC_DAPM_POST_PMD),
901 ++};
902 ++
903 + static int gbaudio_tplg_create_widget(struct gbaudio_module_info *module,
904 + struct snd_soc_dapm_widget *dw,
905 + struct gb_audio_widget *w, int *w_size)
906 +@@ -1052,77 +1090,37 @@ static int gbaudio_tplg_create_widget(struct gbaudio_module_info *module,
907 +
908 + switch (w->type) {
909 + case snd_soc_dapm_spk:
910 +- *dw = (struct snd_soc_dapm_widget)
911 +- SND_SOC_DAPM_SPK(w->name, gbcodec_event_spk);
912 ++ *dw = gbaudio_widgets[w->type];
913 + module->op_devices |= GBAUDIO_DEVICE_OUT_SPEAKER;
914 + break;
915 + case snd_soc_dapm_hp:
916 +- *dw = (struct snd_soc_dapm_widget)
917 +- SND_SOC_DAPM_HP(w->name, gbcodec_event_hp);
918 ++ *dw = gbaudio_widgets[w->type];
919 + module->op_devices |= (GBAUDIO_DEVICE_OUT_WIRED_HEADSET
920 + | GBAUDIO_DEVICE_OUT_WIRED_HEADPHONE);
921 + module->ip_devices |= GBAUDIO_DEVICE_IN_WIRED_HEADSET;
922 + break;
923 + case snd_soc_dapm_mic:
924 +- *dw = (struct snd_soc_dapm_widget)
925 +- SND_SOC_DAPM_MIC(w->name, gbcodec_event_int_mic);
926 ++ *dw = gbaudio_widgets[w->type];
927 + module->ip_devices |= GBAUDIO_DEVICE_IN_BUILTIN_MIC;
928 + break;
929 + case snd_soc_dapm_output:
930 +- *dw = (struct snd_soc_dapm_widget)SND_SOC_DAPM_OUTPUT(w->name);
931 +- break;
932 + case snd_soc_dapm_input:
933 +- *dw = (struct snd_soc_dapm_widget)SND_SOC_DAPM_INPUT(w->name);
934 +- break;
935 + case snd_soc_dapm_switch:
936 +- *dw = (struct snd_soc_dapm_widget)
937 +- SND_SOC_DAPM_SWITCH_E(w->name, SND_SOC_NOPM, 0, 0,
938 +- widget_kctls,
939 +- gbaudio_widget_event,
940 +- SND_SOC_DAPM_PRE_PMU |
941 +- SND_SOC_DAPM_POST_PMD);
942 +- break;
943 + case snd_soc_dapm_pga:
944 +- *dw = (struct snd_soc_dapm_widget)
945 +- SND_SOC_DAPM_PGA_E(w->name, SND_SOC_NOPM, 0, 0, NULL, 0,
946 +- gbaudio_widget_event,
947 +- SND_SOC_DAPM_PRE_PMU |
948 +- SND_SOC_DAPM_POST_PMD);
949 +- break;
950 + case snd_soc_dapm_mixer:
951 +- *dw = (struct snd_soc_dapm_widget)
952 +- SND_SOC_DAPM_MIXER_E(w->name, SND_SOC_NOPM, 0, 0, NULL,
953 +- 0, gbaudio_widget_event,
954 +- SND_SOC_DAPM_PRE_PMU |
955 +- SND_SOC_DAPM_POST_PMD);
956 +- break;
957 + case snd_soc_dapm_mux:
958 +- *dw = (struct snd_soc_dapm_widget)
959 +- SND_SOC_DAPM_MUX_E(w->name, SND_SOC_NOPM, 0, 0,
960 +- widget_kctls, gbaudio_widget_event,
961 +- SND_SOC_DAPM_PRE_PMU |
962 +- SND_SOC_DAPM_POST_PMD);
963 ++ *dw = gbaudio_widgets[w->type];
964 + break;
965 + case snd_soc_dapm_aif_in:
966 +- *dw = (struct snd_soc_dapm_widget)
967 +- SND_SOC_DAPM_AIF_IN_E(w->name, w->sname, 0,
968 +- SND_SOC_NOPM,
969 +- 0, 0, gbaudio_widget_event,
970 +- SND_SOC_DAPM_PRE_PMU |
971 +- SND_SOC_DAPM_POST_PMD);
972 +- break;
973 + case snd_soc_dapm_aif_out:
974 +- *dw = (struct snd_soc_dapm_widget)
975 +- SND_SOC_DAPM_AIF_OUT_E(w->name, w->sname, 0,
976 +- SND_SOC_NOPM,
977 +- 0, 0, gbaudio_widget_event,
978 +- SND_SOC_DAPM_PRE_PMU |
979 +- SND_SOC_DAPM_POST_PMD);
980 ++ *dw = gbaudio_widgets[w->type];
981 ++ dw->sname = w->sname;
982 + break;
983 + default:
984 + ret = -EINVAL;
985 + goto error;
986 + }
987 ++ dw->name = w->name;
988 +
989 + dev_dbg(module->dev, "%s: widget of type %d created\n", dw->name,
990 + dw->id);
991 +diff --git a/drivers/staging/r8188eu/core/rtw_led.c b/drivers/staging/r8188eu/core/rtw_led.c
992 +index 0e3453639a8b0..a6dc268397438 100644
993 +--- a/drivers/staging/r8188eu/core/rtw_led.c
994 ++++ b/drivers/staging/r8188eu/core/rtw_led.c
995 +@@ -54,6 +54,7 @@ void DeInitLed871x(struct LED_871x *pLed)
996 + _cancel_workitem_sync(&pLed->BlinkWorkItem);
997 + _cancel_timer_ex(&pLed->BlinkTimer);
998 + ResetLedStatus(pLed);
999 ++ SwLedOff(pLed->padapter, pLed);
1000 + }
1001 +
1002 + static void SwLedBlink1(struct LED_871x *pLed)
1003 +diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
1004 +index 4d326ee12c36a..8948b3bf7622b 100644
1005 +--- a/drivers/usb/core/hcd.c
1006 ++++ b/drivers/usb/core/hcd.c
1007 +@@ -753,6 +753,7 @@ void usb_hcd_poll_rh_status(struct usb_hcd *hcd)
1008 + {
1009 + struct urb *urb;
1010 + int length;
1011 ++ int status;
1012 + unsigned long flags;
1013 + char buffer[6]; /* Any root hubs with > 31 ports? */
1014 +
1015 +@@ -770,11 +771,17 @@ void usb_hcd_poll_rh_status(struct usb_hcd *hcd)
1016 + if (urb) {
1017 + clear_bit(HCD_FLAG_POLL_PENDING, &hcd->flags);
1018 + hcd->status_urb = NULL;
1019 ++ if (urb->transfer_buffer_length >= length) {
1020 ++ status = 0;
1021 ++ } else {
1022 ++ status = -EOVERFLOW;
1023 ++ length = urb->transfer_buffer_length;
1024 ++ }
1025 + urb->actual_length = length;
1026 + memcpy(urb->transfer_buffer, buffer, length);
1027 +
1028 + usb_hcd_unlink_urb_from_ep(hcd, urb);
1029 +- usb_hcd_giveback_urb(hcd, urb, 0);
1030 ++ usb_hcd_giveback_urb(hcd, urb, status);
1031 + } else {
1032 + length = 0;
1033 + set_bit(HCD_FLAG_POLL_PENDING, &hcd->flags);
1034 +diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
1035 +index 00070a8a65079..3bc4a86c3d0a5 100644
1036 +--- a/drivers/usb/core/hub.c
1037 ++++ b/drivers/usb/core/hub.c
1038 +@@ -1225,7 +1225,7 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)
1039 + */
1040 + if (portchange || (hub_is_superspeed(hub->hdev) &&
1041 + port_resumed))
1042 +- set_bit(port1, hub->change_bits);
1043 ++ set_bit(port1, hub->event_bits);
1044 +
1045 + } else if (udev->persist_enabled) {
1046 + #ifdef CONFIG_PM
1047 +diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
1048 +index 63065bc01b766..383342efcdc46 100644
1049 +--- a/include/net/bluetooth/hci.h
1050 ++++ b/include/net/bluetooth/hci.h
1051 +@@ -246,6 +246,15 @@ enum {
1052 + * HCI after resume.
1053 + */
1054 + HCI_QUIRK_NO_SUSPEND_NOTIFIER,
1055 ++
1056 ++ /*
1057 ++ * When this quirk is set, LE tx power is not queried on startup
1058 ++ * and the min/max tx power values default to HCI_TX_POWER_INVALID.
1059 ++ *
1060 ++ * This quirk can be set before hci_register_dev is called or
1061 ++ * during the hdev->setup vendor callback.
1062 ++ */
1063 ++ HCI_QUIRK_BROKEN_READ_TRANSMIT_POWER,
1064 + };
1065 +
1066 + /* HCI device flags */
1067 +diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
1068 +index b532f1058d35f..4e51bf3f9603a 100644
1069 +--- a/kernel/bpf/verifier.c
1070 ++++ b/kernel/bpf/verifier.c
1071 +@@ -7229,16 +7229,16 @@ static int adjust_ptr_min_max_vals(struct bpf_verifier_env *env,
1072 + fallthrough;
1073 + case PTR_TO_PACKET_END:
1074 + case PTR_TO_SOCKET:
1075 +- case PTR_TO_SOCKET_OR_NULL:
1076 + case PTR_TO_SOCK_COMMON:
1077 +- case PTR_TO_SOCK_COMMON_OR_NULL:
1078 + case PTR_TO_TCP_SOCK:
1079 +- case PTR_TO_TCP_SOCK_OR_NULL:
1080 + case PTR_TO_XDP_SOCK:
1081 ++reject:
1082 + verbose(env, "R%d pointer arithmetic on %s prohibited\n",
1083 + dst, reg_type_str[ptr_reg->type]);
1084 + return -EACCES;
1085 + default:
1086 ++ if (reg_type_may_be_null(ptr_reg->type))
1087 ++ goto reject;
1088 + break;
1089 + }
1090 +
1091 +diff --git a/kernel/workqueue.c b/kernel/workqueue.c
1092 +index 613917bbc4e73..c55004cbf48ee 100644
1093 +--- a/kernel/workqueue.c
1094 ++++ b/kernel/workqueue.c
1095 +@@ -868,8 +868,17 @@ void wq_worker_running(struct task_struct *task)
1096 +
1097 + if (!worker->sleeping)
1098 + return;
1099 ++
1100 ++ /*
1101 ++ * If preempted by unbind_workers() between the WORKER_NOT_RUNNING check
1102 ++ * and the nr_running increment below, we may ruin the nr_running reset
1103 ++ * and leave with an unexpected pool->nr_running == 1 on the newly unbound
1104 ++ * pool. Protect against such race.
1105 ++ */
1106 ++ preempt_disable();
1107 + if (!(worker->flags & WORKER_NOT_RUNNING))
1108 + atomic_inc(&worker->pool->nr_running);
1109 ++ preempt_enable();
1110 + worker->sleeping = 0;
1111 + }
1112 +
1113 +@@ -903,6 +912,16 @@ void wq_worker_sleeping(struct task_struct *task)
1114 + worker->sleeping = 1;
1115 + raw_spin_lock_irq(&pool->lock);
1116 +
1117 ++ /*
1118 ++ * Recheck in case unbind_workers() preempted us. We don't
1119 ++ * want to decrement nr_running after the worker is unbound
1120 ++ * and nr_running has been reset.
1121 ++ */
1122 ++ if (worker->flags & WORKER_NOT_RUNNING) {
1123 ++ raw_spin_unlock_irq(&pool->lock);
1124 ++ return;
1125 ++ }
1126 ++
1127 + /*
1128 + * The counterpart of the following dec_and_test, implied mb,
1129 + * worklist not empty test sequence is in insert_work().
1130 +diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
1131 +index 8d33aa64846b1..2cf77d76c50be 100644
1132 +--- a/net/bluetooth/hci_core.c
1133 ++++ b/net/bluetooth/hci_core.c
1134 +@@ -619,7 +619,8 @@ static int hci_init3_req(struct hci_request *req, unsigned long opt)
1135 + hci_req_add(req, HCI_OP_LE_READ_ADV_TX_POWER, 0, NULL);
1136 + }
1137 +
1138 +- if (hdev->commands[38] & 0x80) {
1139 ++ if ((hdev->commands[38] & 0x80) &&
1140 ++ !test_bit(HCI_QUIRK_BROKEN_READ_TRANSMIT_POWER, &hdev->quirks)) {
1141 + /* Read LE Min/Max Tx Power*/
1142 + hci_req_add(req, HCI_OP_LE_READ_TRANSMIT_POWER,
1143 + 0, NULL);
1144 +diff --git a/net/can/isotp.c b/net/can/isotp.c
1145 +index df6968b28bf41..02cbcb2ecf0db 100644
1146 +--- a/net/can/isotp.c
1147 ++++ b/net/can/isotp.c
1148 +@@ -119,8 +119,8 @@ enum {
1149 + };
1150 +
1151 + struct tpcon {
1152 +- int idx;
1153 +- int len;
1154 ++ unsigned int idx;
1155 ++ unsigned int len;
1156 + u32 state;
1157 + u8 bs;
1158 + u8 sn;