From patchwork Fri May 22 08:32:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanley Chu X-Patchwork-Id: 11564969 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F003F14C0 for ; Fri, 22 May 2020 08:32:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CE61820825 for ; Fri, 22 May 2020 08:32:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="XOterxaz" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729129AbgEVIcU (ORCPT ); Fri, 22 May 2020 04:32:20 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:59834 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728883AbgEVIcU (ORCPT ); Fri, 22 May 2020 04:32:20 -0400 X-UUID: 896b2fc4da5a49cba9ffc87e400a522f-20200522 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=ySjpqS2b2+5IV1wMLJ9XawozivexLkd7UOWw5IgdK4A=; b=XOterxazLQFB2zwnlZuZQfv0G52lbAo5yMLA0BG6FIlRfSinKs01TJWqJ/PoEuXoa7wYoWmP5wIyeUrbPYRPd/y1brlRmAI6VAZZJF9lfip6hZXb5PICgVwEjoYBBYUEbzugyOPZ3f4ZhPfFogBcX2ajd16vFYjDYL0scRIDLIw=; X-UUID: 896b2fc4da5a49cba9ffc87e400a522f-20200522 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 888027467; Fri, 22 May 2020 16:32:16 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs05n2.mediatek.inc (172.21.101.140) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 22 May 2020 16:32:14 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 22 May 2020 16:32:14 +0800 From: Stanley Chu To: , , , , , CC: , , , , , , , , Stanley Chu Subject: [PATCH v4 2/4] scsi: ufs: Allow WriteBooster on UFS 2.2 devices Date: Fri, 22 May 2020 16:32:10 +0800 Message-ID: <20200522083212.4008-3-stanley.chu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20200522083212.4008-1-stanley.chu@mediatek.com> References: <20200522083212.4008-1-stanley.chu@mediatek.com> MIME-Version: 1.0 X-MTK: N Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org 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. Signed-off-by: Stanley Chu Reviewed-by: Avri Altman --- 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 9e55c524f330..0dbd8a7a6642 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -6930,6 +6930,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);