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 B74ACC46467 for ; Wed, 11 Jan 2023 04:51:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231303AbjAKEvA (ORCPT ); Tue, 10 Jan 2023 23:51:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230194AbjAKEuz (ORCPT ); Tue, 10 Jan 2023 23:50:55 -0500 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9F625F9F for ; Tue, 10 Jan 2023 20:50:36 -0800 (PST) Received: by verein.lst.de (Postfix, from userid 2407) id 53F5368BEB; Wed, 11 Jan 2023 05:50:32 +0100 (CET) Date: Wed, 11 Jan 2023 05:50:32 +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 2/2] nvme: Handle shut down controllers during initialization Message-ID: <20230111045032.GA15520@lst.de> References: <20230111043614.27087-1-marcan@marcan.st> <20230111043614.27087-3-marcan@marcan.st> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230111043614.27087-3-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:14PM +0900, Hector Martin wrote: > According to the spec, controllers need an explicit reset to become > active again after a controller shutdown. Check for this state in > nvme_enable_ctrl and issue an explicit disable if required, which will > trigger the required reset. I don't think this belongs into nvme_enable_ctrl. It seems like nvme-apple is missing the equivalent to the nvme_disable_ctrl call in nvme_pci_configure_admin_queue, though.