diff options
author | Marc Gonzalez <marc_gonzalez@sigmadesigns.com> | 2017-07-28 13:18:30 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-07-31 16:21:31 -0700 |
commit | 6a95befc8d0346d6cb3b4646c761e8b42e66a4df (patch) | |
tree | f1cd4591138e102447549aa2d9d54877926b8ed1 /drivers/net/phy | |
parent | 6e7291752ba717dba51f136d62a114635a944e56 (diff) | |
download | linux-6a95befc8d0346d6cb3b4646c761e8b42e66a4df.tar.bz2 |
net: phy: Log only PHY state transitions
In the current code, old and new PHY states are always logged.
>From now on, log only PHY state transitions.
Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r-- | drivers/net/phy/phy.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index ac1dcf0289fa..3aedf415908b 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -1225,9 +1225,10 @@ void phy_state_machine(struct work_struct *work) if (err < 0) phy_error(phydev); - phydev_dbg(phydev, "PHY state change %s -> %s\n", - phy_state_to_str(old_state), - phy_state_to_str(phydev->state)); + if (old_state != phydev->state) + phydev_dbg(phydev, "PHY state change %s -> %s\n", + phy_state_to_str(old_state), + phy_state_to_str(phydev->state)); /* Only re-schedule a PHY state machine change if we are polling the * PHY, if PHY_IGNORE_INTERRUPT is set, then we will be moving |