]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'net-phy-call-phy_disable_interrupts-in-phy_init_hw'
authorDavid S. Miller <davem@davemloft.net>
Wed, 24 Jun 2020 21:52:49 +0000 (14:52 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Jun 2020 21:52:49 +0000 (14:52 -0700)
commit73b8f87104b5b155e217d0c641d6b95570821e04
tree5399a6c3e32d842c96e657c01a6431f40ce587d8
parentf04c2fc351775641261b46036f03b1ebbea1cf41
parent2ff780a31fabf7df5554f8152a7b4d6d4ad77e62
Merge branch 'net-phy-call-phy_disable_interrupts-in-phy_init_hw'

Jisheng Zhang says:

====================
net: phy: call phy_disable_interrupts() in phy_init_hw()

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."

patch1 makes phy_disable_interrupts() non-static so that it could be used
in phy_init_hw() to have a defined init state.

patch2 calls phy_disable_interrupts() in phy_init_hw() to have a
defined init state.

Since v3:
  - call phy_disable_interrupts() have interrupts disabled first then
    config_init, thank Florian

Since v2:
  - Don't export phy_disable_interrupts() but just make it non-static

Since v1:
  - EXPORT the correct symbol
====================

Signed-off-by: David S. Miller <davem@davemloft.net>