Subject: Re: [PATCH v3 net-next 3/5] net: ethernet: mtk_eth_soc: align reset procedure to vendor sdk

From: Leon Romanovsky <[email-masked]>
Date: Sun, 8 Jan 2023 15:44:09 +0200

On Sat, Jan 07, 2023 at 03:50:52PM +0100, Lorenzo Bianconi wrote:
> Avoid to power-down the ethernet chip during hw reset and align reset
> procedure to vendor sdk.
> 
> Tested-by: Daniel Golle <[email-masked]>
> Co-developed-by: Sujuan Chen <[email-masked]>
> Signed-off-by: Sujuan Chen <[email-masked]>
> Signed-off-by: Lorenzo Bianconi <[email-masked]>
> ---
>  drivers/net/ethernet/mediatek/mtk_eth_soc.c  | 94 +++++++++++++++-----
>  drivers/net/ethernet/mediatek/mtk_eth_soc.h  | 12 +++
>  drivers/net/ethernet/mediatek/mtk_ppe.c      | 27 ++++++
>  drivers/net/ethernet/mediatek/mtk_ppe.h      |  1 +
>  drivers/net/ethernet/mediatek/mtk_ppe_regs.h |  6 ++
>  5 files changed, 116 insertions(+), 24 deletions(-)

mdelay is macro wrapper around udelay, to account for possible overflow when
passing large arguments to udelay. In general, use of mdelay is discouraged
and code should be refactored to allow for the use of msleep.

https://www.kernel.org/doc/html/latest/timers/timers-howto.html#delays-information-on-the-various-kern

It is not your case as you are passing small numbers and can use udelay instead.

Thanks,
Reviewed-by: Leon Romanovsky <[email-masked]>