diff options
| author | HiFiPHile <[email protected]> | 2026-09-01 04:02:54 +0200 |
|---|---|---|
| committer | HiFiPHile <[email protected]> | 2026-09-02 10:50:03 +0200 |
| commit | 3a81af3de30ee999b543af4e52408f3a6b9b5fdf (patch) | |
| tree | 597870d42778ff3d3a24e12adb39468650fd35ca /src/device | |
| parent | 393694d842b454ecadd32760851be899a91d69af (diff) | |
fix(dwc2): enable periodic channels in the selected frame
Periodic IN and DMA-backed transfers selected ODDFRM before waiting for request-queue space. A DWC2 interrupt could also run between reading HFNUM and writing HCCHAR.CHENA, allowing the selected frame to pass while the transfer still appeared active.
Wait for request-queue capacity with controller interrupts enabled, then mask only GAHBCFG.GINT while sampling HFNUM and enabling a new periodic channel. Record the periodic phase from that same HFNUM sample so a boundary after channel enable cannot shift later interval calculations. The bounded critical section contains no queue wait, callback, disable, or allocation loop. Retries that already selected their frame bypass the new selection step.
Also clear a retained HCCHAR.CHDIS before every channel enable. A halted channel can otherwise be re-enabled as CHENA|CHDIS and wait for a terminal interrupt that never arrives.
Hardware traces captured periodic IN selections at frames 0x3303 and 0x3266 but activation only after 0x330c and 0x3273, respectively.
Diffstat (limited to 'src/device')
0 files changed, 0 insertions, 0 deletions
