Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions drivers/net/phy/phylink.c
Original file line number Diff line number Diff line change
Expand Up @@ -2853,6 +2853,23 @@ int phylink_ethtool_ksettings_get(struct phylink *pl,
*/
phylink_get_ksettings(&link_state, kset);
break;

default:
/* MLO_AN_PHY without a PHY device: the interface is not yet
* fully configured (e.g. waiting for an SFP module to be
* detected and its state machine to run). Return the current
* link_config state so that userspace sees a consistent
* picture and, crucially, does not observe autoneg=false and
* perform a read-modify-write that forces autoneg off before
* the SFP initialisation completes.
*/
if (!pl->phydev) {
phylink_dbg(pl,
"ksettings_get: pre-init state, returning link_config (interface=%s)\n",
phy_modes(pl->link_config.interface));
phylink_get_ksettings(&pl->link_config, kset);
}
break;
}

return 0;
Expand Down
Loading