lkml.org 
[lkml]   [2021]   [Jan]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH net 0/1] net: phy: Fix interrupt mask loss on resume from hibernation
Date
Some PHYs such as SMSC LAN87xx clear the interrupt mask register on
software reset. Since mdio_bus_phy_restore() calls phy_init_hw() which
does a software reset of the PHY, these PHYs will lose their interrupt
mask configuration on resuming from hibernation.

I initially reconfigured only the PHY interrupt mask using
phydev->config_intr(), which worked fine with PM_DEBUG/test_resume, but
there seems to be an issue when resuming from a real hibernation, by which
the interrupt type is not set appropriately (in this case
IRQ_TYPE_LEVEL_LOW). Calling irq_set_irq_type() directly from sysfs
restored the PHY functionality immediately suggesting that everything is
otherwise well configured. Therefore this patch suggests freeing and
re-requesting the interrupt, to guarantee proper interrupt configuration.

Laurent Badel (1):
net: phy: Reconfigure PHY interrupt in mdio_bus_phy_restore()

drivers/net/phy/phy_device.c | 9 +++++++++
1 file changed, 9 insertions(+)

--
2.17.1



-----------------------------
Eaton Industries Manufacturing GmbH ~ Registered place of business: Route de la Longeraie 7, 1110, Morges, Switzerland

-----------------------------

\
 
 \ /
  Last update: 2021-01-22 15:46    [W:0.053 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site