Skip to content

thunderbolt: apple: do not start the NHI without its DART - #1150

Merged
RyanTheTide merged 1 commit into
aurora-silicon:integration/aurorafrom
dmitzsaz:pr/thunderbolt-apple-nhi
Nov 9, 2026
Merged

RyanTheTide merged 1 commit into
aurora-silicon:integration/aurorafrom
dmitzsaz:pr/thunderbolt-apple-nhi

Conversation

@dmitzsaz

@dmitzsaz dmitzsaz commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

apple_nhi_probe() now refuses to start an NHI that has iommus but isn't attached to an IOMMU yet. That happens when the DART driver is a module that isn't loaded when a cable is plugged in, after the driver core has stopped waiting for suppliers. The rings then never run untranslated. The NHI reports -EPROBE_DEFER through the boot status, so the ACIO start fails right away instead of after the 10 s NHI timeout, and the next connection retries.

The earlier first commit here, which compared the T8142 NHI generation as a boolean, is dropped: 8aaab09 rewrote that check as (t8142 || t6040), which is boolean already.

Tested on: J704 (MacBook Pro 14-inch, M5), 2026-11-07, with a Mac mini (Mac16,10) on a Thunderbolt cable: 409f00000.nhi binds to thunderbolt-apple-nhi in its IOMMU group, the XDomain host is found and thunderbolt0 comes up with an address. The change has been in my J704 kernel for days, with Thunderbolt networking to the Mac mini. Rebased onto integration/aurora 9cfd38d; thunderbolt/apple.o builds clean with W=1 there.

Prepared with Claude Opus 5.5; tested by me on the hardware.

The NHI and its DART are both children of the ACIO and are created
together when the router starts. The DART normally binds first, and the
driver core defers the NHI until it has. Once the core has stopped
waiting for missing suppliers, though (for example, the DART driver is a
module that is not loaded yet when a cable is plugged in), the NHI
probes without an IOMMU and would hand the hardware physical ring
addresses.

Refuse to probe an NHI that has iommus but is not attached to an IOMMU
domain. Report it through the boot status as well, so that the ACIO
fails this start right away with -EPROBE_DEFER instead of waiting for
the 10 s NHI boot timeout; the next connection retries.

Signed-off-by: Dmitriy <noc@pimk.in>
Assisted-by: LLM
@dmitzsaz
dmitzsaz force-pushed the pr/thunderbolt-apple-nhi branch from ac6fa99 to f6ba35b Compare November 8, 2026 14:03
@dmitzsaz dmitzsaz changed the title thunderbolt: apple: fix the T8142 NHI generation check and wait for its DART thunderbolt: apple: do not start the NHI without its DART Nov 8, 2026
RyanTheTide added a commit that referenced this pull request Nov 9, 2026
@RyanTheTide
RyanTheTide merged commit 4efa4bc into aurora-silicon:integration/aurora Nov 9, 2026
1 check passed
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