[PATCH] ARM: imx6: Fix "BUG: scheduling while atomic" if PCIe switch is attached
Fabio Estevam
festevam at gmail.com
Mon Jun 22 06:30:34 PDT 2015
On Thu, Jun 18, 2015 at 5:27 AM, Lucas Stach <l.stach at pengutronix.de> wrote:
>> diff --git a/drivers/pci/host/pci-imx6.c b/drivers/pci/host/pci-imx6.c
>> index fdb9536..c63691c 100644
>> --- a/drivers/pci/host/pci-imx6.c
>> +++ b/drivers/pci/host/pci-imx6.c
>> @@ -489,7 +489,7 @@ 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);
>> + mdelay(20);
>
> While switching to mdelay might be the right thing to do here, you are
> also changing the timeout. This is a change in behavior and so not okay.
msleep(2) is not recommended according to Documentation/timers/timers-howto.txt.
What would be the proper fix then?
Regards,
Fabio Estevam
More information about the linux-arm-kernel
mailing list