diff options
author | Jisheng Zhang <Jisheng.Zhang@synaptics.com> | 2020-06-24 15:59:23 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-06-24 14:52:49 -0700 |
commit | 9886a4dbd2aacf4b044e294e4cdebb43992d44b1 (patch) | |
tree | 5399a6c3e32d842c96e657c01a6431f40ce587d8 /drivers/net/phy/phy_device.c | |
parent | 3dd4ef1bdbac959bb20faec93937720ddd9917c6 (diff) | |
download | linux-9886a4dbd2aacf4b044e294e4cdebb43992d44b1.tar.bz2 |
net: phy: call phy_disable_interrupts() in phy_init_hw()
Call phy_disable_interrupts() in phy_init_hw() to "have a defined init
state as we don't know in which state the PHY is if the PHY driver is
loaded. We shouldn't assume that it's the chip power-on defaults, BIOS
or boot loader could have changed this. Or in case of dual-boot
systems the other OS could leave the PHY in whatever state." as pointed
out by Heiner.
Suggested-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/phy_device.c')
-rw-r--r-- | drivers/net/phy/phy_device.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 85ba95b598b5..b4978c5fb2ca 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -1092,6 +1092,10 @@ int phy_init_hw(struct phy_device *phydev) if (ret < 0) return ret; + ret = phy_disable_interrupts(phydev); + if (ret) + return ret; + if (phydev->drv->config_init) ret = phydev->drv->config_init(phydev); |