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 12370C5479D for ; Wed, 11 Jan 2023 04:54:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231700AbjAKEyN (ORCPT ); Tue, 10 Jan 2023 23:54:13 -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) 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.