Commit 9ca5cb9
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>1 parent dcba5d8 commit 9ca5cb9
1 file changed
Lines changed: 36 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1049 | 1049 | | |
1050 | 1050 | | |
1051 | 1051 | | |
| 1052 | + | |
| 1053 | + | |
1052 | 1054 | | |
1053 | 1055 | | |
1054 | | - | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
1055 | 1062 | | |
1056 | | - | |
1057 | | - | |
1058 | | - | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
1059 | 1066 | | |
1060 | | - | |
1061 | | - | |
1062 | | - | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
1063 | 1070 | | |
1064 | | - | |
1065 | | - | |
1066 | | - | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
1067 | 1082 | | |
1068 | | - | |
1069 | | - | |
1070 | | - | |
1071 | 1083 | | |
1072 | 1084 | | |
1073 | 1085 | | |
| |||
1635 | 1647 | | |
1636 | 1648 | | |
1637 | 1649 | | |
1638 | | - | |
| 1650 | + | |
1639 | 1651 | | |
1640 | 1652 | | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
1641 | 1656 | | |
1642 | 1657 | | |
1643 | 1658 | | |
| |||
1647 | 1662 | | |
1648 | 1663 | | |
1649 | 1664 | | |
1650 | | - | |
| 1665 | + | |
1651 | 1666 | | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
1652 | 1670 | | |
1653 | 1671 | | |
1654 | 1672 | | |
| |||
1665 | 1683 | | |
1666 | 1684 | | |
1667 | 1685 | | |
1668 | | - | |
| 1686 | + | |
1669 | 1687 | | |
1670 | 1688 | | |
1671 | | - | |
| 1689 | + | |
| 1690 | + | |
1672 | 1691 | | |
1673 | 1692 | | |
1674 | 1693 | | |
| |||
0 commit comments