diff options
| author | hathach <[email protected]> | 2026-07-10 09:15:22 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2026-07-17 17:26:05 +0700 |
| commit | 7d7444bd8924fce9e60364893265bd2451e115e7 (patch) | |
| tree | fac077306ab92aecdc8998de0b49c0de8f9ef9b9 /test/vendor/ceedling/docs/UnityHelperScriptsGuide.md | |
| parent | d155273ce44f6bcf72494cce396188c90279c6a1 (diff) | |
fix(ci_fs host): release stale sibling BDT on multi-packet completion
hcd_ci_fs shares a single BDT set across all pipes. prepare_packets()
speculatively arms the sibling (odd^1) BDT of a multi-packet transfer so it
can ping-pong without NAKs. When such a transfer ends early (a short IN
packet) or fails, the still-owned sibling was never released, permanently
blocking the shared BDT for every other pipe.
This deadlocked a 2nd device enumerating behind a hub while another device
issued descriptor reads (host/device_info with CDC+MSC): the MSC's control
transfers could never acquire the BDT, so it never got Set Address.
Release the sibling in process_tokdne()'s completion path, but ONLY for a
multi-packet transfer (length > max_packet_size): a single-packet transfer
never arms a sibling, so that BDT slot may legitimately belong to another
pipe's in-flight transfer and must not be disturbed (doing so unconditionally
corrupts concurrent transfers, e.g. the CDC bulk-IN vs MSC enum in
host/cdc_msc_hid).
Mirrors the equivalent device-side fix in dcd_ci_fs.c; the host needs the
multi-packet guard because its BDT set is shared across pipes.
Verified on frdm_k64f (HIL): host/device_info now enumerates both CDC+MSC
behind a hub, host/cdc_msc_hid still mounts the MSC (no regression).
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01ExGPLP5eU43LR7o6yYLpNi
Diffstat (limited to 'test/vendor/ceedling/docs/UnityHelperScriptsGuide.md')
0 files changed, 0 insertions, 0 deletions
