Commit 186ce88c authored by Bjorn Helgaas's avatar Bjorn Helgaas

Merge branch 'pci/controller/keystone'

- Hold power management references to all PHYs while enabling them to avoid
  a race when one provides clocks to others (Siddharth Vadapalli)

* pci/controller/keystone:
  PCI: keystone: Fix race condition when initializing PHYs
parents 787c72b1 c12ca110
...@@ -1218,7 +1218,16 @@ static int ks_pcie_probe(struct platform_device *pdev) ...@@ -1218,7 +1218,16 @@ static int ks_pcie_probe(struct platform_device *pdev)
goto err_link; goto err_link;
} }
/* Obtain references to the PHYs */
for (i = 0; i < num_lanes; i++)
phy_pm_runtime_get_sync(ks_pcie->phy[i]);
ret = ks_pcie_enable_phy(ks_pcie); ret = ks_pcie_enable_phy(ks_pcie);
/* Release references to the PHYs */
for (i = 0; i < num_lanes; i++)
phy_pm_runtime_put_sync(ks_pcie->phy[i]);
if (ret) { if (ret) {
dev_err(dev, "failed to enable phy\n"); dev_err(dev, "failed to enable phy\n");
goto err_link; goto err_link;
......
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