Message ID | 1453967746-6404-1-git-send-email-shh.xie@gmail.com |
---|---|
State | Accepted |
Commit | ddcd1f3084d88cc92403ed09f77f42fc6f2c4e0e |
Delegated to: | Joe Hershberger |
Headers | show |
On Thu, Jan 28, 2016 at 1:55 AM, <shh.xie@gmail.com> wrote: > From: Shaohui Xie <Shaohui.Xie@nxp.com> > > 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>
Hi shaohui, https://patchwork.ozlabs.org/patch/574632/ was applied to u-boot-net.git. Thanks! -Joe
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 9bf231c..9126d5d 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -741,6 +741,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)) { diff --git a/include/phy.h b/include/phy.h index e030c9f..09bbe48 100644 --- a/include/phy.h +++ b/include/phy.h @@ -17,6 +17,8 @@ #define PHY_MAX_ADDR 32 +#define PHY_FLAG_BROKEN_RESET (1 << 0) /* soft reset not supported */ + #define PHY_DEFAULT_FEATURES (SUPPORTED_Autoneg | \ SUPPORTED_TP | \ SUPPORTED_MII)