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: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: Xiaolei Wang <xiaolei.wang@windriver.com>
Please register or sign in to comment