From patchwork Mon Dec 21 01:24:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kiwoong Kim X-Patchwork-Id: 346543 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 40174C433DB for ; Mon, 21 Dec 2020 01:36:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1135822C7B for ; Mon, 21 Dec 2020 01:36:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726508AbgLUBgW (ORCPT ); Sun, 20 Dec 2020 20:36:22 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:47103 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726146AbgLUBgV (ORCPT ); Sun, 20 Dec 2020 20:36:21 -0500 Received: from epcas2p1.samsung.com (unknown [182.195.41.53]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20201221013537epoutp0186b51f5d4461c0a3335493a4c8e7fcf3~Sl3MK6BVd0882108821epoutp01N for ; Mon, 21 Dec 2020 01:35:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20201221013537epoutp0186b51f5d4461c0a3335493a4c8e7fcf3~Sl3MK6BVd0882108821epoutp01N DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1608514537; bh=MGuh82DX6E5g8HiXvy+a7m1va7hecL227AUSV+OV2l8=; h=From:To:Cc:Subject:Date:In-Reply-To:In-Reply-To:References:From; b=rYQrjZLYukc3kbojHNN8JsIeghS6BOHi03fd3lRtBgdIcQjtqxtJDtUjQgh5JBsLR QYbwS68L3srMuXD3LmrX9h3j2UttdSouFvhSY0EazSTAwW6e00YsXpNv/xMWheVm8e WWb7f1MWY9lV6bkLIRdnkIQuN3LgAGhccVfJaUCw= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas2p4.samsung.com (KnoxPortal) with ESMTP id 20201221013536epcas2p465770c7ce60d59d1582a9e8e20101d05~Sl3LdM_cF0233902339epcas2p4w; Mon, 21 Dec 2020 01:35:36 +0000 (GMT) Received: from epsmges2p4.samsung.com (unknown [182.195.40.184]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4Czhqp0NlSzMqYkd; Mon, 21 Dec 2020 01:35:34 +0000 (GMT) Received: from epcas2p3.samsung.com ( [182.195.41.55]) by epsmges2p4.samsung.com (Symantec Messaging Gateway) with SMTP id 52.5C.52511.5EBFFDF5; Mon, 21 Dec 2020 10:35:33 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p2.samsung.com (KnoxPortal) with ESMTPA id 20201221013533epcas2p2b4a9931d56ebd626a0fbc0490ac129c1~Sl3IgqrXW2735427354epcas2p2f; Mon, 21 Dec 2020 01:35:33 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20201221013533epsmtrp1c7af6f4e9af0c85346f77bebbab578eb~Sl3Ifmm0e0623206232epsmtrp1E; Mon, 21 Dec 2020 01:35:33 +0000 (GMT) X-AuditID: b6c32a48-50fff7000000cd1f-af-5fdffbe56df5 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 10.43.08745.5EBFFDF5; Mon, 21 Dec 2020 10:35:33 +0900 (KST) Received: from ubuntu.dsn.sec.samsung.com (unknown [12.36.155.120]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20201221013533epsmtip272ddebbf649465675fd5dc4e2155ac8b~Sl3IUkIF-2616226162epsmtip2i; Mon, 21 Dec 2020 01:35:33 +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: [PATCH v3 1/2] ufs: add a quirk not to use default unipro timeout values Date: Mon, 21 Dec 2020 10:24:40 +0900 Message-Id: <1fedd3dea0ccc980913a5995a10510d86a5b01b9.1608513782.git.kwmad.kim@samsung.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: In-Reply-To: X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprDJsWRmVeSWpSXmKPExsWy7bCmue7T3/fjDQ5PsLB4MG8bm8XethPs Fi9/XmWzOPiwk8Xi69JnrBbTPvxktvi0fhmrxa+/69ktVi9+wGKx6MY2JoubW46yWHRf38Fm sfz4PyaLrrs3GC2W/nvL4sDvcfmKt8flvl4mjwmLDjB6fF/fwebx8ektFo++LasYPT5vkvNo P9DNFMARlWOTkZqYklqkkJqXnJ+SmZduq+QdHO8cb2pmYKhraGlhrqSQl5ibaqvk4hOg65aZ A3S8kkJZYk4pUCggsbhYSd/Opii/tCRVISO/uMRWKbUgJafA0LBArzgxt7g0L10vOT/XytDA wMgUqDIhJ2POkrXsBf+lK66eeM3awLhCoouRg0NCwESif111FyMnh5DADkaJtkuKXYxcQPYn RolTK1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fF/fwebx8ektFo++LasYPT5vkvNo P9DNFMARxWWTkpqTWZZapG+XwJUxZ8la9oL/0hVXT7xmbWBcIdHFyMkhIWAiMXvzVNYuRi4O IYEdjBIXL+1jhEhISpzY+RzKFpa433IEqugbo8TmN6dYQRJsApoST29OZQJJiAjcY5K4NGEu M0iCWUBdYteEE0wgtrBAoMTE74dZuhg5OFgEVCWmvEgDCfMKREscmfCfFWKBnMTNc51grZwC lhKt09aBtQoJWEjcO/SUCZf4BEaBBYwMqxglUwuKc9Nziw0LjPJSy/WKE3OLS/PS9ZLzczcx gmNCS2sH455VH/QOMTJxMB5ilOBgVhLhNZO6Hy/Em5JYWZValB9fVJqTWnyIUZqDRUmc90LX yXghgfTEktTs1NSC1CKYLBMHp1QDU9mpiCuPWedd6tzzWrjf8IHg/iBOi07xpp0XFY0KxfJy L+6UNeELS6kVu6MQLMHoXFdi+X95ixS/wD/JmeqBFfLhGxb9Zs6QU5vfNu9bdTRTas+mwE3L EjlVpTYWK3M9exLuLnogt8WFY4rvi3SvEgfWz7ybco6t4fe3Dubb3aZ+2Tao+tNO966FBRuY ru2qYf/IblEu1yW++qbSrYvK2e7dHxb5H/ylsWPbkUNtHBxaPj5dryadXHrt1/VrylrBZekO mwNeWN+5U3dA9nqgyZeqnrhjE9jYczfuyl/4cOMLq0yHgyGNh1MivscecdUMKwkSVLjI9WBC eqrlpiPScZNZQ9c1b/pgofb+YrESS3FGoqEWc1FxIgD83o8o+AIAAA== X-CMS-MailID: 20201221013533epcas2p2b4a9931d56ebd626a0fbc0490ac129c1 X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20201221013533epcas2p2b4a9931d56ebd626a0fbc0490ac129c1 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 Mon Dec 21 01:24:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kiwoong Kim X-Patchwork-Id: 346544 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 4220EC433DB for ; Mon, 21 Dec 2020 01:36:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F423122C7C for ; Mon, 21 Dec 2020 01:36:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726575AbgLUBgU (ORCPT ); Sun, 20 Dec 2020 20:36:20 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:22069 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726508AbgLUBgT (ORCPT ); Sun, 20 Dec 2020 20:36:19 -0500 Received: from epcas2p3.samsung.com (unknown [182.195.41.55]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20201221013537epoutp02be70fa6cf720416ee367ebbaef4031f1~Sl3Mw7szi0698206982epoutp02C for ; Mon, 21 Dec 2020 01:35:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20201221013537epoutp02be70fa6cf720416ee367ebbaef4031f1~Sl3Mw7szi0698206982epoutp02C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1608514537; bh=oAZkt8d/EzEdD6gm9i+kuwRAAhZpY0ps41OxDiNtdgU=; h=From:To:Cc:Subject:Date:In-Reply-To:In-Reply-To:References:From; b=sOFCK3RToZZhp3uFP7dIHmXvL4lqw/OEXA7IHGndpN6027HJgxKLLrFyDNWYSVV0x p3VuhLVoXzrbzWvoVdNCk2iuuJh0nIUi80z73Z+PzYKWlLUQcv+HU6LLq/Rq7quGGP l9wsHYSmOhybapKJhhnELohSZCOSKtQDy8v8SXO0= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas2p4.samsung.com (KnoxPortal) with ESMTP id 20201221013536epcas2p47a179a3dc850681aecfa5eed6ca59941~Sl3L3GXxa0233802338epcas2p4v; Mon, 21 Dec 2020 01:35:36 +0000 (GMT) Received: from epsmges2p3.samsung.com (unknown [182.195.40.181]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4Czhqp6rDvz4x9Q3; Mon, 21 Dec 2020 01:35:34 +0000 (GMT) Received: from epcas2p1.samsung.com ( [182.195.41.53]) by epsmges2p3.samsung.com (Symantec Messaging Gateway) with SMTP id 73.26.05262.6EBFFDF5; Mon, 21 Dec 2020 10:35:34 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p3.samsung.com (KnoxPortal) with ESMTPA id 20201221013533epcas2p39a17300dc5e1659acdea849bea1322e0~Sl3JAviWb1421414214epcas2p3O; Mon, 21 Dec 2020 01:35:33 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20201221013533epsmtrp1de168209ba526e26603102a067c5d994~Sl3I-vkVn0617006170epsmtrp1e; Mon, 21 Dec 2020 01:35:33 +0000 (GMT) X-AuditID: b6c32a47-b97ff7000000148e-33-5fdffbe6c801 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id F1.43.08745.5EBFFDF5; Mon, 21 Dec 2020 10:35:33 +0900 (KST) Received: from ubuntu.dsn.sec.samsung.com (unknown [12.36.155.120]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20201221013533epsmtip2be4e7d9b835a19b2bb81e197d2d97c74~Sl3IzDaNO2619126191epsmtip2I; Mon, 21 Dec 2020 01:35:33 +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: [PATCH v3 2/2] ufs: ufs-exynos: apply vendor specifics for three timeouts Date: Mon, 21 Dec 2020 10:24:41 +0900 Message-Id: X-Mailer: git-send-email 2.7.4 In-Reply-To: In-Reply-To: X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprPJsWRmVeSWpSXmKPExsWy7bCmqe6z3/fjDfY/FLN4MG8bm8XethPs Fi9/XmWzOPiwk8Xi69JnrBbTPvxktvi0fhmrxa+/69ktVi9+wGKx6MY2JoubW46yWHRf38Fm sfz4PyaLrrs3GC2W/nvL4sDvcfmKt8flvl4mjwmLDjB6fF/fwebx8ektFo++LasYPT5vkvNo P9DNFMARlWOTkZqYklqkkJqXnJ+SmZduq+QdHO8cb2pmYKhraGlhrqSQl5ibaqvk4hOg65aZ A3S8kkJZYk4pUCggsbhYSd/Opii/tCRVISO/uMRWKbUgJafA0LBArzgxt7g0L10vOT/XytDA wMgUqDIhJ+P2hQ+sBTe5KqZ1P2JpYPzA0cXIySEhYCLx9e5vti5GLg4hgR2ME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z4PyaLrrs3GC2W/nvL4sDvcfmKt8flvl4mjwmLDjB6fF/fwebx8ektFo++LasYPT5vkvNo P9DNFMARxWWTkpqTWZZapG+XwJVx+8IH1oKbXBXTuh+xNDB+4Ohi5OSQEDCRePb/AGMXIxeH kMAORomWM70sEAlJiRM7nzNC2MIS91uOsEIUfWOUOPp6JlgRm4CmxNObU5lAEiIC95gkLk2Y ywySYBZQl9g14QQTiC0sECSxYc42sAYWAVWJg9+fgk3lFYiW6Og+zAqxQU7i5rlOsF5OAUuJ 1mnrwHqFBCwk7h16yoRLfAKjwAJGhlWMkqkFxbnpucWGBUZ5qeV6xYm5xaV56XrJ+bmbGMFR oaW1g3HPqg96hxiZOBgPMUpwMCuJ8JpJ3Y8X4k1JrKxKLcqPLyrNSS0+xCjNwaIkznuh62S8 kEB6YklqdmpqQWoRTJaJg1OqgenIgffzjh12NeYQm8eiHHv6xIfjvYW7PW4+mV3np6yl2Xvu e0X+/olWr/rLysJnrmBO3v2e9QL7/de+qxbMWCw1d5po//ztvw6fvvl1+pxFXhrKm+85GD57 uWpWK/f0H/ujmsN1q/5W1tnPFQ2ecduW9dpxT22pzHX/9x0U/OtTu6lB5dP79zt4VPRtJ0// vNp3wYGjKW2+dX90Lucvj0v6yjLr95JZm/5cd+FVOShnOu3MzPdvf7o+ncbKInIjnyWcdVPQ xHaX2nc3cjecrL35WkzYf8v2FVJZgUs3HfW7dmOXuNeF1ZYb2Ce8lUk5eNvM+1xm0htxGfbk CgvmylUTbtt6RpxhuJuo8M1DftWG5UosxRmJhlrMRcWJAFar56f5AgAA X-CMS-MailID: 20201221013533epcas2p39a17300dc5e1659acdea849bea1322e0 X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20201221013533epcas2p39a17300dc5e1659acdea849bea1322e0 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 |