summaryrefslogtreecommitdiff
path: root/drivers/pci
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/probe.c17
-rw-r--r--drivers/pci/tph.c9
2 files changed, 6 insertions, 20 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index bccc7a4bdd79..19d73f6132fb 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -68,23 +68,6 @@ static struct resource *get_pci_domain_busn_res(int domain_nr)
}
/*
- * Some device drivers need know if PCI is initiated.
- * Basically, we think PCI is not initiated when there
- * is no device to be found on the pci_bus_type.
- */
-int no_pci_devices(void)
-{
- struct device *dev;
- int no_devices;
-
- dev = bus_find_next_device(&pci_bus_type, NULL);
- no_devices = (dev == NULL);
- put_device(dev);
- return no_devices;
-}
-EXPORT_SYMBOL(no_pci_devices);
-
-/*
* PCI Bus Class
*/
static void release_pcibus_dev(struct device *dev)
diff --git a/drivers/pci/tph.c b/drivers/pci/tph.c
index ca4f97be7538..e896b3958281 100644
--- a/drivers/pci/tph.c
+++ b/drivers/pci/tph.c
@@ -407,10 +407,13 @@ int pcie_enable_tph(struct pci_dev *pdev, int mode)
else
pdev->tph_req_type = PCI_TPH_REQ_TPH_ONLY;
- rp_req_type = get_rp_completer_type(pdev);
+ /* Check if the device is behind a Root Port */
+ if (pci_pcie_type(pdev) != PCI_EXP_TYPE_RC_END) {
+ rp_req_type = get_rp_completer_type(pdev);
- /* Final req_type is the smallest value of two */
- pdev->tph_req_type = min(pdev->tph_req_type, rp_req_type);
+ /* Final req_type is the smallest value of two */
+ pdev->tph_req_type = min(pdev->tph_req_type, rp_req_type);
+ }
if (pdev->tph_req_type == PCI_TPH_REQ_DISABLE)
return -EINVAL;