Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp27388imp; Tue, 19 Feb 2019 17:22:40 -0800 (PST) X-Google-Smtp-Source: AHgI3IYn781LmdyrBlPZ9byzAEO+AsuUMy2JSLkNVfR/+m4Py/vD3Ra8Q8oQb+BSNXhjtdI5pp95 X-Received: by 2002:a62:6d81:: with SMTP id i123mr19280891pfc.235.1550625760812; Tue, 19 Feb 2019 17:22:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550625760; cv=none; d=google.com; s=arc-20160816; b=F4oRrXf1FBl6r6xY0ttPOz7iaAAVYfr0S/lH2KC3M9lMKP76eISW/jENDnIxUvJQOH qHUbk9ao3c3jgC2RfPosaWbVqm4JmH5+FCR5H/bn9P4IxSN/ItjdhhAz+cfoh3vwxCAh UWJcvv+HagkpbccQW6kIhW4x70yLbOxsB5p8cUl38iDibiDs2OJGUykyfERML6ScUQGn K+DmfsGpAHe07bmbS7W64XLxNHSMg+RGauir+RYj0xgxb0bbTspMPF/diF6IUwO9DdvA e/DhZQYLK1dcdtwB9DKDseKAppCF0niWTdn2fuEBAJSLJis8ZD/00TPcesAngnYsNe3/ nhRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=icSMYWZ1TCBph2yK3xUDD7lbSKqUZW49ipCB4B2lztg=; b=CMibJtaoqJgReObTMPn4HSzTF0TyH4rI4jGyg/1dDp3xbCD1bwfpws9OLiyo3Rg5D4 mi2uwC7Zvsb9WWKW3MiJo1WOuQKypF9V+7jG0PVEXbK9KXKCUXMk6ijulYq2frpzyS2R fdghHuuJ9cRlR0AT5iVMgNtvFL8h04GHKMTk9KG6poRnp51AcSjQcjkxvVbDyOCeHm/p WyKw4Ks8iQFABybNCQjeyMG57FMrTchXVBkHVN7CrQWP7m3U7lhyhAwlBZ5UVyXmk8ZM PuFa6lkz7V+Om4/tZbzReI5oBjyuZEwL8Y+dEnTpmYLner9FABVWSMsxyxPLh/6LlIbP q8Cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Dz7KGAxd; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3si18099869plo.217.2019.02.19.17.22.25; Tue, 19 Feb 2019 17:22:40 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Dz7KGAxd; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730281AbfBTBVI (ORCPT + 99 others); Tue, 19 Feb 2019 20:21:08 -0500 Received: from mail-ot1-f68.google.com ([209.85.210.68]:33200 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726214AbfBTBVH (ORCPT ); Tue, 19 Feb 2019 20:21:07 -0500 Received: by mail-ot1-f68.google.com with SMTP id i20so37574757otl.0; Tue, 19 Feb 2019 17:21:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=icSMYWZ1TCBph2yK3xUDD7lbSKqUZW49ipCB4B2lztg=; b=Dz7KGAxdD8LlyCChAE9NNDESeqrpxN+Hwwj/rCZ4/qp5y1IvN1ZRitfyT86HSJhCH8 +/PmeI0tmxcz0AGFyEUYD1FinVcQTmN30VhY7eAsLNolBbfkfP9700WFltQVmTGNRDqt QOVsrflazXIpj4DhWQngSigF1bXJERIHOZJ+mRlfAWqIEt1LfTOEFPdkfpEuCc5GQ89U JRDTbP6mLrA7FSpgEwqfpFZIuolL6JwoikurvmvhLm11rKDdvBxz2sNUVpPBO8uPoYBx YmfzdizOTvCHu8LkX8y20P7GNCVoXr7U19TbjNf4NhP+SY7bzqdrD+Gp6sAMw4lpF3VH t95Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=icSMYWZ1TCBph2yK3xUDD7lbSKqUZW49ipCB4B2lztg=; b=VAJcHRTlaJcJy9RpA77p2KqxH5/FmbnmfRkDJm8P6A+vQhEkVfoqY6DwERhpooFvlG uHtw80T98DP6di/MVGgzPfm8m3N2UBssOND/YVNiIiBW+OF1gk2GvF7UBxbXaIXYuu9F XJy7gQzEDNiXio9/3z0qk5Paa9QOVaPJylATC7I39Ajk/wYRkVnj+R8F6P6DohDGqnXb hkdlromoztKIAh4pOue7WHSwxi0Kb9HI8Oec4B2vDUfMIYhrKmUHV905mT6lOYAac0G2 yo8VjB7lohad8vShvFz2vn6cpLLGncRT39PCb9K4dy1MxVXiF0HxPMzkLirP5tdJksjh Umfg== X-Gm-Message-State: AHQUAubGZ4/8OureyIrPULpsXE5MJJglE112NLEUoNc/XBpPUPuDIYmN zusUKbCGDMj+7A3sLAsFMg4= X-Received: by 2002:aca:4205:: with SMTP id p5mr4510977oia.15.1550625666880; Tue, 19 Feb 2019 17:21:06 -0800 (PST) Received: from nuclearis2-1.lan (c-98-195-139-126.hsd1.tx.comcast.net. [98.195.139.126]) by smtp.gmail.com with ESMTPSA id d67sm8000424oig.36.2019.02.19.17.21.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Feb 2019 17:21:06 -0800 (PST) From: Alexandru Gagniuc To: bhelgaas@google.com Cc: austin_bolen@dell.com, alex_gagniuc@dellteam.com, keith.busch@intel.com, Shyam_Iyer@Dell.com, lukas@wunner.de, okaya@kernel.org, linux-pci@vger.kernel.org, Alexandru Gagniuc , Mika Westerberg , Sinan Kaya , Oza Pawandeep , linux-kernel@vger.kernel.org Subject: [PATCH RFC v2 4/4] PCI: hotplug: Add quirk For Dell nvme pcie switches Date: Tue, 19 Feb 2019 19:20:30 -0600 Message-Id: <20190220012031.10741-5-mr.nuke.me@gmail.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190220012031.10741-1-mr.nuke.me@gmail.com> References: <20190220012031.10741-1-mr.nuke.me@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org These switches are used to fornicate the motherboard's x16 PCIe ports into four x4 ports for NVMe drives. In conjunction with the storage backplane, the PDS bit reports only the out-of-band presence. The fact that inband presence is disabled is not reported in the slot capabilities 2 (SLTCAP2) register. Because this does not conform to the PCIe spec, add a quirk to let hotplug code know to expect and handle this. Signed-off-by: Alexandru Gagniuc --- drivers/pci/hotplug/pciehp_hpc.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index 9bcadb5d3561..853fb4ab53de 100644 --- 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); + + +static void fixup_dell_nvme_backplane_switches(struct pci_dev *pdev) +{ + if (!pci_is_pcie(pdev)) + return; + + if (pci_pcie_type(pdev) != PCI_EXP_TYPE_DOWNSTREAM) + return; + + 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, + PCI_CLASS_BRIDGE_PCI, 8, + fixup_dell_nvme_backplane_switches); -- 2.19.2