Skip to content

Commit 21acf46

Browse files
Stanley Chumartinkpetersen
authored andcommitted
scsi: ufs: Relax the condition of UFSHCI_QUIRK_SKIP_MANUAL_WB_FLUSH_CTRL
UFSHCI_QUIRK_SKIP_MANUAL_WB_FLUSH_CTRL is intended to skip enabling fWriteBoosterBufferFlushEn while WriteBooster is initializing. Therefore it is better to apply the checking during WriteBooster initialization only. Link: https://lore.kernel.org/r/20201222072905.32221-3-stanley.chu@mediatek.com Reviewed-by: Can Guo <cang@codeaurora.org> Signed-off-by: Stanley Chu <stanley.chu@mediatek.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 1d53864 commit 21acf46

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

drivers/scsi/ufs/ufshcd.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,8 @@ static inline void ufshcd_wb_config(struct ufs_hba *hba)
289289
if (ret)
290290
dev_err(hba->dev, "%s: En WB flush during H8: failed: %d\n",
291291
__func__, ret);
292-
ufshcd_wb_toggle_flush(hba, true);
292+
if (!(hba->quirks & UFSHCI_QUIRK_SKIP_MANUAL_WB_FLUSH_CTRL))
293+
ufshcd_wb_toggle_flush(hba, true);
293294
}
294295

295296
static void ufshcd_scsi_unblock_requests(struct ufs_hba *hba)
@@ -5436,9 +5437,6 @@ static int ufshcd_wb_toggle_flush_during_h8(struct ufs_hba *hba, bool set)
54365437

54375438
static inline void ufshcd_wb_toggle_flush(struct ufs_hba *hba, bool enable)
54385439
{
5439-
if (hba->quirks & UFSHCI_QUIRK_SKIP_MANUAL_WB_FLUSH_CTRL)
5440-
return;
5441-
54425440
if (enable)
54435441
ufshcd_wb_buf_flush_enable(hba);
54445442
else

0 commit comments

Comments
 (0)