The fixed_phy driver does not set the phydev->is_gigabit_capable member when the fixed_phy is gigabit capable. This in turn causes phy_device.c:genphy_read_status function to return unknown phy parameters (SPEED_UNKNOWN, DUPLEX_UNKNOWN, ...), if the fixed_phy is created with SPEED_1000.
Signed-off-by: Marek Behún <marek.be...@nic.cz> Cc: Heiner Kallweit <hkallwe...@gmail.com> Cc: Sebastian Reichel <sebastian.reic...@collabora.co.uk> Cc: Vivien Didelot <vivien.dide...@gmail.com> Cc: Andrew Lunn <and...@lunn.ch> Cc: Florian Fainelli <f.faine...@gmail.com> Cc: David S. Miller <da...@davemloft.net> --- drivers/net/phy/fixed_phy.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/phy/fixed_phy.c b/drivers/net/phy/fixed_phy.c index 3ffe46df249e..424b02ad7b7b 100644 --- a/drivers/net/phy/fixed_phy.c +++ b/drivers/net/phy/fixed_phy.c @@ -286,6 +286,7 @@ static struct phy_device *__fixed_phy_register(unsigned int irq, phy->supported); linkmode_set_bit(ETHTOOL_LINK_MODE_1000baseT_Full_BIT, phy->supported); + phy->is_gigabit_capable = 1; /* fall through */ case SPEED_100: linkmode_set_bit(ETHTOOL_LINK_MODE_100baseT_Half_BIT, -- 2.21.0