linux/drivers/usb
Michal Pecio 7c4650ded4 xhci: handle isoc Babble and Buffer Overrun events properly
xHCI 4.9 explicitly forbids assuming that the xHC has released its
ownership of a multi-TRB TD when it reports an error on one of the
early TRBs. Yet the driver makes such assumption and releases the TD,
allowing the remaining TRBs to be freed or overwritten by new TDs.

The xHC should also report completion of the final TRB due to its IOC
flag being set by us, regardless of prior errors. This event cannot
be recognized if the TD has already been freed earlier, resulting in
"Transfer event TRB DMA ptr not part of current TD" error message.

Fix this by reusing the logic for processing isoc Transaction Errors.
This also handles hosts which fail to report the final completion.

Fix transfer length reporting on Babble errors. They may be caused by
device malfunction, no guarantee that the buffer has been filled.

Signed-off-by: Michal Pecio <michal.pecio@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20240125152737.2983959-5-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-01-27 16:28:35 -08:00
..
atm usb: ueagle-atm: Use wait_event_freezable_timeout() in uea_wait() 2024-01-04 15:57:29 +01:00
c67x00 USB: c67x00: Remove unused declaration c67x00_hcd_msg_received() 2023-10-02 16:42:33 +02:00
cdns3 usb: cdns3: Fix uvc fail when DMA cross 4k boundery since sg enabled 2024-01-04 16:01:45 +01:00
chipidea usb: chipidea: wait controller resume finished for wakeup irq 2024-01-04 16:01:56 +01:00
class usb: cdc-acm: return correct error code on unsupported break 2023-12-15 13:52:47 +01:00
common Merge 6.5-rc6 into usb-next 2023-08-14 22:22:31 +02:00
core USB: core: Use device_driver directly in struct usb_driver and usb_device_driver 2024-01-04 16:06:32 +01:00
dwc2 usb: dwc2: Disable clock gating feature on Rockchip SoCs 2024-01-02 14:35:23 +01:00
dwc3 usb: dwc3: host: Set XHCI_SG_TRB_CACHE_SIZE_QUIRK 2024-01-27 16:28:23 -08:00
early
fotg210 USB / Thunderbolt changes for 6.8-rc1 2024-01-18 11:43:55 -08:00
gadget usb: gadget: ncm: Fix endianness of wMaxSegmentSize variable in ecm_desc 2024-01-27 16:28:28 -08:00
host xhci: handle isoc Babble and Buffer Overrun events properly 2024-01-27 16:28:35 -08: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 USB: core: Use device_driver directly in struct usb_driver and usb_device_driver 2024-01-04 16:06:32 +01:00
mon usb: mon: Fix atomicity violation in mon_bin_vma_fault 2024-01-05 10:36:08 +01:00
mtu3 usb: mtu3: Convert to platform remove callback returning void 2023-10-21 12:49:08 +02:00
musb Merge 6.6-rc6 into usb-next 2023-10-16 17:36:12 +02:00
phy usb: phy: mxs: remove CONFIG_USB_OTG condition for mxs_phy_is_otg_host() 2024-01-04 16:01:56 +01:00
renesas_usbhs usb: Explicitly include correct DT includes 2023-07-25 18:20:02 +02:00
roles USB: roles: make role_class a static const structure 2023-06-20 16:20:40 +02:00
serial USB / Thunderbolt changes for 6.8-rc1 2024-01-18 11:43:55 -08:00
storage USB / Thunderbolt changes for 6.8-rc1 2024-01-18 11:43:55 -08:00
typec USB / Thunderbolt changes for 6.8-rc1 2024-01-18 11:43:55 -08:00
usbip USB: core: Use device_driver directly in struct usb_driver and usb_device_driver 2024-01-04 16:06:32 +01:00
Kconfig usb: pci-quirks: handle HAS_IOPORT dependency for AMD quirk 2023-10-02 16:19:12 +02:00
Makefile usb: host: u132-hcd: Delete driver 2023-03-21 14:06:11 +01:00
usb-skeleton.c