Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753334AbbGOQzC (ORCPT ); Wed, 15 Jul 2015 12:55:02 -0400 Received: from mail-ie0-f174.google.com ([209.85.223.174]:34948 "EHLO mail-ie0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753252AbbGOQy5 (ORCPT ); Wed, 15 Jul 2015 12:54:57 -0400 From: David Daney To: linux-arm-kernel@lists.infradead.org, Catalin Marinas , Will Deacon , Bjorn Helgaas , linux-pci@vger.kernel.org, Thomas Gleixner , Jason Cooper Cc: linux-kernel@vger.kernel.org, Robert Richter , David Daney Subject: [PATCH 1/5] pci: Add is_pcierc element to struct pci_bus Date: Wed, 15 Jul 2015 09:54:41 -0700 Message-Id: <1436979285-8177-2-git-send-email-ddaney.cavm@gmail.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1436979285-8177-1-git-send-email-ddaney.cavm@gmail.com> References: <1436979285-8177-1-git-send-email-ddaney.cavm@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1389 Lines: 45 From: David Daney ... and use is to force only_one_child() to return true. Needed because the ThunderX PCIe RC cannot be identified by existing methods. Signed-off-by: David Daney --- drivers/pci/probe.c | 2 ++ include/linux/pci.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index cefd636..11ec2e7 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -1643,6 +1643,8 @@ static int only_one_child(struct pci_bus *bus) { struct pci_dev *parent = bus->self; + if (bus->is_pcierc) + return 1; if (!parent || !pci_is_pcie(parent)) return 0; if (pci_pcie_type(parent) == PCI_EXP_TYPE_ROOT_PORT) diff --git a/include/linux/pci.h b/include/linux/pci.h index 8a0321a..1f1ce73 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -473,6 +473,7 @@ struct pci_bus { struct bin_attribute *legacy_io; /* legacy I/O for this bus */ struct bin_attribute *legacy_mem; /* legacy mem */ unsigned int is_added:1; + unsigned int is_pcierc:1; }; #define to_pci_bus(n) container_of(n, struct pci_bus, dev) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/