diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2022-08-01 16:34:03 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-08-03 19:20:41 -0700 |
commit | 744d23c71af39c7dc77ac7c3cac87ae86a181a85 (patch) | |
tree | 71a5858c1bed8f900892bb128578622b6ae4962a /drivers/rtc/rtc-sd3078.c | |
parent | 7de196a6aa3a02f6079f5bf8796df4cb6cb5e783 (diff) | |
download | linux-744d23c71af39c7dc77ac7c3cac87ae86a181a85.tar.gz |
net: phy: Warn about incorrect mdio_bus_phy_resume() state
Calling mdio_bus_phy_resume() with neither the PHY state machine set to PHY_HALTED nor phydev->mac_managed_pm set to true is a good indication that we can produce a race condition looking like this: CPU0 CPU1 bcmgenet_resume -> phy_resume -> phy_init_hw -> phy_start -> phy_resume phy_start_aneg() mdio_bus_phy_resume -> phy_resume -> phy_write(..., BMCR_RESET) -> usleep() -> phy_read() with the phy_resume() function triggering a PHY behavior that might have to be worked around with (see bf8bfc4336f7 ("net: phy: broadcom: Fix brcm_fet_config_init()") for instance) that ultimately leads to an error reading from the PHY. Fixes: fba863b81604 ("net: phy: make PHY PM ops a no-op if MAC driver manages PHY PM") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Link: https://lore.kernel.org/r/20220801233403.258871-1-f.fainelli@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/rtc/rtc-sd3078.c')
0 files changed, 0 insertions, 0 deletions