From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5F5FDC64ED8 for ; Mon, 20 Feb 2023 14:01:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232812AbjBTOBm (ORCPT ); Mon, 20 Feb 2023 09:01:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232789AbjBTOBg (ORCPT ); Mon, 20 Feb 2023 09:01:36 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DDC41E9E0 for ; Mon, 20 Feb 2023 06:01:22 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 111EA60E8A for ; Mon, 20 Feb 2023 14:01:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 22460C433EF; Mon, 20 Feb 2023 14:01:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1676901681; bh=Ae203KdtJCkDRQWwuWZMlJw96Pauouf65+5MHUrCZsg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rPKDNUvlyDMEpl/pzw4xIKsQYWmpxcP22w1XV74UipKOdyd0Ve1pGa8CZGFmmK07f cVIbroAj8WDeI7FQZgvl7xI8jwMn5/k3kqi8MgXBpkDbq52ukYtCHnC+SzCM4qKf4p ORuOmGcBJjaDkejI0CFMQnQA29SPh4Uf1MKLBI74= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Christoph Hellwig , Keith Busch , Eric Curtin , Sagi Grimberg , Hector Martin , Sasha Levin Subject: [PATCH 6.1 111/118] nvme-apple: fix controller shutdown in apple_nvme_disable Date: Mon, 20 Feb 2023 14:37:07 +0100 Message-Id: <20230220133604.848590902@linuxfoundation.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230220133600.368809650@linuxfoundation.org> References: <20230220133600.368809650@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Christoph Hellwig [ Upstream commit c76b8308e4c9148e44e0c7e086ab6d8b4bb10162 ] 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 Signed-off-by: Sasha Levin --- drivers/nvme/host/apple.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/nvme/host/apple.c b/drivers/nvme/host/apple.c index 262d2b60ac6dd..92c70c4b2f6ec 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); -- 2.39.0