Skip to content

Commit

Permalink
Merge tag 'pci-v4.9-fixes-2' of git://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/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
  • Loading branch information
torvalds committed Nov 5, 2016
2 parents 785bcb4 + 416379f commit 41e6410
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions drivers/pci/host/pcie-designware.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
pp->ops->host_init(pp);

Expand Down Expand Up @@ -809,6 +807,11 @@ void dw_pcie_setup_rc(struct pcie_port *pp)
{
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 */
val = dw_pcie_readl_rc(pp, PCIE_PORT_LINK_CONTROL);
val &= ~PORT_LINK_MODE_MASK;
Expand Down
2 changes: 1 addition & 1 deletion drivers/pci/host/pcie-qcom.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,11 +533,11 @@ static int qcom_pcie_probe(struct platform_device *pdev)
if (IS_ERR(pcie->phy))
return PTR_ERR(pcie->phy);

pp->dev = dev;
ret = pcie->ops->get_resources(pcie);
if (ret)
return ret;

pp->dev = dev;
pp->root_bus_nr = -1;
pp->ops = &qcom_pcie_dw_ops;

Expand Down

0 comments on commit 41e6410

Please sign in to comment.