linux/drivers/usb/mtu3
Haoxiang Li 0bddda5a11 usb: mtu3: unmap request DMA on queue failure
mtu3_gadget_queue() maps the request before checking whether
the QMU GPD ring can accept another transfer. the request is
returned with -EAGAIN before it is linked on the endpoint
request list if mtu3_prepare_transfer() fails.

Normal completion and dequeue paths unmap requests from
mtu3_req_complete(), but this error path never reaches that
helper, so the DMA mapping is left active. Unmap the request
before returning from the failed queue path.

Fixes: df2069acb0 ("usb: Add MediaTek USB3 DRD driver")
Cc: stable <stable@kernel.org>
Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com>
Link: https://patch.msgid.link/20260623093325.2105323-1-haoxiang_li2024@163.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-06-25 16:04:26 +01:00
..
Kconfig usb: use "prompt" instead of "bool" for choice prompts 2024-11-04 17:53:09 +09:00
Makefile usb: mtu3: add tracepoints to help debug 2019-03-26 16:40:14 +09:00
mtu3_core.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
mtu3_debug.h usb: mtu3: mtu3_debug: remove an unused struct member 2020-12-04 16:49:06 +01:00
mtu3_debugfs.c Driver core and debugfs updates 2025-01-28 12:25:12 -08:00
mtu3_dr.c USB: Use str_enable_disable-like helpers 2025-01-15 18:28:13 +01:00
mtu3_dr.h usb: mtu3: support suspend/resume for dual-role mode 2021-07-27 15:58:37 +02:00
mtu3_gadget_ep0.c usb: mtu3: support function remote wakeup 2022-07-08 14:53:30 +02:00
mtu3_gadget.c usb: mtu3: unmap request DMA on queue failure 2026-06-25 16:04:26 +01:00
mtu3_host.c usb: mtu3: Add MT8195 MTU3 ip-sleep wakeup support 2024-01-27 17:36:50 -08:00
mtu3_hw_regs.h usb: mtu3: fix the failure of qmu stop 2023-01-19 14:12:08 +01:00
mtu3_plat.c usb: Remove redundant pm_runtime_mark_last_busy() calls 2025-11-21 15:11:53 +01:00
mtu3_qmu.c usb: mtu3: fix misspelled words 2025-10-28 15:35:25 +01:00
mtu3_qmu.h USB: mtu3: Use the correct style for SPDX License Identifier 2020-04-16 14:32:48 +02:00
mtu3_trace.c usb: mtu3: mtu3_trace: Supply missing mtu3_debug.h include file 2020-07-15 17:25:57 +02:00
mtu3_trace.h tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
mtu3.h usb: mtu3: fix invalid kernel-doc in mtu3.h 2025-10-28 15:35:25 +01:00