<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [CI][BAT] all suspend tests - dmesg-warn - called from state HALTED"
href="https://bugs.freedesktop.org/show_bug.cgi?id=109241#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [CI][BAT] all suspend tests - dmesg-warn - called from state HALTED"
href="https://bugs.freedesktop.org/show_bug.cgi?id=109241">bug 109241</a>
from <span class="vcard"><a class="email" href="mailto:chris@chris-wilson.co.uk" title="Chris Wilson <chris@chris-wilson.co.uk>"> <span class="fn">Chris Wilson</span></a>
</span></b>
<pre>Fwiw,
commit 2b3e88ea65287ba738a798622405b15344871085
Author: Heiner Kallweit <<a href="mailto:hkallweit1@gmail.com">hkallweit1@gmail.com</a>>
Date: Sun Dec 16 18:30:14 2018 +0100
net: phy: improve phy state checking
Add helpers phy_is_started() and __phy_is_started() to avoid open-coded
checks whether PHY has been started. To make the check easier move
PHY_HALTED before PHY_UP in enum phy_state. Further improvements:
phy_start_aneg():
Return -EBUSY and print warning if function is called from a non-started
state (DOWN, READY, HALTED). Better check because function is exported
and drivers may use it incorrectly.
phy_interrupt():
Return IRQ_NONE also if state is DOWN or READY. We should never receive
an interrupt in one of these states, but better play safe.
phy_stop():
Just return and print a warning if PHY is in a non-started state.
This warning should help to identify drivers with unbalanced calls to
phy_start() / phy_stop().
phy_state_machine():
Schedule state machine run only if PHY is in a started state.
E.g. if state is READY we don't need the state machine, it will be
started by phy_start().
v2:
- don't use __func__ within phy_warn_state
v3:
- use WARN() instead of printing error message to facilitate debugging
Signed-off-by: Heiner Kallweit <<a href="mailto:hkallweit1@gmail.com">hkallweit1@gmail.com</a>>
Reviewed-by: Florian Fainelli <<a href="mailto:f.fainelli@gmail.com">f.fainelli@gmail.com</a>>
Signed-off-by: David S. Miller <<a href="mailto:davem@davemloft.net">davem@davemloft.net</a>>
deemed to turn phy_start_aneg() while HALTED into an error (previously it still
did the phy_config_aneg()).</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>