aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2014-06-02 18:18:48 -0400
committerBjorn Helgaas <bhelgaas@google.com>2014-06-02 18:18:48 -0400
commit0eeb4f2af5f71f64ba6362df33ddc1f218075c52 (patch)
treea5ba0181900968cda030364e18235e93f975b093 /include/linux
parent617b4157a5c82ab3e9509aa388bfd3d47e0e623a (diff)
parentebdb51eb7806df56221d4536a6a9702751d6df85 (diff)
Merge branch 'pci/iommu' into next
* pci/iommu: PCI: Add bridge DMA alias quirk for ASMedia and Tundra bridges PCI: Add support for PCIe-to-PCI bridge DMA alias quirks PCI: Add function 1 DMA alias quirk for Marvell devices PCI: Add function 0 DMA alias quirk for Ricoh devices PCI: Add support for DMA alias quirks PCI: Convert pci_dev_flags definitions to bit shifts PCI: Add DMA alias iterator
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/pci.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 71d9673c1b2c..466bcd111d85 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -164,13 +164,17 @@ enum pci_dev_flags {
164 /* INTX_DISABLE in PCI_COMMAND register disables MSI 164 /* INTX_DISABLE in PCI_COMMAND register disables MSI
165 * generation too. 165 * generation too.
166 */ 166 */
167 PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG = (__force pci_dev_flags_t) 1, 167 PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG = (__force pci_dev_flags_t) (1 << 0),
168 /* Device configuration is irrevocably lost if disabled into D3 */ 168 /* Device configuration is irrevocably lost if disabled into D3 */
169 PCI_DEV_FLAGS_NO_D3 = (__force pci_dev_flags_t) 2, 169 PCI_DEV_FLAGS_NO_D3 = (__force pci_dev_flags_t) (1 << 1),
170 /* Provide indication device is assigned by a Virtual Machine Manager */ 170 /* Provide indication device is assigned by a Virtual Machine Manager */
171 PCI_DEV_FLAGS_ASSIGNED = (__force pci_dev_flags_t) 4, 171 PCI_DEV_FLAGS_ASSIGNED = (__force pci_dev_flags_t) (1 << 2),
172 /* Flag for quirk use to store if quirk-specific ACS is enabled */ 172 /* Flag for quirk use to store if quirk-specific ACS is enabled */
173 PCI_DEV_FLAGS_ACS_ENABLED_QUIRK = (__force pci_dev_flags_t) 8, 173 PCI_DEV_FLAGS_ACS_ENABLED_QUIRK = (__force pci_dev_flags_t) (1 << 3),
174 /* Flag to indicate the device uses dma_alias_devfn */
175 PCI_DEV_FLAGS_DMA_ALIAS_DEVFN = (__force pci_dev_flags_t) (1 << 4),
176 /* Use a PCIe-to-PCI bridge alias even if !pci_is_pcie */
177 PCI_DEV_FLAG_PCIE_BRIDGE_ALIAS = (__force pci_dev_flags_t) (1 << 5),
174}; 178};
175 179
176enum pci_irq_reroute_variant { 180enum pci_irq_reroute_variant {
@@ -268,6 +272,7 @@ struct pci_dev {
268 u8 rom_base_reg; /* which config register controls the ROM */ 272 u8 rom_base_reg; /* which config register controls the ROM */
269 u8 pin; /* which interrupt pin this device uses */ 273 u8 pin; /* which interrupt pin this device uses */
270 u16 pcie_flags_reg; /* cached PCIe Capabilities Register */ 274 u16 pcie_flags_reg; /* cached PCIe Capabilities Register */
275 u8 dma_alias_devfn;/* devfn of DMA alias, if any */
271 276
272 struct pci_driver *driver; /* which driver has allocated this device */ 277 struct pci_driver *driver; /* which driver has allocated this device */
273 u64 dma_mask; /* Mask of the bits of bus address this 278 u64 dma_mask; /* Mask of the bits of bus address this
@@ -1809,6 +1814,10 @@ static inline struct eeh_dev *pci_dev_to_eeh_dev(struct pci_dev *pdev)
1809} 1814}
1810#endif 1815#endif
1811 1816
1817int pci_for_each_dma_alias(struct pci_dev *pdev,
1818 int (*fn)(struct pci_dev *pdev,
1819 u16 alias, void *data), void *data);
1820
1812/** 1821/**
1813 * pci_find_upstream_pcie_bridge - find upstream PCIe-to-PCI bridge of a device 1822 * pci_find_upstream_pcie_bridge - find upstream PCIe-to-PCI bridge of a device
1814 * @pdev: the PCI device 1823 * @pdev: the PCI device