Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: phy: fix reading fixed phy status

With the switch to phy_resolve_aneg_linkmode() we don't read from the
chip any longer what is advertised but use phydev->advertising directly.
For a fixed phy however this bitmap is empty so far, what results in
no common mode being found. This breaks DSA. Fix this by advertising
everything that is supported. For a normal phy this done by phy_probe().

Fixes: 5502b218e001 ("net: phy: use phy_resolve_aneg_linkmode in genphy_read_status")
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Tested-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Heiner Kallweit and committed by
David S. Miller
0f3b1cf2 726097d6

+3
+3
drivers/net/phy/fixed_phy.c
··· 22 22 #include <linux/seqlock.h> 23 23 #include <linux/idr.h> 24 24 #include <linux/netdevice.h> 25 + #include <linux/linkmode.h> 25 26 26 27 #include "swphy.h" 27 28 ··· 300 299 linkmode_set_bit(ETHTOOL_LINK_MODE_10baseT_Full_BIT, 301 300 phy->supported); 302 301 } 302 + 303 + linkmode_copy(phy->advertising, phy->supported); 303 304 304 305 ret = phy_device_register(phy); 305 306 if (ret) {