mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
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>
This commit is contained in:
parent
aae88261ab
commit
8a477a6fb6
2 changed files with 20 additions and 4 deletions
|
@ -328,6 +328,7 @@ struct phy_c45_device_ids {
|
|||
* is_c45: Set to true if this phy uses clause 45 addressing.
|
||||
* is_internal: Set to true if this phy is internal to a MAC.
|
||||
* has_fixups: Set to true if this phy has fixups/quirks.
|
||||
* suspended: Set to true if this phy has been suspended successfully.
|
||||
* state: state of the PHY for management purposes
|
||||
* dev_flags: Device-specific flags used by the PHY driver.
|
||||
* addr: Bus address of PHY
|
||||
|
@ -365,6 +366,7 @@ struct phy_device {
|
|||
bool is_c45;
|
||||
bool is_internal;
|
||||
bool has_fixups;
|
||||
bool suspended;
|
||||
|
||||
enum phy_state state;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue