linux/drivers/usb
Michal Pecio def5f5bc83 usb: xhci: Don't change the status of stalled TDs on failed Stop EP
[ Upstream commit dfc88357b6 ]

When the device stalls an endpoint, current TD is assigned -EPIPE
status and Reset Endpoint is queued. If a Stop Endpoint is pending
at the time, it will run before Reset Endpoint and fail due to the
stall. Its handler will change TD's status to -EPROTO before Reset
Endpoint handler runs and initiates giveback.

Check if the stall has already been handled and don't try to do it
again. Since xhci_handle_halted_endpoint() performs this check too,
not overwriting td->status is the only difference.

I haven't seen this case yet, but I have seen a related one where
the xHC has already executed Reset Endpoint, EP Context state is
now Stopped and EP_HALTED is set. If the xHC took a bit longer to
execute Reset Endpoint, said case would become this one.

Signed-off-by: Michal Pecio <michal.pecio@gmail.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20250311154551.4035726-3-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-06-04 14:42:00 +02:00
..
atm usb: atm: cxacru: fix a flaw in existing endpoint checks 2025-03-13 12:58:34 +01:00
c67x00 usb: c67x00-drv: Convert to platform remove callback returning void 2023-05-28 12:36:14 +01:00
cdns3 usb: cdnsp: fix L1 resume issue for RTL_REVISION_NEW_LPM version 2025-05-18 08:24:08 +02:00
chipidea usb: chipidea: ci_hdrc_imx: implement usb_phy_init() error handling 2025-05-02 07:50:50 +02:00
class usb: usbtmc: Fix erroneous generic_read ioctl return 2025-05-18 08:24:09 +02:00
common usb: ulpi: Fix debugfs directory leak 2024-02-23 09:24:56 +01:00
core USB: VLI disk crashes if LPM is used 2025-05-02 07:50:51 +02:00
dwc2 usb: dwc2: gadget: remove of_node reference upon udc_stop 2025-02-21 13:57:14 +01:00
dwc3 usb: dwc3: gadget: Avoid using reserved endpoints on Intel Merrifield 2025-05-02 07:50:54 +02:00
early usb: early: xhci-dbc: Use memcpy_and_pad() 2023-01-31 10:40:54 +01:00
fotg210 usb: fotg210: Add missing kernel doc description 2024-06-12 11:12:31 +02:00
gadget ALSA: ump: Fix a typo of snd_ump_stream_msg_device_info 2025-05-22 14:12:16 +02:00
host usb: xhci: Don't change the status of stalled TDs on failed Stop EP 2025-06-04 14:42:00 +02:00
image scsi: usb: uas: Declare two host templates and host template pointers const 2023-03-24 19:20:00 -04:00
isp1760 usb: isp1760: Convert to platform remove callback returning void 2023-05-28 12:38:01 +01:00
misc of: remove internal arguments from of_property_for_each_u32() 2025-02-08 09:51:51 +01:00
mon usb: mon: Fix atomicity violation in mon_bin_vma_fault 2024-01-25 15:35:43 -08:00
mtu3 usb: Explicitly include correct DT includes 2023-07-25 18:20:02 +02:00
musb usb: musb: Fix hardware lockup on first Rx endpoint request 2024-12-09 10:32:53 +01:00
phy usb: phy: generic: Use proper helper for property detection 2025-03-22 12:50:41 -07:00
renesas_usbhs usb: renesas_usbhs: Flush the notify_hotplug_work 2025-03-13 12:58:34 +01:00
roles usb: roles: set switch registered flag early on 2025-02-21 13:57:14 +01:00
serial USB: serial: simple: add OWON HDS200 series oscilloscope support 2025-05-02 07:50:50 +02:00
storage USB: storage: quirk for ADATA Portable HDD CH94 2025-05-02 07:50:48 +02:00
typec usb: typec: ucsi: displayport: Fix deadlock 2025-05-22 14:12:24 +02:00
usbip usbip: Don't submit special requests twice 2024-09-08 07:54:44 +02:00
Kconfig usb: move config USB_USS720 to usb's misc Kconfig 2023-03-29 10:34:08 +02:00
Makefile USB: xen-hcd: Traverse host/ when CONFIG_USB_XEN_HCD is selected 2024-06-21 14:38:23 +02:00
usb-skeleton.c usb: add usb_set_intfdata() documentation 2022-11-29 08:56:09 +01:00