From patchwork Sat Feb 22 00:47:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Asutosh Das (asd)" X-Patchwork-Id: 11397749 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 AF8FB14BC for ; Sat, 22 Feb 2020 00:47:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8ED7F207FD for ; Sat, 22 Feb 2020 00:47:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727506AbgBVArk (ORCPT ); Fri, 21 Feb 2020 19:47:40 -0500 Received: from alexa-out-sd-01.qualcomm.com ([199.106.114.38]:28033 "EHLO alexa-out-sd-01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727268AbgBVArj (ORCPT ); Fri, 21 Feb 2020 19:47:39 -0500 Received: from unknown (HELO ironmsg03-sd.qualcomm.com) ([10.53.140.143]) by alexa-out-sd-01.qualcomm.com with ESMTP; 21 Feb 2020 16:47:39 -0800 Received: from asutoshd-linux1.qualcomm.com ([10.46.160.39]) by ironmsg03-sd.qualcomm.com with ESMTP; 21 Feb 2020 16:47:38 -0800 Received: by asutoshd-linux1.qualcomm.com (Postfix, from userid 92687) id A5E3E216F4; Fri, 21 Feb 2020 16:47:38 -0800 (PST) From: Asutosh Das To: subhashj@codeaurora.org, cang@codeaurora.org, rnayak@codeaurora.org, vinholikatti@gmail.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com, linux-scsi@vger.kernel.org Cc: Asutosh Das , linux-arm-msm@vger.kernel.org, Andy Gross , Bjorn Andersson , Alim Akhtar , Avri Altman , "James E.J. Bottomley" , linux-kernel@vger.kernel.org (open list) Subject: [ 2/2] ufs-qcom: scsi: configure write booster type Date: Fri, 21 Feb 2020 16:47:21 -0800 Message-Id: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Configure the WriteBooster type to preserve user-space mode. This would ensure that no user-space capacity is reduced when write booster is enabled. Signed-off-by: Asutosh Das --- drivers/scsi/ufs/ufs-qcom.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c index 8339050..313b4a2 100644 --- a/drivers/scsi/ufs/ufs-qcom.c +++ b/drivers/scsi/ufs/ufs-qcom.c @@ -1686,6 +1686,12 @@ static void ufs_qcom_device_reset(struct ufs_hba *hba) usleep_range(10, 15); } +static u32 ufs_qcom_get_user_cap_mode(struct ufs_hba *hba) +{ + /* QCom prefers no user-space reduction mode */ + return UFS_WB_BUFF_PRESERVE_USER_SPACE; +} + /** * struct ufs_hba_qcom_vops - UFS QCOM specific variant operations * @@ -1707,6 +1713,7 @@ static const struct ufs_hba_variant_ops ufs_hba_qcom_vops = { .resume = ufs_qcom_resume, .dbg_register_dump = ufs_qcom_dump_dbg_regs, .device_reset = ufs_qcom_device_reset, + .get_user_cap_mode = ufs_qcom_get_user_cap_mode, }; /**