diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-11-05 14:11:31 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-11-05 14:11:31 -0400 |
| commit | 41e6410ec3037cee1751d8f7d152a9ebec1fc1fc (patch) | |
| tree | f804a78b6a927ab2b7f34fbe21ff57d50de612f3 | |
| parent | 785bcb40a065748368bd16091171e43d260c77a5 (diff) | |
| parent | 416379f9ebded501eda882e6af0a7aafc1866700 (diff) | |
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
| -rw-r--r-- | drivers/pci/host/pcie-designware.c | 7 | ||||
| -rw-r--r-- | drivers/pci/host/pcie-qcom.c | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c index 035f50c03281..bed19994c1e9 100644 --- a/drivers/pci/host/pcie-designware.c +++ b/drivers/pci/host/pcie-designware.c | |||
| @@ -637,8 +637,6 @@ int dw_pcie_host_init(struct pcie_port *pp) | |||
| 637 | } | 637 | } |
| 638 | } | 638 | } |
| 639 | 639 | ||
| 640 | pp->iatu_unroll_enabled = dw_pcie_iatu_unroll_enabled(pp); | ||
| 641 | |||
| 642 | if (pp->ops->host_init) | 640 | if (pp->ops->host_init) |
| 643 | pp->ops->host_init(pp); | 641 | pp->ops->host_init(pp); |
| 644 | 642 | ||
| @@ -809,6 +807,11 @@ void dw_pcie_setup_rc(struct pcie_port *pp) | |||
| 809 | { | 807 | { |
| 810 | u32 val; | 808 | u32 val; |
| 811 | 809 | ||
| 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 | |||
| 812 | /* set the number of lanes */ | 815 | /* set the number of lanes */ |
| 813 | val = dw_pcie_readl_rc(pp, PCIE_PORT_LINK_CONTROL); | 816 | val = dw_pcie_readl_rc(pp, PCIE_PORT_LINK_CONTROL); |
| 814 | val &= ~PORT_LINK_MODE_MASK; | 817 | val &= ~PORT_LINK_MODE_MASK; |
diff --git a/drivers/pci/host/pcie-qcom.c b/drivers/pci/host/pcie-qcom.c index ef0a84c7a588..35936409b2d4 100644 --- a/drivers/pci/host/pcie-qcom.c +++ b/drivers/pci/host/pcie-qcom.c | |||
| @@ -533,11 +533,11 @@ static int qcom_pcie_probe(struct platform_device *pdev) | |||
| 533 | if (IS_ERR(pcie->phy)) | 533 | if (IS_ERR(pcie->phy)) |
| 534 | return PTR_ERR(pcie->phy); | 534 | return PTR_ERR(pcie->phy); |
| 535 | 535 | ||
| 536 | pp->dev = dev; | ||
| 536 | ret = pcie->ops->get_resources(pcie); | 537 | ret = pcie->ops->get_resources(pcie); |
| 537 | if (ret) | 538 | if (ret) |
| 538 | return ret; | 539 | return ret; |
| 539 | 540 | ||
| 540 | pp->dev = dev; | ||
| 541 | pp->root_bus_nr = -1; | 541 | pp->root_bus_nr = -1; |
| 542 | pp->ops = &qcom_pcie_dw_ops; | 542 | pp->ops = &qcom_pcie_dw_ops; |
| 543 | 543 | ||
