]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: set link state to down when creating the phy_device
authorHeiner Kallweit <hkallweit1@gmail.com>
Sun, 11 Mar 2018 14:00:37 +0000 (15:00 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Mar 2018 01:00:20 +0000 (21:00 -0400)
commitf1711283e7b90ad49e2ef9d77179fb77ae1ff770
tree4024386a0ec1ea4ef7599d26f7071b8a43afd15b
parentb3e2526ffc7a7687e44f2471f4949a6d31d26266
net: phy: set link state to down when creating the phy_device

Currently the link state is initialized to "up" when the phy_device is
being created. This is not consistent with the phy state being
initialized to PHY_DOWN.

Usually this doen't do any harm because the link state is updated
once the PHY reaches state PHY_AN. However e.g. if a LAN port isn't
used and the PHY remains down this inconsistency remains and calls
to functions like phy_print_status() give false results.
Therefore change the initialization to link being down.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy_device.c