On Tue, 22 Jul 2025 14:27:15 +0800
Tiezhu Yang <yangtiezhu@xxxxxxxxxxx> 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@xxxxxxxxxxx>
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.