History

net: phy: make phy_disable_interrupts() non-static

We face an issue with rtl8211f, a pin is shared between INTB and PMEB, and the PHY Register Accessible Interrupt is enabled by default, so the INTB/PMEB pin is always active in polling mode case. As Heiner pointed out "I was thinking about calling 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." Make phy_disable_interrupts() non-static so that it could be used in phy_init_hw() to have a defined init state.

Jisheng Zhang committed 6 years ago

Commit 3dd4ef11 parent 41c2b6b2 files · +2 −1Browse files

Unified · Split

2 files
  1. drivers/net/phy/phy.c +1 −1
  2. include/linux/phy.h +1 −0
drivers/net/phy/phy.c+1−1
@@ -840,7 +840,7 @@ static void phy_error(struct phy_device *phydev) · 839 unmodified lines
840 * phy_disable_interrupts - Disable the PHY interrupts from the PHY side840 * phy_disable_interrupts - Disable the PHY interrupts from the PHY side
841 * @phydev: target phy_device struct841 * @phydev: target phy_device struct
842 */842 */
843static int phy_disable_interrupts(struct phy_device *phydev)843int phy_disable_interrupts(struct phy_device *phydev)
844{844{
845 int err;845 int err;
846 846
include/linux/phy.h+1−0
@@ -1416,6 +1416,7 @@ int phy_ethtool_ksettings_set(struct phy_device *phydev, · 1415 unmodified lines
1416int phy_mii_ioctl(struct phy_device *phydev, struct ifreq *ifr, int cmd);1416int phy_mii_ioctl(struct phy_device *phydev, struct ifreq *ifr, int cmd);
1417int phy_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);1417int phy_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
1418int phy_do_ioctl_running(struct net_device *dev, struct ifreq *ifr, int cmd);1418int phy_do_ioctl_running(struct net_device *dev, struct ifreq *ifr, int cmd);
1419int phy_disable_interrupts(struct phy_device *phydev);
1419void phy_request_interrupt(struct phy_device *phydev);1420void phy_request_interrupt(struct phy_device *phydev);
1420void phy_free_interrupt(struct phy_device *phydev);1421void phy_free_interrupt(struct phy_device *phydev);
1421void phy_print_status(struct phy_device *phydev);1422void phy_print_status(struct phy_device *phydev);