From 3b7a80ece86a5e77cbe1035ad27c297d1115a2bf Mon Sep 17 00:00:00 2001 From: Stanley Chu Date: Fri, 22 May 2020 16:32:10 +0800 Subject: [PATCH] BACKPORT: scsi: ufs: Allow WriteBooster on UFS 2.2 devices According to the UFS specification, WriteBooster is officially supported by UFS 2.2. Since UFS 2.2 specification has been finalized in JEDEC and such devices have also showed up in the market, modify the checking rule for ufshcd_wb_probe() to allow these devices to enable WriteBooster. Link: https://lore.kernel.org/r/20200522083212.4008-3-stanley.chu@mediatek.com Reviewed-by: Avri Altman Reviewed-by: Asutosh Das Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen Bug: 151050916 (cherry picked from commit c7cee3e746a5b5a79d415112f7b7af90e8259fa1) [ Resolved minor conflict in drivers/scsi/ufs/ufshcd.c ] Change-Id: Ifce7223b8892b6c0cd7f4635e96b103a86be4556 Signed-off-by: Stanley Chu Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/ufs/ufshcd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index d0b2a4ad88f9..a28d5d0cc84d 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -7109,6 +7109,7 @@ static int ufs_get_device_desc(struct ufs_hba *hba) * UFS_DEVICE_QUIRK_SUPPORT_EXTENDED_FEATURES enabled */ if (dev_info->wspecversion >= 0x310 || + dev_info->wspecversion == 0x220 || (hba->dev_quirks & UFS_DEVICE_QUIRK_SUPPORT_EXTENDED_FEATURES)) ufshcd_wb_probe(hba, desc_buf);