From: John Garry <john.garry@huawei.com>
To: <jejb@linux.ibm.com>, <martin.petersen@oracle.com>
Cc: <linux-scsi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linuxarm@huawei.com>, Luo Jiaxing <luojiaxing@huawei.com>,
John Garry <john.garry@huawei.com>
Subject: [PATCH 5/5] scsi: hisi_sas: Increase debugfs_dump_index after dump is completed
Date: Tue, 24 Aug 2021 18:01:00 +0800 [thread overview]
Message-ID: <1629799260-120116-6-git-send-email-john.garry@huawei.com> (raw)
In-Reply-To: <1629799260-120116-1-git-send-email-john.garry@huawei.com>
From: Luo Jiaxing <luojiaxing@huawei.com>
The hisi_hba debugfs_dump_index member should increased after a dump insertion
completed, and not before it has started, so fix the code to do so.
Signed-off-by: Luo Jiaxing <luojiaxing@huawei.com>
Signed-off-by: John Garry <john.garry@huawei.com>
---
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
index cbc6c2d86745..f4517f3eb922 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
@@ -3688,7 +3688,6 @@ static void debugfs_snapshot_regs_v3_hw(struct hisi_hba *hisi_hba)
do_div(timestamp, NSEC_PER_MSEC);
hisi_hba->debugfs_timestamp[debugfs_dump_index] = timestamp;
- hisi_hba->debugfs_dump_index++;
debugfs_snapshot_prepare_v3_hw(hisi_hba);
@@ -3704,6 +3703,7 @@ static void debugfs_snapshot_regs_v3_hw(struct hisi_hba *hisi_hba)
debugfs_create_files_v3_hw(hisi_hba);
debugfs_snapshot_restore_v3_hw(hisi_hba);
+ hisi_hba->debugfs_dump_index++;
}
static ssize_t debugfs_trigger_dump_v3_hw_write(struct file *file,
--
2.26.2
next prev parent reply other threads:[~2021-08-24 10:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-24 10:00 [PATCH 0/5] hisi_sas: Some misc patches for next John Garry
2021-08-24 10:00 ` [PATCH 1/5] scsi: hisi_sas: Use managed PCI functions John Garry
2021-08-24 10:00 ` [PATCH 2/5] scsi: hisi_sas: Remove print in v3 hw probe about #hw queues John Garry
2021-08-24 10:00 ` [PATCH 3/5] scsi: hisi_sas: Rename HISI_SAS_{RESET -> RESETTING}_BIT John Garry
2021-08-24 10:00 ` [PATCH 4/5] scsi: hisi_sas: Replace some del_timer() calls with del_timer_sync() John Garry
2021-08-24 10:01 ` John Garry [this message]
2021-09-14 3:56 ` [PATCH 0/5] hisi_sas: Some misc patches for next Martin K. Petersen
2021-09-22 4:45 ` Martin K. Petersen
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=1629799260-120116-6-git-send-email-john.garry@huawei.com \
--to=john.garry@huawei.com \
--cc=jejb@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=luojiaxing@huawei.com \
--cc=martin.petersen@oracle.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).