Hello everyone, This series aims at converting ucc_geth to phylink, one one part for better SFP handling, and on the other hand as a preparation for complex topology support with multiple PHYs being attached, which could involve phylink. Even without considering the multi-phy case, this series brings proper SFP support for that driver.
This driver is pretty old, which shows in the coding style. I did not include a cleanup pass to get checkpatch happy, so a few patches will complain about the CamelCase used in some internal structure attrubutes... The first 6 patches are preparation for the phylink conversion that's done in patch 7. The first patch removes support for the "interface" DT property which has been deprecated for 17 years, allowing to simplify the phy mode parsing. The second patch splits the adjust_link function, as advised in the phylink porting guide. This makes patch 7 easier to process. Patches 3, 5 and 6 perform some cleanup on unsued or leftover constructs to again make patch 7 easier to process. Patch 5 addresses the WoL configuration in that driver. Finally, patch 7 does the phylink conversion. Note that there are some things that I wasn't able to test, namely the TBI/RTBI handling. I did my best to replicate the existing logic, but I don't have the hardware to test it. Thanks, Maxime Maxime Chevallier (7): net: freescale: ucc_geth: Drop support for the "interface" DT property net: freescale: ucc_geth: split adjust_link for phylink conversion net: freescale: ucc_geth: Use netdev->phydev to access the PHY net: freescale: ucc_geth: Fix WOL configuration net: freescale: ucc_geth: Simplify frame length check net: freescale: ucc_geth: Hardcode the preamble length to 7 bytes net: freescale: ucc_geth: phylink conversion drivers/net/ethernet/freescale/Kconfig | 3 +- drivers/net/ethernet/freescale/ucc_geth.c | 600 +++++++----------- drivers/net/ethernet/freescale/ucc_geth.h | 19 +- .../net/ethernet/freescale/ucc_geth_ethtool.c | 57 +- 4 files changed, 247 insertions(+), 432 deletions(-) -- 2.47.0