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 /drivers/pci/pci.c | |
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 'drivers/pci/pci.c')
-rw-r--r-- | drivers/pci/pci.c | 48 |
1 files changed, 36 insertions, 12 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index bdf66b500f22..5cb5820fae40 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -1333,6 +1333,19 @@ void pcim_pin_device(struct pci_dev *pdev) | |||
1333 | dr->pinned = 1; | 1333 | dr->pinned = 1; |
1334 | } | 1334 | } |
1335 | 1335 | ||
1336 | /* | ||
1337 | * pcibios_add_device - provide arch specific hooks when adding device dev | ||
1338 | * @dev: the PCI device being added | ||
1339 | * | ||
1340 | * Permits the platform to provide architecture specific functionality when | ||
1341 | * devices are added. This is the default implementation. Architecture | ||
1342 | * implementations can override this. | ||
1343 | */ | ||
1344 | int __weak pcibios_add_device (struct pci_dev *dev) | ||
1345 | { | ||
1346 | return 0; | ||
1347 | } | ||
1348 | |||
1336 | /** | 1349 | /** |
1337 | * pcibios_disable_device - disable arch specific PCI resources for device dev | 1350 | * pcibios_disable_device - disable arch specific PCI resources for device dev |
1338 | * @dev: the PCI device to disable | 1351 | * @dev: the PCI device to disable |
@@ -1578,15 +1591,25 @@ void pci_pme_active(struct pci_dev *dev, bool enable) | |||
1578 | 1591 | ||
1579 | pci_write_config_word(dev, dev->pm_cap + PCI_PM_CTRL, pmcsr); | 1592 | pci_write_config_word(dev, dev->pm_cap + PCI_PM_CTRL, pmcsr); |
1580 | 1593 | ||
1581 | /* PCI (as opposed to PCIe) PME requires that the device have | 1594 | /* |
1582 | its PME# line hooked up correctly. Not all hardware vendors | 1595 | * PCI (as opposed to PCIe) PME requires that the device have |
1583 | do this, so the PME never gets delivered and the device | 1596 | * its PME# line hooked up correctly. Not all hardware vendors |
1584 | remains asleep. The easiest way around this is to | 1597 | * do this, so the PME never gets delivered and the device |
1585 | periodically walk the list of suspended devices and check | 1598 | * remains asleep. The easiest way around this is to |
1586 | whether any have their PME flag set. The assumption is that | 1599 | * periodically walk the list of suspended devices and check |
1587 | we'll wake up often enough anyway that this won't be a huge | 1600 | * whether any have their PME flag set. The assumption is that |
1588 | hit, and the power savings from the devices will still be a | 1601 | * we'll wake up often enough anyway that this won't be a huge |
1589 | win. */ | 1602 | * hit, and the power savings from the devices will still be a |
1603 | * win. | ||
1604 | * | ||
1605 | * Although PCIe uses in-band PME message instead of PME# line | ||
1606 | * to report PME, PME does not work for some PCIe devices in | ||
1607 | * reality. For example, there are devices that set their PME | ||
1608 | * status bits, but don't really bother to send a PME message; | ||
1609 | * there are PCI Express Root Ports that don't bother to | ||
1610 | * trigger interrupts when they receive PME messages from the | ||
1611 | * devices below. So PME poll is used for PCIe devices too. | ||
1612 | */ | ||
1590 | 1613 | ||
1591 | if (dev->pme_poll) { | 1614 | if (dev->pme_poll) { |
1592 | struct pci_pme_device *pme_dev; | 1615 | struct pci_pme_device *pme_dev; |
@@ -1900,6 +1923,8 @@ void pci_pm_init(struct pci_dev *dev) | |||
1900 | u16 pmc; | 1923 | u16 pmc; |
1901 | 1924 | ||
1902 | pm_runtime_forbid(&dev->dev); | 1925 | pm_runtime_forbid(&dev->dev); |
1926 | pm_runtime_set_active(&dev->dev); | ||
1927 | pm_runtime_enable(&dev->dev); | ||
1903 | device_enable_async_suspend(&dev->dev); | 1928 | device_enable_async_suspend(&dev->dev); |
1904 | dev->wakeup_prepared = false; | 1929 | dev->wakeup_prepared = false; |
1905 | 1930 | ||
@@ -3865,14 +3890,13 @@ static void pci_no_domains(void) | |||
3865 | } | 3890 | } |
3866 | 3891 | ||
3867 | /** | 3892 | /** |
3868 | * pci_ext_cfg_enabled - can we access extended PCI config space? | 3893 | * pci_ext_cfg_avail - can we access extended PCI config space? |
3869 | * @dev: The PCI device of the root bridge. | ||
3870 | * | 3894 | * |
3871 | * Returns 1 if we can access PCI extended config space (offsets | 3895 | * Returns 1 if we can access PCI extended config space (offsets |
3872 | * greater than 0xff). This is the default implementation. Architecture | 3896 | * greater than 0xff). This is the default implementation. Architecture |
3873 | * implementations can override this. | 3897 | * implementations can override this. |
3874 | */ | 3898 | */ |
3875 | int __weak pci_ext_cfg_avail(struct pci_dev *dev) | 3899 | int __weak pci_ext_cfg_avail(void) |
3876 | { | 3900 | { |
3877 | return 1; | 3901 | return 1; |
3878 | } | 3902 | } |