From patchwork Tue Jan 12 02:48:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kiwoong Kim X-Patchwork-Id: 12012287 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.2 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,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 820A9C433DB for ; Tue, 12 Jan 2021 03:00:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 34A5722D3E for ; Tue, 12 Jan 2021 03:00:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733223AbhALDAa (ORCPT ); Mon, 11 Jan 2021 22:00:30 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:36613 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730576AbhALDA3 (ORCPT ); Mon, 11 Jan 2021 22:00:29 -0500 Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20210112025945epoutp01530075bed1bb0d8a4bb73de8e19c9304~ZXM7gTJ512805828058epoutp01T for ; Tue, 12 Jan 2021 02:59:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20210112025945epoutp01530075bed1bb0d8a4bb73de8e19c9304~ZXM7gTJ512805828058epoutp01T DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1610420385; bh=MGuh82DX6E5g8HiXvy+a7m1va7hecL227AUSV+OV2l8=; h=From:To:Cc:Subject:Date:In-Reply-To:In-Reply-To:References:From; b=dUonYPBbAZukwUKG29S0wnxAICHF/X9Y/64JEHyQ1NMLt9GgpZXdCJuUMFjX2kiii rlmcIazEAzdEtDyu0vx17Y1labrMgxmjwtQmUI7C2W7eMTXwqNnwkLvesdPidoQqwu R9G7WZlhl7f+xHoOybBi7bNCFaq3BPfCFJNQwDd0= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20210112025944epcas2p3404bd33fe4cf7086b1867ba67ce3bc7f~ZXM6_oCnL1758617586epcas2p3f; Tue, 12 Jan 2021 02:59:44 +0000 (GMT) Received: from epsmges2p1.samsung.com (unknown [182.195.40.187]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4DFFfk12fQz4x9Q4; Tue, 12 Jan 2021 02:59:42 +0000 (GMT) Received: from epcas2p3.samsung.com ( [182.195.41.55]) by epsmges2p1.samsung.com (Symantec Messaging Gateway) with SMTP id 9C.30.10621.D901DFF5; Tue, 12 Jan 2021 11:59:41 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p2.samsung.com (KnoxPortal) with ESMTPA id 20210112025941epcas2p2dcdeaa23a2728dd478618b750809e875~ZXM33GTnd1168311683epcas2p2U; Tue, 12 Jan 2021 02:59:41 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20210112025941epsmtrp1e051ae040fb7d3cc2c9300733f1fa1aa~ZXM32QU022509325093epsmtrp1J; Tue, 12 Jan 2021 02:59:41 +0000 (GMT) X-AuditID: b6c32a45-34dff7000001297d-e9-5ffd109d46d3 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 9C.32.08745.D901DFF5; Tue, 12 Jan 2021 11:59:41 +0900 (KST) Received: from ubuntu.dsn.sec.samsung.com (unknown [12.36.155.120]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20210112025941epsmtip1ecfc9c63cf7be0b36d99a2c5d2a49b50~ZXM3pxClY1202812028epsmtip1R; Tue, 12 Jan 2021 02:59:41 +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: [RESEND PATCH v3 1/2] ufs: add a quirk not to use default unipro timeout values Date: Tue, 12 Jan 2021 11:48:26 +0900 Message-Id: <47f41dc96fe0a4143c2acddb0ce28befb1a60b49.1610419672.git.kwmad.kim@samsung.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: In-Reply-To: X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprPJsWRmVeSWpSXmKPExsWy7bCmue48gb/xBu3pFg/mbWOz2Nt2gt3i 5c+rbBYHH3ayWHxd+ozVYtqHn8wWn9YvY7X49Xc9u8XqxQ9YLBbd2MZkcXPLURaL7us72CyW H//HZNF19wajxdJ/b1kc+D0uX/H2uNzXy+QxYdEBRo/v6zvYPD4+vcXi0bdlFaPH501yHu0H upkCOKJybDJSE1NSixRS85LzUzLz0m2VvIPjneNNzQwMdQ0tLcyVFPISc1NtlVx8AnTdMnOA bldSKEvMKQUKBSQWFyvp29kU5ZeWpCpk5BeX2CqlFqTkFBgaFugVJ+YWl+al6yXn51oZGhgY mQJVJuRkzFmylr3gv3TF1ROvWRsYV0h0MXJySAiYSBz9eIW5i5GLQ0hgB6PE3GVP2SGcT4wS kxsu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KiA4we39d3sHl8fHqLxaNvyypGj8+b5Dza D3QzBXBEcdmkpOZklqUW6dslcGXMWbKWveC/dMXVE69ZGxhXSHQxcnJICJhI7Pxxna2LkYtD SGAHo8ScP03MEAlJiRM7nzNC2MIS91uOsEIUfWOUWH7yAViCTUBT4unNqUwgCRGBe0wSlybM BetmFlCX2DXhBBOILSwQIbH62VQWEJtFQFXi7/klYDavQLTE1GV3mSA2yEncPNcJ1sspYCnx eVUvWI2QgIXEsub9jLjEJzAKLGBkWMUomVpQnJueW2xYYJSXWq5XnJhbXJqXrpecn7uJERwV Wlo7GPes+qB3iJGJg/EQowQHs5IIr9eGP/FCvCmJlVWpRfnxRaU5qcWHGKU5WJTEeS90nYwX EkhPLEnNTk0tSC2CyTJxcEo1MJ2R2yihaNIlsTR+4bkbS/fPtE5fGXZcmFWl/M4M6/uP1s+9 XllXI+hc/4vxirrLlLnXVHYoTlXMbjxverAy/tCyXTIc2wQnc5esy7ui4H1wfdmR5j2uswsf 3nst1MGxJedLXYT0L8cjiZvu7WOb+9ukkjkssOfe9Kn5LQfSCqeVOTgJR+x51NN74GDZ4Y7I nvmJJY/fiDO4mZ9gF9OI33iMu1PJMW+VpOsdN+HzX5Uv/YyUTXzJraYoMPl642veN3cWcz3Y NdujZbd2b+iNliKdlim/Zhz6p7pWqKH0/jZ/iyRl+w27FFlj7LYF3+vRF8x/bROc+LHb6o0I 6+03i74LtMiuWdmRWVohUXA0SomlOCPRUIu5qDgRADmg2fb5AgAA X-CMS-MailID: 20210112025941epcas2p2dcdeaa23a2728dd478618b750809e875 X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210112025941epcas2p2dcdeaa23a2728dd478618b750809e875 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 addresses - 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 you could use reset values or vendor specific values - PA_PWRMODEUSERDATA0 - PA_PWRMODEUSERDATA1 - PA_PWRMODEUSERDATA2 - PA_PWRMODEUSERDATA3 - PA_PWRMODEUSERDATA4 - PA_PWRMODEUSERDATA5 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..9d3a41d 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_DEF_UNIPRO_TIMEOUT_SETTING)) { + 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..f36f73c8 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 unipro timeout values + * before power mode change + */ + UFSHCD_QUIRK_SKIP_DEF_UNIPRO_TIMEOUT_SETTING = 1 << 13, + }; enum ufshcd_caps { From patchwork Tue Jan 12 02:48:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kiwoong Kim X-Patchwork-Id: 12012285 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=-19.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, 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 C8C8CC433E0 for ; Tue, 12 Jan 2021 03:00:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7460722D3E for ; Tue, 12 Jan 2021 03:00:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728044AbhALDAa (ORCPT ); Mon, 11 Jan 2021 22:00:30 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:36621 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730986AbhALDA3 (ORCPT ); Mon, 11 Jan 2021 22:00:29 -0500 Received: from epcas2p2.samsung.com (unknown [182.195.41.54]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20210112025945epoutp01540ee406a2f2570200bc11a8d87fa8c3~ZXM7rWG8y2805528055epoutp01Q for ; Tue, 12 Jan 2021 02:59:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20210112025945epoutp01540ee406a2f2570200bc11a8d87fa8c3~ZXM7rWG8y2805528055epoutp01Q DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1610420385; bh=oAZkt8d/EzEdD6gm9i+kuwRAAhZpY0ps41OxDiNtdgU=; h=From:To:Cc:Subject:Date:In-Reply-To:In-Reply-To:References:From; b=WwS1qfV3Ppo6LNw0M1i3NdpOe0WVmGPRInH91mzyplHYdX6xAKerjh6gNdI3BmSAA sDJvL0lsIQyZJCtXO/IB9HKfKjK9erCi+yupQTlnNHXGC+XiFGhqP7U2kVoKD/K9BV nwj9OSkzfz98bncEWx/uO8OJYdipqHHdQDUsT1gE= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20210112025944epcas2p2d2fe8d40e181856dcf3682644a5f33b4~ZXM7HklTc1401914019epcas2p2R; Tue, 12 Jan 2021 02:59:44 +0000 (GMT) Received: from epsmges2p1.samsung.com (unknown [182.195.40.190]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4DFFfl0XCyz4x9Px; Tue, 12 Jan 2021 02:59:43 +0000 (GMT) Received: from epcas2p4.samsung.com ( [182.195.41.56]) by epsmges2p1.samsung.com (Symantec Messaging Gateway) with SMTP id EE.30.10621.E901DFF5; Tue, 12 Jan 2021 11:59:42 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas2p4.samsung.com (KnoxPortal) with ESMTPA id 20210112025942epcas2p4017cceea0f853461a9feec556cc53d2d~ZXM4nvgKN3061530615epcas2p44; Tue, 12 Jan 2021 02:59:42 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20210112025942epsmtrp22a357bcdda9e4a09a5c6fc93c784080c~ZXM4mKmk62420624206epsmtrp27; Tue, 12 Jan 2021 02:59:42 +0000 (GMT) X-AuditID: b6c32a45-34dff7000001297d-f0-5ffd109eb435 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 9D.32.08745.E901DFF5; Tue, 12 Jan 2021 11:59:42 +0900 (KST) Received: from ubuntu.dsn.sec.samsung.com (unknown [12.36.155.120]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20210112025941epsmtip1053b87469450ad5249bf183545e16ed7~ZXM4Xh8Sm1462214622epsmtip1Y; Tue, 12 Jan 2021 02:59:41 +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: [RESEND PATCH v3 2/2] ufs: ufs-exynos: apply vendor specifics for three timeouts Date: Tue, 12 Jan 2021 11:48:27 +0900 Message-Id: <3a223a4a449f87ff33eebd0a81d9206fbd7770ac.1610419672.git.kwmad.kim@samsung.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: In-Reply-To: X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrIJsWRmVeSWpSXmKPExsWy7bCmhe48gb/xBj2NthYP5m1js9jbdoLd 4uXPq2wWBx92slh8XfqM1WLah5/MFp/WL2O1+PV3PbvF6sUPWCwW3djGZHFzy1EWi+7rO9gs lh//x2TRdfcGo8XSf29ZHPg9Ll/x9rjc18vkMWHRAUaP7+s72Dw+Pr3F4tG3ZRWjx+dNch7t B7qZAjiicmwyUhNTUosUUvOS81My89JtlbyD453jTc0MDHUNLS3MlRTyEnNTbZVcfAJ03TJz gI5XUihLzCkFCgUkFhcr6dvZFOWXlqQqZOQXl9gqpRak5BQYGhboFSfmFpfmpesl5+daGRoY GJkCVSb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YdGMbk8XNLUdZLLqv72Cz WH78H5NF190bjBZL/71lceD3uHzF2+NyXy+Tx4RFBxg9vq/vYPP4+PQWi0ffllWMHp83yXm0 H+hmCuCI4rJJSc3JLEst0rdL4Mq4feEDa8FNropp3Y9YGhg/cHQxcnJICJhInO94xd7FyMUh JLCDUWLhsm0sEAlJiRM7nzNC2MIS91uOsEIUfWOUeHvgNytIgk1AU+LpzalMIAkRgXtMEpcm zGUGSTALqEvsmnCCCcQWFoiUuNnwH2wSi4CqxOQfR9hAbF6BaIlTt2ZCbZOTuHmuE6yXU8BS 4vOqXrC4kICFxLLm/Yy4xCcwCixgZFjFKJlaUJybnltsWGCUl1quV5yYW1yal66XnJ+7iREc FVpaOxj3rPqgd4iRiYPxEKMEB7OSCK/Xhj/xQrwpiZVVqUX58UWlOanFhxilOViUxHkvdJ2M FxJITyxJzU5NLUgtgskycXBKNTC5+M/Rk1z93d2+bNedxKiZjCs2J19tF5Y4tsw6eu//C8zT j1gkqRrJyEV9uL1hXbaXsR934Tkxi+7ps/6k+cz4Z+l8KKqpYDGn7BqPXhP+hANP7vJySe8s YNwQ0LtAsDai/sS3xr8HKwrOGFfyTJ+78h2XroSAwMTJ3Wl/dp4udfGV/f1Z5sOuPYreh08/ SHh44MnkDU7xfnknBZSmnsp5vkRTTJBXPY53r9MlpgPed1z33TE85nVKKHOP8VyrzJtCk9wW PZ5T1n+vwXtDyu9rv9fuU30soSd2Mi1e+ttvh7rHcp05zTetq1/WfNeoW3gyz+DRutU7CjpX 1HsYLth11eikk3mKQEVQz6f5EWeVWIozEg21mIuKEwGE4mj5+QIAAA== X-CMS-MailID: 20210112025942epcas2p4017cceea0f853461a9feec556cc53d2d X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210112025942epcas2p4017cceea0f853461a9feec556cc53d2d 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. 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..5ca21d1 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_DEF_UNIPRO_TIMEOUT_SETTING, .opts = EXYNOS_UFS_OPT_HAS_APB_CLK_CTRL | EXYNOS_UFS_OPT_BROKEN_AUTO_CLK_CTRL | EXYNOS_UFS_OPT_BROKEN_RX_SEL_IDX |