Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp270373pxj; Wed, 26 May 2021 22:55:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwgf7YSo8ewUM2/zhFv9lJ3snqPB7i5/NhqXDYbYT84A4qow3FQBBxPxqh4X+uX+Ah9nqna X-Received: by 2002:aa7:de19:: with SMTP id h25mr2273348edv.84.1622094899842; Wed, 26 May 2021 22:54:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622094899; cv=none; d=google.com; s=arc-20160816; b=e7g1UzmG773fMQkodM4VUK0fSzXgO1lGiFkgCWxFZReZscCxxK7xcpNmLjL5BI8ZqX IRxz9WGJMiSUrj6PRkceW3Ah/uqjDy//p/Gkm9tJ3fzkvBF5w5G5l7Svg0Q+HhjF2cGy aEefWoFSZj95OeMI+tcfXTN2S69Qf2FRvnRqZb6QWhD9aG52p0EGoOe2Xk0Fbsw+SJhv cMq160SdSOGyUZrEVDTpyjkN1ddcsPoZDVlqXz4qyfS3tooruroJjdQRhsRKXeqicljG 00MBzTW3xts5RAk/MfCJfekW+gWfj8Bw/XV1ccAbvmBaBNHgTY8CPxj2Jmxkxk93XqFA YZ+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:dlp-filter:cms-type :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature:dkim-filter; bh=f37EYTIi3mXSrhIWvEOJvyWGH29au5/mg/qphK5+clw=; b=PRQ3dYOXb+q5Fo68orLOO6kgz4Wxrt+n0ywm8YopKCw+hNCn9Q/2bA4V4gMBcwV7c6 XOy3Lg7LRuPFT6LMr86CvPQdpCYivg5Sq0W9TQVdT6l9Hes8z86ub3hNFQlTiGPWoMuB lgVGvkMZNn3W2SITFWuNLmuB6tbAmm4pYe/o4dKOR6MUZC4+GAcEIDceWS7ySvgP7w8b zbmKgKOjBK4IMcfZ900ELmNAZ2h4MJEcMGwy0bcDgV4x5N5/+6sappQRa7On4YmaKUG6 FbdKoKF9xgFGqTlvHnXQJNPmhrVSK0USp0xCuX8C6a0m/BidZQ/l6skmiaOT6XBK0DM5 +nJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=kIdwI50V; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w23si1311549ejn.289.2021.05.26.22.54.34; Wed, 26 May 2021 22:54:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=kIdwI50V; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234497AbhE0DN5 (ORCPT + 99 others); Wed, 26 May 2021 23:13:57 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:59580 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233643AbhE0DN4 (ORCPT ); Wed, 26 May 2021 23:13:56 -0400 Received: from epcas2p1.samsung.com (unknown [182.195.41.53]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20210527031222epoutp03143cbb78dee1449b8a222501b7448aab~Czde32myH2256922569epoutp03f for ; Thu, 27 May 2021 03:12:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20210527031222epoutp03143cbb78dee1449b8a222501b7448aab~Czde32myH2256922569epoutp03f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1622085142; bh=f37EYTIi3mXSrhIWvEOJvyWGH29au5/mg/qphK5+clw=; h=From:To:Cc:Subject:Date:References:From; b=kIdwI50VoWQfBYrIzH3o6hochu7wHO+c+V32GMBRPm0pVNSvOaOi26y176CaGkHVe QPmhNzEAOTbnk0OGeIYPNK8X1JaSzB8cL4YeadtDt+aqCUKIWnOakhxeSt2ZJQAe2Z vpE3dMHsqikv8Ui9NT8iccmJd7rNtFHLCr7xTS9w= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20210527031221epcas2p29a6a54129cb58a2244f099bf6066cea6~CzdeM8AYv2760027600epcas2p2O; Thu, 27 May 2021 03:12:21 +0000 (GMT) Received: from epsmges2p1.samsung.com (unknown [182.195.40.187]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4FrCXz47B4z4x9Q3; Thu, 27 May 2021 03:12:19 +0000 (GMT) Received: from epcas2p4.samsung.com ( [182.195.41.56]) by epsmges2p1.samsung.com (Symantec Messaging Gateway) with SMTP id AE.CC.09604.11E0FA06; Thu, 27 May 2021 12:12:17 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p4.samsung.com (KnoxPortal) with ESMTPA id 20210527031217epcas2p44b9d999edcc55b345dfd0749acefeaec~CzdajC8Xk0835408354epcas2p40; Thu, 27 May 2021 03:12:17 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20210527031217epsmtrp1152503d270cc1830080b6c7179960e3a~CzdaiBbl70371003710epsmtrp1Q; Thu, 27 May 2021 03:12:17 +0000 (GMT) X-AuditID: b6c32a45-dc9ff70000002584-cd-60af0e11cee9 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 50.B2.08163.11E0FA06; Thu, 27 May 2021 12:12:17 +0900 (KST) Received: from localhost.localdomain (unknown [10.229.9.60]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20210527031217epsmtip22a13cd0e5dd19317ca6ce8846d49991d~CzdaWk3PN2849528495epsmtip2t; Thu, 27 May 2021 03:12:17 +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 0/3] Add quirk to support exynos ufshci Date: Thu, 27 May 2021 12:08:58 +0900 Message-Id: <20210527030901.88403-1-jjmin.jeong@samsung.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprHJsWRmVeSWpSXmKPExsWy7bCmha4g3/oEg3NNlhYnn6xhs3gwbxub xcufV9ksDj7sZLH4tH4Zq8WiG9uYLFZes7C4vGsOm0X39R1sFsuP/2Ny4PK43NfL5LF4z0sm jwmLDjB6fF/fwebx8ektFo++LasYPT5vkvNoP9DNFMARlWOTkZqYklqkkJqXnJ+SmZduq+Qd HO8cb2pmYKhraGlhrqSQl5ibaqvk4hOg65aZA3SjkkJZYk4pUCggsbhYSd/Opii/tCRVISO/ uMRWKbUgJafA0LBArzgxt7g0L10vOT/XytDAwMgUqDIhJ2PajWdsBUfEKl6v+MLSwDhJsIuR k0NCwERi1ZHLrF2MXBxCAjsYJV5e/wjlfGKU+DnjPZTzmVFi0sqTjDAtB67NY4RI7GKU2Nl0 hg3C+cgo0XVpNTNIFZuArsSZzS+BbA4OEQEjiWurPEFqmAVOMkr0nn0BViMsYC6x/80uVhCb RUBV4tfTPjCbV8BG4szFK+wQ2+QlTp+4xggRF5Q4OfMJC4jNDBRv3jqbGWSohMBfdok7+x+x QDS4SDR+2csEY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K /HraB2bzCthInLl4hR1igbzE6RPXGCHighInZz5hgZgjL9G8dTbzBEa+WUhSs5CkFjAyrWKU TC0ozk3PLTYsMMpLLdcrTswtLs1L10vOz93ECA5vLa0djHtWfdA7xMjEwXiIUYKDWUmE92Dz 2gQh3pTEyqrUovz4otKc1OJDjNIcLErivBe6TsYLCaQnlqRmp6YWpBbBZJk4OKUamPg5V5+6 bCFwJMTA7jwDd3OnxvYmnTn+p0zu7K8rZX9lyVUaVGc8rVLK3njTLf4nG9RLH924OenYpZ8L zheWrStc8ePzd/Zmwe8NVo9ulT+K/CPxWeN2lPfZoLRD++PaIiyWau48uN55Oke3hZe0gF7q LNvC5JqjT69a/ld9Fj3NYOqsxkWnQnWCn1UHL/A/dunFc4nJh88oikq1q4fxND7YU7P/rdjH Y7vOMS3b4+U0KXBzxzUxe+bwwjt8k5gsbvX2n6iOlir69mHxnqJ226jf5mK2s/5LC5w7dejO 0/0Xnkh+5P++ibmx+/oN61k7F53WEb2yYPVLu4XtzR+KJp9fkXhBd90H1l8RMXPSfycrsRRn JBpqMRcVJwIAwxcaq94CAAA= X-CMS-MailID: 20210527031217epcas2p44b9d999edcc55b345dfd0749acefeaec X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210527031217epcas2p44b9d999edcc55b345dfd0749acefeaec References: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In ExynosAuto(variant of the Exynos for automotive), the UFS Storage needs to be accessed from multi-OS. To increase IO performance and reduce SW complexity, we implemented UFS-IOV to support storage IO virtualization feature on UFS. IO virtualization increases IO performance and reduce SW complexity with small area cost. And IO virtualization supports virtual machine isolation for Security and Safety which are requested by Multi-OS system such as automotive application. Below figure is the conception of UFS-IOV architeture. +------+ +------+ | OS#1 | | OS#2 | +------+ +------+ | | +------------+ +------------+ | Physical | | Virtual | | Host | | Host | +------------+ +------------+ | | | <-- UTP_CMD_SAP, UTP_TM_SAP | +-------------------------+ | | Function Arbitor | | +-------------------------+ +-------------------------------+ | UTP Layer | +-------------------------------+ +-------------------------------+ | UIC Layer | +-------------------------------+ There are two types of host controllers on the UFS host controller that we designed. The UFS device has a Function Arbitor that arranges commands of each host. When each host transmits a command to the Arbitor, the Arbitor transmits it to the UTP layer. Physical Host(PH) support all UFSHCI functions(all SAPs) same as conventional UFSHCI. Virtual Host(VH) support only data transfer function(UTP_CMD_SAP and UTP_TM_SAP). In an environment where multiple OSs are used, the OS that has the leadership of the system is called System OS. This system OS uses PH and controls error handling. Since VH can only use less functions than PH, it is necessary to send a request to PH for Detected Error Handling in VH. To interface among PH and VHs, UFSHCI HW supports mailbox. PH can broadcast mail to other VH at the same time with arguments and VH can mail to PH with arguments. PH and VH generate interrupts when mails from PH or VH. In this structure, the virtual host can't support some feature and need to skip the some part of ufshcd code by using quirk. This patchs add quirks so that the UIC command is ignored and the ufshcd init process can be skipped for VH. Also, according to our UFS-IOV policy, we added a quirk to the abort handler or device reset handler to call the host reset handler. jongmin jeong (3): scsi: ufs: add quirk to handle broken UIC command scsi: ufs: add quirk to enable host controller without interface configuration scsi: ufs: add quirk to support host reset only drivers/scsi/ufs/ufshcd.c | 13 +++++++++++++ drivers/scsi/ufs/ufshcd.h | 18 ++++++++++++++++++ 2 files changed, 31 insertions(+) -- 2.31.1