Repository navigation
soc: apple: aop: refuse EPIC calls once the firmware has crashed - #2342
RyanTheTide wants to merge 1 commit into
Conversation
After RTKit reports the AOP crashed, every EPIC call still reserved a
tag on its endpoint before rtkit refused the doorbell ("Device is
crashed, cannot send message"). The call was then marked abandoned, to
keep the tag until its reply arrives, and a crashed firmware never
replies. After about eight calls the endpoint had no free tag and every
later call failed with "Too many inflight calls on endpoint 34". The
result was the same, but the log no longer said the firmware was dead,
and the client errors changed from the crash to EIO from a full table.
Check the crash flag before a call reserves anything, and fail it with
ENODEV, as calls already fail while the transport is closing. EPIC
clients (the speaker service's pw1/pwrd/idle requests, the sensors) now
report ENODEV for as long as the firmware stays down, and no tag is used
up.
This does not change the crash itself, nor any AOP firmware or speaker
power sequence.
Link: #2188
Signed-off-by: Ryan Murray <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Blockers: 1.
The code is correct. drivers/soc/apple/aop.rs:943 reads HW row: Neo (J700) on this head with the AOP crash that #2188 tracks (it shows up in some first deep-sleep cycles; loop s2idle/deep until an AOP crash is logged). Pass: after "AOP firmware crashed", every later EPIC client error is ENODEV, there are 0 "Too many inflight calls" lines, and the next suspend logs "sleeping without it". Also 0 AVC, 0 failed units and no new kernel errors on a boot with no crash. Assisted-by: LLM (Claude:Opus 5.5) |
|
Replaced by #2800: the same changes with the commit trailers fixed, on the current integration/aurora. |
Refs #2188 (the driver side after an AOP crash; the crash itself is not addressed here)
After RTKit reports the AOP crashed, every EPIC call still reserved a tag on its endpoint before rtkit refused the doorbell ("Device is crashed, cannot send message"). The call was then marked abandoned, keeping its tag until a reply arrives, and a crashed firmware never replies. After about eight calls the table was full, and every later call failed with "Too many inflight calls on endpoint 34". The result was the same, but the log no longer named the crash, and clients saw
EIOfrom a full table.epic_notify()now checks the crash flag before it reserves anything and fails the call withENODEV, as calls already fail while the transport is closing. Clients such as the speaker service'spw1/pwrd/idlerequests and the sensors reportENODEVfor as long as the firmware stays down. No firmware message, power sequence or speaker-protection path changes, and the change applies to every AOP the driver binds.Evidence
integration/aurora0abc2f3. arm64LLVM=1build ofdrivers/soc/apple/,drivers/gpu/drm/asahi/anddrivers/media/platform/apple/avd/with the fleet config (DRM_ASAHI=mwith G15/G16/G18/M5,APPLE_AOP=m; rustc 1.97.1, bindgen 0.73.2): rc 0, and no error or warning in the changed file.checkpatch.pl --strict: 0 errors. The only warnings are about theCo-Authored-Bytrailer form.Not run on hardware. This needs an AOP crash to observe; the expected log after one is
spkr pw1 failed: ENODEVon every later request, and no "Too many inflight calls".Assisted-by: LLM (Claude:Opus 5.5)