Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp234393imp; Wed, 20 Feb 2019 23:57:19 -0800 (PST) X-Google-Smtp-Source: AHgI3IbUTH62fnTrXzheDwMeC0bQXVOzKPJkNEnq6MJFBkGYHYeA60i9vG15U0iqONOeXDcf42co X-Received: by 2002:a17:902:9307:: with SMTP id bc7mr25760118plb.234.1550735839123; Wed, 20 Feb 2019 23:57:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550735839; cv=none; d=google.com; s=arc-20160816; b=PNI5g8i9HzsQ/qw4G3cEh8hpFkXTPGc6VNPbccDT491GlY1qcbIQS+4IqEQWuRAgAO 0ORI74Fg3TFX6GIxJaBRQPmpZCfsZbzpsKrQ88AnZ2PFb2phuFmEjLAnBsY9+AEEZNTr GUhbX3dZWK6uP3CzU6W8etzF2kUWk1POI4iFflylzrJ5drTlfJyQ2JPHtFbyGlASuSi9 YvEPYTN+2CoQ9erWrXse6UzTftIDAsK7vXeD9gHk+XvmTMrpuhbbS2U3c672xdUjVTyy cYHes2eNaljFSdxrGTsk0idTsQImPnwc+oW6He+AmgWZaTZSUeJ8FF5R8OIHJYRRNtSM CeQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=dz0QgJnrUK2GqbEEwigWNKjs4qe4yE3dpVlV6MidO/4=; b=sbrAtNh4sjE90tEkxsJkP3nlKblIKXtop9VbUkKwBYu0h3X0P+4wKyz12obhhfOmds ZfduMi5OCQdFOZenaShcU+eW/RDaAncevY/ccP2pglzmts+OU5cd+gFATELXQ1xVjumq 9nfFjaogx8Q7Uv57d6i7fo1LrgDgUTuZ8hpoe9ohBtqC3+/sKm1qfZ7ygpqUe06PKEe9 AJf5t0xjWa24LY+//2cOJdUNySbHCJ6UTJcgep9apCUq+oPuWTPUfl5kkm0W8Y+OBEkx Jd7Cz3rx7VTfXdcqYbYJBEUZnhVp5FGCSApQFTd4X+P/qq0Ttykz/b8i4h6TQhFTnJUO G4Qg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j73si1787174pge.263.2019.02.20.23.57.03; Wed, 20 Feb 2019 23:57:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726639AbfBUH4h (ORCPT + 99 others); Thu, 21 Feb 2019 02:56:37 -0500 Received: from bmailout3.hostsharing.net ([176.9.242.62]:35295 "EHLO bmailout3.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725891AbfBUH4h (ORCPT ); Thu, 21 Feb 2019 02:56:37 -0500 Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by bmailout3.hostsharing.net (Postfix) with ESMTPS id 0420D100D940C; Thu, 21 Feb 2019 08:56:35 +0100 (CET) Received: by h08.hostsharing.net (Postfix, from userid 100393) id AB831173A2E; Thu, 21 Feb 2019 08:56:34 +0100 (CET) Date: Thu, 21 Feb 2019 08:56:34 +0100 From: Lukas Wunner To: Alexandru Gagniuc Cc: bhelgaas@google.com, austin_bolen@dell.com, alex_gagniuc@dellteam.com, keith.busch@intel.com, Shyam_Iyer@Dell.com, okaya@kernel.org, linux-pci@vger.kernel.org, Mika Westerberg , Sinan Kaya , Oza Pawandeep , linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC v2 4/4] PCI: hotplug: Add quirk For Dell nvme pcie switches Message-ID: <20190221075634.uih5ysqwkna7cku4@wunner.de> References: <20190220012031.10741-1-mr.nuke.me@gmail.com> <20190220012031.10741-5-mr.nuke.me@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190220012031.10741-5-mr.nuke.me@gmail.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 19, 2019 at 07:20:30PM -0600, Alexandru Gagniuc wrote: > --- a/drivers/pci/hotplug/pciehp_hpc.c > +++ b/drivers/pci/hotplug/pciehp_hpc.c > @@ -952,3 +952,23 @@ DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_QCOM, 0x0400, > PCI_CLASS_BRIDGE_PCI, 8, quirk_cmd_compl); > DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_QCOM, 0x0401, > PCI_CLASS_BRIDGE_PCI, 8, quirk_cmd_compl); > + > + Duplicate newline. > +static void fixup_dell_nvme_backplane_switches(struct pci_dev *pdev) Can we have a little code comment above the function such as: +/* + * Dell NVMe storage backplanes disable in-band presence + * (PCIe r5.0 sec X.Y.Z) but neglect to set the corresponding flag in the + * Slot Capabilities 2 register. + */ > + if (pdev->subsystem_vendor != PCI_VENDOR_ID_DELL > + || pdev->subsystem_device != 0x1fc7) This looks a little unpolished, how about: + if (pdev->subsystem_vendor != PCI_VENDOR_ID_DELL || + pdev->subsystem_device != 0x1fc7) > + return; > + > + pdev->no_in_band_presence = 1; > +} > + > +DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_PLX, 0x9733, By convention there's no blank line between the closing curly brace and the DECLARE_PCI_FIXUP_CLASS_FINAL(). If the quirk is x86-specific, please enclose it in "#ifdef CONFIG_X86" to reduce kernel footprint on other arches. Thanks, Lukas