Commit b7ec8a2b authored by Khairul Anuar Romli's avatar Khairul Anuar Romli Committed by Greg Kroah-Hartman
Browse files

spi: cadence-quadspi: Implement refcount to handle unbind during busy



[ Upstream commit 74462840 ]

driver support indirect read and indirect write operation with
assumption no force device removal(unbind) operation. However
force device removal(removal) is still available to root superuser.

Unbinding driver during operation causes kernel crash. This changes
ensure driver able to handle such operation for indirect read and
indirect write by implementing refcount to track attached devices
to the controller and gracefully wait and until attached devices
remove operation completed before proceed with removal operation.

Signed-off-by: default avatarKhairul Anuar Romli <khairul.anuar.romli@altera.com>
Reviewed-by: default avatarMatthew Gerlach <matthew.gerlach@altera.com>
Reviewed-by: default avatarNiravkumar L Rabara <nirav.rabara@altera.com>
Link: https://patch.msgid.link/8704fd6bd2ff4d37bba4a0eacf5eba3ba001079e.1756168074.git.khairul.anuar.romli@altera.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Stable-dep-of: 30dbc1c8 ("spi: cadence-qspi: defer runtime support on socfpga if reset bit is enabled")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4109506b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment