[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2fea78e7-9e0a-4c6b-9d86-6433e4c28e5e@loongson.cn>
Date: Tue, 22 Jul 2025 21:10:31 +0800
From: Tiezhu Yang <yangtiezhu@...ngson.cn>
To: Maxime Chevallier <maxime.chevallier@...tlin.com>
Cc: Andrew Lunn <andrew+netdev@...n.ch>,
"David S . Miller" <davem@...emloft.net>, Eric Dumazet
<edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 1/2] net: stmmac: Return early if invalid in
loongson_dwmac_fix_reset()
On 2025/7/22 下午8:48, Maxime Chevallier wrote:
> On Tue, 22 Jul 2025 14:27:15 +0800
> Tiezhu Yang <yangtiezhu@...ngson.cn> wrote:
>
>> If the DMA_BUS_MODE_SFT_RESET bit is 1 before software reset,
>> there is no need to do anything for this abnormal case, just
>> return -EINVAL immediately in loongson_dwmac_fix_reset().
>>
>> Signed-off-by: Tiezhu Yang <yangtiezhu@...ngson.cn>
>
> Do you know when that could ever happen ? I'm asking because this logic
> for the DMA reset is duplicated in several places in this driver, maybe
> this could be useful for other users as well. I'm guessing this is to
> avoid waiting for the timeout when the DMA reset fails, but that is
> usually when there's a missing clock somewhere (such as the RGMII clock
> from the PHY), in which case I don't think the RST bit will be set.
To be honest, I am not quite sure the root cause but this actually
happened on the test environment, I guess there is a missing clock.
You are right, the initial aim of this patch is to return early for
this case to avoid waiting for the timeout when the DMA reset fails.
Thanks,
Tiezhu
Powered by blists - more mailing lists