mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-10-16 22:39:48 +00:00
PCI: imx6: Move link up check into imx6_pcie_wait_for_link()
commit4d107d3b5aupstream. imx6_pcie_link_up() previously used usleep_range() to wait for the link to come up. Since it may be called while holding the config spinlock, the sleep causes a "BUG: scheduling while atomic" error. Instead of waiting for the link to come up in imx6_pcie_link_up(), do the waiting in imx6_pcie_wait_for_link(), where we're not holding a lock and sleeping is allowed. [bhelgaas: changelog, references to bugzilla andf95d3ae771] Link: https://bugzilla.kernel.org/show_bug.cgi?id=100031 Fixes:f95d3ae771("PCI: imx6: Wait for retraining") Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> [bwh: Backported to 3.16: also update the retry loop in imx6_pcie_wait_for_link() as done upstream in commit6cbb247e85("PCI: designware: Wait for link to come up with consistent style")] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
This commit is contained in:
parent
f5aa19a43a
commit
92d27c4aac
1 changed files with 24 additions and 8 deletions
Loading…
Add table
Add a link
Reference in a new issue