fix(async,bus): harden generation and completion handling - #9
Conversation
This PR covers clauses:IEEE 1394-2008:
OHCI 1.1 (May not be valid with OHC 1.2!)
this comment intention is to preserve references to exact specifications |
|
Thanks for contributing, @gly11 |
|
Thanks, @mrmidi! That means a lot. Really appreciate your careful review and the spec notes. Always happy to help move ASFireWire forward :) |
fix(async,bus): harden generation and completion handling
…ation 44100.md: - §12: reverse-engineer RME FirefaceAudioDriver's 44.1 cadence — DCL-branch Bresenham (increment = rate/8000), closed-loop RX clock recovery via the +276 per-group target table and a 1/16 IIR estimate, and per-rate startup latency anchors. Behavioral/algorithm observations only (proprietary binary). - Extend the IDA evidence index and add RME-specific open questions. - Mark all open questions with status: mrmidi#6 RESOLVED (Linux cross-check), mrmidi#8 RESOLVED-by-decision (resync branch not needed under replay), mrmidi#12 RESOLVED design / capture-gated value; flag #1–#5 as legacy-DCL archaeology, not blockers. SAMPLE_RATE_EXPANSION.md: - §3: minimal TX cadence contract ({data/no-data, SYT}; DBC free; SYT = delta replay + per-rate phase re-anchor; payload separate; RX carries none) and what "device-as-master" does and does not remove. - §8: consolidate the capture-gated items into one measurement (per-rate presentation lead + startup-prefix tolerance) in one gated session, partly self-instrumented via [TxSyt]/[Zts] traces; mrmidi#9/mrmidi#10 moot under replay. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
fix(async,bus): harden generation and completion handling
…ation 44100.md: - §12: reverse-engineer RME FirefaceAudioDriver's 44.1 cadence — DCL-branch Bresenham (increment = rate/8000), closed-loop RX clock recovery via the +276 per-group target table and a 1/16 IIR estimate, and per-rate startup latency anchors. Behavioral/algorithm observations only (proprietary binary). - Extend the IDA evidence index and add RME-specific open questions. - Mark all open questions with status: mrmidi#6 RESOLVED (Linux cross-check), mrmidi#8 RESOLVED-by-decision (resync branch not needed under replay), mrmidi#12 RESOLVED design / capture-gated value; flag mrmidi#1–mrmidi#5 as legacy-DCL archaeology, not blockers. SAMPLE_RATE_EXPANSION.md: - §3: minimal TX cadence contract ({data/no-data, SYT}; DBC free; SYT = delta replay + per-rate phase re-anchor; payload separate; RX carries none) and what "device-as-master" does and does not remove. - §8: consolidate the capture-gated items into one measurement (per-rate presentation lead + startup-prefix tolerance) in one gated session, partly self-instrumented via [TxSyt]/[Zts] traces; mrmidi#9/mrmidi#10 moot under replay. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Summary
This PR contains a small set of async/bus correctness fixes.
OUTPUT_MOREprecursor descriptors when hardware reports completion on the followingOUTPUT_LASTdescriptorcycleMasteraftercycleTooLong/ bus reset and add explicit short/long bus reset supportWhy
These changes make async transaction matching and bus-reset recovery more robust across bus-reset cycles and controller-specific OHCI completion behavior.
The bus-reset changes follow OHCI / IEEE 1394 behavior and align with the Linux firewire-ohci handling of cycle-too-long recovery, where
cycleMasteris re-asserted after hardware clears it. The async completion changes make descriptor scanning and ACK interpretation more tolerant of controller-specific OHCI reporting.They also make the core async/bus layer a safer foundation for future protocol work that depends on generation-correct response matching, split-transaction ACK handling, and reliable bus-reset recovery.
This supersedes #8 by folding the 16-bit generation fix into the broader async/bus correctness pass.
Test Plan
./build.sh --no-bumpctest --test-dir build/tests_build -R 'CompletionRefactorPlan|AsyncBusContract|AsyncSubsystemAccessor' --output-on-failurectest --test-dir build/tests_build -R 'BusResetCoordinator|BusManagerGapOptimization' --output-on-failureResults: