From: Christoph Hellwig Date: Tue, 8 Nov 2022 10:14:09 +0000 (+0100) Subject: nvme-apple: fix controller shutdown in apple_nvme_disable X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c76b8308e4c9148e44e0c7e086ab6d8b4bb10162;p=linux.git nvme-apple: fix controller shutdown in apple_nvme_disable 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 Reviewed-by: Keith Busch Reviewed-by: Eric Curtin Reviewed-by: Sagi Grimberg Reviewed-by: Hector Martin --- diff --git a/drivers/nvme/host/apple.c b/drivers/nvme/host/apple.c index 94ef797e8b4a5..56d9e9be945b7 100644 --- a/drivers/nvme/host/apple.c +++ b/drivers/nvme/host/apple.c @@ -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);