From patchwork Fri Dec 18 07:30:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kiwoong Kim X-Patchwork-Id: 345818 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, UNWANTED_LANGUAGE_BODY,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EC580C2BBD4 for ; Fri, 18 Dec 2020 07:42:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A4F6023A79 for ; Fri, 18 Dec 2020 07:42:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726612AbgLRHmn (ORCPT ); Fri, 18 Dec 2020 02:42:43 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:54622 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725895AbgLRHmm (ORCPT ); Fri, 18 Dec 2020 02:42:42 -0500 Received: from epcas2p1.samsung.com (unknown [182.195.41.53]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20201218074159epoutp043623aff01ef6eebdbbb451cbff1dfd98~Rv7Ni6q5t1240812408epoutp04i for ; Fri, 18 Dec 2020 07:41:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20201218074159epoutp043623aff01ef6eebdbbb451cbff1dfd98~Rv7Ni6q5t1240812408epoutp04i DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1608277319; bh=z1Bjcdkf+fSfnSu+EZhpZtPGHVBzMaAyX4Cv7V8fVMU=; h=From:To:Cc:Subject:Date:In-Reply-To:In-Reply-To:References:From; b=X9jjWl+lDc4ZZ9WInzHVDk18SUlRmC2EW8x2TlAPeVPR8aA0J2NSIBn83Dhm7MvqX 3zrsy9/cwYPY64N3cORjyWV0a4sJQklB9HCkzRBQ9r4bqZzQAiX8zDWRPkko4U7jdH PiPI4HzPEa/ejOghO4KqcLT6Vle00fu+dS4OBqyQ= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20201218074154epcas2p293cf580a93078d4ddf9bf8ee94419c8e~Rv7JGUyx21566415664epcas2p22; Fri, 18 Dec 2020 07:41:54 +0000 (GMT) Received: from epsmges2p2.samsung.com (unknown [182.195.40.191]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4Cy15q0WStzMqYkj; Fri, 18 Dec 2020 07:41:51 +0000 (GMT) Received: from epcas2p4.samsung.com ( [182.195.41.56]) by epsmges2p2.samsung.com (Symantec Messaging Gateway) with SMTP id A9.76.56312.E3D5CDF5; Fri, 18 Dec 2020 16:41:50 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p1.samsung.com (KnoxPortal) with ESMTPA id 20201218074144epcas2p1dfe10a239993fec0c9998f367a029c51~Rv6-sTmUK2036320363epcas2p1A; Fri, 18 Dec 2020 07:41:44 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20201218074144epsmtrp1b72caaf00bcfa3988484605299177b9b~Rv6-ozrB21822618226epsmtrp1T; Fri, 18 Dec 2020 07:41:44 +0000 (GMT) X-AuditID: b6c32a46-1d9ff7000000dbf8-f4-5fdc5d3e6351 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 4F.B4.13470.83D5CDF5; Fri, 18 Dec 2020 16:41:44 +0900 (KST) Received: from ubuntu.dsn.sec.samsung.com (unknown [12.36.155.120]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20201218074143epsmtip13438079a0ac1ef37534ddfb320d3a40a~Rv6-ZhyOB2784627846epsmtip1n; Fri, 18 Dec 2020 07:41:43 +0000 (GMT) From: Kiwoong Kim To: linux-scsi@vger.kernel.org, alim.akhtar@samsung.com, avri.altman@wdc.com, jejb@linux.ibm.com, martin.petersen@oracle.com, beanhuo@micron.com, asutoshd@codeaurora.org, cang@codeaurora.org, bvanassche@acm.org, grant.jung@samsung.com, sc.suh@samsung.com, hy50.seo@samsung.com, sh425.lee@samsung.com, bhoon95.kim@samsung.com Cc: Kiwoong Kim Subject: [RFC PATCH v1 1/2] ufs: add a quirk for vendor specifics before pmc Date: Fri, 18 Dec 2020 16:30:50 +0900 Message-Id: <4fb86180155832d08b4a320fa2153c1b3eb4aa72.1608276380.git.kwmad.kim@samsung.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: In-Reply-To: X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprLJsWRmVeSWpSXmKPExsWy7bCmha5d7J14g02f+SwezNvGZrG37QS7 xcufV9ksDj7sZLH4uvQZq8W0Dz+ZLT6tX8Zq8evvenaL1YsfsFgsurGNyeLmlqMsFt3Xd7BZ LD/+j8mi6+4NRoul/96yOPB7XL7i7XG5r5fJY8KiA4we39d3sHl8fHqLxaNvyypGj8+b5Dza D3QzBXBE5dhkpCampBYppOYl56dk5qXbKnkHxzvHm5oZGOoaWlqYKynkJeam2iq5+AToumXm AB2vpFCWmFMKFApILC5W0rezKcovLUlVyMgvLrFVSi1IySkwNCzQK07MLS7NS9dLzs+1MjQw MDIFqkzIyTj67htbwXqZiiMbFrA3MF6T6GLk4JAQMJFYcK6ii5GLQ0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oul/96yOPB7XL7i7XG5r5fJY8KiA4we39d3sHl8fHqLxaNvyypGj8+b5Dza D3QzBXBEcdmkpOZklqUW6dslcGUcffeNrWC9TMWRDQvYGxivSXQxcnBICJhIzFpX0sXIxSEk sJtR4teuv4xdjJxAcUmJEzufQ9nCEvdbjrBCFH1jlJj+dSETSIJNQFPi6c2pTCAJEYF7TBKX JsxlBkkwC6hL7JpwAqxIWMBH4nbLNLA4i4CqRNeGE2A2r0C0xNQbh5kgNshJ3DzXCRbnFLCU WNIH0SskYCFx/2c3Ey7xCYwCCxgZVjFKphYU56bnFhsWGOallusVJ+YWl+al6yXn525iBMeE luYOxu2rPugdYmTiYDzEKMHBrCTCG/rgdrwQb0piZVVqUX58UWlOavEhRmkOFiVx3gtdJ+OF BNITS1KzU1MLUotgskwcnFINTEztZy3P32BYWzjPKdDyPWNOY4VU9tmktxvmPZX1CzwudTAu VrppvkStbF3xB/Wmmcyb+a1aWdJOXFCrmjXhS5+xsOpUcc0bU8s/GJyfZBpf1vozZ+O3ayuW X5RRuaOWVzX96amMRRZN3nMlutYoXrjyaZXwdI06ozLP7V+sX5VMiradPHPBd2PHoEnqsfwy bQw3mosqWdKvCj/oP/2fW1FbqKixaWLLi4v3D5Zxi0co/2JknbNsCevynydTtE1DJiw7UME4 fea+rLwWldr+jF0etd9f7hXYn3D24XmbC5k+r4UM55w9vl7S8quRi5mMwuMV/RfL5stN9cy4 GqPtFBHUPykzl+XA4206233klViKMxINtZiLihMBHyhT4fgCAAA= X-CMS-MailID: 20201218074144epcas2p1dfe10a239993fec0c9998f367a029c51 X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20201218074144epcas2p1dfe10a239993fec0c9998f367a029c51 References: Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Unipro specification says attribute IDs of the following thing are vendor-specific values, so some SoCs could have no regions at the defined address - DME_LocalFC0ProtectionTimeOutVal - DME_LocalTC0ReplayTimeOutVal - DME_LocalAFC0ReqTimeOutVal The following things should be set considering the compatibility between host and device, so those values must not be fixed and could be reset values or vendor specific values - PA_PWRMODEUSERDATA0 - PA_PWRMODEUSERDATA1 - PA_PWRMODEUSERDATA2 - PA_PWRMODEUSERDATA3 - PA_PWRMODEUSERDATA4 - PA_PWRMODEUSERDATA5 Change-Id: Ifbb55e9ea221156804121c4dedb3a099ce02cb95 Signed-off-by: Kiwoong Kim --- drivers/scsi/ufs/ufshcd.c | 40 +++++++++++++++++++++------------------- drivers/scsi/ufs/ufshcd.h | 6 ++++++ 2 files changed, 27 insertions(+), 19 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 92d433d..934d96f 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -4153,25 +4153,27 @@ static int ufshcd_change_power_mode(struct ufs_hba *hba, ufshcd_dme_set(hba, UIC_ARG_MIB(PA_HSSERIES), pwr_mode->hs_rate); - ufshcd_dme_set(hba, UIC_ARG_MIB(PA_PWRMODEUSERDATA0), - DL_FC0ProtectionTimeOutVal_Default); - ufshcd_dme_set(hba, UIC_ARG_MIB(PA_PWRMODEUSERDATA1), - DL_TC0ReplayTimeOutVal_Default); - ufshcd_dme_set(hba, UIC_ARG_MIB(PA_PWRMODEUSERDATA2), - DL_AFC0ReqTimeOutVal_Default); - ufshcd_dme_set(hba, UIC_ARG_MIB(PA_PWRMODEUSERDATA3), - DL_FC1ProtectionTimeOutVal_Default); - ufshcd_dme_set(hba, UIC_ARG_MIB(PA_PWRMODEUSERDATA4), - DL_TC1ReplayTimeOutVal_Default); - ufshcd_dme_set(hba, UIC_ARG_MIB(PA_PWRMODEUSERDATA5), - DL_AFC1ReqTimeOutVal_Default); - - ufshcd_dme_set(hba, UIC_ARG_MIB(DME_LocalFC0ProtectionTimeOutVal), - DL_FC0ProtectionTimeOutVal_Default); - ufshcd_dme_set(hba, UIC_ARG_MIB(DME_LocalTC0ReplayTimeOutVal), - DL_TC0ReplayTimeOutVal_Default); - ufshcd_dme_set(hba, UIC_ARG_MIB(DME_LocalAFC0ReqTimeOutVal), - DL_AFC0ReqTimeOutVal_Default); + if (!(hba->quirks & UFSHCD_QUIRK_SKIP_VENDOR_SPECIFIC_BEFORE_PMC)) { + ufshcd_dme_set(hba, UIC_ARG_MIB(PA_PWRMODEUSERDATA0), + DL_FC0ProtectionTimeOutVal_Default); + ufshcd_dme_set(hba, UIC_ARG_MIB(PA_PWRMODEUSERDATA1), + DL_TC0ReplayTimeOutVal_Default); + ufshcd_dme_set(hba, UIC_ARG_MIB(PA_PWRMODEUSERDATA2), + DL_AFC0ReqTimeOutVal_Default); + ufshcd_dme_set(hba, UIC_ARG_MIB(PA_PWRMODEUSERDATA3), + DL_FC1ProtectionTimeOutVal_Default); + ufshcd_dme_set(hba, UIC_ARG_MIB(PA_PWRMODEUSERDATA4), + DL_TC1ReplayTimeOutVal_Default); + ufshcd_dme_set(hba, UIC_ARG_MIB(PA_PWRMODEUSERDATA5), + DL_AFC1ReqTimeOutVal_Default); + + ufshcd_dme_set(hba, UIC_ARG_MIB(DME_LocalFC0ProtectionTimeOutVal), + DL_FC0ProtectionTimeOutVal_Default); + ufshcd_dme_set(hba, UIC_ARG_MIB(DME_LocalTC0ReplayTimeOutVal), + DL_TC0ReplayTimeOutVal_Default); + ufshcd_dme_set(hba, UIC_ARG_MIB(DME_LocalAFC0ReqTimeOutVal), + DL_AFC0ReqTimeOutVal_Default); + } ret = ufshcd_uic_change_pwr_mode(hba, pwr_mode->pwr_rx << 4 | pwr_mode->pwr_tx); diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h index 61344c4..ab7af1d 100644 --- a/drivers/scsi/ufs/ufshcd.h +++ b/drivers/scsi/ufs/ufshcd.h @@ -549,6 +549,12 @@ enum ufshcd_quirks { */ UFSHCI_QUIRK_SKIP_MANUAL_WB_FLUSH_CTRL = 1 << 12, + /* + * This quirk needs to disable vendor specific setting + * before power mode change + */ + UFSHCD_QUIRK_SKIP_VENDOR_SPECIFIC_BEFORE_PMC = 1 << 13, + }; enum ufshcd_caps { From patchwork Fri Dec 18 07:30:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kiwoong Kim X-Patchwork-Id: 346145 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C3AEC2BBCF for ; Fri, 18 Dec 2020 07:42:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CC6CB23A1E for ; Fri, 18 Dec 2020 07:42:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725908AbgLRHmq (ORCPT ); Fri, 18 Dec 2020 02:42:46 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:54641 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725298AbgLRHmp (ORCPT ); Fri, 18 Dec 2020 02:42:45 -0500 Received: from epcas2p1.samsung.com (unknown [182.195.41.53]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20201218074201epoutp043058ece2755b0960b85be83407d9f750~Rv7PnJxj41270712707epoutp04C for ; Fri, 18 Dec 2020 07:42:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20201218074201epoutp043058ece2755b0960b85be83407d9f750~Rv7PnJxj41270712707epoutp04C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1608277321; bh=1eznudDb9pMmsTWiLYk6VcT0dlz00yiAIDtdPsCSGCc=; h=From:To:Cc:Subject:Date:In-Reply-To:In-Reply-To:References:From; b=MIM7jEd3uIcnY/ClD1Q5E9dIwNGUhG9M773zWz6dwxqZXvM7HPJGqX2xehB0cKGKw uzaHKkFFGBrmdH3Hth2njTgF/jbbLs2lG4ch5Ow95kX7ra3CJXVoPeSNU5g+bxsIWY lA5/BMS2boPjvIb0N2YRDWRgbQIQ/uqJRSWL5W9k= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas2p1.samsung.com (KnoxPortal) with ESMTP id 20201218074152epcas2p1407ed13e7bdd394a27874f117f383356~Rv7HTLuDm0841308413epcas2p1V; Fri, 18 Dec 2020 07:41:52 +0000 (GMT) Received: from epsmges2p3.samsung.com (unknown [182.195.40.182]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4Cy15m5HvxzMqYkf; Fri, 18 Dec 2020 07:41:48 +0000 (GMT) Received: from epcas2p1.samsung.com ( [182.195.41.53]) by epsmges2p3.samsung.com (Symantec Messaging Gateway) with SMTP id 53.5B.05262.B3D5CDF5; Fri, 18 Dec 2020 16:41:47 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p3.samsung.com (KnoxPortal) with ESMTPA id 20201218074145epcas2p3563711f5d05a41dff0602d3e7aef5891~Rv7As-gQk2281922819epcas2p3d; Fri, 18 Dec 2020 07:41:45 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20201218074145epsmtrp180086c6c74cdfb097ad0df3c12574a40~Rv7AsEDKd1822618226epsmtrp1V; Fri, 18 Dec 2020 07:41:45 +0000 (GMT) X-AuditID: b6c32a47-b97ff7000000148e-46-5fdc5d3bf5c8 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 38.61.08745.93D5CDF5; Fri, 18 Dec 2020 16:41:45 +0900 (KST) Received: from ubuntu.dsn.sec.samsung.com (unknown [12.36.155.120]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20201218074145epsmtip11b9d90ec82a62e8fc98cf9c68bdbae6e~Rv7Aa1JgK2655626556epsmtip1j; Fri, 18 Dec 2020 07:41:45 +0000 (GMT) From: Kiwoong Kim To: linux-scsi@vger.kernel.org, alim.akhtar@samsung.com, avri.altman@wdc.com, jejb@linux.ibm.com, martin.petersen@oracle.com, beanhuo@micron.com, asutoshd@codeaurora.org, cang@codeaurora.org, bvanassche@acm.org, grant.jung@samsung.com, sc.suh@samsung.com, hy50.seo@samsung.com, sh425.lee@samsung.com, bhoon95.kim@samsung.com Cc: Kiwoong Kim Subject: [RFC PATCH v1 2/2] ufs: ufs-exynos: apply vendor specifics for three timeouts Date: Fri, 18 Dec 2020 16:30:51 +0900 Message-Id: <5bf1a6fa16c010878b1dd7155256954fab548801.1608276380.git.kwmad.kim@samsung.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: In-Reply-To: X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprPJsWRmVeSWpSXmKPExsWy7bCmqa517J14g8Y/XBYP5m1js9jbdoLd 4uXPq2wWBx92slh8XfqM1WLah5/MFp/WL2O1+PV3PbvF6sUPWCwW3djGZHFzy1EWi+7rO9gs lh//x2TRdfcGo8XSf29ZHPg9Ll/x9rjc18vkMWHRAUaP7+s72Dw+Pr3F4tG3ZRWjx+dNch7t B7qZAjiicmwyUhNTUosUUvOS81My89JtlbyD453jTc0MDHUNLS3MlRTyEnNTbZVcfAJ03TJz gI5XUihLzCkFCgUkFhcr6dvZFOWXlq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7sZLH4uvQZq8W0Dz+ZLT6tX8Zq8evvenaL1YsfsFgsurGNyeLmlqMsFt3Xd7BZ LD/+j8mi6+4NRoul/96yOPB7XL7i7XG5r5fJY8KiA4we39d3sHl8fHqLxaNvyypGj8+b5Dza D3QzBXBEcdmkpOZklqUW6dslcGWs6hMr6OeumPzjDWsD42LOLkZODgkBE4lJv48xdzFycQgJ 7GCUmPr3ADtEQlLixM7njBC2sMT9liOsEEXfGCU2zJ8DlmAT0JR4enMqE0hCROAek8SlCXOZ QRLMAuoSuyacYAKxhQXCJO4vuA1mswioSry91w5m8wpES3xfMh1qm5zEzXOdYL2cApYSS/og eoUELCTu/+xmwiU+gVFgASPDKkbJ1ILi3PTcYsMCo7zUcr3ixNzi0rx0veT83E2M4JjQ0trB uGfVB71DjEwcjIcYJTiYlUR4Qx/cjhfiTUmsrEotyo8vKs1JLT7EKM3BoiTOe6HrZLyQQHpi SWp2ampBahFMlomDU6qBaXd4oVJ+wN0vl6MF3y0u3sLgOn32uuX9STLP7h3I2RWZ+Ky39Kwg t0tE2EeWjVxyzzT3m55TvqOWu+GE8GpWh31yM65OythS5rP7VniJ48t1+wokm1NPsCZem3Lr uxujFyfvkcVC6exmMiYuW+6zzPO5v+PR0/cJnq3sa5iWOK/ae25uTGnJCVEBM5d7+r9nL28M uvtrZp2OVoDzI4urH3ZENGRyG645sMD19J4Pz5tuCTXc2CmZ6v76G9/hHRsvZkucjtOJfc3/ 1batVcH8kcmcd4/LqhPCTq86Zmi9JnvmM/GJJ1+nm5q2zbpjYlwVnmT564puz9bEJu2EKaJq D1/+uaS+YGVm45vy131L/imxFGckGmoxFxUnAgD1RYGX+AIAAA== X-CMS-MailID: 20201218074145epcas2p3563711f5d05a41dff0602d3e7aef5891 X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20201218074145epcas2p3563711f5d05a41dff0602d3e7aef5891 References: Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Set optimized values for those timeouts - FC0_PROTECTION_TIMER - TC0_REPLAY_TIMER - AFC0_REQUEST_TIMER Exynos doesn't yet use traffic class #1. Change-Id: Ib672b554ea109159cd75ff67a111f46ebff4a7dc Signed-off-by: Kiwoong Kim --- drivers/scsi/ufs/ufs-exynos.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/ufs/ufs-exynos.c b/drivers/scsi/ufs/ufs-exynos.c index a8770ff..1ea8244 100644 --- a/drivers/scsi/ufs/ufs-exynos.c +++ b/drivers/scsi/ufs/ufs-exynos.c @@ -640,6 +640,11 @@ static int exynos_ufs_pre_pwr_mode(struct ufs_hba *hba, } } + /* setting for three timeout values for traffic class #0 */ + ufshcd_dme_set(hba, UIC_ARG_MIB(PA_PWRMODEUSERDATA0), 8064); + ufshcd_dme_set(hba, UIC_ARG_MIB(PA_PWRMODEUSERDATA1), 28224); + ufshcd_dme_set(hba, UIC_ARG_MIB(PA_PWRMODEUSERDATA2), 20160); + return 0; out: return ret; @@ -1236,7 +1241,8 @@ struct exynos_ufs_drv_data exynos_ufs_drvs = { UFSHCI_QUIRK_BROKEN_HCE | UFSHCI_QUIRK_SKIP_RESET_INTR_AGGR | UFSHCD_QUIRK_BROKEN_OCS_FATAL_ERROR | - UFSHCI_QUIRK_SKIP_MANUAL_WB_FLUSH_CTRL, + UFSHCI_QUIRK_SKIP_MANUAL_WB_FLUSH_CTRL | + UFSHCD_QUIRK_SKIP_VENDOR_SPECIFIC_BEFORE_PMC, .opts = EXYNOS_UFS_OPT_HAS_APB_CLK_CTRL | EXYNOS_UFS_OPT_BROKEN_AUTO_CLK_CTRL | EXYNOS_UFS_OPT_BROKEN_RX_SEL_IDX |