mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-07-06 00:13:38 -04:00
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>
This commit is contained in:
parent
3dd4ef1bdb
commit
9886a4dbd2
1 changed files with 4 additions and 0 deletions
|
@ -1092,6 +1092,10 @@ int phy_init_hw(struct phy_device *phydev)
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
ret = phy_disable_interrupts(phydev);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
if (phydev->drv->config_init)
|
if (phydev->drv->config_init)
|
||||||
ret = phydev->drv->config_init(phydev);
|
ret = phydev->drv->config_init(phydev);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue