scsi: ufs: core: Remove the ufshcd_hba_exit() call from ufshcd_async_scan()
authorBart Van Assche <bvanassche@acm.org>
Mon, 18 Dec 2023 22:52:15 +0000 (14:52 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Feb 2024 00:18:48 +0000 (16:18 -0800)
commitcf4669c30a8a90ae4b4eb1d38ba2008faaa09a1d
tree306f5e653a068d7d21566abcae1ed5411882e0cf
parente23d6ba5029bc555974ee2461130a1b67c5224a7
scsi: ufs: core: Remove the ufshcd_hba_exit() call from ufshcd_async_scan()

[ Upstream commit ee36710912b2075c417100a8acc642c9c6496501 ]

Calling ufshcd_hba_exit() from a function that is called asynchronously
from ufshcd_init() is wrong because this triggers multiple race
conditions. Instead of calling ufshcd_hba_exit(), log an error message.

Reported-by: Daniel Mentz <danielmentz@google.com>
Fixes: 1d337ec2f35e ("ufs: improve init sequence")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20231218225229.2542156-3-bvanassche@acm.org
Reviewed-by: Can Guo <quic_cang@quicinc.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/ufs/core/ufshcd.c