Skip to content

Read bus-reset generation from SelfIDCount, not reserved 0x06C - #215

Merged
mrmidi merged 1 commit into
mrmidi:mainfrom
mhellevang:fix/busreset-generation
Oct 23, 2026
Merged

mrmidi merged 1 commit into
mrmidi:mainfrom
mhellevang:fix/busreset-generation

Conversation

@mhellevang

@mhellevang mhellevang commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Split of #213 (merge order):

  1. Bound SBP-2 max_payload by link speed, log posted-write fault address #214 Standalone fixes (max_payload, posted-write, rcvPhyPkt)
  2. Read bus-reset generation from SelfIDCount, not reserved 0x06C #215 Bus-reset generation from SelfIDCount ← this PR
  3. SBP-2: re-login/reconnect after rediscovery, not on a 100 ms timer #216 Reconnect after rediscovery
  4. SBP-2: carry command data by OHCI physical DMA #217 Physical DMA, needs 2+3
  5. SBP-2: bus reset only when a logout with a command outstanding fails #218 Recovery/teardown policy, needs 4
  6. SBP-2: DMA HBA task data in place via fBufferIOVMAddr #219 Zero-copy, needs 5

Split out of #213 per review. At the busReset interrupt, HandleInterrupt read 0x06C, which is reserved in the OHCI 1.2 register map. SelfIDCount.selfIDGeneration (bits 23:16) already holds the new generation at the reset edge (Table 11-2), which is what every OnBusResetStarted(generation) consumer needs to drop old-generation work. Matches Apple's move to a new generation at the reset edge (IOFireWireController.cpp:1998-2000).

No host test: none of the generation consumers are reachable from the interrupt fixture without a full SBP-2 rig. HW verification is the generation in the [BusReset]/IRM log lines matching Self-ID. Affects stale-work handling for the whole controller, so a run with an audio device on the bus is welcome; I only have scanners.

@mhellevang

Copy link
Copy Markdown
Contributor Author

HW: five bus resets on the LS-9000 (power-cycle, cable pulls) on a build with this + #214 + #216 (d50b605); Self-ID generation VALIDATED 1–5 matched the generation every OnBusResetStarted consumer logged. No audio device on the bus; that run is still open to anyone who has one.

@mrmidi

mrmidi commented Oct 22, 2026

Copy link
Copy Markdown
Owner

who has one
Who it may be...

@mhellevang

Copy link
Copy Markdown
Contributor Author

who has one
Who it may be...

I think... I should buy a sound thingy to make testing easier.

@mrmidi
mrmidi merged commit 9faf9d8 into mrmidi:main Oct 23, 2026
2 checks passed
@mhellevang
mhellevang deleted the fix/busreset-generation branch October 23, 2026 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants