Repository navigation
soc: apple: rtkit: wait up to 10 s for a handshake reply - #1082
RyanTheTide merged 1 commit into
Conversation
RyanTheTide
left a comment
There was a problem hiding this comment.
Merge-train pre-review (11-08). It isn't on our merge list yet, so a maintainer decides. The change makes the RTKit handshake wait 10 s for every co-processor on every Mac. When a co-processor really is dead, each one then holds probe or resume for 10 s instead of 1 s. Could the longer wait apply only where it's needed, e.g. a per-device timeout from the ANS driver on T6050, or a retry on the first slow handshake, so other SoCs keep failing fast?
apple_rtkit_wait_for_completion() gives the co-processor 1 s to answer. On the T6050 (J716s, MacBook Pro 16-inch M5 Pro) the ANS firmware that iBoot hands over sometimes needs about 3 s to answer the power-state and endpoint-map handshake. With 1 s, nvme-apple fails with "ANS did not boot" / "Reset failure status: -62" and the root device never appears, although a later rebind of the same firmware succeeds. Make the handshake timeout a per-instance setting, set with apple_rtkit_set_handshake_timeout() and defaulting to the current 1000 ms, and use it for every handshake wait, including the polled apple,sync-syslog-ack path. nvme-apple asks for 10 s on the T6050 ANS only, so a dead co-processor on any other SoC is still reported after 1 s, and a T6050 ANS that answers in time is not slowed down. Signed-off-by: Rolando Trevino <rolotrealanis@gmail.com> Assisted-by: LLM Claude
6d43a3e to
0630fab
Compare
|
Thanks, agreed. v2 (0630fab) makes the handshake timeout per instance: nvme-apple asks for 10 s only on Testing: v1 with the global 10 s ran on the J716s on every boot. v2 is compile-tested only for now ( |
db35e3d
into
aurora-silicon:integration/aurora
|
Tested before merging, silent: one-shot test kernel 7.3.0-aurora-f4mtr3x/y = integration/aurora 36d9198 plus this PR, #1082, #1083, #1084, #1060 and the Touch ID series, all merged onto the current tip. It was booted once on each of the four fleet Macs (M2 J413, M1 Pro J316s, J616s M4 Pro, MacBook Neo J700), and our regression suite was compared with the fleet30 rows on the same Macs:
For this PR in particular: every fleet Mac kept the 1000 ms default (only apple,t6050-nvme-ans2 gets 10 s), and RTKit timeout and error lines in dmesg were 0 on both the test boot and the default boot of every Mac. Thank you, Rolando! |
apple_rtkit_wait_for_completion()gives a co-processor 1 s to answer. On the J716s (MacBook Pro 16-inch, M5 Pro, T6050) the ANS firmware that iBoot hands over sometimes needs about 3 s to answer the power-state and endpoint-map handshake. With PR #936's nvme-apple that fails as "ANS did not boot" / "Reset failure status: -62" and there is no root device; a later rebind of the same firmware works.This raises the timeout to 10 s. A firmware that answers in time is not slowed down; only a dead co-processor is reported later.
Tested on: J716s, in every payload since our round R3-J; most recently R3-SERIES and R3-S (2026-11-07, kernel built from this tree + the T6050 PRs): NVMe partitions at 0.37 s on every boot.
drivers/soc/apple/rtkit.obuilds clean withW=1(LLVM, arm64) onintegration/aurora7aee01a.Dependencies: none; applies on
integration/auroraalone and on top of #942 (rtkit crash logs). Motivated by #936 (T6050 ANS).Open questions:
timeout_msinstruct apple_rtkit_ops, or a DT property on the ANS, default 1000 ms) than global? Happy to rework it that way.