scsi: ufs: Stop using the clock scaling lock in the error handler
authorBart Van Assche <bvanassche@acm.org>
Fri, 3 Dec 2021 23:19:48 +0000 (15:19 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:48:53 +0000 (11:48 +0100)
commit513fdf0b8e2025b8fc04437083c652c91b307423
tree310afd5564b4a979b8718341b18393e98587c55a
parent13259b60b71b2f1e83b8e91f78f9728d470c1042
scsi: ufs: Stop using the clock scaling lock in the error handler

[ Upstream commit 5675c381ea51360b4968b78f23aefda73e3de90d ]

Instead of locking and unlocking the clock scaling lock, surround the
command queueing code with an RCU reader lock and call synchronize_rcu().
This patch prepares for removal of the clock scaling lock.

Link: https://lore.kernel.org/r/20211203231950.193369-16-bvanassche@acm.org
Tested-by: Bean Huo <beanhuo@micron.com>
Reviewed-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Stable-dep-of: 1a5665fc8d7a ("scsi: ufs: core: WLUN suspend SSU/enter hibern8 fail recovery")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/ufs/ufshcd.c