]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: make phy_disable_interrupts() non-static
authorJisheng Zhang <Jisheng.Zhang@synaptics.com>
Wed, 24 Jun 2020 07:58:24 +0000 (15:58 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Jun 2020 21:52:49 +0000 (14:52 -0700)
commite150c5d172ddf3a9855929376923b6a3552715ab
tree75a29c79f49de343857af2a2b63ca153b408c20f
parentf04c2fc351775641261b46036f03b1ebbea1cf41
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.

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>
drivers/net/phy/phy.c
include/linux/phy.h