[v2,0/2] nvme-apple: Fix suspend-resume regression

Message ID 20230114-apple-nvme-suspend-fixes-v6.2-v2-0-9157bf633dba@jannau.net
Headers
Series nvme-apple: Fix suspend-resume regression |

Message

Janne Grunau Jan. 17, 2023, 6:25 p.m. UTC
  c76b8308e4c9 removed a NVMe controller reset in the shutdown path. This
broke suspend since it triggered a reset on resume. This reset hangs
since the co-processor is not up.
In addition the reset is needed on suspend to shutdown the co-processor
cleanly.

This series contains a functional revert of c76b8308e4c9 (a simple revert
is not possible due to other changes) and issues the NVMe reset only when
the co-processor is running.

Changes since Hector's v1:
- keep the fix localy in nvme-apple
- disable on shutdown for clean co-processor shutdown
- disable on reset only while the co-processor is running

---
Janne Grunau (2):
      nvme-apple: Reset controller during shutdown
      nvme-apple: Only reset the controller when RTKit is running

 drivers/nvme/host/apple.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
---
base-commit: 5dc4c995db9eb45f6373a956eb1f69460e69e6d4
change-id: 20230114-apple-nvme-suspend-fixes-v6.2-rc4

Best regards,
  

Comments

Christoph Hellwig Jan. 18, 2023, 5:25 a.m. UTC | #1
I'll queue this up in nvme-6.2 as an urgent fix.  But I'd love to hear
clarification on what hsould be in the comment based on the discussion
last week.