Go to file
Khairul Anuar Romli cdfb20e4b3 spi: spi-cadence-quadspi: Fix pm runtime unbalance
commit b07f349d18 upstream.

Having PM put sync in remove function is causing PM underflow during
remove operation. This is caused by the function, runtime_pm_get_sync,
not being called anywhere during the op. Ensure that calls to
pm_runtime_enable()/pm_runtime_disable() and
pm_runtime_get_sync()/pm_runtime_put_sync() match.

echo 108d2000.spi > /sys/bus/platform/drivers/cadence-qspi/unbind
[   49.644256] Deleting MTD partitions on "108d2000.spi.0":
[   49.649575] Deleting u-boot MTD partition
[   49.684087] Deleting root MTD partition
[   49.724188] cadence-qspi 108d2000.spi: Runtime PM usage count underflow!

Continuous bind/unbind will result in an "Unbalanced pm_runtime_enable" error.
Subsequent unbind attempts will return a "No such device" error, while bind
attempts will return a "Resource temporarily unavailable" error.

[   47.592434] cadence-qspi 108d2000.spi: Runtime PM usage count underflow!
[   49.592233] cadence-qspi 108d2000.spi: detected FIFO depth (1024) different from config (128)
[   53.232309] cadence-qspi 108d2000.spi: Runtime PM usage count underflow!
[   55.828550] cadence-qspi 108d2000.spi: detected FIFO depth (1024) different from config (128)
[   57.940627] cadence-qspi 108d2000.spi: Runtime PM usage count underflow!
[   59.912490] cadence-qspi 108d2000.spi: detected FIFO depth (1024) different from config (128)
[   61.876243] cadence-qspi 108d2000.spi: Runtime PM usage count underflow!
[   61.883000] platform 108d2000.spi: Unbalanced pm_runtime_enable!
[  532.012270] cadence-qspi 108d2000.spi: probe with driver cadence-qspi failed1

Also, change clk_disable_unprepare() to clk_disable() since continuous
bind and unbind operations will trigger a warning indicating that the clock is
already unprepared.

Fixes: 4892b374c9 ("mtd: spi-nor: cadence-quadspi: Add runtime PM support")
cc: stable@vger.kernel.org # 6.6+
Signed-off-by: Khairul Anuar Romli <khairul.anuar.romli@altera.com>
Reviewed-by: Matthew Gerlach <matthew.gerlach@altera.com>
Link: https://patch.msgid.link/4e7a4b8aba300e629b45a04f90bddf665fbdb335.1749601877.git.khairul.anuar.romli@altera.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-07-06 11:00:16 +02:00
arch x86/tools: Drop duplicate unlikely() definition in insn_decoder_test.c 2025-07-06 11:00:16 +02:00
block
certs
crypto
Documentation dt-bindings: serial: 8250: Make clocks and clock-frequency exclusive 2025-07-06 11:00:13 +02:00
drivers spi: spi-cadence-quadspi: Fix pm runtime unbalance 2025-07-06 11:00:16 +02:00
fs ksmbd: remove unsafe_memcpy use in session setup 2025-07-06 11:00:16 +02:00
include Revert "ipv6: save dontfrag in cork" 2025-07-06 11:00:16 +02:00
init
io_uring io_uring: fix task leak issue in io_wq_create() 2025-06-27 11:08:58 +01:00
ipc ipc: fix to protect IPCS lookups using RCU 2025-06-27 11:08:49 +01:00
kernel perf/core: Fix WARN in perf_cgroup_switch() 2025-06-27 11:09:04 +01:00
lib Kunit to check the longest symbol length 2025-07-06 11:00:16 +02:00
LICENSES
mm mm/damon/sysfs-schemes: free old damon_sysfs_scheme_filter->memcg_path on write 2025-07-06 11:00:11 +02:00
net Revert "ipv6: save dontfrag in cork" 2025-07-06 11:00:16 +02:00
rust rust: module: place cleanup_module() in .exit.text section 2025-07-06 11:00:06 +02:00
samples
scripts kbuild: rpm-pkg: simplify installkernel %post 2025-07-06 11:00:16 +02:00
security selinux: fix selinux_xfrm_alloc_user() to set correct ctx_len 2025-06-27 11:08:59 +01:00
sound ALSA: hda/realtek: Fix built-in mic on ASUS VivoBook X507UAR 2025-07-06 11:00:12 +02:00
tools libbpf: Fix possible use-after-free for externs 2025-07-06 11:00:12 +02:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile Linux 6.6.95 2025-06-27 11:09:04 +01:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.