Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2567477pxb; Sun, 3 Apr 2022 11:38:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwCqV4cI3fveQqImNw8+j8t0RfGHASBzCf6BcOnVgRI+AuJQzJQQ1s71ReBLsqIbFIe5Tba X-Received: by 2002:a17:907:6e0d:b0:6e0:59ae:21f1 with SMTP id sd13-20020a1709076e0d00b006e059ae21f1mr8038807ejc.362.1649011125692; Sun, 03 Apr 2022 11:38:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649011125; cv=none; d=google.com; s=arc-20160816; b=Udmd5ih2nk3JATTdQkpTyxRTNoeaF3XI/mXa3iiuOHXybmi29EohydtT1J4frEfImj odktPExbp0uUByoGwLVU0bvYaNb98K4q+SJxOVzQlEddlNEaiCOfYWdN4Xze5rs36RRv XsO8ym0WQC2T52HSyE2xrAH+lpOhOORjRaZfgyHPRjRjjX6CNkHm0FyMalKD9RIgs4rH /RthGr6FyQuUKl/ZBLhznzsJAE4q6SqwucPbGOcDWPJZASHaNSJX0NxCyjYY/OG7sftl WIRMniQ4kG8OMAvl0EyuyAiz7BlZLydWNw/W8XnJtGUUOUjb72uzAM9zfw9UNQL+2rCJ RfeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:subject:cc:to:from :date:references:in-reply-to:message-id:mime-version:user-agent :dkim-signature:dkim-signature; bh=F1G7MAN3XjEeRjSELWEKW2o5UMZe0NatNffQWEI3lu0=; b=vZ0Ssa0sbJU0byfbeoqJZmyISYm5d2sIwi371odgfgoki9ZIXn9xnj6GpByMDGuX1a VssbsgfiqfnEf3QQdwz8ZK0S3AOvRbhytkZHqmNzzveXh851WBZ/dhRB/cdBfjQ2ToiX mXw7xFbNDRxe0mI4M+gbiOYyTZdEjutmA6dvPgSsKxB9lEX0pptQkVu3ep6324hTnncZ tFivhmRLU3mB8+k/LU/E/r7CRrRbRqhCTw5OGxSOMJ3vUjU8t63kxrJi/BN8OBN2UiMs 4/KGlgIp5um6zep0MoVJliyrdYWBCKz4/NLL9CHSQ0DXEYIF2Ln9r81HSLOVInt+N5KO Vofg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@svenpeter.dev header.s=fm1 header.b=OHw2USsW; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=IKUfMzOu; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=svenpeter.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h5-20020a50e105000000b004190fd858eesi5295975edl.432.2022.04.03.11.38.20; Sun, 03 Apr 2022 11:38:45 -0700 (PDT) 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; dkim=pass header.i=@svenpeter.dev header.s=fm1 header.b=OHw2USsW; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=IKUfMzOu; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=svenpeter.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354754AbiDBMt5 (ORCPT + 99 others); Sat, 2 Apr 2022 08:49:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354750AbiDBMty (ORCPT ); Sat, 2 Apr 2022 08:49:54 -0400 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F12C93EF0E; Sat, 2 Apr 2022 05:48:02 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 55B435C015C; Sat, 2 Apr 2022 08:48:02 -0400 (EDT) Received: from imap47 ([10.202.2.97]) by compute2.internal (MEProxy); Sat, 02 Apr 2022 08:48:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svenpeter.dev; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; bh=F1G7MAN3XjEeRj SELWEKW2o5UMZe0NatNffQWEI3lu0=; b=OHw2USsW2ISE+49T5S7RqLyRraE0DT Y1JRXPXWJRIsb4uIl0Q/SeLnjeghbj5RUU9jYALgTto76oXuPYQGiynX2Xgakvev hPMnJ0A0kG8Vnk7sYr760TNw4xJnmoA6T//cez0a+3/GMQdiyjRU9D7/s3R4HMK3 SuoCTjvgPfGEMKFEe4JmVlFjDLaS5g+blti0o3aDeXZ09PXLhCqPF5EZvz0cmhsE GTqXgL5BXDnYm3shZkUwbJ6AkZNvMhUERgDsc8pxU59luiubBAfdX9JCxL/thMQG hO3THEo/QxSKzvYmWGMaQbd3q1hSuztnO8ilFaGKPrllVIT+SMfKhdfQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=F1G7MAN3XjEeRjSELWEKW2o5UMZe0NatNffQWEI3l u0=; b=IKUfMzOu6WEJOXdgdPPMWcMtpJtHKfA9URXSipevmN8omSFZ1KEoDbGLz 3FOhBOaAtwJqeX2fsh5EO6NjyEzfxaZJlKlDpy2VTpjuP5F3o/aKSbSHA4hOu4db L+DTgdDcKJ7qEDvpkudcQ6uv0KraU0e1MLmvApwbpNDYz1dBO8NSl9POgV3GKdsw 8SQe0MjbDNaJF3Gyjyaoge6Pjp10e6p15UTgZU56qAabumYbFlPsUtPz8Rt5vXFo 0oJza4eMn+u8xvFf7lfxoTSh8Aem0OPNM7RtVNtXEBU8iCycVUVsIs4oPRXZAybd smi3qUSKX66S2nq8+KgmaloGRr3RA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudeikedgheejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgfgsehtqhertderreejnecuhfhrohhmpedfufhv vghnucfrvghtvghrfdcuoehsvhgvnhesshhvvghnphgvthgvrhdruggvvheqnecuggftrf grthhtvghrnhepteeuudelteefueelvdelheehieevvdfhkeehjeejudfhieelffffudfh keeileegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epshhvvghnsehsvhgvnhhpvghtvghrrdguvghv X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 249A927402C7; Sat, 2 Apr 2022 08:48:02 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-382-g88b93171a9-fm-20220330.001-g88b93171 Mime-Version: 1.0 Message-Id: In-Reply-To: <20220324061620.GA12330@lst.de> References: <20220321165049.35985-1-sven@svenpeter.dev> <20220321165049.35985-7-sven@svenpeter.dev> <20220324061620.GA12330@lst.de> Date: Sat, 02 Apr 2022 14:47:41 +0200 From: "Sven Peter" To: "hch@lst.de" Cc: "Keith Busch" , "axboe@fb.com" , "sagi@grimberg.me" , "Hector Martin" , "Alyssa Rosenzweig" , "Rob Herring" , "Arnd Bergmann" , "Marc Zyngier" , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org Subject: Re: [PATCH 6/9] nvme-apple: Add initial Apple SoC NVMe driver Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 Hi, Thanks for the review! On Thu, Mar 24, 2022, at 07:16, Christoph Hellwig wrote: >> + >> +//#define DEBUG > > This should not leak into the driver=E1=B9=A1 Agreed, I'll remove it. > >> +#include > > As far as I can tell this driver does not support metadata or PI, > so why is this include needed? Yup, you're right, it's not required at all. It's a left-over from when I hadn't realized that this controller doesn't support metadata and still had it implemented. > >> +/* NVM Express NVM Command Set Specification, Revision 1.0a, Figure = 18 */ >> +#define NVME_OPCODE_DATA_XFER_HOST_TO_CTRL BIT(0) >> +#define NVME_OPCODE_DATA_XFER_CTRL_TO_HOST BIT(1) > > Please just use the nvme_is_write helper where you are using these. I didn't realize that helper exists, will use it! > >> +static int apple_nvme_sart_dma_setup(void *cookie, struct apple_rtki= t_shmem *bfr, > > Please avoid > 80 character lines. Will fix it. > >> +static void apple_nvme_free_ctrl(struct nvme_ctrl *ctrl) >> +{ >> +} > > So where are the apple specific resources free? ->free_ctrl is > the callback from the struct device release callback, so without > one the resource release can't be tried to the device release. The resources are all devres managed but I only just realized that the nvme_ctrl creates its own struct device that has to be tied to the platform device. I think I'll at least need a get_device in _probe and a put_device here just like in pci.c to tie those two together. I'll also double check to make sure that all resources are indeed devres-managed. Thanks, Sven