diff options
-rw-r--r-- | drivers/net/phy/phy.c | 5 | ||||
-rw-r--r-- | include/linux/phy.h | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 683c9c9bda32..c185503af5f7 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -812,6 +812,8 @@ void phy_stop(struct phy_device *phydev) sfp_upstream_stop(phydev->sfp_bus); phydev->state = PHY_HALTED; + if (phydev->drv->stop) + phydev->drv->stop(phydev); mutex_unlock(&phydev->lock); @@ -845,6 +847,9 @@ void phy_start(struct phy_device *phydev) goto out; } + if (phydev->drv->start && phydev->drv->start(phydev)) + goto out; + if (phydev->sfp_bus) sfp_upstream_start(phydev->sfp_bus); diff --git a/include/linux/phy.h b/include/linux/phy.h index fb162b56343d..d929683db8ce 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -551,6 +551,9 @@ struct phy_driver { int (*suspend)(struct phy_device *phydev); int (*resume)(struct phy_device *phydev); + int (*start)(struct phy_device *phydev); + void (*stop)(struct phy_device *phydev); + /* * Configures the advertisement and resets * autonegotiation if phydev->autoneg is on, |