Re: [PATCH] net: mvpp2: add delay at the end of .mac_prepare

Marcin Wojtas
2022-04-28T09:00:22Z

Hi Baruch,

śr., 27 kwi 2022 o 17:05 Baruch Siach <baruch@tkos.co.il> napisał(a):
>
> From: Baruch Siach <baruch.siach@siklu.com>
>
> Without this delay PHY mode switch from XLG to SGMII fails in a weird
> way. Rx side works. However, Tx appears to work as far as the MAC is
> concerned, but packets don't show up on the wire.
>
> Tested with Marvell 10G 88X3310 PHY.
>
> Signed-off-by: Baruch Siach <baruch.siach@siklu.com>
> ---
>
> Not sure this is the right fix. Let me know if you have any better
> suggestion for me to test.
>
> The same issue and fix reproduce with both v5.18-rc4 and v5.10.110.
> ---
> drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
> index 1a835b48791b..8823efe396b1 100644
> --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
> +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
> @@ -6432,6 +6432,8 @@ static int mvpp2_mac_prepare(struct phylink_config *config, unsigned int mode,
> }
> }
>
> + mdelay(10);
> +
> return 0;
> }
>

Thank you for the patch and debug effort, however at first glance it
seems that adding delay may be a work-around and cover an actual root
cause (maybe Russell will have more input here).

Can you share exact reproduction steps?

Best regards,
Marcin