aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/phy.h
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2015-01-27 01:05:39 -0500
committerDavid S. Miller <davem@davemloft.net>2015-01-27 03:16:51 -0500
commit8a477a6fb6a33651adda772360b85fd813569743 (patch)
treeb9b22fb33dbeecda77bb31d3cbb0b0fe0b9547cd /include/linux/phy.h
parentaae88261abd58fffef7ee0e00160ce4ea105b0f3 (diff)
net: phy: keep track of the PHY suspend state
In order to avoid double calls to phydev->drv->suspend and resume, keep track of whether the PHY has already been suspended as a consequence of a successful call to phy_suspend(). We will use this in our MDIO bus suspend/resume hooks to avoid a double suspend call. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/phy.h')
-rw-r--r--include/linux/phy.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 1b3690b597d5..685809835b5c 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -328,6 +328,7 @@ struct phy_c45_device_ids {
328 * is_c45: Set to true if this phy uses clause 45 addressing. 328 * is_c45: Set to true if this phy uses clause 45 addressing.
329 * is_internal: Set to true if this phy is internal to a MAC. 329 * is_internal: Set to true if this phy is internal to a MAC.
330 * has_fixups: Set to true if this phy has fixups/quirks. 330 * has_fixups: Set to true if this phy has fixups/quirks.
331 * suspended: Set to true if this phy has been suspended successfully.
331 * state: state of the PHY for management purposes 332 * state: state of the PHY for management purposes
332 * dev_flags: Device-specific flags used by the PHY driver. 333 * dev_flags: Device-specific flags used by the PHY driver.
333 * addr: Bus address of PHY 334 * addr: Bus address of PHY
@@ -365,6 +366,7 @@ struct phy_device {
365 bool is_c45; 366 bool is_c45;
366 bool is_internal; 367 bool is_internal;
367 bool has_fixups; 368 bool has_fixups;
369 bool suspended;
368 370
369 enum phy_state state; 371 enum phy_state state;
370 372