Gentoo Archives: gentoo-commits

From: Mike Pagano <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/linux-patches:5.14 commit in: /
Date: Sun, 12 Sep 2021 14:36:15
Message-Id: 1631457354.5515c5fcb54e0deb1c8681a2ee87c724495401b9.mpagano@gentoo
1 commit: 5515c5fcb54e0deb1c8681a2ee87c724495401b9
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Sun Sep 12 14:35:54 2021 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Sun Sep 12 14:35:54 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=5515c5fc
7
8 Linux patch 5.14.3
9
10 Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>
11
12 0000_README | 4 +
13 1002_linux-5.14.3.patch | 1007 +++++++++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 1011 insertions(+)
15
16 diff --git a/0000_README b/0000_README
17 index d1db2c0..4ad6164 100644
18 --- a/0000_README
19 +++ b/0000_README
20 @@ -51,6 +51,10 @@ Patch: 1001_linux-5.14.2.patch
21 From: http://www.kernel.org
22 Desc: Linux 5.14.2
23
24 +Patch: 1002_linux-5.14.3.patch
25 +From: http://www.kernel.org
26 +Desc: Linux 5.14.3
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/1002_linux-5.14.3.patch b/1002_linux-5.14.3.patch
33 new file mode 100644
34 index 0000000..5fdb325
35 --- /dev/null
36 +++ b/1002_linux-5.14.3.patch
37 @@ -0,0 +1,1007 @@
38 +diff --git a/Makefile b/Makefile
39 +index 9a2b00ecc6af4..8715942fccb4a 100644
40 +--- a/Makefile
41 ++++ b/Makefile
42 +@@ -1,7 +1,7 @@
43 + # SPDX-License-Identifier: GPL-2.0
44 + VERSION = 5
45 + PATCHLEVEL = 14
46 +-SUBLEVEL = 2
47 ++SUBLEVEL = 3
48 + EXTRAVERSION =
49 + NAME = Opossums on Parade
50 +
51 +diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
52 +index ebfb911082326..0a40df66a40de 100644
53 +--- a/arch/x86/kernel/reboot.c
54 ++++ b/arch/x86/kernel/reboot.c
55 +@@ -388,10 +388,11 @@ static const struct dmi_system_id reboot_dmi_table[] __initconst = {
56 + },
57 + { /* Handle problems with rebooting on the OptiPlex 990. */
58 + .callback = set_pci_reboot,
59 +- .ident = "Dell OptiPlex 990",
60 ++ .ident = "Dell OptiPlex 990 BIOS A0x",
61 + .matches = {
62 + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
63 + DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 990"),
64 ++ DMI_MATCH(DMI_BIOS_VERSION, "A0"),
65 + },
66 + },
67 + { /* Handle problems with rebooting on Dell 300's */
68 +diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
69 +index a552e7b483603..0255bf243ce55 100644
70 +--- a/drivers/bluetooth/btusb.c
71 ++++ b/drivers/bluetooth/btusb.c
72 +@@ -452,6 +452,10 @@ static const struct usb_device_id blacklist_table[] = {
73 + /* Additional Realtek 8822CE Bluetooth devices */
74 + { USB_DEVICE(0x04ca, 0x4005), .driver_info = BTUSB_REALTEK |
75 + BTUSB_WIDEBAND_SPEECH },
76 ++ /* Bluetooth component of Realtek 8852AE device */
77 ++ { USB_DEVICE(0x04ca, 0x4006), .driver_info = BTUSB_REALTEK |
78 ++ BTUSB_WIDEBAND_SPEECH },
79 ++
80 + { USB_DEVICE(0x04c5, 0x161f), .driver_info = BTUSB_REALTEK |
81 + BTUSB_WIDEBAND_SPEECH },
82 + { USB_DEVICE(0x0b05, 0x18ef), .driver_info = BTUSB_REALTEK |
83 +@@ -1895,7 +1899,7 @@ static int btusb_setup_csr(struct hci_dev *hdev)
84 + is_fake = true;
85 +
86 + if (is_fake) {
87 +- bt_dev_warn(hdev, "CSR: Unbranded CSR clone detected; adding workarounds...");
88 ++ bt_dev_warn(hdev, "CSR: Unbranded CSR clone detected; adding workarounds and force-suspending once...");
89 +
90 + /* Generally these clones have big discrepancies between
91 + * advertised features and what's actually supported.
92 +@@ -1912,41 +1916,46 @@ static int btusb_setup_csr(struct hci_dev *hdev)
93 + clear_bit(HCI_QUIRK_SIMULTANEOUS_DISCOVERY, &hdev->quirks);
94 +
95 + /*
96 +- * Special workaround for clones with a Barrot 8041a02 chip,
97 +- * these clones are really messed-up:
98 +- * 1. Their bulk rx endpoint will never report any data unless
99 +- * the device was suspended at least once (yes really).
100 ++ * Special workaround for these BT 4.0 chip clones, and potentially more:
101 ++ *
102 ++ * - 0x0134: a Barrot 8041a02 (HCI rev: 0x1012 sub: 0x0810)
103 ++ * - 0x7558: IC markings FR3191AHAL 749H15143 (HCI rev/sub-version: 0x0709)
104 ++ *
105 ++ * These controllers are really messed-up.
106 ++ *
107 ++ * 1. Their bulk RX endpoint will never report any data unless
108 ++ * the device was suspended at least once (yes, really).
109 + * 2. They will not wakeup when autosuspended and receiving data
110 +- * on their bulk rx endpoint from e.g. a keyboard or mouse
111 ++ * on their bulk RX endpoint from e.g. a keyboard or mouse
112 + * (IOW remote-wakeup support is broken for the bulk endpoint).
113 + *
114 + * To fix 1. enable runtime-suspend, force-suspend the
115 +- * hci and then wake-it up by disabling runtime-suspend.
116 ++ * HCI and then wake-it up by disabling runtime-suspend.
117 + *
118 +- * To fix 2. clear the hci's can_wake flag, this way the hci
119 ++ * To fix 2. clear the HCI's can_wake flag, this way the HCI
120 + * will still be autosuspended when it is not open.
121 ++ *
122 ++ * --
123 ++ *
124 ++ * Because these are widespread problems we prefer generic solutions; so
125 ++ * apply this initialization quirk to every controller that gets here,
126 ++ * it should be harmless. The alternative is to not work at all.
127 + */
128 +- if (bcdDevice == 0x8891 &&
129 +- le16_to_cpu(rp->lmp_subver) == 0x1012 &&
130 +- le16_to_cpu(rp->hci_rev) == 0x0810 &&
131 +- le16_to_cpu(rp->hci_ver) == BLUETOOTH_VER_4_0) {
132 +- bt_dev_warn(hdev, "CSR: detected a fake CSR dongle using a Barrot 8041a02 chip, this chip is very buggy and may have issues");
133 ++ pm_runtime_allow(&data->udev->dev);
134 +
135 +- pm_runtime_allow(&data->udev->dev);
136 ++ ret = pm_runtime_suspend(&data->udev->dev);
137 ++ if (ret >= 0)
138 ++ msleep(200);
139 ++ else
140 ++ bt_dev_err(hdev, "CSR: Failed to suspend the device for our Barrot 8041a02 receive-issue workaround");
141 +
142 +- ret = pm_runtime_suspend(&data->udev->dev);
143 +- if (ret >= 0)
144 +- msleep(200);
145 +- else
146 +- bt_dev_err(hdev, "Failed to suspend the device for Barrot 8041a02 receive-issue workaround");
147 ++ pm_runtime_forbid(&data->udev->dev);
148 +
149 +- pm_runtime_forbid(&data->udev->dev);
150 ++ device_set_wakeup_capable(&data->udev->dev, false);
151 +
152 +- device_set_wakeup_capable(&data->udev->dev, false);
153 +- /* Re-enable autosuspend if this was requested */
154 +- if (enable_autosuspend)
155 +- usb_enable_autosuspend(data->udev);
156 +- }
157 ++ /* Re-enable autosuspend if this was requested */
158 ++ if (enable_autosuspend)
159 ++ usb_enable_autosuspend(data->udev);
160 + }
161 +
162 + kfree_skb(skb);
163 +diff --git a/drivers/cxl/acpi.c b/drivers/cxl/acpi.c
164 +index 8ae89273f58e9..54e9d4d2cf5f5 100644
165 +--- a/drivers/cxl/acpi.c
166 ++++ b/drivers/cxl/acpi.c
167 +@@ -243,6 +243,9 @@ static struct acpi_device *to_cxl_host_bridge(struct device *dev)
168 + {
169 + struct acpi_device *adev = to_acpi_device(dev);
170 +
171 ++ if (!acpi_pci_find_root(adev->handle))
172 ++ return NULL;
173 ++
174 + if (strcmp(acpi_device_hid(adev), "ACPI0016") == 0)
175 + return adev;
176 + return NULL;
177 +@@ -266,10 +269,6 @@ static int add_host_bridge_uport(struct device *match, void *arg)
178 + if (!bridge)
179 + return 0;
180 +
181 +- pci_root = acpi_pci_find_root(bridge->handle);
182 +- if (!pci_root)
183 +- return -ENXIO;
184 +-
185 + dport = find_dport_by_dev(root_port, match);
186 + if (!dport) {
187 + dev_dbg(host, "host bridge expected and not found\n");
188 +@@ -282,6 +281,11 @@ static int add_host_bridge_uport(struct device *match, void *arg)
189 + return PTR_ERR(port);
190 + dev_dbg(host, "%s: add: %s\n", dev_name(match), dev_name(&port->dev));
191 +
192 ++ /*
193 ++ * Note that this lookup already succeeded in
194 ++ * to_cxl_host_bridge(), so no need to check for failure here
195 ++ */
196 ++ pci_root = acpi_pci_find_root(bridge->handle);
197 + ctx = (struct cxl_walk_context){
198 + .dev = host,
199 + .root = pci_root->bus,
200 +diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c
201 +index 4cf351a3cf992..145ad4bc305fc 100644
202 +--- a/drivers/cxl/pci.c
203 ++++ b/drivers/cxl/pci.c
204 +@@ -568,7 +568,7 @@ static bool cxl_mem_raw_command_allowed(u16 opcode)
205 + if (!IS_ENABLED(CONFIG_CXL_MEM_RAW_COMMANDS))
206 + return false;
207 +
208 +- if (security_locked_down(LOCKDOWN_NONE))
209 ++ if (security_locked_down(LOCKDOWN_PCI_ACCESS))
210 + return false;
211 +
212 + if (cxl_raw_allow_all)
213 +@@ -1022,8 +1022,8 @@ static int cxl_probe_regs(struct cxl_mem *cxlm, void __iomem *base,
214 + !dev_map->memdev.valid) {
215 + dev_err(dev, "registers not found: %s%s%s\n",
216 + !dev_map->status.valid ? "status " : "",
217 +- !dev_map->mbox.valid ? "status " : "",
218 +- !dev_map->memdev.valid ? "status " : "");
219 ++ !dev_map->mbox.valid ? "mbox " : "",
220 ++ !dev_map->memdev.valid ? "memdev " : "");
221 + return -ENXIO;
222 + }
223 +
224 +diff --git a/drivers/firmware/dmi-id.c b/drivers/firmware/dmi-id.c
225 +index 4d5421d14a410..940ddf916202a 100644
226 +--- a/drivers/firmware/dmi-id.c
227 ++++ b/drivers/firmware/dmi-id.c
228 +@@ -73,6 +73,10 @@ static void ascii_filter(char *d, const char *s)
229 +
230 + static ssize_t get_modalias(char *buffer, size_t buffer_size)
231 + {
232 ++ /*
233 ++ * Note new fields need to be added at the end to keep compatibility
234 ++ * with udev's hwdb which does matches on "`cat dmi/id/modalias`*".
235 ++ */
236 + static const struct mafield {
237 + const char *prefix;
238 + int field;
239 +@@ -85,13 +89,13 @@ static ssize_t get_modalias(char *buffer, size_t buffer_size)
240 + { "svn", DMI_SYS_VENDOR },
241 + { "pn", DMI_PRODUCT_NAME },
242 + { "pvr", DMI_PRODUCT_VERSION },
243 +- { "sku", DMI_PRODUCT_SKU },
244 + { "rvn", DMI_BOARD_VENDOR },
245 + { "rn", DMI_BOARD_NAME },
246 + { "rvr", DMI_BOARD_VERSION },
247 + { "cvn", DMI_CHASSIS_VENDOR },
248 + { "ct", DMI_CHASSIS_TYPE },
249 + { "cvr", DMI_CHASSIS_VERSION },
250 ++ { "sku", DMI_PRODUCT_SKU },
251 + { NULL, DMI_NONE }
252 + };
253 +
254 +diff --git a/drivers/net/can/c_can/c_can_ethtool.c b/drivers/net/can/c_can/c_can_ethtool.c
255 +index cd5f07fca2a56..377c7d2e76120 100644
256 +--- a/drivers/net/can/c_can/c_can_ethtool.c
257 ++++ b/drivers/net/can/c_can/c_can_ethtool.c
258 +@@ -15,10 +15,8 @@ static void c_can_get_drvinfo(struct net_device *netdev,
259 + struct ethtool_drvinfo *info)
260 + {
261 + struct c_can_priv *priv = netdev_priv(netdev);
262 +- struct platform_device *pdev = to_platform_device(priv->device);
263 +-
264 + strscpy(info->driver, "c_can", sizeof(info->driver));
265 +- strscpy(info->bus_info, pdev->name, sizeof(info->bus_info));
266 ++ strscpy(info->bus_info, dev_name(priv->device), sizeof(info->bus_info));
267 + }
268 +
269 + static void c_can_get_ringparam(struct net_device *netdev,
270 +diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
271 +index 4d8e337f5085a..55411c100a0e5 100644
272 +--- a/drivers/net/ethernet/realtek/r8169_main.c
273 ++++ b/drivers/net/ethernet/realtek/r8169_main.c
274 +@@ -3489,6 +3489,7 @@ static void rtl_hw_start_8402(struct rtl8169_private *tp)
275 + rtl_eri_write(tp, 0x1b0, ERIAR_MASK_0011, 0x0000);
276 +
277 + rtl_pcie_state_l2l3_disable(tp);
278 ++ rtl_hw_aspm_clkreq_enable(tp, true);
279 + }
280 +
281 + static void rtl_hw_start_8106(struct rtl8169_private *tp)
282 +diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
283 +index ab3de1551b503..7b1c81b899cdf 100644
284 +--- a/drivers/pci/quirks.c
285 ++++ b/drivers/pci/quirks.c
286 +@@ -3235,12 +3235,12 @@ static void fixup_mpss_256(struct pci_dev *dev)
287 + {
288 + dev->pcie_mpss = 1; /* 256 bytes */
289 + }
290 +-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SOLARFLARE,
291 +- PCI_DEVICE_ID_SOLARFLARE_SFC4000A_0, fixup_mpss_256);
292 +-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SOLARFLARE,
293 +- PCI_DEVICE_ID_SOLARFLARE_SFC4000A_1, fixup_mpss_256);
294 +-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SOLARFLARE,
295 +- PCI_DEVICE_ID_SOLARFLARE_SFC4000B, fixup_mpss_256);
296 ++DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SOLARFLARE,
297 ++ PCI_DEVICE_ID_SOLARFLARE_SFC4000A_0, fixup_mpss_256);
298 ++DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SOLARFLARE,
299 ++ PCI_DEVICE_ID_SOLARFLARE_SFC4000A_1, fixup_mpss_256);
300 ++DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SOLARFLARE,
301 ++ PCI_DEVICE_ID_SOLARFLARE_SFC4000B, fixup_mpss_256);
302 +
303 + /*
304 + * Intel 5000 and 5100 Memory controllers have an erratum with read completion
305 +diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c
306 +index f9bdf4e331341..6acfc94a16e73 100644
307 +--- a/drivers/staging/mt7621-pci/pci-mt7621.c
308 ++++ b/drivers/staging/mt7621-pci/pci-mt7621.c
309 +@@ -56,6 +56,7 @@
310 + #define PCIE_BAR_ENABLE BIT(0)
311 + #define PCIE_PORT_INT_EN(x) BIT(20 + (x))
312 + #define PCIE_PORT_LINKUP BIT(0)
313 ++#define PCIE_PORT_CNT 3
314 +
315 + #define PERST_DELAY_MS 100
316 +
317 +@@ -388,10 +389,11 @@ static void mt7621_pcie_reset_ep_deassert(struct mt7621_pcie *pcie)
318 + msleep(PERST_DELAY_MS);
319 + }
320 +
321 +-static void mt7621_pcie_init_ports(struct mt7621_pcie *pcie)
322 ++static int mt7621_pcie_init_ports(struct mt7621_pcie *pcie)
323 + {
324 + struct device *dev = pcie->dev;
325 + struct mt7621_pcie_port *port, *tmp;
326 ++ u8 num_disabled = 0;
327 + int err;
328 +
329 + mt7621_pcie_reset_assert(pcie);
330 +@@ -423,6 +425,7 @@ static void mt7621_pcie_init_ports(struct mt7621_pcie *pcie)
331 + slot);
332 + mt7621_control_assert(port);
333 + port->enabled = false;
334 ++ num_disabled++;
335 +
336 + if (slot == 0) {
337 + tmp = port;
338 +@@ -433,6 +436,8 @@ static void mt7621_pcie_init_ports(struct mt7621_pcie *pcie)
339 + phy_power_off(tmp->phy);
340 + }
341 + }
342 ++
343 ++ return (num_disabled != PCIE_PORT_CNT) ? 0 : -ENODEV;
344 + }
345 +
346 + static void mt7621_pcie_enable_port(struct mt7621_pcie_port *port)
347 +@@ -540,7 +545,11 @@ static int mt7621_pci_probe(struct platform_device *pdev)
348 + return err;
349 + }
350 +
351 +- mt7621_pcie_init_ports(pcie);
352 ++ err = mt7621_pcie_init_ports(pcie);
353 ++ if (err) {
354 ++ dev_err(dev, "Nothing connected in virtual bridges\n");
355 ++ return 0;
356 ++ }
357 +
358 + err = mt7621_pcie_enable_ports(bridge);
359 + if (err) {
360 +diff --git a/drivers/usb/cdns3/cdnsp-mem.c b/drivers/usb/cdns3/cdnsp-mem.c
361 +index a47948a1623fd..ad9aee3f1e398 100644
362 +--- a/drivers/usb/cdns3/cdnsp-mem.c
363 ++++ b/drivers/usb/cdns3/cdnsp-mem.c
364 +@@ -882,7 +882,7 @@ static u32 cdnsp_get_endpoint_max_burst(struct usb_gadget *g,
365 + if (g->speed == USB_SPEED_HIGH &&
366 + (usb_endpoint_xfer_isoc(pep->endpoint.desc) ||
367 + usb_endpoint_xfer_int(pep->endpoint.desc)))
368 +- return (usb_endpoint_maxp(pep->endpoint.desc) & 0x1800) >> 11;
369 ++ return usb_endpoint_maxp_mult(pep->endpoint.desc) - 1;
370 +
371 + return 0;
372 + }
373 +diff --git a/drivers/usb/gadget/udc/tegra-xudc.c b/drivers/usb/gadget/udc/tegra-xudc.c
374 +index c0ca7144e5128..43f1b0d461c1e 100644
375 +--- a/drivers/usb/gadget/udc/tegra-xudc.c
376 ++++ b/drivers/usb/gadget/udc/tegra-xudc.c
377 +@@ -1610,7 +1610,7 @@ static void tegra_xudc_ep_context_setup(struct tegra_xudc_ep *ep)
378 + u16 maxpacket, maxburst = 0, esit = 0;
379 + u32 val;
380 +
381 +- maxpacket = usb_endpoint_maxp(desc) & 0x7ff;
382 ++ maxpacket = usb_endpoint_maxp(desc);
383 + if (xudc->gadget.speed == USB_SPEED_SUPER) {
384 + if (!usb_endpoint_xfer_control(desc))
385 + maxburst = comp_desc->bMaxBurst;
386 +@@ -1621,7 +1621,7 @@ static void tegra_xudc_ep_context_setup(struct tegra_xudc_ep *ep)
387 + (usb_endpoint_xfer_int(desc) ||
388 + usb_endpoint_xfer_isoc(desc))) {
389 + if (xudc->gadget.speed == USB_SPEED_HIGH) {
390 +- maxburst = (usb_endpoint_maxp(desc) >> 11) & 0x3;
391 ++ maxburst = usb_endpoint_maxp_mult(desc) - 1;
392 + if (maxburst == 0x3) {
393 + dev_warn(xudc->dev,
394 + "invalid endpoint maxburst\n");
395 +diff --git a/drivers/usb/host/xhci-debugfs.c b/drivers/usb/host/xhci-debugfs.c
396 +index 2c0fda57869e4..dc832ddf7033f 100644
397 +--- a/drivers/usb/host/xhci-debugfs.c
398 ++++ b/drivers/usb/host/xhci-debugfs.c
399 +@@ -198,12 +198,13 @@ static void xhci_ring_dump_segment(struct seq_file *s,
400 + int i;
401 + dma_addr_t dma;
402 + union xhci_trb *trb;
403 ++ char str[XHCI_MSG_MAX];
404 +
405 + for (i = 0; i < TRBS_PER_SEGMENT; i++) {
406 + trb = &seg->trbs[i];
407 + dma = seg->dma + i * sizeof(*trb);
408 + seq_printf(s, "%pad: %s\n", &dma,
409 +- xhci_decode_trb(le32_to_cpu(trb->generic.field[0]),
410 ++ xhci_decode_trb(str, XHCI_MSG_MAX, le32_to_cpu(trb->generic.field[0]),
411 + le32_to_cpu(trb->generic.field[1]),
412 + le32_to_cpu(trb->generic.field[2]),
413 + le32_to_cpu(trb->generic.field[3])));
414 +@@ -260,11 +261,13 @@ static int xhci_slot_context_show(struct seq_file *s, void *unused)
415 + struct xhci_slot_ctx *slot_ctx;
416 + struct xhci_slot_priv *priv = s->private;
417 + struct xhci_virt_device *dev = priv->dev;
418 ++ char str[XHCI_MSG_MAX];
419 +
420 + xhci = hcd_to_xhci(bus_to_hcd(dev->udev->bus));
421 + slot_ctx = xhci_get_slot_ctx(xhci, dev->out_ctx);
422 + seq_printf(s, "%pad: %s\n", &dev->out_ctx->dma,
423 +- xhci_decode_slot_context(le32_to_cpu(slot_ctx->dev_info),
424 ++ xhci_decode_slot_context(str,
425 ++ le32_to_cpu(slot_ctx->dev_info),
426 + le32_to_cpu(slot_ctx->dev_info2),
427 + le32_to_cpu(slot_ctx->tt_info),
428 + le32_to_cpu(slot_ctx->dev_state)));
429 +@@ -280,6 +283,7 @@ static int xhci_endpoint_context_show(struct seq_file *s, void *unused)
430 + struct xhci_ep_ctx *ep_ctx;
431 + struct xhci_slot_priv *priv = s->private;
432 + struct xhci_virt_device *dev = priv->dev;
433 ++ char str[XHCI_MSG_MAX];
434 +
435 + xhci = hcd_to_xhci(bus_to_hcd(dev->udev->bus));
436 +
437 +@@ -287,7 +291,8 @@ static int xhci_endpoint_context_show(struct seq_file *s, void *unused)
438 + ep_ctx = xhci_get_ep_ctx(xhci, dev->out_ctx, ep_index);
439 + dma = dev->out_ctx->dma + (ep_index + 1) * CTX_SIZE(xhci->hcc_params);
440 + seq_printf(s, "%pad: %s\n", &dma,
441 +- xhci_decode_ep_context(le32_to_cpu(ep_ctx->ep_info),
442 ++ xhci_decode_ep_context(str,
443 ++ le32_to_cpu(ep_ctx->ep_info),
444 + le32_to_cpu(ep_ctx->ep_info2),
445 + le64_to_cpu(ep_ctx->deq),
446 + le32_to_cpu(ep_ctx->tx_info)));
447 +@@ -341,9 +346,10 @@ static int xhci_portsc_show(struct seq_file *s, void *unused)
448 + {
449 + struct xhci_port *port = s->private;
450 + u32 portsc;
451 ++ char str[XHCI_MSG_MAX];
452 +
453 + portsc = readl(port->addr);
454 +- seq_printf(s, "%s\n", xhci_decode_portsc(portsc));
455 ++ seq_printf(s, "%s\n", xhci_decode_portsc(str, portsc));
456 +
457 + return 0;
458 + }
459 +diff --git a/drivers/usb/host/xhci-mtk-sch.c b/drivers/usb/host/xhci-mtk-sch.c
460 +index cffcaf4dfa9f8..0bb1a6295d64a 100644
461 +--- a/drivers/usb/host/xhci-mtk-sch.c
462 ++++ b/drivers/usb/host/xhci-mtk-sch.c
463 +@@ -575,10 +575,12 @@ static u32 get_esit_boundary(struct mu3h_sch_ep_info *sch_ep)
464 + u32 boundary = sch_ep->esit;
465 +
466 + if (sch_ep->sch_tt) { /* LS/FS with TT */
467 +- /* tune for CS */
468 +- if (sch_ep->ep_type != ISOC_OUT_EP)
469 +- boundary++;
470 +- else if (boundary > 1) /* normally esit >= 8 for FS/LS */
471 ++ /*
472 ++ * tune for CS, normally esit >= 8 for FS/LS,
473 ++ * not add one for other types to avoid access array
474 ++ * out of boundary
475 ++ */
476 ++ if (sch_ep->ep_type == ISOC_OUT_EP && boundary > 1)
477 + boundary--;
478 + }
479 +
480 +diff --git a/drivers/usb/host/xhci-rcar.c b/drivers/usb/host/xhci-rcar.c
481 +index 1bc4fe7b8c756..9888ba7d85b6a 100644
482 +--- a/drivers/usb/host/xhci-rcar.c
483 ++++ b/drivers/usb/host/xhci-rcar.c
484 +@@ -134,6 +134,13 @@ static int xhci_rcar_download_firmware(struct usb_hcd *hcd)
485 + const struct soc_device_attribute *attr;
486 + const char *firmware_name;
487 +
488 ++ /*
489 ++ * According to the datasheet, "Upon the completion of FW Download,
490 ++ * there is no need to write or reload FW".
491 ++ */
492 ++ if (readl(regs + RCAR_USB3_DL_CTRL) & RCAR_USB3_DL_CTRL_FW_SUCCESS)
493 ++ return 0;
494 ++
495 + attr = soc_device_match(rcar_quirks_match);
496 + if (attr)
497 + quirks = (uintptr_t)attr->data;
498 +diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
499 +index 8fea44bbc2665..9017986241f51 100644
500 +--- a/drivers/usb/host/xhci-ring.c
501 ++++ b/drivers/usb/host/xhci-ring.c
502 +@@ -942,17 +942,21 @@ static int xhci_invalidate_cancelled_tds(struct xhci_virt_ep *ep)
503 + td->urb->stream_id);
504 + hw_deq &= ~0xf;
505 +
506 +- if (td->cancel_status == TD_HALTED) {
507 +- cached_td = td;
508 +- } else if (trb_in_td(xhci, td->start_seg, td->first_trb,
509 +- td->last_trb, hw_deq, false)) {
510 ++ if (td->cancel_status == TD_HALTED ||
511 ++ trb_in_td(xhci, td->start_seg, td->first_trb, td->last_trb, hw_deq, false)) {
512 + switch (td->cancel_status) {
513 + case TD_CLEARED: /* TD is already no-op */
514 + case TD_CLEARING_CACHE: /* set TR deq command already queued */
515 + break;
516 + case TD_DIRTY: /* TD is cached, clear it */
517 + case TD_HALTED:
518 +- /* FIXME stream case, several stopped rings */
519 ++ td->cancel_status = TD_CLEARING_CACHE;
520 ++ if (cached_td)
521 ++ /* FIXME stream case, several stopped rings */
522 ++ xhci_dbg(xhci,
523 ++ "Move dq past stream %u URB %p instead of stream %u URB %p\n",
524 ++ td->urb->stream_id, td->urb,
525 ++ cached_td->urb->stream_id, cached_td->urb);
526 + cached_td = td;
527 + break;
528 + }
529 +@@ -961,18 +965,24 @@ static int xhci_invalidate_cancelled_tds(struct xhci_virt_ep *ep)
530 + td->cancel_status = TD_CLEARED;
531 + }
532 + }
533 +- if (cached_td) {
534 +- cached_td->cancel_status = TD_CLEARING_CACHE;
535 +
536 +- err = xhci_move_dequeue_past_td(xhci, slot_id, ep->ep_index,
537 +- cached_td->urb->stream_id,
538 +- cached_td);
539 +- /* Failed to move past cached td, try just setting it noop */
540 +- if (err) {
541 +- td_to_noop(xhci, ring, cached_td, false);
542 +- cached_td->cancel_status = TD_CLEARED;
543 ++ /* If there's no need to move the dequeue pointer then we're done */
544 ++ if (!cached_td)
545 ++ return 0;
546 ++
547 ++ err = xhci_move_dequeue_past_td(xhci, slot_id, ep->ep_index,
548 ++ cached_td->urb->stream_id,
549 ++ cached_td);
550 ++ if (err) {
551 ++ /* Failed to move past cached td, just set cached TDs to no-op */
552 ++ list_for_each_entry_safe(td, tmp_td, &ep->cancelled_td_list, cancelled_td_list) {
553 ++ if (td->cancel_status != TD_CLEARING_CACHE)
554 ++ continue;
555 ++ xhci_dbg(xhci, "Failed to clear cancelled cached URB %p, mark clear anyway\n",
556 ++ td->urb);
557 ++ td_to_noop(xhci, ring, td, false);
558 ++ td->cancel_status = TD_CLEARED;
559 + }
560 +- cached_td = NULL;
561 + }
562 + return 0;
563 + }
564 +@@ -1212,6 +1222,7 @@ void xhci_stop_endpoint_command_watchdog(struct timer_list *t)
565 + struct xhci_hcd *xhci = ep->xhci;
566 + unsigned long flags;
567 + u32 usbsts;
568 ++ char str[XHCI_MSG_MAX];
569 +
570 + spin_lock_irqsave(&xhci->lock, flags);
571 +
572 +@@ -1225,7 +1236,7 @@ void xhci_stop_endpoint_command_watchdog(struct timer_list *t)
573 + usbsts = readl(&xhci->op_regs->status);
574 +
575 + xhci_warn(xhci, "xHCI host not responding to stop endpoint command.\n");
576 +- xhci_warn(xhci, "USBSTS:%s\n", xhci_decode_usbsts(usbsts));
577 ++ xhci_warn(xhci, "USBSTS:%s\n", xhci_decode_usbsts(str, usbsts));
578 +
579 + ep->ep_state &= ~EP_STOP_CMD_PENDING;
580 +
581 +diff --git a/drivers/usb/host/xhci-trace.h b/drivers/usb/host/xhci-trace.h
582 +index 627abd236dbe1..a5da020772977 100644
583 +--- a/drivers/usb/host/xhci-trace.h
584 ++++ b/drivers/usb/host/xhci-trace.h
585 +@@ -25,8 +25,6 @@
586 + #include "xhci.h"
587 + #include "xhci-dbgcap.h"
588 +
589 +-#define XHCI_MSG_MAX 500
590 +-
591 + DECLARE_EVENT_CLASS(xhci_log_msg,
592 + TP_PROTO(struct va_format *vaf),
593 + TP_ARGS(vaf),
594 +@@ -122,6 +120,7 @@ DECLARE_EVENT_CLASS(xhci_log_trb,
595 + __field(u32, field1)
596 + __field(u32, field2)
597 + __field(u32, field3)
598 ++ __dynamic_array(char, str, XHCI_MSG_MAX)
599 + ),
600 + TP_fast_assign(
601 + __entry->type = ring->type;
602 +@@ -131,7 +130,7 @@ DECLARE_EVENT_CLASS(xhci_log_trb,
603 + __entry->field3 = le32_to_cpu(trb->field[3]);
604 + ),
605 + TP_printk("%s: %s", xhci_ring_type_string(__entry->type),
606 +- xhci_decode_trb(__entry->field0, __entry->field1,
607 ++ xhci_decode_trb(__get_str(str), XHCI_MSG_MAX, __entry->field0, __entry->field1,
608 + __entry->field2, __entry->field3)
609 + )
610 + );
611 +@@ -323,6 +322,7 @@ DECLARE_EVENT_CLASS(xhci_log_ep_ctx,
612 + __field(u32, info2)
613 + __field(u64, deq)
614 + __field(u32, tx_info)
615 ++ __dynamic_array(char, str, XHCI_MSG_MAX)
616 + ),
617 + TP_fast_assign(
618 + __entry->info = le32_to_cpu(ctx->ep_info);
619 +@@ -330,8 +330,8 @@ DECLARE_EVENT_CLASS(xhci_log_ep_ctx,
620 + __entry->deq = le64_to_cpu(ctx->deq);
621 + __entry->tx_info = le32_to_cpu(ctx->tx_info);
622 + ),
623 +- TP_printk("%s", xhci_decode_ep_context(__entry->info,
624 +- __entry->info2, __entry->deq, __entry->tx_info)
625 ++ TP_printk("%s", xhci_decode_ep_context(__get_str(str),
626 ++ __entry->info, __entry->info2, __entry->deq, __entry->tx_info)
627 + )
628 + );
629 +
630 +@@ -368,6 +368,7 @@ DECLARE_EVENT_CLASS(xhci_log_slot_ctx,
631 + __field(u32, info2)
632 + __field(u32, tt_info)
633 + __field(u32, state)
634 ++ __dynamic_array(char, str, XHCI_MSG_MAX)
635 + ),
636 + TP_fast_assign(
637 + __entry->info = le32_to_cpu(ctx->dev_info);
638 +@@ -375,9 +376,9 @@ DECLARE_EVENT_CLASS(xhci_log_slot_ctx,
639 + __entry->tt_info = le64_to_cpu(ctx->tt_info);
640 + __entry->state = le32_to_cpu(ctx->dev_state);
641 + ),
642 +- TP_printk("%s", xhci_decode_slot_context(__entry->info,
643 +- __entry->info2, __entry->tt_info,
644 +- __entry->state)
645 ++ TP_printk("%s", xhci_decode_slot_context(__get_str(str),
646 ++ __entry->info, __entry->info2,
647 ++ __entry->tt_info, __entry->state)
648 + )
649 + );
650 +
651 +@@ -432,12 +433,13 @@ DECLARE_EVENT_CLASS(xhci_log_ctrl_ctx,
652 + TP_STRUCT__entry(
653 + __field(u32, drop)
654 + __field(u32, add)
655 ++ __dynamic_array(char, str, XHCI_MSG_MAX)
656 + ),
657 + TP_fast_assign(
658 + __entry->drop = le32_to_cpu(ctrl_ctx->drop_flags);
659 + __entry->add = le32_to_cpu(ctrl_ctx->add_flags);
660 + ),
661 +- TP_printk("%s", xhci_decode_ctrl_ctx(__entry->drop, __entry->add)
662 ++ TP_printk("%s", xhci_decode_ctrl_ctx(__get_str(str), __entry->drop, __entry->add)
663 + )
664 + );
665 +
666 +@@ -523,6 +525,7 @@ DECLARE_EVENT_CLASS(xhci_log_portsc,
667 + TP_STRUCT__entry(
668 + __field(u32, portnum)
669 + __field(u32, portsc)
670 ++ __dynamic_array(char, str, XHCI_MSG_MAX)
671 + ),
672 + TP_fast_assign(
673 + __entry->portnum = portnum;
674 +@@ -530,7 +533,7 @@ DECLARE_EVENT_CLASS(xhci_log_portsc,
675 + ),
676 + TP_printk("port-%d: %s",
677 + __entry->portnum,
678 +- xhci_decode_portsc(__entry->portsc)
679 ++ xhci_decode_portsc(__get_str(str), __entry->portsc)
680 + )
681 + );
682 +
683 +@@ -555,13 +558,14 @@ DECLARE_EVENT_CLASS(xhci_log_doorbell,
684 + TP_STRUCT__entry(
685 + __field(u32, slot)
686 + __field(u32, doorbell)
687 ++ __dynamic_array(char, str, XHCI_MSG_MAX)
688 + ),
689 + TP_fast_assign(
690 + __entry->slot = slot;
691 + __entry->doorbell = doorbell;
692 + ),
693 + TP_printk("Ring doorbell for %s",
694 +- xhci_decode_doorbell(__entry->slot, __entry->doorbell)
695 ++ xhci_decode_doorbell(__get_str(str), __entry->slot, __entry->doorbell)
696 + )
697 + );
698 +
699 +diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
700 +index 3c7d281672aec..dca6181c33fdb 100644
701 +--- a/drivers/usb/host/xhci.h
702 ++++ b/drivers/usb/host/xhci.h
703 +@@ -22,6 +22,9 @@
704 + #include "xhci-ext-caps.h"
705 + #include "pci-quirks.h"
706 +
707 ++/* max buffer size for trace and debug messages */
708 ++#define XHCI_MSG_MAX 500
709 ++
710 + /* xHCI PCI Configuration Registers */
711 + #define XHCI_SBRN_OFFSET (0x60)
712 +
713 +@@ -2235,15 +2238,14 @@ static inline char *xhci_slot_state_string(u32 state)
714 + }
715 + }
716 +
717 +-static inline const char *xhci_decode_trb(u32 field0, u32 field1, u32 field2,
718 +- u32 field3)
719 ++static inline const char *xhci_decode_trb(char *str, size_t size,
720 ++ u32 field0, u32 field1, u32 field2, u32 field3)
721 + {
722 +- static char str[256];
723 + int type = TRB_FIELD_TO_TYPE(field3);
724 +
725 + switch (type) {
726 + case TRB_LINK:
727 +- sprintf(str,
728 ++ snprintf(str, size,
729 + "LINK %08x%08x intr %d type '%s' flags %c:%c:%c:%c",
730 + field1, field0, GET_INTR_TARGET(field2),
731 + xhci_trb_type_string(type),
732 +@@ -2260,7 +2262,7 @@ static inline const char *xhci_decode_trb(u32 field0, u32 field1, u32 field2,
733 + case TRB_HC_EVENT:
734 + case TRB_DEV_NOTE:
735 + case TRB_MFINDEX_WRAP:
736 +- sprintf(str,
737 ++ snprintf(str, size,
738 + "TRB %08x%08x status '%s' len %d slot %d ep %d type '%s' flags %c:%c",
739 + field1, field0,
740 + xhci_trb_comp_code_string(GET_COMP_CODE(field2)),
741 +@@ -2273,7 +2275,8 @@ static inline const char *xhci_decode_trb(u32 field0, u32 field1, u32 field2,
742 +
743 + break;
744 + case TRB_SETUP:
745 +- sprintf(str, "bRequestType %02x bRequest %02x wValue %02x%02x wIndex %02x%02x wLength %d length %d TD size %d intr %d type '%s' flags %c:%c:%c",
746 ++ snprintf(str, size,
747 ++ "bRequestType %02x bRequest %02x wValue %02x%02x wIndex %02x%02x wLength %d length %d TD size %d intr %d type '%s' flags %c:%c:%c",
748 + field0 & 0xff,
749 + (field0 & 0xff00) >> 8,
750 + (field0 & 0xff000000) >> 24,
751 +@@ -2290,7 +2293,8 @@ static inline const char *xhci_decode_trb(u32 field0, u32 field1, u32 field2,
752 + field3 & TRB_CYCLE ? 'C' : 'c');
753 + break;
754 + case TRB_DATA:
755 +- sprintf(str, "Buffer %08x%08x length %d TD size %d intr %d type '%s' flags %c:%c:%c:%c:%c:%c:%c",
756 ++ snprintf(str, size,
757 ++ "Buffer %08x%08x length %d TD size %d intr %d type '%s' flags %c:%c:%c:%c:%c:%c:%c",
758 + field1, field0, TRB_LEN(field2), GET_TD_SIZE(field2),
759 + GET_INTR_TARGET(field2),
760 + xhci_trb_type_string(type),
761 +@@ -2303,7 +2307,8 @@ static inline const char *xhci_decode_trb(u32 field0, u32 field1, u32 field2,
762 + field3 & TRB_CYCLE ? 'C' : 'c');
763 + break;
764 + case TRB_STATUS:
765 +- sprintf(str, "Buffer %08x%08x length %d TD size %d intr %d type '%s' flags %c:%c:%c:%c",
766 ++ snprintf(str, size,
767 ++ "Buffer %08x%08x length %d TD size %d intr %d type '%s' flags %c:%c:%c:%c",
768 + field1, field0, TRB_LEN(field2), GET_TD_SIZE(field2),
769 + GET_INTR_TARGET(field2),
770 + xhci_trb_type_string(type),
771 +@@ -2316,7 +2321,7 @@ static inline const char *xhci_decode_trb(u32 field0, u32 field1, u32 field2,
772 + case TRB_ISOC:
773 + case TRB_EVENT_DATA:
774 + case TRB_TR_NOOP:
775 +- sprintf(str,
776 ++ snprintf(str, size,
777 + "Buffer %08x%08x length %d TD size %d intr %d type '%s' flags %c:%c:%c:%c:%c:%c:%c:%c",
778 + field1, field0, TRB_LEN(field2), GET_TD_SIZE(field2),
779 + GET_INTR_TARGET(field2),
780 +@@ -2333,21 +2338,21 @@ static inline const char *xhci_decode_trb(u32 field0, u32 field1, u32 field2,
781 +
782 + case TRB_CMD_NOOP:
783 + case TRB_ENABLE_SLOT:
784 +- sprintf(str,
785 ++ snprintf(str, size,
786 + "%s: flags %c",
787 + xhci_trb_type_string(type),
788 + field3 & TRB_CYCLE ? 'C' : 'c');
789 + break;
790 + case TRB_DISABLE_SLOT:
791 + case TRB_NEG_BANDWIDTH:
792 +- sprintf(str,
793 ++ snprintf(str, size,
794 + "%s: slot %d flags %c",
795 + xhci_trb_type_string(type),
796 + TRB_TO_SLOT_ID(field3),
797 + field3 & TRB_CYCLE ? 'C' : 'c');
798 + break;
799 + case TRB_ADDR_DEV:
800 +- sprintf(str,
801 ++ snprintf(str, size,
802 + "%s: ctx %08x%08x slot %d flags %c:%c",
803 + xhci_trb_type_string(type),
804 + field1, field0,
805 +@@ -2356,7 +2361,7 @@ static inline const char *xhci_decode_trb(u32 field0, u32 field1, u32 field2,
806 + field3 & TRB_CYCLE ? 'C' : 'c');
807 + break;
808 + case TRB_CONFIG_EP:
809 +- sprintf(str,
810 ++ snprintf(str, size,
811 + "%s: ctx %08x%08x slot %d flags %c:%c",
812 + xhci_trb_type_string(type),
813 + field1, field0,
814 +@@ -2365,7 +2370,7 @@ static inline const char *xhci_decode_trb(u32 field0, u32 field1, u32 field2,
815 + field3 & TRB_CYCLE ? 'C' : 'c');
816 + break;
817 + case TRB_EVAL_CONTEXT:
818 +- sprintf(str,
819 ++ snprintf(str, size,
820 + "%s: ctx %08x%08x slot %d flags %c",
821 + xhci_trb_type_string(type),
822 + field1, field0,
823 +@@ -2373,7 +2378,7 @@ static inline const char *xhci_decode_trb(u32 field0, u32 field1, u32 field2,
824 + field3 & TRB_CYCLE ? 'C' : 'c');
825 + break;
826 + case TRB_RESET_EP:
827 +- sprintf(str,
828 ++ snprintf(str, size,
829 + "%s: ctx %08x%08x slot %d ep %d flags %c:%c",
830 + xhci_trb_type_string(type),
831 + field1, field0,
832 +@@ -2394,7 +2399,7 @@ static inline const char *xhci_decode_trb(u32 field0, u32 field1, u32 field2,
833 + field3 & TRB_CYCLE ? 'C' : 'c');
834 + break;
835 + case TRB_SET_DEQ:
836 +- sprintf(str,
837 ++ snprintf(str, size,
838 + "%s: deq %08x%08x stream %d slot %d ep %d flags %c",
839 + xhci_trb_type_string(type),
840 + field1, field0,
841 +@@ -2405,14 +2410,14 @@ static inline const char *xhci_decode_trb(u32 field0, u32 field1, u32 field2,
842 + field3 & TRB_CYCLE ? 'C' : 'c');
843 + break;
844 + case TRB_RESET_DEV:
845 +- sprintf(str,
846 ++ snprintf(str, size,
847 + "%s: slot %d flags %c",
848 + xhci_trb_type_string(type),
849 + TRB_TO_SLOT_ID(field3),
850 + field3 & TRB_CYCLE ? 'C' : 'c');
851 + break;
852 + case TRB_FORCE_EVENT:
853 +- sprintf(str,
854 ++ snprintf(str, size,
855 + "%s: event %08x%08x vf intr %d vf id %d flags %c",
856 + xhci_trb_type_string(type),
857 + field1, field0,
858 +@@ -2421,14 +2426,14 @@ static inline const char *xhci_decode_trb(u32 field0, u32 field1, u32 field2,
859 + field3 & TRB_CYCLE ? 'C' : 'c');
860 + break;
861 + case TRB_SET_LT:
862 +- sprintf(str,
863 ++ snprintf(str, size,
864 + "%s: belt %d flags %c",
865 + xhci_trb_type_string(type),
866 + TRB_TO_BELT(field3),
867 + field3 & TRB_CYCLE ? 'C' : 'c');
868 + break;
869 + case TRB_GET_BW:
870 +- sprintf(str,
871 ++ snprintf(str, size,
872 + "%s: ctx %08x%08x slot %d speed %d flags %c",
873 + xhci_trb_type_string(type),
874 + field1, field0,
875 +@@ -2437,7 +2442,7 @@ static inline const char *xhci_decode_trb(u32 field0, u32 field1, u32 field2,
876 + field3 & TRB_CYCLE ? 'C' : 'c');
877 + break;
878 + case TRB_FORCE_HEADER:
879 +- sprintf(str,
880 ++ snprintf(str, size,
881 + "%s: info %08x%08x%08x pkt type %d roothub port %d flags %c",
882 + xhci_trb_type_string(type),
883 + field2, field1, field0 & 0xffffffe0,
884 +@@ -2446,7 +2451,7 @@ static inline const char *xhci_decode_trb(u32 field0, u32 field1, u32 field2,
885 + field3 & TRB_CYCLE ? 'C' : 'c');
886 + break;
887 + default:
888 +- sprintf(str,
889 ++ snprintf(str, size,
890 + "type '%s' -> raw %08x %08x %08x %08x",
891 + xhci_trb_type_string(type),
892 + field0, field1, field2, field3);
893 +@@ -2455,10 +2460,9 @@ static inline const char *xhci_decode_trb(u32 field0, u32 field1, u32 field2,
894 + return str;
895 + }
896 +
897 +-static inline const char *xhci_decode_ctrl_ctx(unsigned long drop,
898 +- unsigned long add)
899 ++static inline const char *xhci_decode_ctrl_ctx(char *str,
900 ++ unsigned long drop, unsigned long add)
901 + {
902 +- static char str[1024];
903 + unsigned int bit;
904 + int ret = 0;
905 +
906 +@@ -2484,10 +2488,9 @@ static inline const char *xhci_decode_ctrl_ctx(unsigned long drop,
907 + return str;
908 + }
909 +
910 +-static inline const char *xhci_decode_slot_context(u32 info, u32 info2,
911 +- u32 tt_info, u32 state)
912 ++static inline const char *xhci_decode_slot_context(char *str,
913 ++ u32 info, u32 info2, u32 tt_info, u32 state)
914 + {
915 +- static char str[1024];
916 + u32 speed;
917 + u32 hub;
918 + u32 mtt;
919 +@@ -2571,9 +2574,8 @@ static inline const char *xhci_portsc_link_state_string(u32 portsc)
920 + return "Unknown";
921 + }
922 +
923 +-static inline const char *xhci_decode_portsc(u32 portsc)
924 ++static inline const char *xhci_decode_portsc(char *str, u32 portsc)
925 + {
926 +- static char str[256];
927 + int ret;
928 +
929 + ret = sprintf(str, "%s %s %s Link:%s PortSpeed:%d ",
930 +@@ -2617,9 +2619,8 @@ static inline const char *xhci_decode_portsc(u32 portsc)
931 + return str;
932 + }
933 +
934 +-static inline const char *xhci_decode_usbsts(u32 usbsts)
935 ++static inline const char *xhci_decode_usbsts(char *str, u32 usbsts)
936 + {
937 +- static char str[256];
938 + int ret = 0;
939 +
940 + if (usbsts == ~(u32)0)
941 +@@ -2646,9 +2647,8 @@ static inline const char *xhci_decode_usbsts(u32 usbsts)
942 + return str;
943 + }
944 +
945 +-static inline const char *xhci_decode_doorbell(u32 slot, u32 doorbell)
946 ++static inline const char *xhci_decode_doorbell(char *str, u32 slot, u32 doorbell)
947 + {
948 +- static char str[256];
949 + u8 ep;
950 + u16 stream;
951 + int ret;
952 +@@ -2715,10 +2715,9 @@ static inline const char *xhci_ep_type_string(u8 type)
953 + }
954 + }
955 +
956 +-static inline const char *xhci_decode_ep_context(u32 info, u32 info2, u64 deq,
957 +- u32 tx_info)
958 ++static inline const char *xhci_decode_ep_context(char *str, u32 info,
959 ++ u32 info2, u64 deq, u32 tx_info)
960 + {
961 +- static char str[1024];
962 + int ret;
963 +
964 + u32 esit;
965 +diff --git a/drivers/usb/mtu3/mtu3_core.c b/drivers/usb/mtu3/mtu3_core.c
966 +index 562f4357831ee..6403f01947b28 100644
967 +--- a/drivers/usb/mtu3/mtu3_core.c
968 ++++ b/drivers/usb/mtu3/mtu3_core.c
969 +@@ -227,11 +227,13 @@ static void mtu3_set_speed(struct mtu3 *mtu, enum usb_device_speed speed)
970 + mtu3_setbits(mbase, U3D_POWER_MANAGEMENT, HS_ENABLE);
971 + break;
972 + case USB_SPEED_SUPER:
973 ++ mtu3_setbits(mbase, U3D_POWER_MANAGEMENT, HS_ENABLE);
974 + mtu3_clrbits(mtu->ippc_base, SSUSB_U3_CTRL(0),
975 + SSUSB_U3_PORT_SSP_SPEED);
976 + break;
977 + case USB_SPEED_SUPER_PLUS:
978 +- mtu3_setbits(mtu->ippc_base, SSUSB_U3_CTRL(0),
979 ++ mtu3_setbits(mbase, U3D_POWER_MANAGEMENT, HS_ENABLE);
980 ++ mtu3_setbits(mtu->ippc_base, SSUSB_U3_CTRL(0),
981 + SSUSB_U3_PORT_SSP_SPEED);
982 + break;
983 + default:
984 +diff --git a/drivers/usb/mtu3/mtu3_gadget.c b/drivers/usb/mtu3/mtu3_gadget.c
985 +index 5e21ba05ebf0b..a399fd84c71f2 100644
986 +--- a/drivers/usb/mtu3/mtu3_gadget.c
987 ++++ b/drivers/usb/mtu3/mtu3_gadget.c
988 +@@ -64,14 +64,12 @@ static int mtu3_ep_enable(struct mtu3_ep *mep)
989 + u32 interval = 0;
990 + u32 mult = 0;
991 + u32 burst = 0;
992 +- int max_packet;
993 + int ret;
994 +
995 + desc = mep->desc;
996 + comp_desc = mep->comp_desc;
997 + mep->type = usb_endpoint_type(desc);
998 +- max_packet = usb_endpoint_maxp(desc);
999 +- mep->maxp = max_packet & GENMASK(10, 0);
1000 ++ mep->maxp = usb_endpoint_maxp(desc);
1001 +
1002 + switch (mtu->g.speed) {
1003 + case USB_SPEED_SUPER:
1004 +@@ -92,7 +90,7 @@ static int mtu3_ep_enable(struct mtu3_ep *mep)
1005 + usb_endpoint_xfer_int(desc)) {
1006 + interval = desc->bInterval;
1007 + interval = clamp_val(interval, 1, 16) - 1;
1008 +- burst = (max_packet & GENMASK(12, 11)) >> 11;
1009 ++ mult = usb_endpoint_maxp_mult(desc) - 1;
1010 + }
1011 + break;
1012 + default:
1013 +diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
1014 +index 00576bae183d3..0c321996c6eb0 100644
1015 +--- a/net/ipv4/igmp.c
1016 ++++ b/net/ipv4/igmp.c
1017 +@@ -2720,6 +2720,7 @@ int ip_check_mc_rcu(struct in_device *in_dev, __be32 mc_addr, __be32 src_addr, u
1018 + rv = 1;
1019 + } else if (im) {
1020 + if (src_addr) {
1021 ++ spin_lock_bh(&im->lock);
1022 + for (psf = im->sources; psf; psf = psf->sf_next) {
1023 + if (psf->sf_inaddr == src_addr)
1024 + break;
1025 +@@ -2730,6 +2731,7 @@ int ip_check_mc_rcu(struct in_device *in_dev, __be32 mc_addr, __be32 src_addr, u
1026 + im->sfcount[MCAST_EXCLUDE];
1027 + else
1028 + rv = im->sfcount[MCAST_EXCLUDE] != 0;
1029 ++ spin_unlock_bh(&im->lock);
1030 + } else
1031 + rv = 1; /* unspecified source; tentatively allow */
1032 + }
1033 +diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
1034 +index 326d1b0ea5e69..db65f77eb131f 100644
1035 +--- a/sound/usb/quirks.c
1036 ++++ b/sound/usb/quirks.c
1037 +@@ -1898,6 +1898,7 @@ static const struct registration_quirk registration_quirks[] = {
1038 + REG_QUIRK_ENTRY(0x0951, 0x16ed, 2), /* Kingston HyperX Cloud Alpha S */
1039 + REG_QUIRK_ENTRY(0x0951, 0x16ea, 2), /* Kingston HyperX Cloud Flight S */
1040 + REG_QUIRK_ENTRY(0x0ecb, 0x1f46, 2), /* JBL Quantum 600 */
1041 ++ REG_QUIRK_ENTRY(0x0ecb, 0x1f47, 2), /* JBL Quantum 800 */
1042 + REG_QUIRK_ENTRY(0x0ecb, 0x2039, 2), /* JBL Quantum 400 */
1043 + REG_QUIRK_ENTRY(0x0ecb, 0x203c, 2), /* JBL Quantum 600 */
1044 + REG_QUIRK_ENTRY(0x0ecb, 0x203e, 2), /* JBL Quantum 800 */