mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
PCI: Add support for PCIe-to-PCI bridge DMA alias quirks
Several PCIe-to-PCI bridges fail to provide a PCIe capability, causing us to handle them as conventional PCI devices when they really use the requester ID of the secondary bus. We need to differentiate these from PCIe-to-PCI bridges that actually use the conventional PCI ID when a PCIe capability is not present, such as those found on the root complex of may Intel chipsets. Add a dev_flag bit to identify devices to be handled as standard PCIe-to-PCI bridges. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
parent
cc346a4714
commit
c8fe16e3f9
2 changed files with 10 additions and 2 deletions
|
@ -88,8 +88,14 @@ int pci_for_each_dma_alias(struct pci_dev *pdev,
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ret = fn(tmp, PCI_DEVID(tmp->bus->number, tmp->devfn),
|
if (tmp->dev_flags & PCI_DEV_FLAG_PCIE_BRIDGE_ALIAS)
|
||||||
data);
|
ret = fn(tmp,
|
||||||
|
PCI_DEVID(tmp->subordinate->number,
|
||||||
|
PCI_DEVFN(0, 0)), data);
|
||||||
|
else
|
||||||
|
ret = fn(tmp,
|
||||||
|
PCI_DEVID(tmp->bus->number,
|
||||||
|
tmp->devfn), data);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -173,6 +173,8 @@ enum pci_dev_flags {
|
||||||
PCI_DEV_FLAGS_ACS_ENABLED_QUIRK = (__force pci_dev_flags_t) (1 << 3),
|
PCI_DEV_FLAGS_ACS_ENABLED_QUIRK = (__force pci_dev_flags_t) (1 << 3),
|
||||||
/* Flag to indicate the device uses dma_alias_devfn */
|
/* Flag to indicate the device uses dma_alias_devfn */
|
||||||
PCI_DEV_FLAGS_DMA_ALIAS_DEVFN = (__force pci_dev_flags_t) (1 << 4),
|
PCI_DEV_FLAGS_DMA_ALIAS_DEVFN = (__force pci_dev_flags_t) (1 << 4),
|
||||||
|
/* Use a PCIe-to-PCI bridge alias even if !pci_is_pcie */
|
||||||
|
PCI_DEV_FLAG_PCIE_BRIDGE_ALIAS = (__force pci_dev_flags_t) (1 << 5),
|
||||||
};
|
};
|
||||||
|
|
||||||
enum pci_irq_reroute_variant {
|
enum pci_irq_reroute_variant {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue