On 4/30/20 4:36 AM, David Wu wrote:
> When using rgmii Gigabit mode, the wait_for_bit_le32()
> reset method resulting in RX can not receive data, after
> this patch, works well.

> diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c

> +     limit = eqos->config->swr_wait / 10;
> +     while (limit--) {
> +             if (!(readl(&eqos->dma_regs->mode) & EQOS_DMA_MODE_SWR))
> +                     break;
> +             mdelay(10000);
> +     }

mdelay()'s parameter is in milliseconds judging by its implementation in
include/linux/delay.h. So, this delays 10 seconds in each loop
iteration. That can't possibly be right.

Reply via email to