Re: [PATCH] net: fec: Refactor MAC reset to function
From: Andrew Lunn
Date: Tue Jan 21 2025 - 12:28:35 EST
On Tue, Jan 21, 2025 at 11:38:58AM +0100, Csókás, Bence wrote:
> The core is reset both in `fec_restart()`
> (called on link-up) and `fec_stop()`
> (going to sleep, driver remove etc.).
> These two functions had their separate
> implementations, which was at first only
> a register write and a `udelay()` (and
> the accompanying block comment).
> However, since then we got soft-reset
> (MAC disable) and Wake-on-LAN support,
> which meant that these implementations
> diverged, often causing bugs. For instance,
> as of now, `fec_stop()` does not check for
> `FEC_QUIRK_NO_HARD_RESET`. To eliminate
> this bug-source, refactor implementation
> to a common function.
>
> Fixes: c730ab423bfa ("net: fec: Fix temporary RMII clock reset on link up")
> Signed-off-by: Csókás, Bence <csokas.bence@xxxxxxxxx>
The subject say "Refactor...." A refactor generally does not need a
Fixes: tag. Maybe make the subject reflect the bug you are fixing, and
reword the commit message to focus on the bug being fixed, not the
refactor.
Andrew