1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/phy
Heiner Kallweit 4c0d2e96ba net: phy: consider that suspend2ram may cut off PHY power
Claudiu reported that on his system S2R cuts off power to the PHY and
after resuming certain PHY settings are lost. The PM folks confirmed
that cutting off power to selected components in S2R is a valid case.
Therefore resuming from S2R, same as from hibernation, has to assume
that the PHY has power-on defaults. As a consequence use the restore
callback also as resume callback.
In addition make sure that the interrupt configuration is restored.
Let's do this in phy_init_hw() and ensure that after this call
actual interrupt configuration is in sync with phydev->interrupts.
Currently, if interrupt was enabled before hibernation, we would
resume with interrupt disabled because that's the power-on default.

This fix applies cleanly only after the commit marked as fixed.

I don't have an affected system, therefore change is compile-tested
only.

[0] https://lore.kernel.org/netdev/1610120754-14331-1-git-send-email-claudiu.beznea@microchip.com/

Fixes: 611d779af7 ("net: phy: fix MDIO bus PM PHY resuming")
Reported-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-02-11 18:27:18 -08:00
..
mscc net: phy: mscc: use new PTP_MSGTYPE_* defines 2020-11-25 12:23:21 -08:00
adin.c net: phy: adin: remove the use of the .ack_interrupt() 2020-11-17 11:37:09 -08:00
amd.c net: phy: amd: remove the use of .ack_interrupt() 2020-11-17 11:37:00 -08:00
aquantia.h net: phy: Use the correct style for SPDX License Identifier 2019-11-27 11:25:48 -08:00
aquantia_hwmon.c net: phy: aquantia: add hwmon support 2019-02-25 14:16:22 -08:00
aquantia_main.c net: phy: aquantia: do not return an error on clearing pending IRQs 2020-11-11 14:09:54 -08:00
at803x.c net: phy: at803x: remove the use of .ack_interrupt() 2020-11-05 16:31:59 -08:00
ax88796b.c net: phy: rename Asix Electronics PHY driver 2019-06-09 13:24:17 -07:00
bcm-cygnus.c net: phy: broadcom: remove use of ack_interrupt() 2020-11-05 16:32:39 -08:00
bcm-phy-lib.c net: phy: broadcom: remove use of ack_interrupt() 2020-11-05 16:32:39 -08:00
bcm-phy-lib.h net: phy: broadcom: implement generic .handle_interrupt() callback 2020-11-05 16:32:27 -08:00
bcm7xxx.c net: phy: bcm7xxx: Add an entry for BCM72113 2020-09-21 17:16:17 -07:00
bcm63xx.c net: phy: broadcom: remove use of ack_interrupt() 2020-11-05 16:32:39 -08:00
bcm87xx.c net: phy: broadcom: remove use of ack_interrupt() 2020-11-05 16:32:39 -08:00
bcm54140.c net: phy: broadcom: remove use of ack_interrupt() 2020-11-05 16:32:39 -08:00
bcm84881.c net: phy: bcm84881: clear settings on link down 2020-04-23 15:55:35 -07:00
broadcom.c net: phy: broadcom: remove use of ack_interrupt() 2020-11-05 16:32:39 -08:00
cicada.c net: phy: cicada: remove the use of .ack_interrupt() 2020-11-05 16:32:39 -08:00
cortina.c net: mdiobus: add clause 45 mdiobus accessors 2020-05-26 15:31:45 -07:00
davicom.c net: phy: davicom: remove the use of .ack_interrupt() 2020-11-05 16:32:39 -08:00
dp83tc811.c net: phy: ti: remove the use of .ack_interrupt() 2020-11-25 11:18:38 -08:00
dp83640.c net: phy: dp83640: use new PTP_MSGTYPE_SYNC define 2020-11-25 12:23:06 -08:00
dp83640_reg.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dp83822.c net: phy: ti: remove the use of .ack_interrupt() 2020-11-25 11:18:38 -08:00
dp83848.c net: phy: ti: remove the use of .ack_interrupt() 2020-11-25 11:18:38 -08:00
dp83867.c net: phy: ti: remove the use of .ack_interrupt() 2020-11-25 11:18:38 -08:00
dp83869.c net: phy: ti: remove the use of .ack_interrupt() 2020-11-25 11:18:38 -08:00
et1011c.c net: phy: switch drivers to use dynamic feature detection 2019-04-15 17:19:54 -07:00
fixed_phy.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
icplus.c net: phy: icplus: remove the use .ack_interrupt() 2020-11-25 11:18:37 -08:00
intel-xway.c net: phy: intel-xway: remove the use of .ack_interrupt() 2020-11-25 11:18:37 -08:00
Kconfig mdio: fix mdio-thunder.c dependency & build error 2020-09-27 13:21:28 -07:00
linkmode.c net: add linkmode helper for setting flow control advertisement 2020-02-16 19:39:44 -08:00
lxt.c net: phy: lxt: remove the use of .ack_interrupt() 2020-11-17 11:36:59 -08:00
Makefile net: phy: Sort Kconfig and Makefile 2020-08-27 06:55:51 -07:00
marvell.c net: phy: marvell: replace phy_modify() 2020-12-01 17:08:07 -08:00
marvell10g.c net: phy: marvell10g: fix null pointer dereference 2020-08-11 15:42:23 -07:00
mdio-boardinfo.c net: phy: Fixup parameters in kerneldoc 2020-07-07 12:47:10 -07:00
mdio-boardinfo.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mdio_bus.c mdio_bus: suppress err message for reset gpio EPROBE_DEFER 2020-11-20 18:39:58 -08:00
mdio_device.c net: mdio device: use flexible sleeping in reset function 2020-08-03 15:01:02 -07:00
mdio_devres.c of: mdio: provide devm_of_mdiobus_register() 2020-06-30 15:57:34 -07:00
meson-gxl.c net: phy: meson-gxl: remove the use of .ack_callback() 2020-11-25 11:18:37 -08:00
micrel.c net: phy: micrel: fix interrupt handling 2020-11-27 17:26:20 -08:00
microchip.c net: phy: microchip: remove the use of .ack_interrupt() 2020-11-17 11:36:59 -08:00
microchip_t1.c net: phy: microchip: remove the use of .ack_interrupt() 2020-11-17 11:36:59 -08:00
mii_timestamper.c net: mii_timestamper: fix static allocation by PHY driver 2020-01-31 07:46:11 -08:00
national.c net: phy: national: remove the use of the .ack_interrupt() 2020-11-25 11:18:37 -08:00
nxp-tja11xx.c net: phy: nxp-tja11xx: remove the use of .ack_interrupt() 2020-11-17 11:37:00 -08:00
phy-c45.c net: phy: fix kernel-doc markups 2020-11-17 14:15:03 -08:00
phy-core.c net: phy: Document core PHY structures 2020-09-23 18:02:49 -07:00
phy.c net: phy: remove the .did_interrupt() and .ack_interrupt() callback 2020-11-25 11:18:38 -08:00
phy_device.c net: phy: consider that suspend2ram may cut off PHY power 2021-02-11 18:27:18 -08:00
phy_led_triggers.c net: phy: leds: Deduplicate link LED trigger registration 2020-10-30 10:43:37 -07:00
phylink.c net: phy: fix kernel-doc markups 2020-11-17 14:15:03 -08:00
qsemi.c net: phy: qsemi: remove the use of .ack_interrupt() 2020-11-25 11:18:38 -08:00
realtek.c net: phy: realtek: read actual speed on rtl8211f to detect downshift 2020-11-25 12:29:40 -08:00
rockchip.c net: phy: switch drivers to use dynamic feature detection 2019-04-15 17:19:54 -07:00
sfp-bus.c net: sfp: relax bitrate-derived mode check 2020-12-09 19:38:10 -08:00
sfp.c net: sfp: VSOL V2801F / CarlitoxxPro CPGOS03-0490 v2.0 workaround 2020-12-09 19:38:10 -08:00
sfp.h net: sfp: add module start/stop upstream notifications 2019-12-11 11:53:41 -08:00
smsc.c net: phy: smsc: fix clk error handling 2021-01-12 18:39:19 -08:00
spi_ks8995.c net: Use kobj_to_dev() API 2020-09-28 15:14:42 -07:00
ste10Xp.c net: phy: ste10Xp: remove the use of .ack_interrupt() 2020-11-17 11:37:00 -08:00
swphy.c Update rmk's email address in various drivers 2020-04-21 17:50:09 +01:00
swphy.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
teranetics.c net: phy: remove genphy_no_soft_reset 2020-04-24 16:47:51 -07:00
uPD60620.c net: phy: use phy_resolve_aneg_pause() 2019-12-19 12:52:34 -08:00
vitesse.c net: phy: vitesse: remove the use of .ack_interrupt() 2020-11-17 11:36:59 -08:00
xilinx_gmii2rgmii.c net: phy: gmii2rgmii: Dont use priv field in phy device 2019-09-05 12:32:06 +02:00