Skip to content

Commit ad39473

Browse files
oleremNipaLocal
authored andcommitted
net: usb: lan78xx: Convert to PHYLINK for improved PHY and MAC management
Convert the LAN78xx USB Ethernet driver to use the PHYLINK framework for managing PHY and MAC interactions. This improves consistency with other network drivers, simplifies pause frame handling, and enables cleaner suspend/resume support. Key changes: - Replace all PHYLIB-based logic with PHYLINK equivalents: - Replace phy_connect()/phy_disconnect() with phylink_connect_phy() - Replace phy_start()/phy_stop() with phylink_start()/phylink_stop() - Replace pauseparam handling with phylink_ethtool_get/set_pauseparam() - Introduce lan78xx_phylink_setup() to configure PHYLINK - Add phylink MAC operations: - lan78xx_mac_config() - lan78xx_mac_link_up() - lan78xx_mac_link_down() - Remove legacy link state handling: - lan78xx_link_status_change() - lan78xx_link_reset() - Handle fixed-link fallback for LAN7801 using phylink_set_fixed_link() - Replace deprecated flow control handling with phylink-managed logic Power management: - Switch suspend/resume paths to use phylink_suspend()/phylink_resume() - Ensure proper use of rtnl_lock() where required - Note: full runtime testing of power management is currently limited due to hardware setup constraints Note: Conversion of EEE (Energy Efficient Ethernet) handling to the PHYLINK-managed API will be done in a follow-up patch. For now, the legacy EEE enable logic is preserved in mac_link_up(). Signed-off-by: Oleksij Rempel <[email protected]> Reviewed-by: Russell King (Oracle) <[email protected]> Signed-off-by: NipaLocal <nipa@local>
1 parent 3f4a929 commit ad39473

File tree

2 files changed

+262
-288
lines changed

2 files changed

+262
-288
lines changed

drivers/net/usb/Kconfig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,8 @@ config USB_RTL8152
113113
config USB_LAN78XX
114114
tristate "Microchip LAN78XX Based USB Ethernet Adapters"
115115
select MII
116-
select PHYLIB
116+
select PHYLINK
117117
select MICROCHIP_PHY
118-
select FIXED_PHY
119118
select CRC32
120119
help
121120
This option adds support for Microchip LAN78XX based USB 2

0 commit comments

Comments
 (0)