]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: stmmac: fix stm32 (and potentially others) resume regression
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Fri, 30 Jan 2026 20:04:57 +0000 (20:04 +0000)
committerJakub Kicinski <kuba@kernel.org>
Tue, 3 Feb 2026 01:17:01 +0000 (17:17 -0800)
commitdbbec8c5a79f4c7aa8d07da8c0b5a34d76c50699
treeb4ab3fc0c73d6c61351c81c1b3064b51bff09d18
parent1c172febdf065375359b2b95156e476bfee30b60
net: stmmac: fix stm32 (and potentially others) resume regression

Marek reported that suspending stm32 causes the following errors when
the interface is administratively down:

$ echo devices > /sys/power/pm_test
$ echo mem > /sys/power/state
...
ck_ker_eth2stp already disabled
...
ck_ker_eth2stp already unprepared
...

On suspend, stm32 starts the eth2stp clock in its suspend method, and
stops it in the resume method. This is because the blamed commit omits
the call to the platform glue ->suspend() method, but does make the
call to the platform glue ->resume() method.

This problem affects all other converted drivers as well - e.g. looking
at the PCIe drivers, pci_save_state() will not be called, but
pci_restore_state() will be. Similar issues affect all other drivers.

Fix this by always calling the ->suspend() method, even when the network
interface is down. This fixes all the conversions to the platform glue
->suspend() and ->resume() methods.

Link: https://lore.kernel.org/r/20260114081809.12758-1-marex@nabladev.com
Fixes: 07bbbfe7addf ("net: stmmac: add suspend()/resume() platform ops")
Reported-by: Marek Vasut <marex@nabladev.com>
Tested-by: Marek Vasut <marex@nabladev.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1vlujh-00000007Hkw-2p6r@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c