Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1079749pxj; Wed, 2 Jun 2021 20:29:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0qhcSiE34r8E4tx4y+kCn0ftp4UgxAq1QwFKESEReW6aR6tEE6lFMv9ZpKgSdxvs0MPdm X-Received: by 2002:a17:906:9715:: with SMTP id k21mr29058409ejx.553.1622690995860; Wed, 02 Jun 2021 20:29:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622690995; cv=none; d=google.com; s=arc-20160816; b=xNNs72QXh+2CdUw/LK+CnzdZz9a+SUYJSOpinziVYYVtVNl0LRV3Mav9fS6Gx+f7DS 6uMV7PKiJ8kvW87xvDwuuq1Kono1qGA2vQ4zUGjEAmRsVxPpi61Pl5CoFYWAEXQkiocX fGt0hndw9yBVKgc6cP+kxQpcXHYcp6eRtke7dtZmMV8rqsrf+8MzYJLx2fHqjTwm2k1i RggiYUz08Wv6PzLwMmuJyWXGB2BuEqx6UMOKXoRFy1Fz5aFD5SuNQTUhZFEjsZpllnaw QMXRaOdFCdxfP4dgP1uAqOogMV/7xpSl10Ln1/7dHMs6qK2wb+xvCnZh8GJiBC2kTgIO hoCQ== 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-language :thread-index:content-transfer-encoding:mime-version:message-id:date :subject:in-reply-to:cc:to:from:dkim-signature:dkim-filter; bh=xfQdp7ENFf82HbCO6D4eu9F+lquLlW/Lgs0PAWtVh/o=; b=MJGNo0AEQUMosTjwu9XlvCC+ydiHigSTrgdzWWzapPCk3iZF2MvHHmF6e7b69LzIEz hW9sHBOv3hwE/VSFKgMd1aNUpJ8sHqc1XyLX+2QwiUfJHKGP6CLNoqfmnWzv7zOrRv/5 is9QkPIp29zWTGx8RA7pzG09+rfH5hUuJZRp0STSg/vOIrZeNpYJYDGKRJ6myDhYykvh NC3kZtjQxRfyzXh5nLwYDt+ekj/NxmlMUQ4kxM2gNdCpLEJh+m/6OUbvEstE+HJv1zPk H3Hw5ji0Y5XtUgHmR9oqm5eAcmUweKQ7syoFfbSVuuQkdqS6liBijI4AH5rzyC2Rz1n8 yh0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=gs+Tk9AZ; 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 g1si1258996ejj.85.2021.06.02.20.28.53; Wed, 02 Jun 2021 20:29:55 -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=gs+Tk9AZ; 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 S229685AbhFCDXf (ORCPT + 99 others); Wed, 2 Jun 2021 23:23:35 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:24520 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229541AbhFCDXf (ORCPT ); Wed, 2 Jun 2021 23:23:35 -0400 Received: from epcas2p3.samsung.com (unknown [182.195.41.55]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20210603032149epoutp02049a65b47a78cfa6d8ab9367ea76d348~E9GvUOk9s1752717527epoutp02e for ; Thu, 3 Jun 2021 03:21:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20210603032149epoutp02049a65b47a78cfa6d8ab9367ea76d348~E9GvUOk9s1752717527epoutp02e DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1622690509; bh=xfQdp7ENFf82HbCO6D4eu9F+lquLlW/Lgs0PAWtVh/o=; h=From:To:Cc:In-Reply-To:Subject:Date:References:From; b=gs+Tk9AZOhn1rUW/AhHpcr9AmHrNCytqWSuyP1OyoTRlMUN5XdaZ1lJUFLg2zmnlI kCaKQWjUS/5YmIVq2HSm2U4UITfhfdAsP9y1YThVBVGKR0wpl8o/LQkRfoT6Mwhbv3 2qaGHwAERoZHC2QQ4xxbL3mghDynEYooDAup86vQ= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20210603032148epcas2p2071da659da39875669d95a428266c405~E9GupOrRA3169231692epcas2p2J; Thu, 3 Jun 2021 03:21:48 +0000 (GMT) Received: from epsmges2p3.samsung.com (unknown [182.195.40.190]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4FwWQf4KsXz4x9Pw; Thu, 3 Jun 2021 03:21:46 +0000 (GMT) Received: from epcas2p1.samsung.com ( [182.195.41.53]) by epsmges2p3.samsung.com (Symantec Messaging Gateway) with SMTP id CF.47.09433.ACA48B06; Thu, 3 Jun 2021 12:21:46 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p1.samsung.com (KnoxPortal) with ESMTPA id 20210603032146epcas2p1e41a262effe24ac53064896e1fa60926~E9Gr2lnKS1506015060epcas2p1_; Thu, 3 Jun 2021 03:21:46 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20210603032145epsmtrp12886b533f405f7256da7afd7dbd59978~E9Gr15aRj2254622546epsmtrp1I; Thu, 3 Jun 2021 03:21:45 +0000 (GMT) X-AuditID: b6c32a47-f4bff700000024d9-56-60b84aca7e79 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id AC.29.08163.9CA48B06; Thu, 3 Jun 2021 12:21:45 +0900 (KST) Received: from KORDO039821 (unknown [10.229.8.133]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20210603032145epsmtip2ea3929570f42d1c5df521f57856f1ad6~E9GrknrtG1856818568epsmtip2Q; Thu, 3 Jun 2021 03:21:45 +0000 (GMT) From: =?ks_c_5601-1987?B?waTBvrnO?= To: "'Can Guo'" Cc: , , , , , , , In-Reply-To: Subject: RE: [PATCH 3/3] scsi: ufs: add quirk to support host reset only Date: Thu, 3 Jun 2021 12:21:45 +0900 Message-ID: <000101d75827$94eb33d0$bec19b70$@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset="ks_c_5601-1987" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQIoW8PMwO5SDtoUto4XDMUWk4sZmgJIuCXRATb+sNsButkn1Ko1wOaw Content-Language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrMJsWRmVeSWpSXmKPExsWy7bCmqe4prx0JBldWyFucfLKGzeLBvG1s Fi9/XmWzOPiwk8Xi0/plrBaLbmxjsri8aw6bRff1HWwWy4//Y3Lg9Ljc18vksXjPSyaPCYsO MHp8X9/B5vHx6S0Wj74tqxg9Pm+S82g/0M0UwBGVY5ORmpiSWqSQmpecn5KZl26r5B0c7xxv amZgqGtoaWGupJCXmJtqq+TiE6DrlpkDdJ+SQlliTilQKCCxuFhJ386mKL+0JFUhI7+4xFYp tSAlp8DQsECvODG3uDQvXS85P9fK0MDAyBSoMiEnY/m3VqaCueIVjY/msDQwbhXqYuTkkBAw kVj84QhjFyMXh5DADkaJts1n2SGcT4wSvbtnQTmfGSW+rFzOCNMyf9ZyJojELkaJ5aemQjkv GCXWL/rMDFLFJmArseXwIyYQW0RAVeJd63k2EJtZ4C6jxOE7LCA2p4CdxPSnh4BqODiE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uRi0NIYAejxKIJ19m6GDmAEtISa/ZIQ9QIS9xvOcIKUfOM UeLs7SOMIAk2AVuJLYcfMYHYIgKqEu9az7OBFDELPGWUWPy4jwWi4yOQ09/FClLFKWAnMf3p ISaQDcICHhJnd3uChFkEVCTeHv7FAmLzClhKNB34xwZhC0qcnPkELM4MdGnj4W4oW15i+9s5 zBDXKUj8fLqMFeIIN4mVrw+wQdSISMzubGOewCg8C8moWUhGzUIyahaSlgWMLKsYJVMLinPT c4sNC4zyUsv1ihNzi0vz0vWS83M3MYIjUEtrB+OeVR/0DjEycTAeYpTgYFYS4d2jtiNBiDcl sbIqtSg/vqg0J7X4EKM0B4uSOO+FrpPxQgLpiSWp2ampBalFMFkmDk6pBib5ezVC5ffNONbv 49g1//S+tyLv+9QfRDWsP/bu5G2jN3wX0+aHTCm/V8Y/b6Hxzsj6i9eFokP3vj4uVvHleUzU hIxdCgedFHz/KzJN54p3Wq5SNLNz3uGzTZXfM//NCZ3adCav7x376nOTjW1ObspevSj1qfIb tbe261cry875sknlnsz1fe6Pd5ywvdTTdvX0HJGSwj0CpZs4OxMutttNC6o8+pbh/+vM91vy ur/ZF/uo6Chk//gfkDahYtfcPcrTHgloGsXk+Sa910rbrLCz0SfXaqJDie+MOS/OTp0w+W+H +Ndvr35vnZQWoRqoqyS3XaKKIXXJ4riyW5E1WjkWNVbCtx79+bjxoNbdaIs3SizFGYmGWsxF xYkAcymPoC8DAAA= X-CMS-MailID: 20210603032146epcas2p1e41a262effe24ac53064896e1fa60926 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> <20210527030901.88403-4-jjmin.jeong@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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. > > One more question, as per the plot in the cover letter, the VH does > support TMRs. > Why are you trying to make ufshcd_abort() and > ufshcd_eh_device_reset_handler() > no-ops? > > Thanks, > > Can Guo. Can, Thanks for your review. Yes, you are right about ufshcd_abort. it would be better to call if it fails abort handling has failed. I will apply this modification to the next patch. device reset handler case is a little different. We do not want the virtual host to do device reset(LUN reset). According to our virtualization architecture, virtual OSs can share LUNs. Therefore, we are trying to prevent the reset for LUN in guest OS. > > > > 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 { Best Regards, Jongmin jeong