Commit 6a95befc authored by Marc Gonzalez's avatar Marc Gonzalez Committed by David S. Miller

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: default avatarMarc Gonzalez <marc_gonzalez@sigmadesigns.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6e729175
...@@ -1225,6 +1225,7 @@ void phy_state_machine(struct work_struct *work) ...@@ -1225,6 +1225,7 @@ void phy_state_machine(struct work_struct *work)
if (err < 0) if (err < 0)
phy_error(phydev); phy_error(phydev);
if (old_state != phydev->state)
phydev_dbg(phydev, "PHY state change %s -> %s\n", phydev_dbg(phydev, "PHY state change %s -> %s\n",
phy_state_to_str(old_state), phy_state_to_str(old_state),
phy_state_to_str(phydev->state)); phy_state_to_str(phydev->state));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment