aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-10-28 17:20:44 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-10-28 17:20:44 -0400
commit0e59e7e7feb5a12938fbf9135147eeda3238c6c4 (patch)
treedbe994369ca9cad6893f0fd710f75791bc84b816 /include
parent46b51ea2099fa2082342e52b8284aa828429b80b (diff)
parenta513a99a7cebfb452839cc09c9c0586f72d96414 (diff)
Merge branch 'next-rebase' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci
* 'next-rebase' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci: PCI: Clean-up MPS debug output pci: Clamp pcie_set_readrq() when using "performance" settings PCI: enable MPS "performance" setting to properly handle bridge MPS PCI: Workaround for Intel MPS errata PCI: Add support for PASID capability PCI: Add implementation for PRI capability PCI: Export ATS functions to modules PCI: Move ATS implementation into own file PCI / PM: Remove unnecessary error variable from acpi_dev_run_wake() PCI hotplug: acpiphp: Prevent deadlock on PCI-to-PCI bridge remove PCI / PM: Extend PME polling to all PCI devices PCI quirk: mmc: Always check for lower base frequency quirk for Ricoh 1180:e823 PCI: Make pci_setup_bridge() non-static for use by arch code x86: constify PCI raw ops structures PCI: Add quirk for known incorrect MPSS PCI: Add Solarflare vendor ID and SFC4000 device IDs
Diffstat (limited to 'include')
-rw-r--r--include/acpi/acpiosxf.h2
-rw-r--r--include/linux/pci-ats.h75
-rw-r--r--include/linux/pci.h2
-rw-r--r--include/linux/pci_ids.h5
-rw-r--r--include/linux/pci_regs.h20
5 files changed, 104 insertions, 0 deletions
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h
index 4543b6f75867..83062ed0ef2f 100644
--- a/include/acpi/acpiosxf.h
+++ b/include/acpi/acpiosxf.h
@@ -189,6 +189,8 @@ void acpi_os_fixed_event_count(u32 fixed_event_number);
189/* 189/*
190 * Threads and Scheduling 190 * Threads and Scheduling
191 */ 191 */
192extern struct workqueue_struct *kacpi_hotplug_wq;
193
192acpi_thread_id acpi_os_get_thread_id(void); 194acpi_thread_id acpi_os_get_thread_id(void);
193 195
194acpi_status 196acpi_status
diff --git a/include/linux/pci-ats.h b/include/linux/pci-ats.h
index 655824fa4c76..e3d0b3890249 100644
--- a/include/linux/pci-ats.h
+++ b/include/linux/pci-ats.h
@@ -1,6 +1,8 @@
1#ifndef LINUX_PCI_ATS_H 1#ifndef LINUX_PCI_ATS_H
2#define LINUX_PCI_ATS_H 2#define LINUX_PCI_ATS_H
3 3
4#include <linux/pci.h>
5
4/* Address Translation Service */ 6/* Address Translation Service */
5struct pci_ats { 7struct pci_ats {
6 int pos; /* capability position */ 8 int pos; /* capability position */
@@ -15,6 +17,7 @@ struct pci_ats {
15extern int pci_enable_ats(struct pci_dev *dev, int ps); 17extern int pci_enable_ats(struct pci_dev *dev, int ps);
16extern void pci_disable_ats(struct pci_dev *dev); 18extern void pci_disable_ats(struct pci_dev *dev);
17extern int pci_ats_queue_depth(struct pci_dev *dev); 19extern int pci_ats_queue_depth(struct pci_dev *dev);
20
18/** 21/**
19 * pci_ats_enabled - query the ATS status 22 * pci_ats_enabled - query the ATS status
20 * @dev: the PCI device 23 * @dev: the PCI device
@@ -49,4 +52,76 @@ static inline int pci_ats_enabled(struct pci_dev *dev)
49 52
50#endif /* CONFIG_PCI_IOV */ 53#endif /* CONFIG_PCI_IOV */
51 54
55#ifdef CONFIG_PCI_PRI
56
57extern int pci_enable_pri(struct pci_dev *pdev, u32 reqs);
58extern void pci_disable_pri(struct pci_dev *pdev);
59extern bool pci_pri_enabled(struct pci_dev *pdev);
60extern int pci_reset_pri(struct pci_dev *pdev);
61extern bool pci_pri_stopped(struct pci_dev *pdev);
62extern int pci_pri_status(struct pci_dev *pdev);
63
64#else /* CONFIG_PCI_PRI */
65
66static inline int pci_enable_pri(struct pci_dev *pdev, u32 reqs)
67{
68 return -ENODEV;
69}
70
71static inline void pci_disable_pri(struct pci_dev *pdev)
72{
73}
74
75static inline bool pci_pri_enabled(struct pci_dev *pdev)
76{
77 return false;
78}
79
80static inline int pci_reset_pri(struct pci_dev *pdev)
81{
82 return -ENODEV;
83}
84
85static inline bool pci_pri_stopped(struct pci_dev *pdev)
86{
87 return true;
88}
89
90static inline int pci_pri_status(struct pci_dev *pdev)
91{
92 return -ENODEV;
93}
94#endif /* CONFIG_PCI_PRI */
95
96#ifdef CONFIG_PCI_PASID
97
98extern int pci_enable_pasid(struct pci_dev *pdev, int features);
99extern void pci_disable_pasid(struct pci_dev *pdev);
100extern int pci_pasid_features(struct pci_dev *pdev);
101extern int pci_max_pasids(struct pci_dev *pdev);
102
103#else /* CONFIG_PCI_PASID */
104
105static inline int pci_enable_pasid(struct pci_dev *pdev, int features)
106{
107 return -EINVAL;
108}
109
110static inline void pci_disable_pasid(struct pci_dev *pdev)
111{
112}
113
114static inline int pci_pasid_features(struct pci_dev *pdev)
115{
116 return -EINVAL;
117}
118
119static inline int pci_max_pasids(struct pci_dev *pdev)
120{
121 return -EINVAL;
122}
123
124#endif /* CONFIG_PCI_PASID */
125
126
52#endif /* LINUX_PCI_ATS_H*/ 127#endif /* LINUX_PCI_ATS_H*/
diff --git a/include/linux/pci.h b/include/linux/pci.h
index f1b1ca1a09e1..337df0d5d5f7 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -275,6 +275,7 @@ struct pci_dev {
275 unsigned int pme_support:5; /* Bitmask of states from which PME# 275 unsigned int pme_support:5; /* Bitmask of states from which PME#
276 can be generated */ 276 can be generated */
277 unsigned int pme_interrupt:1; 277 unsigned int pme_interrupt:1;
278 unsigned int pme_poll:1; /* Poll device's PME status bit */
278 unsigned int d1_support:1; /* Low power state D1 is supported */ 279 unsigned int d1_support:1; /* Low power state D1 is supported */
279 unsigned int d2_support:1; /* Low power state D2 is supported */ 280 unsigned int d2_support:1; /* Low power state D2 is supported */
280 unsigned int no_d1d2:1; /* Only allow D0 and D3 */ 281 unsigned int no_d1d2:1; /* Only allow D0 and D3 */
@@ -957,6 +958,7 @@ void pci_walk_bus(struct pci_bus *top, int (*cb)(struct pci_dev *, void *),
957int pci_cfg_space_size_ext(struct pci_dev *dev); 958int pci_cfg_space_size_ext(struct pci_dev *dev);
958int pci_cfg_space_size(struct pci_dev *dev); 959int pci_cfg_space_size(struct pci_dev *dev);
959unsigned char pci_bus_max_busnr(struct pci_bus *bus); 960unsigned char pci_bus_max_busnr(struct pci_bus *bus);
961void pci_setup_bridge(struct pci_bus *bus);
960 962
961#define PCI_VGA_STATE_CHANGE_BRIDGE (1 << 0) 963#define PCI_VGA_STATE_CHANGE_BRIDGE (1 << 0)
962#define PCI_VGA_STATE_CHANGE_DECODES (1 << 1) 964#define PCI_VGA_STATE_CHANGE_DECODES (1 << 1)
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index ae96bbe54518..1679ff6931f9 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2302,6 +2302,11 @@
2302#define PCI_DEVICE_ID_RENESAS_SH7785 0x0007 2302#define PCI_DEVICE_ID_RENESAS_SH7785 0x0007
2303#define PCI_DEVICE_ID_RENESAS_SH7786 0x0010 2303#define PCI_DEVICE_ID_RENESAS_SH7786 0x0010
2304 2304
2305#define PCI_VENDOR_ID_SOLARFLARE 0x1924
2306#define PCI_DEVICE_ID_SOLARFLARE_SFC4000A_0 0x0703
2307#define PCI_DEVICE_ID_SOLARFLARE_SFC4000A_1 0x6703
2308#define PCI_DEVICE_ID_SOLARFLARE_SFC4000B 0x0710
2309
2305#define PCI_VENDOR_ID_TDI 0x192E 2310#define PCI_VENDOR_ID_TDI 0x192E
2306#define PCI_DEVICE_ID_TDI_EHCI 0x0101 2311#define PCI_DEVICE_ID_TDI_EHCI 0x0101
2307 2312
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h
index e8840964aca1..b5d9657f3100 100644
--- a/include/linux/pci_regs.h
+++ b/include/linux/pci_regs.h
@@ -663,6 +663,26 @@
663#define PCI_ATS_CTRL_STU(x) ((x) & 0x1f) /* Smallest Translation Unit */ 663#define PCI_ATS_CTRL_STU(x) ((x) & 0x1f) /* Smallest Translation Unit */
664#define PCI_ATS_MIN_STU 12 /* shift of minimum STU block */ 664#define PCI_ATS_MIN_STU 12 /* shift of minimum STU block */
665 665
666/* Page Request Interface */
667#define PCI_PRI_CAP 0x13 /* PRI capability ID */
668#define PCI_PRI_CONTROL_OFF 0x04 /* Offset of control register */
669#define PCI_PRI_STATUS_OFF 0x06 /* Offset of status register */
670#define PCI_PRI_ENABLE 0x0001 /* Enable mask */
671#define PCI_PRI_RESET 0x0002 /* Reset bit mask */
672#define PCI_PRI_STATUS_RF 0x0001 /* Request Failure */
673#define PCI_PRI_STATUS_UPRGI 0x0002 /* Unexpected PRG index */
674#define PCI_PRI_STATUS_STOPPED 0x0100 /* PRI Stopped */
675#define PCI_PRI_MAX_REQ_OFF 0x08 /* Cap offset for max reqs supported */
676#define PCI_PRI_ALLOC_REQ_OFF 0x0c /* Cap offset for max reqs allowed */
677
678/* PASID capability */
679#define PCI_PASID_CAP 0x1b /* PASID capability ID */
680#define PCI_PASID_CAP_OFF 0x04 /* PASID feature register */
681#define PCI_PASID_CONTROL_OFF 0x06 /* PASID control register */
682#define PCI_PASID_ENABLE 0x01 /* Enable/Supported bit */
683#define PCI_PASID_EXEC 0x02 /* Exec permissions Enable/Supported */
684#define PCI_PASID_PRIV 0x04 /* Priviledge Mode Enable/Support */
685
666/* Single Root I/O Virtualization */ 686/* Single Root I/O Virtualization */
667#define PCI_SRIOV_CAP 0x04 /* SR-IOV Capabilities */ 687#define PCI_SRIOV_CAP 0x04 /* SR-IOV Capabilities */
668#define PCI_SRIOV_CAP_VFM 0x01 /* VF Migration Capable */ 688#define PCI_SRIOV_CAP_VFM 0x01 /* VF Migration Capable */