From 9df81dd7583d14862d0cfb673a941b261f3b2112 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Mon, 17 Feb 2014 13:34:03 -0800 Subject: net: phy: allow PHY drivers to implement their own software reset As pointed out by Shaohui, most 10G PHYs out there have a non-standard compliant software reset sequence, eventually something much more complex than just toggling the BMCR_RESET bit. Allow PHY driver to implement their own soft_reset() callback to deal with that. If no callback is provided, call into genphy_soft_reset() which makes sure the existing behavior is kept intact. Reported-by: Shaohui Xie Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller --- include/linux/phy.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/linux/phy.h') diff --git a/include/linux/phy.h b/include/linux/phy.h index bffe0ec1604f..24126c4b27b5 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -439,6 +439,11 @@ struct phy_driver { u32 features; u32 flags; + /* + * Called to issue a PHY software reset + */ + int (*soft_reset)(struct phy_device *phydev); + /* * Called to initialize the PHY, * including after a reset -- cgit v1.2.3