From: Kiwoong Kim <kwmad.kim@samsung.com>
To: linux-scsi@vger.kernel.org, alim.akhtar@samsung.com,
avri.altman@wdc.com, jejb@linux.ibm.com,
martin.petersen@oracle.com, beanhuo@micron.com,
asutoshd@codeaurora.org, cang@codeaurora.org, bvanassche@acm.org,
grant.jung@samsung.com, sc.suh@samsung.com, hy50.seo@samsung.com,
sh425.lee@samsung.com
Cc: Kiwoong Kim <kwmad.kim@samsung.com>
Subject: [RESEND RFC PATCH v4 3/3] ufs: exynos: implement dbg_register_dump
Date: Wed, 8 Jul 2020 11:24:01 +0900 [thread overview]
Message-ID: <ace3fe9ebea3b82e23c6c6ebc5bd92fbdde23b51.1594174981.git.kwmad.kim@samsung.com> (raw)
In-Reply-To: <cover.1594174981.git.kwmad.kim@samsung.com>
In-Reply-To: <cover.1594174981.git.kwmad.kim@samsung.com>
At present, I just add command history print and
you can add various vendor regions.
Signed-off-by: Kiwoong Kim <kwmad.kim@samsung.com>
---
drivers/scsi/ufs/ufs-exynos.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/drivers/scsi/ufs/ufs-exynos.c b/drivers/scsi/ufs/ufs-exynos.c
index 8c60f7d..815c361 100644
--- a/drivers/scsi/ufs/ufs-exynos.c
+++ b/drivers/scsi/ufs/ufs-exynos.c
@@ -1246,6 +1246,29 @@ static int exynos_ufs_resume(struct ufs_hba *hba, enum ufs_pm_op pm_op)
return 0;
}
+static void exynos_ufs_dbg_register_dump(struct ufs_hba *hba)
+{
+ struct exynos_ufs *ufs = ufshcd_get_variant(hba);
+ unsigned long flags;
+
+ spin_lock_irqsave(&ufs->dbg_lock, flags);
+ if (ufs->under_dump == 0)
+ ufs->under_dump = 1;
+ else {
+ spin_unlock_irqrestore(&ufs->dbg_lock, flags);
+ goto out;
+ }
+ spin_unlock_irqrestore(&ufs->dbg_lock, flags);
+
+ exynos_ufs_dump_info(&ufs->handle, hba->dev);
+
+ spin_lock_irqsave(&ufs->dbg_lock, flags);
+ ufs->under_dump = 0;
+ spin_unlock_irqrestore(&ufs->dbg_lock, flags);
+out:
+ return;
+}
+
static struct ufs_hba_variant_ops ufs_hba_exynos_ops = {
.name = "exynos_ufs",
.init = exynos_ufs_init,
@@ -1258,6 +1281,7 @@ static struct ufs_hba_variant_ops ufs_hba_exynos_ops = {
.hibern8_notify = exynos_ufs_hibern8_notify,
.suspend = exynos_ufs_suspend,
.resume = exynos_ufs_resume,
+ .dbg_register_dump = exynos_ufs_dbg_register_dump,
};
static int exynos_ufs_probe(struct platform_device *pdev)
--
2.7.4
next prev parent reply other threads:[~2020-07-08 2:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20200708023153epcas2p1fc18ee2920c5defa2896af34dd62865f@epcas2p1.samsung.com>
2020-07-08 2:23 ` [RESEND RFC PATCH v4 0/3] ufs: exynos: introduce the way to get cmd info Kiwoong Kim
[not found] ` <CGME20200708023155epcas2p3ac30e4b0c24855e0a3466126bba9c612@epcas2p3.samsung.com>
2020-07-08 2:23 ` [RESEND RFC PATCH v4 1/3] ufs: introduce a callback to get info of command completion Kiwoong Kim
2020-07-09 12:06 ` Avri Altman
2020-07-11 5:43 ` Kiwoong Kim
[not found] ` <CGME20200708023156epcas2p416ac7979ed0a0a7a71de1636defb0ec7@epcas2p4.samsung.com>
2020-07-08 2:24 ` [RESEND RFC PATCH v4 2/3] ufs: exynos: introduce command history Kiwoong Kim
2020-07-09 13:27 ` Avri Altman
2020-07-11 5:53 ` Kiwoong Kim
2020-07-11 5:58 ` Kiwoong Kim
[not found] ` <CGME20200708023156epcas2p188781afcff94b548918326986d58a2d7@epcas2p1.samsung.com>
2020-07-08 2:24 ` Kiwoong Kim [this message]
2020-07-09 12:30 ` [RESEND RFC PATCH v4 3/3] ufs: exynos: implement dbg_register_dump Avri Altman
2020-07-11 5:43 ` Kiwoong Kim
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=ace3fe9ebea3b82e23c6c6ebc5bd92fbdde23b51.1594174981.git.kwmad.kim@samsung.com \
--to=kwmad.kim@samsung.com \
--cc=alim.akhtar@samsung.com \
--cc=asutoshd@codeaurora.org \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=cang@codeaurora.org \
--cc=grant.jung@samsung.com \
--cc=hy50.seo@samsung.com \
--cc=jejb@linux.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=sc.suh@samsung.com \
--cc=sh425.lee@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;
as well as URLs for NNTP newsgroup(s).