diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-01 12:47:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-01 12:47:12 -0400 |
commit | e76e5b2c663ac74ae6a542ac20795c625e36a5cd (patch) | |
tree | 2e7271be1f3a26832f4b121839fc4044fbbf27a6 /drivers/pci/pci.h | |
parent | 32527bc0e4b4fa7711ad1c923cf64ae72a7ffd9d (diff) | |
parent | eeafda70bf2807544e96fa4e52b2433cd470ff46 (diff) |
Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (88 commits)
PCI: fix HT MSI mapping fix
PCI: don't enable too much HT MSI mapping
x86/PCI: make pci=lastbus=255 work when acpi is on
PCI: save and restore PCIe 2.0 registers
PCI: update fakephp for bus_id removal
PCI: fix kernel oops on bridge removal
PCI: fix conflict between SR-IOV and config space sizing
powerpc/PCI: include pci.h in powerpc MSI implementation
PCI Hotplug: schedule fakephp for feature removal
PCI Hotplug: rename legacy_fakephp to fakephp
PCI Hotplug: restore fakephp interface with complete reimplementation
PCI: Introduce /sys/bus/pci/devices/.../rescan
PCI: Introduce /sys/bus/pci/devices/.../remove
PCI: Introduce /sys/bus/pci/rescan
PCI: Introduce pci_rescan_bus()
PCI: do not enable bridges more than once
PCI: do not initialize bridges more than once
PCI: always scan child buses
PCI: pci_scan_slot() returns newly found devices
PCI: don't scan existing devices
...
Fix trivial append-only conflict in Documentation/feature-removal-schedule.txt
Diffstat (limited to 'drivers/pci/pci.h')
-rw-r--r-- | drivers/pci/pci.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 149fff65891f..d03f6b99f292 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef DRIVERS_PCI_H | 1 | #ifndef DRIVERS_PCI_H |
2 | #define DRIVERS_PCI_H | 2 | #define DRIVERS_PCI_H |
3 | 3 | ||
4 | #include <linux/workqueue.h> | ||
5 | |||
4 | #define PCI_CFG_SPACE_SIZE 256 | 6 | #define PCI_CFG_SPACE_SIZE 256 |
5 | #define PCI_CFG_SPACE_EXP_SIZE 4096 | 7 | #define PCI_CFG_SPACE_EXP_SIZE 4096 |
6 | 8 | ||
@@ -135,6 +137,12 @@ extern int pcie_mch_quirk; | |||
135 | extern struct device_attribute pci_dev_attrs[]; | 137 | extern struct device_attribute pci_dev_attrs[]; |
136 | extern struct device_attribute dev_attr_cpuaffinity; | 138 | extern struct device_attribute dev_attr_cpuaffinity; |
137 | extern struct device_attribute dev_attr_cpulistaffinity; | 139 | extern struct device_attribute dev_attr_cpulistaffinity; |
140 | #ifdef CONFIG_HOTPLUG | ||
141 | extern struct bus_attribute pci_bus_attrs[]; | ||
142 | #else | ||
143 | #define pci_bus_attrs NULL | ||
144 | #endif | ||
145 | |||
138 | 146 | ||
139 | /** | 147 | /** |
140 | * pci_match_one_device - Tell if a PCI device structure has a matching | 148 | * pci_match_one_device - Tell if a PCI device structure has a matching |
@@ -177,6 +185,7 @@ enum pci_bar_type { | |||
177 | pci_bar_mem64, /* A 64-bit memory BAR */ | 185 | pci_bar_mem64, /* A 64-bit memory BAR */ |
178 | }; | 186 | }; |
179 | 187 | ||
188 | extern int pci_setup_device(struct pci_dev *dev); | ||
180 | extern int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type, | 189 | extern int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type, |
181 | struct resource *res, unsigned int reg); | 190 | struct resource *res, unsigned int reg); |
182 | extern int pci_resource_bar(struct pci_dev *dev, int resno, | 191 | extern int pci_resource_bar(struct pci_dev *dev, int resno, |
@@ -194,4 +203,60 @@ static inline int pci_ari_enabled(struct pci_bus *bus) | |||
194 | return bus->self && bus->self->ari_enabled; | 203 | return bus->self && bus->self->ari_enabled; |
195 | } | 204 | } |
196 | 205 | ||
206 | #ifdef CONFIG_PCI_QUIRKS | ||
207 | extern int pci_is_reassigndev(struct pci_dev *dev); | ||
208 | resource_size_t pci_specified_resource_alignment(struct pci_dev *dev); | ||
209 | extern void pci_disable_bridge_window(struct pci_dev *dev); | ||
210 | #endif | ||
211 | |||
212 | /* Single Root I/O Virtualization */ | ||
213 | struct pci_sriov { | ||
214 | int pos; /* capability position */ | ||
215 | int nres; /* number of resources */ | ||
216 | u32 cap; /* SR-IOV Capabilities */ | ||
217 | u16 ctrl; /* SR-IOV Control */ | ||
218 | u16 total; /* total VFs associated with the PF */ | ||
219 | u16 initial; /* initial VFs associated with the PF */ | ||
220 | u16 nr_virtfn; /* number of VFs available */ | ||
221 | u16 offset; /* first VF Routing ID offset */ | ||
222 | u16 stride; /* following VF stride */ | ||
223 | u32 pgsz; /* page size for BAR alignment */ | ||
224 | u8 link; /* Function Dependency Link */ | ||
225 | struct pci_dev *dev; /* lowest numbered PF */ | ||
226 | struct pci_dev *self; /* this PF */ | ||
227 | struct mutex lock; /* lock for VF bus */ | ||
228 | struct work_struct mtask; /* VF Migration task */ | ||
229 | u8 __iomem *mstate; /* VF Migration State Array */ | ||
230 | }; | ||
231 | |||
232 | #ifdef CONFIG_PCI_IOV | ||
233 | extern int pci_iov_init(struct pci_dev *dev); | ||
234 | extern void pci_iov_release(struct pci_dev *dev); | ||
235 | extern int pci_iov_resource_bar(struct pci_dev *dev, int resno, | ||
236 | enum pci_bar_type *type); | ||
237 | extern void pci_restore_iov_state(struct pci_dev *dev); | ||
238 | extern int pci_iov_bus_range(struct pci_bus *bus); | ||
239 | #else | ||
240 | static inline int pci_iov_init(struct pci_dev *dev) | ||
241 | { | ||
242 | return -ENODEV; | ||
243 | } | ||
244 | static inline void pci_iov_release(struct pci_dev *dev) | ||
245 | |||
246 | { | ||
247 | } | ||
248 | static inline int pci_iov_resource_bar(struct pci_dev *dev, int resno, | ||
249 | enum pci_bar_type *type) | ||
250 | { | ||
251 | return 0; | ||
252 | } | ||
253 | static inline void pci_restore_iov_state(struct pci_dev *dev) | ||
254 | { | ||
255 | } | ||
256 | static inline int pci_iov_bus_range(struct pci_bus *bus) | ||
257 | { | ||
258 | return 0; | ||
259 | } | ||
260 | #endif /* CONFIG_PCI_IOV */ | ||
261 | |||
197 | #endif /* DRIVERS_PCI_H */ | 262 | #endif /* DRIVERS_PCI_H */ |