From patchwork Mon Sep 2 04:26:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kiwoong Kim X-Patchwork-Id: 13786696 Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CEBEC1E50B for ; Mon, 2 Sep 2024 04:17:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.34 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725250681; cv=none; b=kiRnUcDwhMkx0HBWzsrNnvafTFsrCcrZCmvchix1tRWzAWVt4rkM7bRnzoXLGjQ908JqDrl8lIfEIJ+Fqkt5/hxN6N0K0olzb+0mSVKyQaOfyNCJkRrwaeBTIcK+0QXafO781gnFyuIUjJtcH0CWlJQx97qC2MoYjZD24udV/pg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725250681; c=relaxed/simple; bh=rDcTxesVpUAKbdchB2UcayjYfjAZqcA53h9zG3W88Ic=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:MIME-Version: Content-Type:References; b=onJavpF15q7xIONKdIO/ls68wSztSjE6mLtMQzwyoeyxs3idyHkaPXKEyCXnjOCng4V2rp2ZAtr7z/njcgFNaZ6+cVe0+qH+gbI9BIFUzkBCou2JEJCtZjmvAhSFVDlXCEBMTfOddbDAgaeMmRTz06FMs4XNJ8cI0HXi/uAOwNQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=SeslD/0U; arc=none smtp.client-ip=203.254.224.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="SeslD/0U" Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20240902041755epoutp04aa3f92f420f3546e8fc9d7d160f61e2a~xUllFa9Ja1816518165epoutp04S for ; Mon, 2 Sep 2024 04:17:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20240902041755epoutp04aa3f92f420f3546e8fc9d7d160f61e2a~xUllFa9Ja1816518165epoutp04S DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1725250675; bh=Gm6bfVYo8q3tjpjBLXQfHM59etQejq246QIVY2XCsr4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SeslD/0UCa3ZXSuVESgUammiUJWrLiXIP9zNeZzj4yOAJB+gHiTzLlf4yURE4hGK0 nEHmFxWAQmDHO+HypkpnfzYsOKo50UmKq3hyWlKgRzX9G4jsOycWi6xq/PKDG+uH6v AJiM3N7xcMN0tXDonXQWIumb/5Poov5h8t+fIeU8= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20240902041755epcas2p32790dd6a8adcbb4b0997d1d36674a524~xUlkm5Qla2389523895epcas2p3E; Mon, 2 Sep 2024 04:17:55 +0000 (GMT) Received: from epsmges2p3.samsung.com (unknown [182.195.36.90]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4WxwTZ27w6z4x9Pp; Mon, 2 Sep 2024 04:17:54 +0000 (GMT) Received: from epcas2p2.samsung.com ( [182.195.41.54]) by epsmges2p3.samsung.com (Symantec Messaging Gateway) with SMTP id 17.F3.10012.27C35D66; Mon, 2 Sep 2024 13:17:54 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p2.samsung.com (KnoxPortal) with ESMTPA id 20240902041753epcas2p26511cc4d2badf0e866cec2f855380c67~xUljPIODt1585715857epcas2p2q; Mon, 2 Sep 2024 04:17:53 +0000 (GMT) Received: from epsmgms1p2new.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20240902041753epsmtrp1cbe18b74a4ac6a6c646dfbb6936236dd~xUljOQsf43038530385epsmtrp1I; Mon, 2 Sep 2024 04:17:53 +0000 (GMT) X-AuditID: b6c32a47-ea1fa7000000271c-e5-66d53c72617e Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2new.samsung.com (Symantec Messaging Gateway) with SMTP id E6.1A.08456.17C35D66; Mon, 2 Sep 2024 13:17:53 +0900 (KST) Received: from rack03.dsn.sec.samsung.com (unknown [10.229.95.126]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20240902041753epsmtip2e650b1ba05ef0eb92c378c523e2d1b34~xUli8b9Kp0320303203epsmtip2N; Mon, 2 Sep 2024 04:17:53 +0000 (GMT) From: Kiwoong Kim To: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, huobean@gmail.com, alim.akhtar@samsung.com, avri.altman@wdc.com, bvanassche@acm.org, jejb@linux.ibm.com, martin.petersen@oracle.com, beanhuo@micron.com, adrian.hunter@intel.com, h10.kim@samsung.com, hy50.seo@samsung.com, sh425.lee@samsung.com, kwangwon.min@samsung.com, junwoo80.lee@samsung.com, wkon.kim@samsung.com Cc: Kiwoong Kim Subject: [RESEND PATCH v2 1/2] scsi: ufs: core: introduce override_cqe_ocs Date: Mon, 2 Sep 2024 13:26:45 +0900 Message-Id: <90ea4709cf07d951aaad16e1e63f13842bb4608f.1725251103.git.kwmad.kim@samsung.com> X-Mailer: git-send-email 2.26.0 In-Reply-To: Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Br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8FXeeC120nHrV/mTXDP/vb5vF3amazzWxnDzP8tfzV7 2SJXib011aIn7+41n8t1nbH22QT3E2sW7L4rqLql+Kr8yg1PEsu/PJif73OE7eyalrM/M+71 7Q/e4u8UUXOx1fr3xD/55V8tp0lxtn9773Ay6O6TBtHMskm9paLCukd/frn/zbn8Qe8rBp7M x9s38W4tULeMeLZ7sqBT8tZ2X5spgZVlu4plDbP5H81+KRKavO3x20cv3JpKf3CvP/pn+Q8b WSWW4oxEQy3mouJEADVZJlofAwAA X-CMS-MailID: 20240902041753epcas2p26511cc4d2badf0e866cec2f855380c67 X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20240902041753epcas2p26511cc4d2badf0e866cec2f855380c67 References: This patch is to declare override_cqe_ocs callback to override OCS value. Signed-off-by: Kiwoong Kim --- drivers/ufs/core/ufshcd-priv.h | 9 +++++++++ drivers/ufs/core/ufshcd.c | 11 +++++++---- include/ufs/ufshcd.h | 1 + 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/drivers/ufs/core/ufshcd-priv.h b/drivers/ufs/core/ufshcd-priv.h index ce36154ce963..6ebc83029e09 100644 --- a/drivers/ufs/core/ufshcd-priv.h +++ b/drivers/ufs/core/ufshcd-priv.h @@ -275,6 +275,15 @@ static inline int ufshcd_mcq_vops_config_esi(struct ufs_hba *hba) return -EOPNOTSUPP; } +static inline enum utp_ocs ufshcd_vops_override_cqe_ocs(struct ufs_hba *hba, + enum utp_ocs ocs) +{ + if (hba->vops && hba->vops->override_cqe_ocs) + return hba->vops->override_cqe_ocs(ocs); + + return ocs; +} + extern const struct ufs_pm_lvl_states ufs_pm_lvl_states[]; /** diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index 0dd26059f5d7..0615e372fe44 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -821,11 +821,14 @@ static inline bool ufshcd_is_device_present(struct ufs_hba *hba) * * Return: the OCS field in the UTRD. */ -static enum utp_ocs ufshcd_get_tr_ocs(struct ufshcd_lrb *lrbp, +static enum utp_ocs ufshcd_get_tr_ocs(struct ufs_hba *hba, + struct ufshcd_lrb *lrbp, struct cq_entry *cqe) { if (cqe) - return le32_to_cpu(cqe->status) & MASK_OCS; + return ufshcd_vops_override_cqe_ocs(hba, + le32_to_cpu(cqe->status) & + MASK_OCS); return lrbp->utr_descriptor_ptr->header.ocs & MASK_OCS; } @@ -3180,7 +3183,7 @@ static int ufshcd_wait_for_dev_cmd(struct ufs_hba *hba, * not trigger any race conditions. */ hba->dev_cmd.complete = NULL; - err = ufshcd_get_tr_ocs(lrbp, NULL); + err = ufshcd_get_tr_ocs(hba, lrbp, NULL); if (!err) err = ufshcd_dev_cmd_completion(hba, lrbp); } else { @@ -5351,7 +5354,7 @@ ufshcd_transfer_rsp_status(struct ufs_hba *hba, struct ufshcd_lrb *lrbp, scsi_set_resid(lrbp->cmd, resid); /* overall command status of utrd */ - ocs = ufshcd_get_tr_ocs(lrbp, cqe); + ocs = ufshcd_get_tr_ocs(hba, lrbp, cqe); if (hba->quirks & UFSHCD_QUIRK_BROKEN_OCS_FATAL_ERROR) { if (lrbp->ucd_rsp_ptr->header.response || diff --git a/include/ufs/ufshcd.h b/include/ufs/ufshcd.h index a43b14276bc3..3dbd3e41b022 100644 --- a/include/ufs/ufshcd.h +++ b/include/ufs/ufshcd.h @@ -382,6 +382,7 @@ struct ufs_hba_variant_ops { int (*get_outstanding_cqs)(struct ufs_hba *hba, unsigned long *ocqs); int (*config_esi)(struct ufs_hba *hba); + enum utp_ocs (*override_cqe_ocs)(enum utp_ocs); }; /* clock gating state */ From patchwork Mon Sep 2 04:26:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kiwoong Kim X-Patchwork-Id: 13786698 Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 794A1152196 for ; Mon, 2 Sep 2024 04:18:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.33 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725250687; cv=none; b=hZQLw0AwhnDdRUJq/M9XaVFnGfb5L9kcMBg4Hb8oErkiq4NnY7HRjUO56jIXW78DVtrv9w8SKVtEp563KXeRVgEnfmQM7ySWUuZ93lNgixQWJ+QmVWBrhx0I7iyLQzmH861miEQyEBmoga8U07Lk2tKGehrR3fZxRCuJJauf3jg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725250687; c=relaxed/simple; bh=SLB2/n/nVuA46cQ/nrPKgQvFJHJlg0ae/1y9NyFE3iw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:MIME-Version: Content-Type:References; b=U0by5gtglKwlPdZjgIkXxFcdPhJmq5A8UXKdBaIEi/2hRdxtnLJGABoTFKWBnh1d0yHGtNQRBXyJTLE7ovIORHXk2fgjdpkcVso9UXmReQAglTN+2doOQqBIyMBHaS0Rm77L7c5pdn4rYiwkI6Y7Bpq6vqjoi4Vu/Rz8u84FP78= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=uBf89/N1; arc=none smtp.client-ip=203.254.224.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="uBf89/N1" Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20240902041757epoutp039a02d8a74d6bd9036c732071cf0b51dc~xUlmkjeI73259432594epoutp03r for ; Mon, 2 Sep 2024 04:17:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20240902041757epoutp039a02d8a74d6bd9036c732071cf0b51dc~xUlmkjeI73259432594epoutp03r DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1725250677; bh=hMJFpPWKRoBweCzBGULW99EK+8CPtkTfrp94G07YkkU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uBf89/N1ltAY8pPogo+hUjU0G/MIMLVkrfpCXoM4t6B6lkfJZ4xx81PaMz27rHJG0 aIITyDjUgUrXj3U6mLjennFeS2wIR4o+fmn3LQLStAZ3pLDRtQbFMb5Xbfoepwhuk4 MoFx5Q267zSVpvvF+sqPr4cN7cxfIrMt3diDlzlA= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas2p4.samsung.com (KnoxPortal) with ESMTP id 20240902041756epcas2p4e71476f86676f29e36fee9fefdae0f49~xUll4y_a21563615636epcas2p4U; Mon, 2 Sep 2024 04:17:56 +0000 (GMT) Received: from epsmges2p3.samsung.com (unknown [182.195.36.97]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4WxwTb4J4gz4x9Pt; Mon, 2 Sep 2024 04:17:55 +0000 (GMT) Received: from epcas2p2.samsung.com ( [182.195.41.54]) by epsmges2p3.samsung.com (Symantec Messaging Gateway) with SMTP id 38.F3.10012.37C35D66; Mon, 2 Sep 2024 13:17:55 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p3.samsung.com (KnoxPortal) with ESMTPA id 20240902041755epcas2p316730258dc0c2ed2b3f9744722dcde9c~xUlkr4rhU2654126541epcas2p3_; Mon, 2 Sep 2024 04:17:55 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20240902041755epsmtrp1e7332b7fc1c06f731afdfbd31444c98a~xUlkrDQdu3022030220epsmtrp1G; Mon, 2 Sep 2024 04:17:55 +0000 (GMT) X-AuditID: b6c32a47-c43ff7000000271c-e6-66d53c73f451 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id BE.F8.08964.37C35D66; Mon, 2 Sep 2024 13:17:55 +0900 (KST) Received: from rack03.dsn.sec.samsung.com (unknown [10.229.95.126]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20240902041754epsmtip29d650fc9aaca8e738d509d634954021c~xUlkfQGxK0320303203epsmtip2Q; Mon, 2 Sep 2024 04:17:54 +0000 (GMT) From: Kiwoong Kim To: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, huobean@gmail.com, alim.akhtar@samsung.com, avri.altman@wdc.com, bvanassche@acm.org, jejb@linux.ibm.com, martin.petersen@oracle.com, beanhuo@micron.com, adrian.hunter@intel.com, h10.kim@samsung.com, hy50.seo@samsung.com, sh425.lee@samsung.com, kwangwon.min@samsung.com, junwoo80.lee@samsung.com, wkon.kim@samsung.com Cc: Kiwoong Kim Subject: [RESEND PATCH v2 2/2] scsi: ufs: ufs-exynos: implement override_cqe_ocs Date: Mon, 2 Sep 2024 13:26:46 +0900 Message-Id: <041c7204703ed2ee7563344e935921dffa34ccfb.1725251103.git.kwmad.kim@samsung.com> X-Mailer: git-send-email 2.26.0 In-Reply-To: Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrIJsWRmVeSWpSXmKPExsWy7bCmmW6xzdU0g5YXchYnn6xhs3gwbxub xcufV9ksDj7sZLGY9uEns8Xf2xdZLeacbWCyWL34AYvFohvbmCx2/W1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8ztv9bHRNze v/Xe+UOvr5wRv39m7cXL7T19sg/eKlZ08K1I/BETfD4q93DGV/2pXH7hS5ZwN3zp6ErJTDFr /3cxnKNOiaU4I9FQi7moOBEAmXHcTSADAAA= X-CMS-MailID: 20240902041755epcas2p316730258dc0c2ed2b3f9744722dcde9c X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20240902041755epcas2p316730258dc0c2ed2b3f9744722dcde9c References: Exynos host reports OCS_ABORT when a command is nullifed or cleaned up with MCQ enabled. I think the command in those situations should be issued again, rather than fail, because when some conditions that caused the nullification or cleaning up disppears after recovery, the command could be processed. Signed-off-by: Kiwoong Kim --- drivers/ufs/host/ufs-exynos.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/ufs/host/ufs-exynos.c b/drivers/ufs/host/ufs-exynos.c index 16ad3528d80b..7ff0e84adaab 100644 --- a/drivers/ufs/host/ufs-exynos.c +++ b/drivers/ufs/host/ufs-exynos.c @@ -1376,6 +1376,13 @@ static void exynos_ufs_fmp_resume(struct ufs_hba *hba) #endif /* !CONFIG_SCSI_UFS_CRYPTO */ +static enum utp_ocs exynos_ufs_override_cqe_ocs(enum utp_ocs ocs) +{ + if (ocs == OCS_ABORTED) + ocs = OCS_INVALID_COMMAND_STATUS; + return ocs; +} + static int exynos_ufs_init(struct ufs_hba *hba) { struct device *dev = hba->dev; @@ -1926,6 +1933,7 @@ static const struct ufs_hba_variant_ops ufs_hba_exynos_ops = { .suspend = exynos_ufs_suspend, .resume = exynos_ufs_resume, .fill_crypto_prdt = exynos_ufs_fmp_fill_prdt, + .override_cqe_ocs = exynos_ufs_override_cqe_ocs, }; static struct ufs_hba_variant_ops ufs_hba_exynosauto_vh_ops = {