aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-08-04 12:29:37 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-04 12:29:37 -0400
commitf74ad8df4e74db550e5a2372cc1f025e56e1d523 (patch)
tree66d5a96522338a55773e4386b9b9e888481c5751 /drivers/pci/pci.c
parent19583ca584d6f574384e17fe7613dfaeadcdc4a6 (diff)
parent792688fde431b4fdb2cf10a6f7589a8176b6b14a (diff)
Merge tag 'pci-v3.17-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Pull PCI updates from Bjorn Helgaas: "I'll be on vacation until Aug 11, and I suspect the merge window will open before then, so I'm sending this to you early. There are more things I'd like to get into v3.17, so I hope to send another pull request soon after I return. The most notable pieces here are: - Support BARs up to 128GB (up from 8GB) - Fix SR-IOV resource assignment when we fail to expand a resource - Rework pciehp to handle a common hardware erratum - Cleanup MSI - Fix NIC renaming issue - Fix VGA default device issue on EFI systems - Fix ASPM configuration (previously we didn't enable it as expected) Alex Williamson has graciously agreed to take care of any major issues with this if you take it before I return. Details: Resource management - Support BAR sizes up to 128GB (Yinghai Lu) - Keep original resource if we fail to expand it (Guo Chao) - Return conventional error values from pci_revert_fw_address() (Bjorn Helgaas) - Tidy resource assignment messages (Bjorn Helgaas) - Don't exclude low BIOS area for non-PCI cards (Christoph Schulz) PCI device hotplug - Prevent NULL dereference during pciehp probe (Andreas Noever) - Make pciehp pcie_wait_cmd() self-contained (Bjorn Helgaas) - Wait for pciehp hotplug command completion lazily (Bjorn Helgaas) - Compute pciehp timeout from hotplug command start time (Bjorn Helgaas) - Remove pciehp assumptions about which commands cause completion events (Bjorn Helgaas) - Clear pciehp Data Link Layer State Changed during init (Myron Stowe) - Remove pciehp struct controller.no_cmd_complete (Rajat Jain) - Remove cpqphp unnecessary null test (Fabian Frederick) - Remove "invalid IRQ" warning for hot-added PCIe ports (Jiang Liu) IOMMU - Add DMA alias quirk for Intel 82801 bridge (Alex Williamson) MSI - Add internal msix_clear_and_set_ctrl() (Yijing Wang) - Remove unused msi_enabled_mask() (Yijing Wang) - Cache Multiple Message Capable in struct msi_desc (Yijing Wang) - Add msi_setup_entry() to clean up initialization (Yijing Wang) - Remove unused msi_remove_pci_irq_vectors() (Yijing Wang) - Retrieve first MSI IRQ from msi_desc rather than pci_dev (Yijing Wang) - Remove unused list access in __pci_restore_msix_state() (Yijing Wang) - Use irq_get_msi_desc() to simplify code (Yijing Wang) Generic host bridge driver - Fix GPL v2 license string typo (Bjorn Helgaas) Marvell MVEBU - Fix GPL v2 license string typo (Thierry Reding) NVIDIA Tegra - Use correct initial HW settings (Phil Edworthy) - Remove rcar_pcie_setup_window() resource argument (Phil Edworthy) - Fix GPL v2 license string typo (Thierry Reding) Renesas R-Car - Remove redundant config accessor register checks (Sergei Shtylyov) - Fix GPL v2 license string typo (Bjorn Helgaas) Virtualization - Factor secondary bus reset logic (Gavin Shan) - Remove duplicate powerpc reset logic (Gavin Shan) Miscellaneous - Rework default VGA detection for EFI (Bruno Prémont) - Fix sysfs "acpi_index" and "label" errors for NIC renaming (Simone Gotti) - Configure ASPM at pci_enable_device()-time (Vidya Sagar) - Add include/linux/pci_ids.h include guard (Rasmus Villemoes)" * tag 'pci-v3.17-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (38 commits) PCI/MSI: Use irq_get_msi_desc() to simplify code PCI/MSI: Remove unused list access in __pci_restore_msix_state() PCI/MSI: Retrieve first MSI IRQ from msi_desc rather than pci_dev PCI/MSI: Remove unused function msi_remove_pci_irq_vectors() PCI/MSI: Add msi_setup_entry() to clean up MSI initialization PCI: Configure ASPM when enabling device x86: don't exclude low BIOS area when allocating address space for non-PCI cards PCI: generic: Fix GPL v2 license string typo PCI: rcar: Fix GPL v2 license string typo PCI: tegra: Fix GPL v2 license string typo PCI: mvebu: Fix GPL v2 license string typo PCI: Add include guard to include/linux/pci_ids.h x86, ia64: Move EFI_FB vga_default_device() initialization to pci_vga_fixup() PCI: Tidy resource assignment messages PCI: Return conventional error values from pci_revert_fw_address() PCI: Cleanup control flow PCI: Support BAR sizes up to 128GB PCI: cpqphp: Remove unnecessary null test before debugfs_remove() PCI: pciehp: Clear Data Link Layer State Changed during init PCI: Add bridge DMA alias quirk for Intel 82801 bridge ...
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r--drivers/pci/pci.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 1c8592b0e146..2c9ac70254e2 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -839,12 +839,6 @@ int pci_set_power_state(struct pci_dev *dev, pci_power_t state)
839 839
840 if (!__pci_complete_power_transition(dev, state)) 840 if (!__pci_complete_power_transition(dev, state))
841 error = 0; 841 error = 0;
842 /*
843 * When aspm_policy is "powersave" this call ensures
844 * that ASPM is configured.
845 */
846 if (!error && dev->bus->self)
847 pcie_aspm_powersave_config_link(dev->bus->self);
848 842
849 return error; 843 return error;
850} 844}
@@ -1195,12 +1189,18 @@ int __weak pcibios_enable_device(struct pci_dev *dev, int bars)
1195static int do_pci_enable_device(struct pci_dev *dev, int bars) 1189static int do_pci_enable_device(struct pci_dev *dev, int bars)
1196{ 1190{
1197 int err; 1191 int err;
1192 struct pci_dev *bridge;
1198 u16 cmd; 1193 u16 cmd;
1199 u8 pin; 1194 u8 pin;
1200 1195
1201 err = pci_set_power_state(dev, PCI_D0); 1196 err = pci_set_power_state(dev, PCI_D0);
1202 if (err < 0 && err != -EIO) 1197 if (err < 0 && err != -EIO)
1203 return err; 1198 return err;
1199
1200 bridge = pci_upstream_bridge(dev);
1201 if (bridge)
1202 pcie_aspm_powersave_config_link(bridge);
1203
1204 err = pcibios_enable_device(dev, bars); 1204 err = pcibios_enable_device(dev, bars);
1205 if (err < 0) 1205 if (err < 0)
1206 return err; 1206 return err;
@@ -3198,7 +3198,7 @@ static int pci_pm_reset(struct pci_dev *dev, int probe)
3198 return 0; 3198 return 0;
3199} 3199}
3200 3200
3201void __weak pcibios_reset_secondary_bus(struct pci_dev *dev) 3201void pci_reset_secondary_bus(struct pci_dev *dev)
3202{ 3202{
3203 u16 ctrl; 3203 u16 ctrl;
3204 3204
@@ -3224,6 +3224,11 @@ void __weak pcibios_reset_secondary_bus(struct pci_dev *dev)
3224 ssleep(1); 3224 ssleep(1);
3225} 3225}
3226 3226
3227void __weak pcibios_reset_secondary_bus(struct pci_dev *dev)
3228{
3229 pci_reset_secondary_bus(dev);
3230}
3231
3227/** 3232/**
3228 * pci_reset_bridge_secondary_bus - Reset the secondary bus on a PCI bridge. 3233 * pci_reset_bridge_secondary_bus - Reset the secondary bus on a PCI bridge.
3229 * @dev: Bridge device 3234 * @dev: Bridge device