From: Kiwoong Kim <kwmad.kim@samsung.com>
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 <kwmad.kim@samsung.com>
Subject: [RESEND PATCH v2 2/2] scsi: ufs: ufs-exynos: implement override_cqe_ocs
Date: Mon, 2 Sep 2024 13:26:46 +0900 [thread overview]
Message-ID: <041c7204703ed2ee7563344e935921dffa34ccfb.1725251103.git.kwmad.kim@samsung.com> (raw)
In-Reply-To: <cover.1725251103.git.kwmad.kim@samsung.com>
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 <kwmad.kim@samsung.com>
---
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 = {
--
2.26.0
next prev parent reply other threads:[~2024-09-02 4:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20240902041752epcas2p12a06fa12d412aa6ce9a03ccb588abcf5@epcas2p1.samsung.com>
2024-09-02 4:26 ` [RESEND PATCH v2 0/2] scsi: ufs: introduce a callback to override OCS value Kiwoong Kim
[not found] ` <CGME20240902041753epcas2p26511cc4d2badf0e866cec2f855380c67@epcas2p2.samsung.com>
2024-09-02 4:26 ` [RESEND PATCH v2 1/2] scsi: ufs: core: introduce override_cqe_ocs Kiwoong Kim
[not found] ` <CGME20240902041755epcas2p316730258dc0c2ed2b3f9744722dcde9c@epcas2p3.samsung.com>
2024-09-02 4:26 ` Kiwoong Kim [this message]
2024-09-03 19:42 ` [RESEND PATCH v2 2/2] scsi: ufs: ufs-exynos: implement override_cqe_ocs Bart Van Assche
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=041c7204703ed2ee7563344e935921dffa34ccfb.1725251103.git.kwmad.kim@samsung.com \
--to=kwmad.kim@samsung.com \
--cc=adrian.hunter@intel.com \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=h10.kim@samsung.com \
--cc=huobean@gmail.com \
--cc=hy50.seo@samsung.com \
--cc=jejb@linux.ibm.com \
--cc=junwoo80.lee@samsung.com \
--cc=kwangwon.min@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=sh425.lee@samsung.com \
--cc=wkon.kim@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®