From b5d9cf67a9593c07ab9d74f1d5cf83a497d577a4 Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Mon, 23 Jun 2014 17:22:22 +0200 Subject: pci-imx6.c: fix BUG, scheduling while atomic Depending on the preemptive settings 'usleep_range' are called in code where this is not allowed. Use udelay instead of usleep_range BUG: scheduling while atomic: swapper/0/1/0x00000002 --- drivers/pci/host/pci-imx6.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/pci/host/pci-imx6.c b/drivers/pci/host/pci-imx6.c index ba8f1e6212aa..b434d6228430 100644 --- a/drivers/pci/host/pci-imx6.c +++ b/drivers/pci/host/pci-imx6.c @@ -449,7 +449,8 @@ static void imx6_pcie_reset_phy(struct pcie_port *pp) PHY_RX_OVRD_IN_LO_RX_PLL_EN); pcie_phy_write(pp->dbi_base, PHY_RX_OVRD_IN_LO, temp); - usleep_range(2000, 3000); + /* BUG: scheduling while atomic: swapper/0/1/0x00000002, use udelay instead of usleep_range*/ + udelay(2000); pcie_phy_read(pp->dbi_base, PHY_RX_OVRD_IN_LO, &temp); temp &= ~(PHY_RX_OVRD_IN_LO_RX_DATA_EN | @@ -491,7 +492,8 @@ static int imx6_pcie_link_up(struct pcie_port *pp) * Wait a little bit, then re-check if the link finished * the training. */ - usleep_range(1000, 2000); + /* BUG: scheduling while atomic: swapper/0/1/0x00000002, use udelay instead of usleep_range*/ + udelay(1000); } /* * From L0, initiate MAC entry to gen2 if EP/RC supports gen2. -- cgit v1.2.3