]> asedeno.scripts.mit.edu Git - linux.git/commit
net: phylink: improve clause 45 PHY ksettings_set implementation
authorRussell King <rmk+kernel@armlinux.org.uk>
Fri, 13 Dec 2019 18:22:02 +0000 (18:22 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 17 Dec 2019 21:26:33 +0000 (13:26 -0800)
commit5d57c327584ae0f88eba61ec8faa9c621f40cffd
tree2be010868133e17346d5c796aedfe287a153ddfe
parent6f6dded1385cfb564de85f86126f1c054c8f47b1
net: phylink: improve clause 45 PHY ksettings_set implementation

While testing ethtool with the Methode DM7052 module, it was noticed
that attempting to set the advertising mask results in the mask being
truncated to the support offered by the currently chosen PHY interface
mode.

When a PHY dynamically changes the PHY interface mode, limiting the
advertising mask in this way is not correct - if the PHY happened to
negotiate 10GBASE-T, and selected 10GBASE-R as the host interface, we
don't want to restrict the advertisement to just 10GBASE-* modes.

Rework setting the advertisement to take account of this; do not pass
the requested advertisement through phylink_validate(), but rely on
the advertisement restriction (supported mask) set when the PHY was
initially setup.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phylink.c