Skip to content

Commit 6948a96

Browse files
Kiwoong Kimmartinkpetersen
authored andcommitted
scsi: ufs: Relocate flush of exceptional event
The current flush location does not guarantee disabling BKOPS for the case of requesting device power off. 1) The exceptional event handler is queued 2) ufs suspend starts with a request of device power off 3) BKOPS is disabled in ufs suspend 4) The queued work for the handler is done and BKOPS is re-enabled Relocate the flush statement to ensure BKOPS remain disabled. Link: https://lore.kernel.org/r/1608360039-16390-1-git-send-email-kwmad.kim@samsung.com Reviewed-by: Can Guo <cang@codeaurora.org> Reviewed-by: Stanley Chu <stanley.chu@mediatek.com> Signed-off-by: Kiwoong Kim <kwmad.kim@samsung.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 21acf46 commit 6948a96

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/scsi/ufs/ufshcd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8696,6 +8696,8 @@ static int ufshcd_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op)
86968696
ufshcd_wb_need_flush(hba));
86978697
}
86988698

8699+
flush_work(&hba->eeh_work);
8700+
86998701
if (req_dev_pwr_mode != hba->curr_dev_pwr_mode) {
87008702
if (!ufshcd_is_runtime_pm(pm_op))
87018703
/* ensure that bkops is disabled */
@@ -8708,8 +8710,6 @@ static int ufshcd_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op)
87088710
}
87098711
}
87108712

8711-
flush_work(&hba->eeh_work);
8712-
87138713
/*
87148714
* In the case of DeepSleep, the device is expected to remain powered
87158715
* with the link off, so do not check for bkops.

0 commit comments

Comments
 (0)