Repository navigation
soc: apple: aop: refuse EPIC calls once the firmware has crashed - #2800
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]>
|
Review at 726da32 (non-author, draft). No blocker found; ready as it is, a crash row would be a bonus.
Small points, not blocking:
Assisted-by: LLM (Claude:Opus 5.5) |
Signed-off-by: Ryan Murray <[email protected]>
There was a problem hiding this comment.
The Acquire check rejects calls after a published crash before EPICv4 abandoned-call checks, ring writes or slot allocation. Normal send handling is unchanged. Keep hosted checks and a controlled post-crash caller row pending. The guard leaves crash-during-submit handling to the existing path.
|
code-owner ping <@422957901716652033> / @DjDeveloperr: merge train at |
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
|
Merging under the 6-point rule (Ryan 09:29, permanent), at |
What: AOP: refuse EPIC calls with ENODEV once the firmware has crashed, instead of leaking a tag per call until "too many inflight calls".
Tested: J615 (M3 Air) and J473 (M2 mini) at 726da32, in one combined one-shot test kernel 7.3.0-aurora-dsw1 (main d8c6043 + this PR + 15 other drafts). This PR's files there are byte-identical to the current head 480c8e1 (= 726da32 + a clean merge of main). J615 (AOP sensors present: 4 IIO devices) and J473: no AOP error lines, one 15 s s2idle rc 0 each, 0 failed units, 0 WARN/BUG.
Risk: two-way · Macs with an AOP
Not yet: an AOP crash (needed to see ENODEV instead of "too many inflight calls"; no repro)
Evidence
git merge-treemerges of linux#2263 power: supply: macsmc: Report net discharge as discharging on every battery #2303 soc: apple: sep: Count sensor bring-up and frame failures; document the remaining SEP retries #2363 drm/apple: dcp: give each Type-C reconnect request its whole budget #2364 drm/apple: name the brightness and 180 Hz probe retry budgets and report their exhaustion #2387 drm/apple: stop the DCPLink when a start or swap ends the session #2460 drm/apple, kbuild, tools/aurora-sep: drop dead kill switches, Kconfig/Makefile leftovers and the login refresh unit #2464 btrfs: verify large data reads in parts #2493 soc: apple: display-gate: request T8122 storage by soc-device record #2682 drm/asahi: mmu: publish a binding without the VM reservation #2799 soc: apple: aop: refuse EPIC calls once the firmware has crashed #2800 soc: apple: sep: gate per-user key bags on a proven capability, not the create variant #2806 soc: apple: sep: read the pnon digest on the two-to-four-page SEPs #2810 PCI: apple: T6050: wait for the radio's port with a wait queue #2377 PCI: apple: t6050: write the gen5 shadow tunables into the 32 GT/s bank #2794 wifi: apple: centauri: T6050: don't veto s2idle for a failed or stopped N1 #2795, fleet89 config (+CONFIG_USB_BILLBOARD=m), LLVM 22.1.6 / rustc 1.97.1; build warnings are the same as main's (23 rustc dead-code warnings, all present on main).grub2-rebootone-shot, no Stage 2 or DTB change. Each Mac went back to its saved fleet kernel, the test kernel was removed, and production state was verified: saved entry, empty next_entry, Enforcing, 0 failed units.genpd_prepare -11, brcmfmac LPAS fallback), and the fleet kernel's own s2idle shows them too. On J615, dsw1's boot also had one brcmfmacring 4: r_ptr 0 outside depth 0line, not seen on 3 fleet boots. No PR in the batch touches brcmfmac.Merge main into isw/aop-crashed-refuse-calls-v2(no conflicts).Original description
Replaces #2342 (same changes, commit trailers fixed).
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, 0 warnings.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".