nvme-apple: fix controller shutdown in apple_nvme_disable
authorChristoph Hellwig <hch@lst.de>
Tue, 8 Nov 2022 10:14:09 +0000 (11:14 +0100)
committerChristoph Hellwig <hch@lst.de>
Tue, 6 Dec 2022 13:36:51 +0000 (14:36 +0100)
nvme_shutdown_ctrl already shuts the controller down, there is no
need to also call nvme_disable_ctrl for the shutdown case.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Eric Curtin <ecurtin@redhat.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Hector Martin <marcan@marcan.st>
drivers/nvme/host/apple.c

index 94ef797e8b4a5f3a69eb1b7de1cb560ee652a6d0..56d9e9be945b760f189249de2f12b52a49f44df8 100644 (file)
@@ -831,7 +831,8 @@ static void apple_nvme_disable(struct apple_nvme *anv, bool shutdown)
 
                if (shutdown)
                        nvme_shutdown_ctrl(&anv->ctrl);
-               nvme_disable_ctrl(&anv->ctrl);
+               else
+                       nvme_disable_ctrl(&anv->ctrl);
        }
 
        WRITE_ONCE(anv->ioq.enabled, false);