Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753248AbdHWEku (ORCPT ); Wed, 23 Aug 2017 00:40:50 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:36370 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751161AbdHWEks (ORCPT ); Wed, 23 Aug 2017 00:40:48 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org B51586025C Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=okaya@codeaurora.org Subject: Re: [PATCH v11 2/4] PCI: Factor out pci_bus_wait_crs() To: Bjorn Helgaas Cc: Bjorn Helgaas , linux-pci@vger.kernel.org, Timur Tabi , linux-kernel@vger.kernel.org, Alex Williamson , linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20170818212310.15145.21732.stgit@bhelgaas-glaptop.roam.corp.google.com> <20170818213210.15145.15340.stgit@bhelgaas-glaptop.roam.corp.google.com> <9cb3006d-31d0-e57a-fd3e-c32914e8ba42@codeaurora.org> <20170821191806.GC28977@bhelgaas-glaptop.roam.corp.google.com> From: Sinan Kaya Message-ID: Date: Wed, 23 Aug 2017 00:40:45 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1668 Lines: 40 On 8/21/2017 3:37 PM, Sinan Kaya wrote: > bool pci_bus_crs_pending(struct pci_dev *dev, u32 l) > { > if !pci_bus_crs_vis_supported(dev->parent) > return false; Apparently, I can't do this. By the time, we come to here from vendor id read function, the topology has not been set up yet. I'm getting an exception: [ 6.067392] [] pci_bus_crs_visibility_pending+0x4/0x7c [ 6.074085] [] pci_scan_single_device+0x40/0xb4 [ 6.080170] [] pci_scan_slot+0x50/0xe8 [ 6.085474] [] pci_scan_child_bus+0x30/0x108 [ 6.091300] [] acpi_pci_root_create+0x184/0x1f0 [ 6.097388] [] pci_acpi_scan_root+0x188/0x1d4 [ 6.103298] [] acpi_pci_root_add+0x38c/0x44c [ 6.109125] [] acpi_bus_attach+0xe0/0x1ac [ 6.114689] [] acpi_bus_attach+0x154/0x1ac [ 6.120340] [] acpi_bus_attach+0x154/0x1ac [ 6.125991] [] acpi_bus_scan+0x60/0x70 [ 6.131297] [] acpi_scan_init+0xd8/0x228 [ 6.136774] [] acpi_init+0x2d4/0x328 [ 6.141905] [] do_one_initcall+0x80/0x108 [ 6.147469] [] kernel_init_freeable+0x188/0x228 [ 6.153556] [] kernel_init+0x10/0xfc [ 6.158687] [] ret_from_fork+0x10/0x50 > > return (l & 0xFFFF) == 0x0001; > } -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.