diff options
author | Yijing Wang <wangyijing@huawei.com> | 2012-07-24 05:20:03 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2012-08-23 11:40:57 -0400 |
commit | 62f87c0e31d646d5501edf4f7feb07d0ad689d80 (patch) | |
tree | f2aa208c10f6cf8b91634f91efda44efc6f4c25f /drivers/iommu | |
parent | 786e22885d9959fda0473ace5a61cb11620fba9b (diff) |
PCI: Introduce pci_pcie_type(dev) to replace pci_dev->pcie_type
Introduce an inline function pci_pcie_type(dev) to extract PCIe
device type from pci_dev->pcie_flags_reg field, and prepare for
removing pci_dev->pcie_type.
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/intel-iommu.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 7469b5346643..8b5075d6dd5a 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c | |||
@@ -2350,7 +2350,7 @@ static int iommu_should_identity_map(struct pci_dev *pdev, int startup) | |||
2350 | return 0; | 2350 | return 0; |
2351 | if (pdev->class >> 8 == PCI_CLASS_BRIDGE_PCI) | 2351 | if (pdev->class >> 8 == PCI_CLASS_BRIDGE_PCI) |
2352 | return 0; | 2352 | return 0; |
2353 | } else if (pdev->pcie_type == PCI_EXP_TYPE_PCI_BRIDGE) | 2353 | } else if (pci_pcie_type(pdev) == PCI_EXP_TYPE_PCI_BRIDGE) |
2354 | return 0; | 2354 | return 0; |
2355 | 2355 | ||
2356 | /* | 2356 | /* |
@@ -3545,10 +3545,10 @@ found: | |||
3545 | struct pci_dev *bridge = bus->self; | 3545 | struct pci_dev *bridge = bus->self; |
3546 | 3546 | ||
3547 | if (!bridge || !pci_is_pcie(bridge) || | 3547 | if (!bridge || !pci_is_pcie(bridge) || |
3548 | bridge->pcie_type == PCI_EXP_TYPE_PCI_BRIDGE) | 3548 | pci_pcie_type(bridge) == PCI_EXP_TYPE_PCI_BRIDGE) |
3549 | return 0; | 3549 | return 0; |
3550 | 3550 | ||
3551 | if (bridge->pcie_type == PCI_EXP_TYPE_ROOT_PORT) { | 3551 | if (pci_pcie_type(bridge) == PCI_EXP_TYPE_ROOT_PORT) { |
3552 | for (i = 0; i < atsru->devices_cnt; i++) | 3552 | for (i = 0; i < atsru->devices_cnt; i++) |
3553 | if (atsru->devices[i] == bridge) | 3553 | if (atsru->devices[i] == bridge) |
3554 | return 1; | 3554 | return 1; |