diff options
author | Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> | 2009-11-11 00:36:17 -0500 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-11-24 18:25:16 -0500 |
commit | 5f4d91a1228ac85c75b099efd36fff1a3407335c (patch) | |
tree | ed0d13811c60bf3357ef70ea2931e29a358ed023 /drivers | |
parent | 7eb776c42e75d17bd8107a1359068d8c742639d1 (diff) |
PCI: use pci_is_pcie() in pci core
Change for PCI core to use pci_is_pcie() instead of checking
pci_dev->is_pcie.
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/dmar.c | 2 | ||||
-rw-r--r-- | drivers/pci/intel-iommu.c | 10 | ||||
-rw-r--r-- | drivers/pci/intr_remapping.c | 4 | ||||
-rw-r--r-- | drivers/pci/iov.c | 2 | ||||
-rw-r--r-- | drivers/pci/pci-acpi.c | 4 | ||||
-rw-r--r-- | drivers/pci/pci.c | 6 | ||||
-rw-r--r-- | drivers/pci/search.c | 4 |
7 files changed, 16 insertions, 16 deletions
diff --git a/drivers/pci/dmar.c b/drivers/pci/dmar.c index 22b02c6df854..e01ca4d6b3e6 100644 --- a/drivers/pci/dmar.c +++ b/drivers/pci/dmar.c | |||
@@ -329,7 +329,7 @@ found: | |||
329 | for (bus = dev->bus; bus; bus = bus->parent) { | 329 | for (bus = dev->bus; bus; bus = bus->parent) { |
330 | struct pci_dev *bridge = bus->self; | 330 | struct pci_dev *bridge = bus->self; |
331 | 331 | ||
332 | if (!bridge || !bridge->is_pcie || | 332 | if (!bridge || !pci_is_pcie(bridge) || |
333 | bridge->pcie_type == PCI_EXP_TYPE_PCI_BRIDGE) | 333 | bridge->pcie_type == PCI_EXP_TYPE_PCI_BRIDGE) |
334 | return 0; | 334 | return 0; |
335 | 335 | ||
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index b1e97e682500..b8802ae4bcdb 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c | |||
@@ -1611,7 +1611,7 @@ domain_context_mapping(struct dmar_domain *domain, struct pci_dev *pdev, | |||
1611 | return ret; | 1611 | return ret; |
1612 | parent = parent->bus->self; | 1612 | parent = parent->bus->self; |
1613 | } | 1613 | } |
1614 | if (tmp->is_pcie) /* this is a PCIE-to-PCI bridge */ | 1614 | if (pci_is_pcie(tmp)) /* this is a PCIE-to-PCI bridge */ |
1615 | return domain_context_mapping_one(domain, | 1615 | return domain_context_mapping_one(domain, |
1616 | pci_domain_nr(tmp->subordinate), | 1616 | pci_domain_nr(tmp->subordinate), |
1617 | tmp->subordinate->number, 0, | 1617 | tmp->subordinate->number, 0, |
@@ -1651,7 +1651,7 @@ static int domain_context_mapped(struct pci_dev *pdev) | |||
1651 | return ret; | 1651 | return ret; |
1652 | parent = parent->bus->self; | 1652 | parent = parent->bus->self; |
1653 | } | 1653 | } |
1654 | if (tmp->is_pcie) | 1654 | if (pci_is_pcie(tmp)) |
1655 | return device_context_mapped(iommu, tmp->subordinate->number, | 1655 | return device_context_mapped(iommu, tmp->subordinate->number, |
1656 | 0); | 1656 | 0); |
1657 | else | 1657 | else |
@@ -1821,7 +1821,7 @@ static struct dmar_domain *get_domain_for_dev(struct pci_dev *pdev, int gaw) | |||
1821 | 1821 | ||
1822 | dev_tmp = pci_find_upstream_pcie_bridge(pdev); | 1822 | dev_tmp = pci_find_upstream_pcie_bridge(pdev); |
1823 | if (dev_tmp) { | 1823 | if (dev_tmp) { |
1824 | if (dev_tmp->is_pcie) { | 1824 | if (pci_is_pcie(dev_tmp)) { |
1825 | bus = dev_tmp->subordinate->number; | 1825 | bus = dev_tmp->subordinate->number; |
1826 | devfn = 0; | 1826 | devfn = 0; |
1827 | } else { | 1827 | } else { |
@@ -2182,7 +2182,7 @@ static int iommu_should_identity_map(struct pci_dev *pdev, int startup) | |||
2182 | * the 1:1 domain, just in _case_ one of their siblings turns out | 2182 | * the 1:1 domain, just in _case_ one of their siblings turns out |
2183 | * not to be able to map all of memory. | 2183 | * not to be able to map all of memory. |
2184 | */ | 2184 | */ |
2185 | if (!pdev->is_pcie) { | 2185 | if (!pci_is_pcie(pdev)) { |
2186 | if (!pci_is_root_bus(pdev->bus)) | 2186 | if (!pci_is_root_bus(pdev->bus)) |
2187 | return 0; | 2187 | return 0; |
2188 | if (pdev->class >> 8 == PCI_CLASS_BRIDGE_PCI) | 2188 | if (pdev->class >> 8 == PCI_CLASS_BRIDGE_PCI) |
@@ -3280,7 +3280,7 @@ static void iommu_detach_dependent_devices(struct intel_iommu *iommu, | |||
3280 | parent->devfn); | 3280 | parent->devfn); |
3281 | parent = parent->bus->self; | 3281 | parent = parent->bus->self; |
3282 | } | 3282 | } |
3283 | if (tmp->is_pcie) /* this is a PCIE-to-PCI bridge */ | 3283 | if (pci_is_pcie(tmp)) /* this is a PCIE-to-PCI bridge */ |
3284 | iommu_detach_dev(iommu, | 3284 | iommu_detach_dev(iommu, |
3285 | tmp->subordinate->number, 0); | 3285 | tmp->subordinate->number, 0); |
3286 | else /* this is a legacy PCI bridge */ | 3286 | else /* this is a legacy PCI bridge */ |
diff --git a/drivers/pci/intr_remapping.c b/drivers/pci/intr_remapping.c index 0ed78a764ded..3e6d8d79a09d 100644 --- a/drivers/pci/intr_remapping.c +++ b/drivers/pci/intr_remapping.c | |||
@@ -478,7 +478,7 @@ int set_msi_sid(struct irte *irte, struct pci_dev *dev) | |||
478 | return -1; | 478 | return -1; |
479 | 479 | ||
480 | /* PCIe device or Root Complex integrated PCI device */ | 480 | /* PCIe device or Root Complex integrated PCI device */ |
481 | if (dev->is_pcie || !dev->bus->parent) { | 481 | if (pci_is_pcie(dev) || !dev->bus->parent) { |
482 | set_irte_sid(irte, SVT_VERIFY_SID_SQ, SQ_ALL_16, | 482 | set_irte_sid(irte, SVT_VERIFY_SID_SQ, SQ_ALL_16, |
483 | (dev->bus->number << 8) | dev->devfn); | 483 | (dev->bus->number << 8) | dev->devfn); |
484 | return 0; | 484 | return 0; |
@@ -486,7 +486,7 @@ int set_msi_sid(struct irte *irte, struct pci_dev *dev) | |||
486 | 486 | ||
487 | bridge = pci_find_upstream_pcie_bridge(dev); | 487 | bridge = pci_find_upstream_pcie_bridge(dev); |
488 | if (bridge) { | 488 | if (bridge) { |
489 | if (bridge->is_pcie) /* this is a PCIE-to-PCI/PCIX bridge */ | 489 | if (pci_is_pcie(bridge))/* this is a PCIE-to-PCI/PCIX bridge */ |
490 | set_irte_sid(irte, SVT_VERIFY_BUS, SQ_ALL_16, | 490 | set_irte_sid(irte, SVT_VERIFY_BUS, SQ_ALL_16, |
491 | (bridge->bus->number << 8) | dev->bus->number); | 491 | (bridge->bus->number << 8) | dev->bus->number); |
492 | else /* this is a legacy PCI bridge */ | 492 | else /* this is a legacy PCI bridge */ |
diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c index e03fe98f0619..b2a448e19fe6 100644 --- a/drivers/pci/iov.c +++ b/drivers/pci/iov.c | |||
@@ -555,7 +555,7 @@ int pci_iov_init(struct pci_dev *dev) | |||
555 | { | 555 | { |
556 | int pos; | 556 | int pos; |
557 | 557 | ||
558 | if (!dev->is_pcie) | 558 | if (!pci_is_pcie(dev)) |
559 | return -ENODEV; | 559 | return -ENODEV; |
560 | 560 | ||
561 | pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_SRIOV); | 561 | pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_SRIOV); |
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c index 33317df47699..cc617ddd33d0 100644 --- a/drivers/pci/pci-acpi.c +++ b/drivers/pci/pci-acpi.c | |||
@@ -116,7 +116,7 @@ static void acpi_pci_propagate_wakeup_enable(struct pci_bus *bus, bool enable) | |||
116 | int ret; | 116 | int ret; |
117 | 117 | ||
118 | ret = acpi_pm_device_sleep_wake(&bridge->dev, enable); | 118 | ret = acpi_pm_device_sleep_wake(&bridge->dev, enable); |
119 | if (!ret || bridge->is_pcie) | 119 | if (!ret || pci_is_pcie(bridge)) |
120 | return; | 120 | return; |
121 | bus = bus->parent; | 121 | bus = bus->parent; |
122 | } | 122 | } |
@@ -131,7 +131,7 @@ static int acpi_pci_sleep_wake(struct pci_dev *dev, bool enable) | |||
131 | if (acpi_pci_can_wakeup(dev)) | 131 | if (acpi_pci_can_wakeup(dev)) |
132 | return acpi_pm_device_sleep_wake(&dev->dev, enable); | 132 | return acpi_pm_device_sleep_wake(&dev->dev, enable); |
133 | 133 | ||
134 | if (!dev->is_pcie) | 134 | if (!pci_is_pcie(dev)) |
135 | acpi_pci_propagate_wakeup_enable(dev->bus, enable); | 135 | acpi_pci_propagate_wakeup_enable(dev->bus, enable); |
136 | 136 | ||
137 | return 0; | 137 | return 0; |
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index bbc82f08d1c1..453d6ba6811e 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -1524,7 +1524,7 @@ void pci_enable_ari(struct pci_dev *dev) | |||
1524 | u16 ctrl; | 1524 | u16 ctrl; |
1525 | struct pci_dev *bridge; | 1525 | struct pci_dev *bridge; |
1526 | 1526 | ||
1527 | if (!dev->is_pcie || dev->devfn) | 1527 | if (!pci_is_pcie(dev) || dev->devfn) |
1528 | return; | 1528 | return; |
1529 | 1529 | ||
1530 | pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ARI); | 1530 | pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ARI); |
@@ -1532,7 +1532,7 @@ void pci_enable_ari(struct pci_dev *dev) | |||
1532 | return; | 1532 | return; |
1533 | 1533 | ||
1534 | bridge = dev->bus->self; | 1534 | bridge = dev->bus->self; |
1535 | if (!bridge || !bridge->is_pcie) | 1535 | if (!bridge || !pci_is_pcie(bridge)) |
1536 | return; | 1536 | return; |
1537 | 1537 | ||
1538 | pos = pci_pcie_cap(bridge); | 1538 | pos = pci_pcie_cap(bridge); |
@@ -1560,7 +1560,7 @@ void pci_enable_acs(struct pci_dev *dev) | |||
1560 | u16 cap; | 1560 | u16 cap; |
1561 | u16 ctrl; | 1561 | u16 ctrl; |
1562 | 1562 | ||
1563 | if (!dev->is_pcie) | 1563 | if (!pci_is_pcie(dev)) |
1564 | return; | 1564 | return; |
1565 | 1565 | ||
1566 | pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ACS); | 1566 | pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ACS); |
diff --git a/drivers/pci/search.c b/drivers/pci/search.c index 75826482c71a..6dae87143258 100644 --- a/drivers/pci/search.c +++ b/drivers/pci/search.c | |||
@@ -26,14 +26,14 @@ pci_find_upstream_pcie_bridge(struct pci_dev *pdev) | |||
26 | { | 26 | { |
27 | struct pci_dev *tmp = NULL; | 27 | struct pci_dev *tmp = NULL; |
28 | 28 | ||
29 | if (pdev->is_pcie) | 29 | if (pci_is_pcie(pdev)) |
30 | return NULL; | 30 | return NULL; |
31 | while (1) { | 31 | while (1) { |
32 | if (pci_is_root_bus(pdev->bus)) | 32 | if (pci_is_root_bus(pdev->bus)) |
33 | break; | 33 | break; |
34 | pdev = pdev->bus->self; | 34 | pdev = pdev->bus->self; |
35 | /* a p2p bridge */ | 35 | /* a p2p bridge */ |
36 | if (!pdev->is_pcie) { | 36 | if (!pci_is_pcie(pdev)) { |
37 | tmp = pdev; | 37 | tmp = pdev; |
38 | continue; | 38 | continue; |
39 | } | 39 | } |