From patchwork Sat Mar 21 00:48:36 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: 11450635 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 64A741864 for ; Sat, 21 Mar 2020 00:48:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 44AB420757 for ; Sat, 21 Mar 2020 00:48:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727862AbgCUAsj (ORCPT ); Fri, 20 Mar 2020 20:48:39 -0400 Received: from alexa-out-sd-01.qualcomm.com ([199.106.114.38]:50318 "EHLO alexa-out-sd-01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727843AbgCUAsj (ORCPT ); Fri, 20 Mar 2020 20:48:39 -0400 Received: from unknown (HELO ironmsg03-sd.qualcomm.com) ([10.53.140.143]) by alexa-out-sd-01.qualcomm.com with ESMTP; 20 Mar 2020 17:48:38 -0700 Received: from asutoshd-linux1.qualcomm.com ([10.46.160.39]) by ironmsg03-sd.qualcomm.com with ESMTP; 20 Mar 2020 17:48:38 -0700 Received: by asutoshd-linux1.qualcomm.com (Postfix, from userid 92687) id 140732003D; Fri, 20 Mar 2020 17:48:37 -0700 (PDT) From: Asutosh Das To: asutoshd@qti.qualcomm.com, linux-scsi@vger.kernel.org Subject: [ 2/3] ufs-qcom: scsi: configure write booster type Date: Fri, 20 Mar 2020 17:48:36 -0700 Message-Id: <116b8c6bed27ffbee9da6ccfd52a2fdc612648b4.1584750888.git.asutoshd@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@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. Change-Id: I4144531a73ea3b5d5ede76beae45722366b1e75c 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 6115ac6..59f3243 100644 --- a/drivers/scsi/ufs/ufs-qcom.c +++ b/drivers/scsi/ufs/ufs-qcom.c @@ -1689,6 +1689,12 @@ static void ufs_qcom_device_reset(struct ufs_hba *hba) usleep_range(10, 15); } +static u32 ufs_qcom_wb_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 * @@ -1710,6 +1716,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, + .wb_get_user_cap_mode = ufs_qcom_wb_get_user_cap_mode, }; /**