summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/net/lib/py/ynl.py
diff options
context:
space:
mode:
authorCsókás, Bence <csokas.bence@prolan.hu>2025-02-07 15:12:55 +0300
committerPaolo Abeni <pabeni@redhat.com>2025-02-11 12:55:25 +0300
commit67800d296191d0a9bde0a7776f99ca1ddfa0fc26 (patch)
tree64bb319a7417479b4128e11d159148289436b349 /tools/testing/selftests/net/lib/py/ynl.py
parent907dd32b4a8aa7fedc2ef1867a6c3a1033738bcb (diff)
downloadlinux-67800d296191d0a9bde0a7776f99ca1ddfa0fc26.tar.xz
net: fec: Refactor MAC reset to function
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`, meaning the MII/RMII mode is cleared on eg. a PM power-down event; and `fec_restart()` missed the refactor renaming the "magic" constant `1` to `FEC_ECR_RESET`. To harmonize current implementations, and eliminate this source of potential future bugs, refactor implementation to a common function. Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: Csókás, Bence <csokas.bence@prolan.hu> Link: https://patch.msgid.link/20250207121255.161146-2-csokas.bence@prolan.hu Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'tools/testing/selftests/net/lib/py/ynl.py')
0 files changed, 0 insertions, 0 deletions