Commit 41e6410e authored by Linus Torvalds's avatar Linus Torvalds

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

Pull PCI fixes from Bjorn Helgaas:

 - fix for a Qualcomm driver issue that causes a use-before-set crash

 - fix for DesignWare iATU unroll support that causes external aborts
   when enabling the host bridge

* tag 'pci-v4.9-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
  PCI: designware: Check for iATU unroll support after initializing host
  PCI: qcom: Fix pp->dev usage before assignment
parents 785bcb40 416379f9
...@@ -637,8 +637,6 @@ int dw_pcie_host_init(struct pcie_port *pp) ...@@ -637,8 +637,6 @@ int dw_pcie_host_init(struct pcie_port *pp)
} }
} }
pp->iatu_unroll_enabled = dw_pcie_iatu_unroll_enabled(pp);
if (pp->ops->host_init) if (pp->ops->host_init)
pp->ops->host_init(pp); pp->ops->host_init(pp);
...@@ -809,6 +807,11 @@ void dw_pcie_setup_rc(struct pcie_port *pp) ...@@ -809,6 +807,11 @@ void dw_pcie_setup_rc(struct pcie_port *pp)
{ {
u32 val; u32 val;
/* get iATU unroll support */
pp->iatu_unroll_enabled = dw_pcie_iatu_unroll_enabled(pp);
dev_dbg(pp->dev, "iATU unroll: %s\n",
pp->iatu_unroll_enabled ? "enabled" : "disabled");
/* set the number of lanes */ /* set the number of lanes */
val = dw_pcie_readl_rc(pp, PCIE_PORT_LINK_CONTROL); val = dw_pcie_readl_rc(pp, PCIE_PORT_LINK_CONTROL);
val &= ~PORT_LINK_MODE_MASK; val &= ~PORT_LINK_MODE_MASK;
......
...@@ -533,11 +533,11 @@ static int qcom_pcie_probe(struct platform_device *pdev) ...@@ -533,11 +533,11 @@ static int qcom_pcie_probe(struct platform_device *pdev)
if (IS_ERR(pcie->phy)) if (IS_ERR(pcie->phy))
return PTR_ERR(pcie->phy); return PTR_ERR(pcie->phy);
pp->dev = dev;
ret = pcie->ops->get_resources(pcie); ret = pcie->ops->get_resources(pcie);
if (ret) if (ret)
return ret; return ret;
pp->dev = dev;
pp->root_bus_nr = -1; pp->root_bus_nr = -1;
pp->ops = &qcom_pcie_dw_ops; pp->ops = &qcom_pcie_dw_ops;
......
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