diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-13 15:14:47 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-13 15:14:47 -0500 |
commit | 193c0d682525987db59ac3a24531a77e4947aa95 (patch) | |
tree | 7b58346171c4d07e2c2ee6c3c469c325495149a4 /include/linux/pci.h | |
parent | 8b0cab14951fbf8126795ab301835a8f8126a988 (diff) | |
parent | 1cb73f8c479e66541fefd3f7fa547b1fa56cdc54 (diff) |
Merge tag 'for-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Pull PCI update from Bjorn Helgaas:
"Host bridge hotplug:
- Untangle _PRT from struct pci_bus (Bjorn Helgaas)
- Request _OSC control before scanning root bus (Taku Izumi)
- Assign resources when adding host bridge (Yinghai Lu)
- Remove root bus when removing host bridge (Yinghai Lu)
- Remove _PRT during hot remove (Yinghai Lu)
SRIOV
- Add sysfs knobs to control numVFs (Don Dutile)
Power management
- Notify devices when power resource turned on (Huang Ying)
Bug fixes
- Work around broken _SEG on HP xw9300 (Bjorn Helgaas)
- Keep runtime PM enabled for unbound PCI devices (Huang Ying)
- Fix Optimus dual-GPU runtime D3 suspend issue (Dave Airlie)
- Fix xen frontend shutdown issue (David Vrabel)
- Work around PLX PCI 9050 BAR alignment erratum (Ian Abbott)
Miscellaneous
- Add GPL license for drivers/pci/ioapic (Andrew Cooks)
- Add standard PCI-X, PCIe ASPM register #defines (Bjorn Helgaas)
- NumaChip remote PCI support (Daniel Blueman)
- Fix PCIe Link Capabilities Supported Link Speed definition (Jingoo
Han)
- Convert dev_printk() to dev_info(), etc (Joe Perches)
- Add support for non PCI BAR ROM data (Matthew Garrett)
- Add x86 support for host bridge translation offset (Mike Yoknis)
- Report success only when every driver supports AER (Vijay
Pandarathil)"
Fix up trivial conflicts.
* tag 'for-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (48 commits)
PCI: Use phys_addr_t for physical ROM address
x86/PCI: Add NumaChip remote PCI support
ath9k: Use standard #defines for PCIe Capability ASPM fields
iwlwifi: Use standard #defines for PCIe Capability ASPM fields
iwlwifi: collapse wrapper for pcie_capability_read_word()
iwlegacy: Use standard #defines for PCIe Capability ASPM fields
iwlegacy: collapse wrapper for pcie_capability_read_word()
cxgb3: Use standard #defines for PCIe Capability ASPM fields
PCI: Add standard PCIe Capability Link ASPM field names
PCI/portdrv: Use PCI Express Capability accessors
PCI: Use standard PCIe Capability Link register field names
x86: Use PCI setup data
PCI: Add support for non-BAR ROMs
PCI: Add pcibios_add_device
EFI: Stash ROMs if they're not in the PCI BAR
PCI: Add and use standard PCI-X Capability register names
PCI/PM: Keep runtime PM enabled for unbound PCI devices
xen-pcifront: Handle backend CLOSED without CLOSING
PCI: SRIOV control and status via sysfs (documentation)
PCI/AER: Report success only when every device has AER-aware driver
...
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r-- | include/linux/pci.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index af8229244ee2..15472d691ee6 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -333,6 +333,8 @@ struct pci_dev { | |||
333 | }; | 333 | }; |
334 | struct pci_ats *ats; /* Address Translation Service */ | 334 | struct pci_ats *ats; /* Address Translation Service */ |
335 | #endif | 335 | #endif |
336 | phys_addr_t rom; /* Physical address of ROM if it's not from the BAR */ | ||
337 | size_t romlen; /* Length of ROM if it's not from the BAR */ | ||
336 | }; | 338 | }; |
337 | 339 | ||
338 | static inline struct pci_dev *pci_physfn(struct pci_dev *dev) | 340 | static inline struct pci_dev *pci_physfn(struct pci_dev *dev) |
@@ -538,6 +540,9 @@ enum pci_ers_result { | |||
538 | 540 | ||
539 | /* Device driver is fully recovered and operational */ | 541 | /* Device driver is fully recovered and operational */ |
540 | PCI_ERS_RESULT_RECOVERED = (__force pci_ers_result_t) 5, | 542 | PCI_ERS_RESULT_RECOVERED = (__force pci_ers_result_t) 5, |
543 | |||
544 | /* No AER capabilities registered for the driver */ | ||
545 | PCI_ERS_RESULT_NO_AER_DRIVER = (__force pci_ers_result_t) 6, | ||
541 | }; | 546 | }; |
542 | 547 | ||
543 | /* PCI bus error event callbacks */ | 548 | /* PCI bus error event callbacks */ |
@@ -573,6 +578,7 @@ struct pci_driver { | |||
573 | int (*resume_early) (struct pci_dev *dev); | 578 | int (*resume_early) (struct pci_dev *dev); |
574 | int (*resume) (struct pci_dev *dev); /* Device woken up */ | 579 | int (*resume) (struct pci_dev *dev); /* Device woken up */ |
575 | void (*shutdown) (struct pci_dev *dev); | 580 | void (*shutdown) (struct pci_dev *dev); |
581 | int (*sriov_configure) (struct pci_dev *dev, int num_vfs); /* PF pdev */ | ||
576 | const struct pci_error_handlers *err_handler; | 582 | const struct pci_error_handlers *err_handler; |
577 | struct device_driver driver; | 583 | struct device_driver driver; |
578 | struct pci_dynids dynids; | 584 | struct pci_dynids dynids; |
@@ -726,6 +732,8 @@ extern struct pci_dev *pci_dev_get(struct pci_dev *dev); | |||
726 | extern void pci_dev_put(struct pci_dev *dev); | 732 | extern void pci_dev_put(struct pci_dev *dev); |
727 | extern void pci_remove_bus(struct pci_bus *b); | 733 | extern void pci_remove_bus(struct pci_bus *b); |
728 | extern void pci_stop_and_remove_bus_device(struct pci_dev *dev); | 734 | extern void pci_stop_and_remove_bus_device(struct pci_dev *dev); |
735 | void pci_stop_root_bus(struct pci_bus *bus); | ||
736 | void pci_remove_root_bus(struct pci_bus *bus); | ||
729 | void pci_setup_cardbus(struct pci_bus *bus); | 737 | void pci_setup_cardbus(struct pci_bus *bus); |
730 | extern void pci_sort_breadthfirst(void); | 738 | extern void pci_sort_breadthfirst(void); |
731 | #define dev_is_pci(d) ((d)->bus == &pci_bus_type) | 739 | #define dev_is_pci(d) ((d)->bus == &pci_bus_type) |
@@ -970,6 +978,7 @@ void pci_bus_size_bridges(struct pci_bus *bus); | |||
970 | int pci_claim_resource(struct pci_dev *, int); | 978 | int pci_claim_resource(struct pci_dev *, int); |
971 | void pci_assign_unassigned_resources(void); | 979 | void pci_assign_unassigned_resources(void); |
972 | void pci_assign_unassigned_bridge_resources(struct pci_dev *bridge); | 980 | void pci_assign_unassigned_bridge_resources(struct pci_dev *bridge); |
981 | void pci_assign_unassigned_bus_resources(struct pci_bus *bus); | ||
973 | void pdev_enable_device(struct pci_dev *); | 982 | void pdev_enable_device(struct pci_dev *); |
974 | int pci_enable_resources(struct pci_dev *, int mask); | 983 | int pci_enable_resources(struct pci_dev *, int mask); |
975 | void pci_fixup_irqs(u8 (*)(struct pci_dev *, u8 *), | 984 | void pci_fixup_irqs(u8 (*)(struct pci_dev *, u8 *), |
@@ -1604,6 +1613,7 @@ void pcibios_disable_device(struct pci_dev *dev); | |||
1604 | void pcibios_set_master(struct pci_dev *dev); | 1613 | void pcibios_set_master(struct pci_dev *dev); |
1605 | int pcibios_set_pcie_reset_state(struct pci_dev *dev, | 1614 | int pcibios_set_pcie_reset_state(struct pci_dev *dev, |
1606 | enum pcie_reset_state state); | 1615 | enum pcie_reset_state state); |
1616 | int pcibios_add_device(struct pci_dev *dev); | ||
1607 | 1617 | ||
1608 | #ifdef CONFIG_PCI_MMCONFIG | 1618 | #ifdef CONFIG_PCI_MMCONFIG |
1609 | extern void __init pci_mmcfg_early_init(void); | 1619 | extern void __init pci_mmcfg_early_init(void); |
@@ -1613,7 +1623,7 @@ static inline void pci_mmcfg_early_init(void) { } | |||
1613 | static inline void pci_mmcfg_late_init(void) { } | 1623 | static inline void pci_mmcfg_late_init(void) { } |
1614 | #endif | 1624 | #endif |
1615 | 1625 | ||
1616 | int pci_ext_cfg_avail(struct pci_dev *dev); | 1626 | int pci_ext_cfg_avail(void); |
1617 | 1627 | ||
1618 | void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar); | 1628 | void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar); |
1619 | 1629 | ||
@@ -1622,6 +1632,8 @@ extern int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn); | |||
1622 | extern void pci_disable_sriov(struct pci_dev *dev); | 1632 | extern void pci_disable_sriov(struct pci_dev *dev); |
1623 | extern irqreturn_t pci_sriov_migration(struct pci_dev *dev); | 1633 | extern irqreturn_t pci_sriov_migration(struct pci_dev *dev); |
1624 | extern int pci_num_vf(struct pci_dev *dev); | 1634 | extern int pci_num_vf(struct pci_dev *dev); |
1635 | extern int pci_sriov_set_totalvfs(struct pci_dev *dev, u16 numvfs); | ||
1636 | extern int pci_sriov_get_totalvfs(struct pci_dev *dev); | ||
1625 | #else | 1637 | #else |
1626 | static inline int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn) | 1638 | static inline int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn) |
1627 | { | 1639 | { |
@@ -1638,6 +1650,14 @@ static inline int pci_num_vf(struct pci_dev *dev) | |||
1638 | { | 1650 | { |
1639 | return 0; | 1651 | return 0; |
1640 | } | 1652 | } |
1653 | static inline int pci_sriov_set_totalvfs(struct pci_dev *dev, u16 numvfs) | ||
1654 | { | ||
1655 | return 0; | ||
1656 | } | ||
1657 | static inline int pci_sriov_get_totalvfs(struct pci_dev *dev) | ||
1658 | { | ||
1659 | return 0; | ||
1660 | } | ||
1641 | #endif | 1661 | #endif |
1642 | 1662 | ||
1643 | #if defined(CONFIG_HOTPLUG_PCI) || defined(CONFIG_HOTPLUG_PCI_MODULE) | 1663 | #if defined(CONFIG_HOTPLUG_PCI) || defined(CONFIG_HOTPLUG_PCI_MODULE) |