Skip to content

Commit 41e6410

Browse files
committed
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
2 parents 785bcb4 + 416379f commit 41e6410

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

drivers/pci/host/pcie-designware.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -637,8 +637,6 @@ int dw_pcie_host_init(struct pcie_port *pp)
637637
}
638638
}
639639

640-
pp->iatu_unroll_enabled = dw_pcie_iatu_unroll_enabled(pp);
641-
642640
if (pp->ops->host_init)
643641
pp->ops->host_init(pp);
644642

@@ -809,6 +807,11 @@ void dw_pcie_setup_rc(struct pcie_port *pp)
809807
{
810808
u32 val;
811809

810+
/* get iATU unroll support */
811+
pp->iatu_unroll_enabled = dw_pcie_iatu_unroll_enabled(pp);
812+
dev_dbg(pp->dev, "iATU unroll: %s\n",
813+
pp->iatu_unroll_enabled ? "enabled" : "disabled");
814+
812815
/* set the number of lanes */
813816
val = dw_pcie_readl_rc(pp, PCIE_PORT_LINK_CONTROL);
814817
val &= ~PORT_LINK_MODE_MASK;

drivers/pci/host/pcie-qcom.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,11 +533,11 @@ static int qcom_pcie_probe(struct platform_device *pdev)
533533
if (IS_ERR(pcie->phy))
534534
return PTR_ERR(pcie->phy);
535535

536+
pp->dev = dev;
536537
ret = pcie->ops->get_resources(pcie);
537538
if (ret)
538539
return ret;
539540

540-
pp->dev = dev;
541541
pp->root_bus_nr = -1;
542542
pp->ops = &qcom_pcie_dw_ops;
543543

0 commit comments

Comments
 (0)