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 <[email protected]> Cc: Heiner Kallweit <[email protected]> Cc: Sebastian Reichel <[email protected]> Cc: Vivien Didelot <[email protected]> Cc: Andrew Lunn <[email protected]> Cc: Florian Fainelli <[email protected]> Cc: David S. Miller <[email protected]> --- 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
