diff options
author | Shaohui Xie <Shaohui.Xie@nxp.com> | 2016-01-28 15:55:46 +0800 |
---|---|---|
committer | Joe Hershberger <joe.hershberger@ni.com> | 2016-01-28 13:20:30 -0600 |
commit | ddcd1f3084d88cc92403ed09f77f42fc6f2c4e0e (patch) | |
tree | 2143f807148f8261d9b7d1dd814b6f295cd3b029 /drivers | |
parent | ff7bd212cb8a0a80a113e25af7616ef0a24abdfc (diff) |
net: phy: introduce a quirk PHY_FLAG_BROKEN_RESET
Current driver always performs a phy soft reset when connecting the phy
device, but soft reset is not always supported by a phy device, so
introduce a quirk PHY_FLAG_BROKEN_RESET to let such a phy device to skip
soft reset. This commit uses 'flags' of phy device structure to store the
quirk.
Signed-off-by: Shaohui Xie <Shaohui.Xie@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/phy/phy.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 467efd8bc7..17866a244b 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -743,6 +743,9 @@ int phy_reset(struct phy_device *phydev) int timeout = 500; int devad = MDIO_DEVAD_NONE; + if (phydev->flags & PHY_FLAG_BROKEN_RESET) + return 0; + #ifdef CONFIG_PHYLIB_10G /* If it's 10G, we need to issue reset through one of the MMDs */ if (is_10g_interface(phydev->interface)) { |