From mboxrd@z Thu Jan 1 00:00:00 1970 From: okaya@codeaurora.org (Sinan Kaya) Date: Wed, 23 Aug 2017 00:40:45 -0400 Subject: [PATCH v11 2/4] PCI: Factor out pci_bus_wait_crs() In-Reply-To: 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> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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.