Re: [PATCH] ARM: imx6: Fix "BUG: scheduling while atomic" if PCIe switch is attached

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 18, 2015 at 5:27 AM, Lucas Stach <l.stach@xxxxxxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux