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.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index a788fa12ff31..6a471aba3b07 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -311,7 +311,8 @@ struct pci_dev {
311 unsigned int is_virtfn:1; 311 unsigned int is_virtfn:1;
312 unsigned int reset_fn:1; 312 unsigned int reset_fn:1;
313 unsigned int is_hotplug_bridge:1; 313 unsigned int is_hotplug_bridge:1;
314 unsigned int aer_firmware_first:1; 314 unsigned int __aer_firmware_first_valid:1;
315 unsigned int __aer_firmware_first:1;
315 pci_dev_flags_t dev_flags; 316 pci_dev_flags_t dev_flags;
316 atomic_t enable_cnt; /* pci_enable_device has been called */ 317 atomic_t enable_cnt; /* pci_enable_device has been called */
317 318
@@ -334,6 +335,16 @@ struct pci_dev {
334#endif 335#endif
335}; 336};
336 337
338static inline struct pci_dev *pci_physfn(struct pci_dev *dev)
339{
340#ifdef CONFIG_PCI_IOV
341 if (dev->is_virtfn)
342 dev = dev->physfn;
343#endif
344
345 return dev;
346}
347
337extern struct pci_dev *alloc_pci_dev(void); 348extern struct pci_dev *alloc_pci_dev(void);
338 349
339#define pci_dev_b(n) list_entry(n, struct pci_dev, bus_list) 350#define pci_dev_b(n) list_entry(n, struct pci_dev, bus_list)