[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250722144802.637bfde0@fedora.home>
Date: Tue, 22 Jul 2025 14:48:02 +0200
From: Maxime Chevallier <maxime.chevallier@...tlin.com>
To: Tiezhu Yang <yangtiezhu@...ngson.cn>
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 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.
Maxime
Powered by blists - more mailing lists