scsi: ufs: host: mediatek: Fix shutdown/suspend race condition
Address a race condition between shutdown and suspend operations in the UFS Mediatek driver. Before entering suspend, check if a shutdown is in progress to prevent conflicts and ensure system stability. Signed-off-by: Peter Wang <peter.wang@mediatek.com> Acked-by: Chun-Hung Wu <chun-hung.wu@mediatek.com> Link: https://patch.msgid.link/20250924094527.2992256-6-peter.wang@mediatek.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
committed by
Martin K. Petersen
parent
1fd05367d5
commit
014de20bb3
@@ -2425,6 +2425,11 @@ static int ufs_mtk_system_suspend(struct device *dev)
|
||||
struct arm_smccc_res res;
|
||||
int ret;
|
||||
|
||||
if (hba->shutting_down) {
|
||||
ret = -EBUSY;
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = ufshcd_system_suspend(dev);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
Reference in New Issue
Block a user