Commit 3f22421
apple-nvme: Support coprocessors left idle
iBoot on at least some firmwares/machines leaves ANS2 running, requiring
a wake command instead of a CPU boot (and if we reset ANS2 in that
state, everything breaks).
Only stop the CPU if RTKit was running, and only do the reset dance if
the CPU is stopped.
Normal shutdown handoff:
- RTKit not yet running
- CPU detected not running
- Reset
- CPU powerup
- RTKit boot wait
ANS2 left running/idle:
- RTKit not yet running
- CPU detected running
- RTKit wake message
Sleep/resume cycle:
- RTKit shutdown
- CPU stopped
- (sleep here)
- CPU detected not running
- Reset
- CPU powerup
- RTKit boot wait
Shutdown or device removal:
- RTKit shutdown
- CPU stopped
Therefore, the CPU running bit serves as a consistent flag of whether
the coprocessor is fully stopped or just idle.
Signed-off-by: Hector Martin <marcan@marcan.st>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Reviewed-by: Sven Peter <sven@svenpeter.dev>
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Signed-off-by: Keith Busch <kbusch@kernel.org>1 parent eefa72a commit 3f22421
1 file changed
+36
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1011 | 1011 | | |
1012 | 1012 | | |
1013 | 1013 | | |
| 1014 | + | |
| 1015 | + | |
1014 | 1016 | | |
1015 | 1017 | | |
1016 | | - | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
1017 | 1024 | | |
1018 | | - | |
1019 | | - | |
1020 | | - | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
1021 | 1028 | | |
1022 | | - | |
1023 | | - | |
1024 | | - | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
1025 | 1032 | | |
1026 | | - | |
1027 | | - | |
1028 | | - | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
1029 | 1044 | | |
1030 | | - | |
1031 | | - | |
1032 | | - | |
1033 | 1045 | | |
1034 | 1046 | | |
1035 | 1047 | | |
| |||
1565 | 1577 | | |
1566 | 1578 | | |
1567 | 1579 | | |
1568 | | - | |
| 1580 | + | |
1569 | 1581 | | |
1570 | 1582 | | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
1571 | 1586 | | |
1572 | 1587 | | |
1573 | 1588 | | |
| |||
1576 | 1591 | | |
1577 | 1592 | | |
1578 | 1593 | | |
1579 | | - | |
| 1594 | + | |
1580 | 1595 | | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
1581 | 1599 | | |
1582 | 1600 | | |
1583 | 1601 | | |
| |||
1594 | 1612 | | |
1595 | 1613 | | |
1596 | 1614 | | |
1597 | | - | |
| 1615 | + | |
1598 | 1616 | | |
1599 | 1617 | | |
1600 | | - | |
| 1618 | + | |
| 1619 | + | |
1601 | 1620 | | |
1602 | 1621 | | |
1603 | 1622 | | |
| |||
0 commit comments