diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2014-02-17 13:34:03 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-02-17 16:40:09 -0500 |
commit | 9df81dd7583d14862d0cfb673a941b261f3b2112 (patch) | |
tree | a790b50329b80f6a6b29f745fd2baad8b4d1944f /include/linux/phy.h | |
parent | 797ac07137d9ae8572008e21e6123a9ae17dae50 (diff) | |
download | linux-stable-9df81dd7583d14862d0cfb673a941b261f3b2112.tar.gz linux-stable-9df81dd7583d14862d0cfb673a941b261f3b2112.tar.bz2 linux-stable-9df81dd7583d14862d0cfb673a941b261f3b2112.zip |
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 <Shaohui.Xie@freescale.com>
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.h | 5 |
1 files changed, 5 insertions, 0 deletions
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 @@ -440,6 +440,11 @@ struct phy_driver { 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 */ |