Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp660863rwb; Thu, 19 Jan 2023 00:37:13 -0800 (PST) X-Google-Smtp-Source: AMrXdXvxYm+kFdG4ejrn/hRazaFrGR8/Fv29qR5nrLRkKrlu8WUVauitOaCLyjkNx7iF+r/xs4JF X-Received: by 2002:a05:6a20:8f21:b0:b5:389e:870e with SMTP id b33-20020a056a208f2100b000b5389e870emr13818953pzk.4.1674117433659; Thu, 19 Jan 2023 00:37:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674117433; cv=none; d=google.com; s=arc-20160816; b=GGmT3k3aSXEooWg6JZc3C7OhXAB8ng2UCdetOBKQ/ui827/A7xcSET+I13fVp4lBSM oyBhg/djSl0xzFgqwdNtf8C2CO9o3m5zaddJwFP9xKl2x4PAZCmxvijn3Ur59zKWK/Y9 Hh7pYRAFmFnUyi3rQ/kqsA1R9zcTgsD4VN7C4Te2/onXclpfRABGor+jRVq27T2y3Z+3 Z1qiTOLaWjumpeZN3kvuFgifDrfsWoHjE2IVRaorOSKj2556Qf3nU//9DbMmZxa38Qf4 IM4vq+S066jDlYfY8S4F1tg1moqVceqv2WxGbnOiIT60YlXnmWiRN9b/HTS6D5p1ULh/ 6bhQ== 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=dTtK7Ojrab9jhaD9uxbY7B3P3jlR4lI+Icwjn/s7Wps=; b=f62De1mNw7kVOLYgEmTubKGUUSO8UP0UNjn638AjLE9bVitdion8RyOQNzPpnBUq0V R832G9wZUiEBmLVp38tKxPlAq89oXAMiukz6xTIkEllhJCWyVmTDNbpW4Sum+4QqiMRx HSPEBZNhulun6aJXkkwcuoxQJUIa20/6aJrwyYj2XS5Wiz14zWJG2fRJVdkJCTZOEHD9 sRHJojLg42DUzg3fKRrLHVf7oOa3LclbbuumfxOH8B/qRdwlSQ3ET2E8EPCxPEBK+nY5 dNGf1By8cO506H7cr3FWWdyL2cmhFSBCIqVJgOjI+P3eOC6YDyQZ80AC+kErQhtWziQv NJOg== 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 j69-20020a638048000000b004b980d584eesi4171382pgd.49.2023.01.19.00.37.08; Thu, 19 Jan 2023 00:37:13 -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 S229910AbjASHzJ (ORCPT + 43 others); Thu, 19 Jan 2023 02:55:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229973AbjASHyl (ORCPT ); Thu, 19 Jan 2023 02:54:41 -0500 X-Greylist: delayed 351 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 18 Jan 2023 23:54:33 PST Received: from soltyk.jannau.net (soltyk.jannau.net [144.76.91.90]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E79F10F for ; Wed, 18 Jan 2023 23:54:32 -0800 (PST) Received: by soltyk.jannau.net (Postfix, from userid 1000) id 2656026F67C; Thu, 19 Jan 2023 08:48:36 +0100 (CET) Date: Thu, 19 Jan 2023 08:48:36 +0100 From: Janne Grunau To: Christoph Hellwig Cc: Hector Martin , Sven Peter , Keith Busch , Jens Axboe , Sagi Grimberg , Alyssa Rosenzweig , Eric Curtin , asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] nvme-apple: Reset controller during shutdown Message-ID: <20230119074836.GC3576@jannau.net> References: <20230114-apple-nvme-suspend-fixes-v6.2-v2-0-9157bf633dba@jannau.net> <20230114-apple-nvme-suspend-fixes-v6.2-v2-1-9157bf633dba@jannau.net> <20230118052450.GA24742@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230118052450.GA24742@lst.de> User-Agent: Mutt/1.10.1 (2018-07-13) 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 Hej, On 2023-01-18 06:24:50 +0100, Christoph Hellwig wrote: > On Tue, Jan 17, 2023 at 07:25:00PM +0100, Janne Grunau wrote: > > + /* > > + * Always reset the NVMe controller on shutdown. The reset is > > + * required to shutdown the co-processor cleanly. > > + */ > > Hmm. This comment doesn't seem to match the discussion we had last > week. Which would be: > > /* > * NVMe requires a reset before setting up a controller to > * ensure it is in a clean state. For NVMe PCIe this is > * done in the setup path to be able to deal with controllers > * in any kind of state. For for Apple devices, the firmware > * will not be available at that time and the reset will > * time out. Thus reset after shutting the NVMe controller > * down and before shutting the firmware down. > */ yes, it differs from the discussion last week. I tried to issue the reset later in the setup path after the firmware was brought back up. That fixes the hang but the device is still not useable. So it appears we need to reset the controller before the firmware is shutdown. Janne