linux/drivers/pci/host
Lucas Stach 92d27c4aac PCI: imx6: Move link up check into imx6_pcie_wait_for_link()
commit 4d107d3b5a upstream.

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 and f95d3ae771]
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 commit 6cbb247e85
 ("PCI: designware: Wait for link to come up with consistent style")]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2016-05-01 00:05:44 +02:00
..
Kconfig Merge branch 'pci/host-generic' into next 2014-05-30 11:40:13 -06:00
Makefile Merge branch 'pci/host-generic' into next 2014-05-30 11:40:13 -06:00
pci-exynos.c PCI: host: Mark PCIe/PCI (MSI) IRQ cascade handlers as IRQF_NO_THREAD 2016-02-02 19:09:18 +00:00
pci-host-generic.c PCI: generic: Add generic PCI host controller driver 2014-05-30 11:34:49 -06:00
pci-imx6.c PCI: imx6: Move link up check into imx6_pcie_wait_for_link() 2016-05-01 00:05:44 +02:00
pci-mvebu.c PCI: mvebu: Fix uninitialized variable in mvebu_get_tgt_attr() 2014-10-30 09:40:15 -07:00
pci-rcar-gen2.c PCI: rcar: Add gen2 device tree support 2014-05-28 07:47:55 -06:00
pci-tegra.c PCI: host: Mark PCIe/PCI (MSI) IRQ cascade handlers as IRQF_NO_THREAD 2016-02-02 19:09:18 +00:00
pcie-designware.c Merge branches 'pci/host-designware', 'pci/host-imx6', 'pci/host-mvebu' and 'pci/host-tegra' into next 2014-06-03 08:45:42 -06:00
pcie-designware.h Merge branches 'pci/host-designware', 'pci/host-imx6', 'pci/host-mvebu' and 'pci/host-tegra' into next 2014-06-03 08:45:42 -06:00
pcie-rcar.c PCI: host: Mark PCIe/PCI (MSI) IRQ cascade handlers as IRQF_NO_THREAD 2016-02-02 19:09:18 +00:00