Repository navigation
mfd: macsmc: drain an ordinary reply before saved-lane noirq resume - #2167
Merged
DjDeveloperr merged 3 commits intoNov 17, 2026
Merged
DjDeveloperr merged 3 commits into
DjDeveloperr merged 3 commits into
Conversation
…aved lane at resume
A wake by something the SMC itself reports, such as a Type-C port's unplug,
brings a notification right behind the wake. Its handler's ordinary command
can be in flight when the noirq resume runs: posted, with its reply waiting
in the mailbox while the interrupt is still off. The resume took the pending
flag for an unresolved saved command and refused with -EBUSY. The SMC then
never got its AP ON notice, and ANS, waiting for its topology from the SMC,
asserted 10 s into the wake:
macsmc 28c600000.smc: PM: failed to resume noirq: error -16
nvme-apple 45dcc0000.nvme: RTKit: Message (id=1): assert failed:
[21370]:timed out waiting for topology from SMC
Poll the mailbox until the reply is in, bounded at 200 ms, before judging
the lane. A recovery or a fault still refuses as before.
Seen on the K116s: a USB stick pulled during a deep sleep.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
(cherry picked from commit 2f579ba)
Align the mocked DCP state and helpers with the production dcp_poweron() used by the fixture. This also covers its negative-control build paths. Signed-off-by: Diljit Singh <hey@djdev.me>
Retain the tested production changes and use the ext26 cold-boot fixture revision that landed in integration. Signed-off-by: Diljit Singh <hey@djdev.me>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An SMC-originated wake can leave an ordinary command reply in the mailbox when
apple_smc_resume_noirq()starts, while interrupts are still disabled. The function then returns-EBUSYbefore sending AP ON and the NVMe firmware can time out waiting for its topology. Jens Axboe reproduced this by unplugging a USB stick during deep sleep on K116s with firmware 27.2. Hardware reportCarry Jens’s exact fix with his authorship. It polls the ordinary reply for at most 200 ms and retains saved-recovery and fault checks. This also addresses the shared path that the J716c SEP/SMC sleep stack enables in #2133. Original commit
Validation compiled the production noirq callback in a mocked transport harness. The original reproduced the refusal with a pending reply, and the fixed callback proceeded after receiving it. Missing replies, saved recovery, and saved faults retained their refusal paths.