Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1716497
| From | Sinan Kaya <okaya@codeaurora.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v11 2/4] PCI: Factor out pci_bus_wait_crs() |
| Date | 2017-08-21 16:00 +0200 |
| Message-ID | <ugVpg-54m-7@gated-at.bofh.it> (permalink) |
| References | <ufX9L-Un-3@gated-at.bofh.it> <ufX9M-Un-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 8/18/2017 5:32 PM, Bjorn Helgaas wrote:
> + if ((*l & 0xffff) != 0x0001)
> + return true; /* not a CRS completion */
>
This version certainly looks cleaner. However, it breaks pci_flr_wait().
If some root port doesn't support CRS and returns 0xFFFFFFFF, pci_bus_wait_crs()
function returns true. pci_flr_wait() prematurely bails out from here.
pci_flr_wait()
{
+ ret = pci_bus_wait_crs(dev->bus, dev->devfn, &id, 60000);
+ if (ret)
+ return;
}
We can change the return code to false above but then we break pci_bus_read_dev_vendor_id()
function.
That's why, I was interested in creating a pci_bus_crs_visibility_supported() helper
function that would check for the magic 0x0001 value and return true. Otherwise, false.
pci_bus_read_dev_vendor_id() would do this
pci_bus_read_dev_vendor_id()
{
...
if (pci_bus_crs_visibility_supported())
return pci_bus_wait_crs(dev->bus, dev->devfn, &id, 60000);
return true
}
Similar pattern for pci_flr_wait().
--
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.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v11 2/4] PCI: Factor out pci_bus_wait_crs() Bjorn Helgaas <bhelgaas@google.com> - 2017-08-18 23:40 +0200
Re: [PATCH v11 2/4] PCI: Factor out pci_bus_wait_crs() Sinan Kaya <okaya@codeaurora.org> - 2017-08-21 16:00 +0200
Re: [PATCH v11 2/4] PCI: Factor out pci_bus_wait_crs() Bjorn Helgaas <helgaas@kernel.org> - 2017-08-21 21:20 +0200
Re: [PATCH v11 2/4] PCI: Factor out pci_bus_wait_crs() Sinan Kaya <okaya@codeaurora.org> - 2017-08-21 21:40 +0200
Re: [PATCH v11 2/4] PCI: Factor out pci_bus_wait_crs() Bjorn Helgaas <helgaas@kernel.org> - 2017-08-21 22:30 +0200
Re: [PATCH v11 2/4] PCI: Factor out pci_bus_wait_crs() Sinan Kaya <okaya@codeaurora.org> - 2017-08-21 22:40 +0200
Re: [PATCH v11 2/4] PCI: Factor out pci_bus_wait_crs() Bjorn Helgaas <helgaas@kernel.org> - 2017-08-21 23:10 +0200
Re: [PATCH v11 2/4] PCI: Factor out pci_bus_wait_crs() Sinan Kaya <okaya@codeaurora.org> - 2017-08-23 06:50 +0200
csiph-web