diff options
| author | Coia Prant <coiaprant@gmail.com> | 2026-10-23 15:52:12 +0800 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-10-28 17:29:38 -0700 |
| commit | 49d8bbc21244f0c2d2ebf5ee03fb7352ff019ecc (patch) | |
| tree | b61b110f9ff9d15e5a7ef1e45d8244d5147cc5a3 /kernel/resource.c | |
| parent | 8146be04908d3efbe3c6e130f551edbfd7a9dab8 (diff) | |
net: pcs: xpcs-plat: fix runtime PM initialization
The driver calls pm_runtime_set_active() before runtime PM is enabled and
before the CSR clock is prepared and enabled. If the device is later
suspended (e.g. during unbind), the runtime suspend callback tries to
disable a clock that was never enabled, producing:
clk_csr already disabled
clk_csr already unprepared
Set the initial runtime PM status to suspended instead, and register a
devm action that force-suspends the device on teardown. Without that
action the CSR clock would stay enabled if the driver is removed while
runtime-active, since nothing triggers a runtime suspend on unbind.
pm_runtime_force_suspend() is not checked because the runtime suspend
callback cannot fail.
The clock is enabled on the first runtime resume (e.g. during MDIO
access).
No upstream platform currently enables this driver with a real CSR clock
dependency, so the issue is not reachable in mainline today. It was
found while using this driver as a reference for the Rockchip XPCS glue
driver.
Signed-off-by: Coia Prant <coiaprant@gmail.com>
Link: https://patch.msgid.link/20261023075214.1793922-3-coiaprant@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'kernel/resource.c')
0 files changed, 0 insertions, 0 deletions
