Commit e45fc85a authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'pci-v4.2-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci

Pull PCI fixes from Bjorn Helgaas:
 "These are fixes for ASPM-related NULL pointer dereference crashes on
  Sparc and PowerPC and 64-bit PCI address-related HPMC crashes on
  PA-RISC.  These are both caused by things we merged in the v4.2 merge
  window.  Details:

  Resource management
    - Don't use 64-bit bus addresses on PA-RISC

  Miscellaneous
    - Tolerate hierarchies with no Root Port"

* tag 'pci-v4.2-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
  PCI: Don't use 64-bit bus addresses on PA-RISC
  PCI: Tolerate hierarchies with no Root Port
parents 00f76410 45ea2a5f
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# PCI configuration # PCI configuration
# #
config PCI_BUS_ADDR_T_64BIT config PCI_BUS_ADDR_T_64BIT
def_bool y if (ARCH_DMA_ADDR_T_64BIT || 64BIT) def_bool y if (ARCH_DMA_ADDR_T_64BIT || (64BIT && !PARISC))
depends on PCI depends on PCI
config PCI_MSI config PCI_MSI
......
...@@ -997,7 +997,12 @@ void set_pcie_port_type(struct pci_dev *pdev) ...@@ -997,7 +997,12 @@ void set_pcie_port_type(struct pci_dev *pdev)
else if (type == PCI_EXP_TYPE_UPSTREAM || else if (type == PCI_EXP_TYPE_UPSTREAM ||
type == PCI_EXP_TYPE_DOWNSTREAM) { type == PCI_EXP_TYPE_DOWNSTREAM) {
parent = pci_upstream_bridge(pdev); parent = pci_upstream_bridge(pdev);
if (!parent->has_secondary_link)
/*
* Usually there's an upstream device (Root Port or Switch
* Downstream Port), but we can't assume one exists.
*/
if (parent && !parent->has_secondary_link)
pdev->has_secondary_link = 1; pdev->has_secondary_link = 1;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment