zephyr/drivers/usb/udc
Tomasz Moń 8d1f7b3bef drivers: udc_dwc2: Fix incomplete iso handling race
Incomplete iso IN/OUT is just informative and its occurrence does not
prevent the endpoint from actually transmitting/receiving data. Such
"late" isochronous transfers, which are perfectly fine according to USB
specification, were observed on Windows host with nRF54H20 running
explicit feedback sample operating at High-Speed.

The incorrect handling manifested itself with "ISO RX buffer too small"
error message. The faulty scenario was:
  * incompISOIN handler does not find any matching endpoint
  * incompISOOUT handler disables endpoint, discards buffer and sets
    rearm flag
  * next DWC2 interrupt handler iteration after reading GINTSTS
  * XferCompl interrupt on iso IN endpoint
  * XferCompl interrupt on iso OUT endpoint
      - transfer was actually happening to the buffer discarded in
	incompISOOUT handler
      - XferCompl handler modified the next buffer
  * GOUTNakEff interrupt, iso OUT endpoint EPDIS bit is set
  * EPDisbld interrupt, rearm flag set
      - the buffer modified by XferCompl is used and fails because it is
	not large enough

Modify the sequence so it accounts for host actions and the above faulty
scenario no longer causes any problems.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-07-29 08:52:20 -04:00
..
CMakeLists.txt drivers: udc: add new UDC driver for SAM0 USB controller 2025-04-27 08:35:00 +02:00
Kconfig drivers: udc: add SOF Kconfig option and SOF event helper 2025-06-23 15:43:32 +01:00
Kconfig.ambiq drivers: udc_ambiq: added support for double endpoint buffer 2025-06-26 11:12:02 +02:00
Kconfig.dwc2 usb: device_next: Add Kconfig to set maximum speed 2025-04-10 12:57:19 +02:00
Kconfig.it82xx2
Kconfig.kinetis drivers: uhc: udc: use DYNAMIC_INTERRUPTS for KHCI and EHCI 2025-05-30 16:34:41 +02:00
Kconfig.max32 drivers: udc: Add MAX32xxx UDC driver 2025-04-09 19:31:24 +02:00
Kconfig.mcux drivers: uhc: udc: use DYNAMIC_INTERRUPTS for KHCI and EHCI 2025-05-30 16:34:41 +02:00
Kconfig.nrf drivers: udc_nrf: Replace driver queue with events 2025-04-09 15:23:12 +02:00
Kconfig.numaker boards: nuvoton: numaker: Drop PINCTRL from board defconfig 2024-11-20 08:23:58 -05:00
Kconfig.renesas_ra drivers: udc: renesas: enable high-speed USB support 2025-04-29 08:17:38 +01:00
Kconfig.rpi_pico drivers: udc_rpi_pico: support VBUS state change detection 2025-04-10 12:57:43 +02:00
Kconfig.sam0 drivers: udc: add new UDC driver for SAM0 USB controller 2025-04-27 08:35:00 +02:00
Kconfig.skeleton usb: device_next: Add Kconfig to set maximum speed 2025-04-10 12:57:19 +02:00
Kconfig.smartbond drivers: usb: udc: add Smartbond UDC driver 2024-10-22 20:41:55 +02:00
Kconfig.stm32 drivers: udc: stm32: update STM32_CLOCK_CHECK definition 2025-01-31 11:50:01 +01:00
Kconfig.virtual usb: device_next: Add Kconfig to set maximum speed 2025-04-10 12:57:19 +02:00
udc_ambiq.c drivers: udc_ambiq: added support for double endpoint buffer 2025-06-26 11:12:02 +02:00
udc_common.c drivers: udc: fix buffer leak when the host omits control data stage 2025-06-27 08:52:22 -10:00
udc_common.h drivers: udc: add SOF Kconfig option and SOF event helper 2025-06-23 15:43:32 +01:00
udc_dwc2_vendor_quirks.h drivers: udc_dwc2: Inline vendor quirks if possible 2025-06-27 10:57:47 +02:00
udc_dwc2.c drivers: udc_dwc2: Fix incomplete iso handling race 2025-07-29 08:52:20 -04:00
udc_dwc2.h drivers: udc_dwc2: Inline vendor quirks if possible 2025-06-27 10:57:47 +02:00
udc_it82xx2.c drivers: udc: disable SOF interrupt by default 2025-06-23 15:43:32 +01:00
udc_kinetis.c drivers: udc: disable SOF interrupt by default 2025-06-23 15:43:32 +01:00
udc_max32.c drivers: udc: disable SOF interrupt by default 2025-06-23 15:43:32 +01:00
udc_mcux_ehci.c drivers: udc: disable SOF interrupt by default 2025-06-23 15:43:32 +01:00
udc_mcux_ip3511.c drivers: udc: disable SOF interrupt by default 2025-06-23 15:43:32 +01:00
udc_nrf.c drivers: udc: disable SOF interrupt by default 2025-06-23 15:43:32 +01:00
udc_numaker.c drivers: udc: disable SOF interrupt by default 2025-06-23 15:43:32 +01:00
udc_renesas_ra.c drivers: udc: disable SOF interrupt by default 2025-06-23 15:43:32 +01:00
udc_rpi_pico.c drivers: udc_rpi_pico: move control endpoint enable/disable 2025-07-29 11:18:28 +01:00
udc_sam0.c drivers: udc: disable SOF interrupt by default 2025-06-23 15:43:32 +01:00
udc_skeleton.c drivers: udc: disable SOF interrupt by default 2025-06-23 15:43:32 +01:00
udc_smartbond.c drivers: udc_smartbond: Fix calls to udc_get_ep_cfg() 2025-05-06 12:00:23 +02:00
udc_stm32.c drivers: usb: udc: prevent USB clock disable in sleep mode 2025-07-22 08:11:49 -04:00
udc_virtual.c drivers: udc_virtual: drop queued control transfer on new setup packet 2025-06-27 08:52:22 -10:00