aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pci.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r--include/linux/pci.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index a788fa12ff31..f26fda76b87f 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -288,6 +288,7 @@ struct pci_dev {
288 */ 288 */
289 unsigned int irq; 289 unsigned int irq;
290 struct resource resource[DEVICE_COUNT_RESOURCE]; /* I/O and memory regions + expansion ROMs */ 290 struct resource resource[DEVICE_COUNT_RESOURCE]; /* I/O and memory regions + expansion ROMs */
291 resource_size_t fw_addr[DEVICE_COUNT_RESOURCE]; /* FW-assigned addr */
291 292
292 /* These fields are used by common fixups */ 293 /* These fields are used by common fixups */
293 unsigned int transparent:1; /* Transparent PCI bridge */ 294 unsigned int transparent:1; /* Transparent PCI bridge */
@@ -311,7 +312,8 @@ struct pci_dev {
311 unsigned int is_virtfn:1; 312 unsigned int is_virtfn:1;
312 unsigned int reset_fn:1; 313 unsigned int reset_fn:1;
313 unsigned int is_hotplug_bridge:1; 314 unsigned int is_hotplug_bridge:1;
314 unsigned int aer_firmware_first:1; 315 unsigned int __aer_firmware_first_valid:1;
316 unsigned int __aer_firmware_first:1;
315 pci_dev_flags_t dev_flags; 317 pci_dev_flags_t dev_flags;
316 atomic_t enable_cnt; /* pci_enable_device has been called */ 318 atomic_t enable_cnt; /* pci_enable_device has been called */
317 319
@@ -334,6 +336,16 @@ struct pci_dev {
334#endif 336#endif
335}; 337};
336 338
339static inline struct pci_dev *pci_physfn(struct pci_dev *dev)
340{
341#ifdef CONFIG_PCI_IOV
342 if (dev->is_virtfn)
343 dev = dev->physfn;
344#endif
345
346 return dev;
347}
348
337extern struct pci_dev *alloc_pci_dev(void); 349extern struct pci_dev *alloc_pci_dev(void);
338 350
339#define pci_dev_b(n) list_entry(n, struct pci_dev, bus_list) 351#define pci_dev_b(n) list_entry(n, struct pci_dev, bus_list)
@@ -621,6 +633,7 @@ void pci_fixup_cardbus(struct pci_bus *);
621 633
622/* Generic PCI functions used internally */ 634/* Generic PCI functions used internally */
623 635
636void pcibios_scan_specific_bus(int busn);
624extern struct pci_bus *pci_find_bus(int domain, int busnr); 637extern struct pci_bus *pci_find_bus(int domain, int busnr);
625void pci_bus_add_devices(const struct pci_bus *bus); 638void pci_bus_add_devices(const struct pci_bus *bus);
626struct pci_bus *pci_scan_bus_parented(struct device *parent, int bus, 639struct pci_bus *pci_scan_bus_parented(struct device *parent, int bus,