Skip to content
Commit a7e0f9ff authored by Vladimir Oltean's avatar Vladimir Oltean Committed by Xiaolei Wang
Browse files

net: phylink: fix phylink_validate() call with c73 from phylink_ethtool_ksettings_set()



commit  7b3fb7cdb5a5be368fa25d192b1564a4ffaa84ac from
https://github.com/nxp-imx/linux-imx lf-6.1.y

Currently, changing the advertisement on a C73-enabled phylink instance
fails:

$ ethtool -s endpmac3 advertise 0x80000 # 10000baseKR Full
netlink error: link settings update failed
netlink error: Invalid argument

This is because the struct phylink_link_state config that
phylink_ethtool_ksettings_set() constructs has an "interface" of
PHY_INTERFACE_MODE_NA, and this makes phylink_validate() call
phylink_validate_mask() rather than phylink_validate_mac_and_pcs()
directly.

This is a pre-existing shortcoming in our initial c73 implementation
which got uncovered now, more than anything. When we go through
phylink_validate_mask(), phylink will simply try to compute
advertisements for all interfaces from supported_interfaces. No wonder
that advertisement is empty, as we don't put any backplane modes in
supported_interfaces.

Fixes: 437a7c678179 ("net: phylink: add support for managed = "c73"")
Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: default avatarXiaolei Wang <xiaolei.wang@windriver.com>
parent 945938d7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment