Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp8863394rwl; Tue, 10 Jan 2023 21:04:37 -0800 (PST) X-Google-Smtp-Source: AMrXdXvEw2KtjbgXuH7Qo7rh84y2tsn41bl22TXgeDu0ozYOi03y4omHVD07BwxsVQehYPGrQP/3 X-Received: by 2002:a17:902:e951:b0:193:2ed4:561a with SMTP id b17-20020a170902e95100b001932ed4561amr10523885pll.38.1673413477224; Tue, 10 Jan 2023 21:04:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673413477; cv=none; d=google.com; s=arc-20160816; b=jp9riB9Xp4k3TRwGaXuWZ8Ejo4qvyf6y+xLGyUNahCH2v4CUOQcdpRWrsP3nLYp1IS 4svtSScn97bif7PURImSW++Nm331Xyc/eKfLoPyhTV/NmRXtsDnLbh7rDPVXw8xGlwDL lMuQeGKM9FRMvbvgCXaZLdEMB36IwOseLihtiZiLJSIOv4Wu5lW6nmOyVMJrjx2cHcC4 VWLFWnDKZuXscqLP/iIOjDhTguNhFepaxzeoLXqsJ/OC6YY9y+5hk+Xi7J7cwZ3vdEEZ SMBtZyC44+/uIKJcXR2yyV6v1sFGIei0KrczHb4b2KEP3gexRIxN7CWJZvM6OyN7jpRr Sxog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=+eGO78dS6alY5X7gw/eBrKIrDOWQhzo67KJLqhyBOwQ=; b=rATimSJfhu866X592xWnrTmtKpVggoiiISkXujaTYk4At8uWIMF895xbM3SK2zKvdj fAS+t2Ns6gpOwCOtbgdXo7xmfUQepjVlrzmvcgx62plkdnrhkPorQ2CUfmv10QXx2GF9 Jze/quzRs0Zsmpb51LGMqf9On8x6VuN0PYulRXEmIkwMAMU7f9GLNXzRwTyRAG0fKPf2 SfPw9CmwHegt4Wu8CMqRZoxcOME/dmER6oc2W+a0sXRiQLqVA2wyDo234MmCbKtYYkKI RrF/QCm2J+Sxx5zvWwIlSOhn8+IiSjjDlcSiNAqfLfY29J/09pgEktjf1/rrFeTbo8eB JR5g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j14-20020a63230e000000b0046ec3bd90bbsi13708869pgj.60.2023.01.10.21.04.30; Tue, 10 Jan 2023 21:04:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231452AbjAKEyM (ORCPT + 53 others); Tue, 10 Jan 2023 23:54:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231332AbjAKEyI (ORCPT ); Tue, 10 Jan 2023 23:54:08 -0500 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F06F2637 for ; Tue, 10 Jan 2023 20:54:07 -0800 (PST) Received: by verein.lst.de (Postfix, from userid 2407) id 2A92C68BEB; Wed, 11 Jan 2023 05:54:03 +0100 (CET) Date: Wed, 11 Jan 2023 05:54:02 +0100 From: Christoph Hellwig To: Hector Martin Cc: Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg , Eric Curtin , Janne Grunau , Sven Peter , Alyssa Rosenzweig , asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] nvme-apple: Do not try to shut down the controller twice Message-ID: <20230111045402.GB15520@lst.de> References: <20230111043614.27087-1-marcan@marcan.st> <20230111043614.27087-2-marcan@marcan.st> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230111043614.27087-2-marcan@marcan.st> User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 11, 2023 at 01:36:13PM +0900, Hector Martin wrote: > The blamed commit stopped explicitly disabling the controller when we do > a controlled shutdown, but apple_nvme_reset_work was only checking for > the disable bit before deciding to issue another disable. Check for the > shutdown state too, to avoid breakage. > > This issue does not affect nvme-pci, since it only issues controller > shutdowns when the system is actually shutting down anyway. There's a few other places where nvme-pci does a shutdown like probe/reset failure and most notably and mostly notably various power management scenarios. What path is causing a problem here for nvme-apple? I fear we're missing some highler level check here and getting further out of sync.