From patchwork Thu May 27 03:09:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?7KCV7KKF66+8?= X-Patchwork-Id: 449240 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.1 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 B6535C4707F for ; Thu, 27 May 2021 03:12:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8554161358 for ; Thu, 27 May 2021 03:12:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234534AbhE0DN6 (ORCPT ); Wed, 26 May 2021 23:13:58 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:17647 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234456AbhE0DN5 (ORCPT ); Wed, 26 May 2021 23:13:57 -0400 Received: from epcas2p3.samsung.com (unknown [182.195.41.55]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20210527031223epoutp01d15a2633715e55ac75ff4a925b800ad6~CzdgAd1I32072420724epoutp017 for ; Thu, 27 May 2021 03:12:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20210527031223epoutp01d15a2633715e55ac75ff4a925b800ad6~CzdgAd1I32072420724epoutp017 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1622085143; bh=0hpKO5higzaZMXr6qB5GWGSB2TNiUI9oi3bZGjSi09c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cbEpr7TY7chBY49FDTaBh+qYjnui/wBl9QBuZLM9HZ3J8fNrgxPLiwZd+xI/kLepI wewRzCSRQIuUnQb4zBWxPV/JH066eiPTpny/BnbZn+8Ortpzw0VMoHXivG7LXGqCTb H9yJAjRlZlyx7/E8vNq9R8l4iHaDeNz6Tql6H1A8= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20210527031222epcas2p212470e592ff66707c629c70f8cf6ed09~CzdfbDpeF2938829388epcas2p2G; Thu, 27 May 2021 03:12:22 +0000 (GMT) Received: from epsmges2p1.samsung.com (unknown [182.195.40.181]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4FrCY05rxtz4x9Q6; Thu, 27 May 2021 03:12:20 +0000 (GMT) Received: from epcas2p3.samsung.com ( [182.195.41.55]) by epsmges2p1.samsung.com (Symantec Messaging Gateway) with SMTP id D4.DC.09604.41E0FA06; Thu, 27 May 2021 12:12:20 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p2.samsung.com (KnoxPortal) with ESMTPA id 20210527031220epcas2p269503cfa517d80af350c5344cdeb24c7~Czdc5w-h12938829388epcas2p2A; Thu, 27 May 2021 03:12:20 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20210527031220epsmtrp1e3f89235528fa6a641153d8fca15764a~Czdc5BcvD0371003710epsmtrp1X; Thu, 27 May 2021 03:12:20 +0000 (GMT) X-AuditID: b6c32a45-dc9ff70000002584-d7-60af0e1492b9 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 62.B2.08163.31E0FA06; Thu, 27 May 2021 12:12:19 +0900 (KST) Received: from localhost.localdomain (unknown [10.229.9.60]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20210527031219epsmtip220642a9673769acd882ab79005a57228~CzdctaIoa2760027600epsmtip29; Thu, 27 May 2021 03:12:19 +0000 (GMT) From: jongmin jeong To: jejb@linux.ibm.com, martin.petersen@oracle.com Cc: alim.akhtar@samsung.com, avri.altman@wdc.com, cang@codeaurora.org, beanhuo@micron.com, adrian.hunter@intel.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, jjmin.jeong@samsung.com Subject: [PATCH 2/3] scsi: ufs: add quirk to enable host controller without interface configuration Date: Thu, 27 May 2021 12:09:00 +0900 Message-Id: <20210527030901.88403-3-jjmin.jeong@samsung.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210527030901.88403-1-jjmin.jeong@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrJJsWRmVeSWpSXmKPExsWy7bCmua4I3/oEgw1N8hYnn6xhs3gwbxub xcufV9ksDj7sZLH4tH4Zq8WiG9uYLFZes7C4vGsOm0X39R1sFsuP/2Ny4PK43NfL5LF4z0sm jwmLDjB6fF/fwebx8ektFo++LasYPT5vkvNoP9DNFMARlWOTkZqYklqkkJqXnJ+SmZduq+Qd HO8cb2pmYKhraGlhrqSQl5ibaqvk4hOg65aZA3SjkkJZYk4pUCggsbhYSd/Opii/tCRVISO/ uMRWKbUgJafA0LBArzgxt7g0L10vOT/XytDAwMgUqDIhJ2N55zvGgkc8FddaFzI3MJ7k6mLk 5JAQMJGY83AnC4gtJLCDUWLv2rAuRi4g+xOjxMoHB1kgnM+MEkveXGKE6Xh99DAbRGIXo8TX f7OgnI+MEr2vvzCDVLEJ6Eqc2fwSyObgEBEwkri2yhOkhlngJFDN2RdgNcICqRK/G24xgdgs AqoSC27sAruDV8BG4vacqUwQ2+QlTp+4xggyh1PAVmLNlUyIEkGJkzOfgJU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YWuMwoMf1cNIgtLJAsMevrArAaFgFV iQU3drGA2LwCNhK350xlglggL3H6xDVGkL2cArYSa65kgphCQCUvlqVAVAtKnJz5hAViurxE 89bZzBMYBWYhSc1CklrAyLSKUTK1oDg3PbfYsMAoL7Vcrzgxt7g0L10vOT93EyM4FrS0djDu WfVB7xAjEwfjIUYJDmYlEd6DzWsThHhTEiurUovy44tKc1KLDzFKc7AoifNe6DoZLySQnliS mp2aWpBaBJNl4uCUamC63LQ3SOZAh+Z/Bi5WyQJH/8tlOqWVuR0bPzRrSy59IlJ1bxYTu5iL hZrcluvb/sl917uu/W3xfYETpTfFTxy4m/R4p2/YSbecBGvXp89mqUa4rdLNz+CM3J59bvIO 58WPE5uzq9V3pDUoWef+7t1g3avyutMg6ZCs0BbTu8zbGBYb3ma70dn3quP9w4n20WtNlRj2 q31/l/CgVJ1nvVP9slXW9vd25UZe9K97dWz12mdBrKr/NiSk1ekfEqpMkO0++K1bRU3i/zxL d1/ztTdOnvnLWycQG/chyOly0bRmBuUYbmsbDck83cUzOBf8VdQs+j17x4KaLp4Wjo0NnE72 Wzd/7MkW9TLhjPscpMRSnJFoqMVcVJwIAHGU/LX0AgAA X-CMS-MailID: 20210527031220epcas2p269503cfa517d80af350c5344cdeb24c7 X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210527031220epcas2p269503cfa517d80af350c5344cdeb24c7 References: <20210527030901.88403-1-jjmin.jeong@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org samsung ExynosAuto SoC has two types of host controller interface to support the virtualization of UFS Device. One is the physical host(PH) that the same as conventaional UFSHCI, and the other is the virtual host(VH) that support data transfer function only. In this structure, the virtual host does not support like device management. This patch skips the interface configuration part that cannot be performed in the virtual host. Change-Id: I65b56f898da9d57c627b5752535dd563e4fd3e8d Signed-off-by: jongmin jeong --- drivers/scsi/ufs/ufshcd.c | 3 +++ drivers/scsi/ufs/ufshcd.h | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index ec663cb58233..4787e40c6a2d 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -7975,6 +7975,9 @@ static int ufshcd_probe_hba(struct ufs_hba *hba, bool async) if (ret) goto out; + if (hba->quirks & UFSHCD_QUIRK_SKIP_INTERFACE_CONFIGURATION) + goto out; + /* Debug counters initialization */ ufshcd_clear_dbg_ufs_stats(hba); diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h index 4a929bf7cf8e..0ab4c296be32 100644 --- a/drivers/scsi/ufs/ufshcd.h +++ b/drivers/scsi/ufs/ufshcd.h @@ -575,6 +575,12 @@ enum ufshcd_quirks { * support UIC command */ UFSHCD_QUIRK_BROKEN_UIC_CMD = 1 << 15, + + /* + * This quirk needs to be enabled if the host controller cannot + * support interface configuration. + */ + UFSHCD_QUIRK_SKIP_INTERFACE_CONFIGURATION = 1 << 16, }; enum ufshcd_caps { From patchwork Thu May 27 03:09:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?7KCV7KKF66+8?= X-Patchwork-Id: 449239 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.1 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 0E5E7C4707F for ; Thu, 27 May 2021 03:12:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E2CD961358 for ; Thu, 27 May 2021 03:12:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234592AbhE0DOE (ORCPT ); Wed, 26 May 2021 23:14:04 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:29328 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234508AbhE0DN6 (ORCPT ); Wed, 26 May 2021 23:13:58 -0400 Received: from epcas2p1.samsung.com (unknown [182.195.41.53]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20210527031224epoutp04aafcce3172a30ebb4dc7775a613886e2~CzdhLSqPA0906709067epoutp04_ for ; Thu, 27 May 2021 03:12:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20210527031224epoutp04aafcce3172a30ebb4dc7775a613886e2~CzdhLSqPA0906709067epoutp04_ DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1622085144; bh=cVkOyZXFci4e/LC+JGV+kk1apRazO3c51y6t6bo12bc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OFPsD0oThsb7QqSIouRArZpV8LvA+D2iTL8FCp4DOhO04LTzDmg1man/tkk3eIdJ3 8gQMPy2eNjyUJ2TahMmHeOd3bVWjYi3Snrom7mVHHlTk2YMzGhZUXG0tSAB3Mqx0nt iPjknoI6fb5LuhqG2/SScjGEgw8dbjdimVFvpVyE= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20210527031223epcas2p2a4d153a87bbe9613dafc3a63bb587506~CzdgciFHj2939229392epcas2p2_; Thu, 27 May 2021 03:12:23 +0000 (GMT) Received: from epsmges2p4.samsung.com (unknown [182.195.40.190]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4FrCY10Z5cz4x9Q1; Thu, 27 May 2021 03:12:21 +0000 (GMT) Received: from epcas2p4.samsung.com ( [182.195.41.56]) by epsmges2p4.samsung.com (Symantec Messaging Gateway) with SMTP id 21.78.09717.41E0FA06; Thu, 27 May 2021 12:12:20 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p4.samsung.com (KnoxPortal) with ESMTPA id 20210527031220epcas2p41a5ba641919769ca95ccea81e5f3bfb0~CzddXBTAw0832808328epcas2p4_; Thu, 27 May 2021 03:12:20 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20210527031220epsmtrp1e96e025d35f0dc9691b6755c5d8bd083~CzddWEBJT0371003710epsmtrp1Z; Thu, 27 May 2021 03:12:20 +0000 (GMT) X-AuditID: b6c32a48-4e5ff700000025f5-85-60af0e14ca4f Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 34.06.08637.41E0FA06; Thu, 27 May 2021 12:12:20 +0900 (KST) Received: from localhost.localdomain (unknown [10.229.9.60]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20210527031220epsmtip26cce362e4d9749c78ab753a66c307239~CzddL--yv1633016330epsmtip29; Thu, 27 May 2021 03:12:20 +0000 (GMT) From: jongmin jeong To: jejb@linux.ibm.com, martin.petersen@oracle.com Cc: alim.akhtar@samsung.com, avri.altman@wdc.com, cang@codeaurora.org, beanhuo@micron.com, adrian.hunter@intel.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, jjmin.jeong@samsung.com Subject: [PATCH 3/3] scsi: ufs: add quirk to support host reset only Date: Thu, 27 May 2021 12:09:01 +0900 Message-Id: <20210527030901.88403-4-jjmin.jeong@samsung.com> X-Mailer: git-send-email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JEfai5mHIgfsLJjG+8Z1gPOc00uC89 XdJisudH3/KEnRrWMpc+tE7jra2/eWrLwZNHn5pbiXulX/y2WLz9zRLRK7sCHZI8Uj1ehE5i Sq/fvstL7GCbekaciNzlC91HJKeeqvl9SyblSr9W7LSdH5Q5a1/1pQXEvn1oZVr5+oXNlr98 HxNdH5tsX/XVaYMSb8gNJZbijERDLeai4kQAoDKvRvQCAAA= X-CMS-MailID: 20210527031220epcas2p41a5ba641919769ca95ccea81e5f3bfb0 X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210527031220epcas2p41a5ba641919769ca95ccea81e5f3bfb0 References: <20210527030901.88403-1-jjmin.jeong@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org samsung ExynosAuto SoC has two types of host controller interface to support the virtualization of UFS Device. One is the physical host(PH) that the same as conventaional UFSHCI, and the other is the virtual host(VH) that support data transfer function only. In this structure, the virtual host does support host reset handler only. This patch calls the host reset handler when abort or device reset handler has occured in the virtual host. Change-Id: I3f07e772415a35fe1e7374e02b3c37ef0bf5660d Signed-off-by: jongmin jeong --- drivers/scsi/ufs/ufshcd.c | 7 +++++++ drivers/scsi/ufs/ufshcd.h | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 4787e40c6a2d..9d1912290f87 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -6826,6 +6826,9 @@ static int ufshcd_eh_device_reset_handler(struct scsi_cmnd *cmd) u8 resp = 0xF, lun; unsigned long flags; + if (hba->quirks & UFSHCD_QUIRK_BROKEN_RESET_HANDLER) + return ufshcd_eh_host_reset_handler(cmd); + host = cmd->device->host; hba = shost_priv(host); @@ -6972,6 +6975,10 @@ static int ufshcd_abort(struct scsi_cmnd *cmd) host = cmd->device->host; hba = shost_priv(host); tag = cmd->request->tag; + + if (hba->quirks & UFSHCD_QUIRK_BROKEN_RESET_HANDLER) + return ufshcd_eh_host_reset_handler(cmd); + lrbp = &hba->lrb[tag]; if (!ufshcd_valid_tag(hba, tag)) { dev_err(hba->dev, diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h index 0ab4c296be32..82a9c6889978 100644 --- a/drivers/scsi/ufs/ufshcd.h +++ b/drivers/scsi/ufs/ufshcd.h @@ -581,6 +581,12 @@ enum ufshcd_quirks { * support interface configuration. */ UFSHCD_QUIRK_SKIP_INTERFACE_CONFIGURATION = 1 << 16, + + /* + * This quirk needs to be enabled if the host controller support + * host reset handler only. + */ + UFSHCD_QUIRK_BROKEN_RESET_HANDLER = 1 << 17, }; enum ufshcd_caps {