|
Lee Duncan |
535945 |
From: Luo Jiaxing <luojiaxing@huawei.com>
|
|
Lee Duncan |
535945 |
Date: Tue, 24 Aug 2021 18:01:00 +0800
|
|
Lee Duncan |
535945 |
Subject: scsi: hisi_sas: Increase debugfs_dump_index after dump is completed
|
|
Lee Duncan |
535945 |
Git-commit: 9aec5ffa6e39926cff1a6b576c815a9cee90e259
|
|
Lee Duncan |
535945 |
Patch-mainline: v5.16-rc1
|
|
Lee Duncan |
535945 |
References: bsc#1198806
|
|
Lee Duncan |
535945 |
|
|
Lee Duncan |
535945 |
The hisi_hba debugfs_dump_index member should increased after a dump
|
|
Lee Duncan |
535945 |
insertion completed, and not before it has started, so fix the code to do
|
|
Lee Duncan |
535945 |
so.
|
|
Lee Duncan |
535945 |
|
|
Lee Duncan |
535945 |
Link: https://lore.kernel.org/r/1629799260-120116-6-git-send-email-john.garry@huawei.com
|
|
Lee Duncan |
535945 |
Signed-off-by: Luo Jiaxing <luojiaxing@huawei.com>
|
|
Lee Duncan |
535945 |
Signed-off-by: John Garry <john.garry@huawei.com>
|
|
Lee Duncan |
535945 |
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
|
|
Lee Duncan |
535945 |
Acked-by: Lee Duncan <lduncan@suse.com>
|
|
Lee Duncan |
535945 |
---
|
|
Lee Duncan |
535945 |
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 2 +-
|
|
Lee Duncan |
535945 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
Lee Duncan |
535945 |
|
|
Lee Duncan |
535945 |
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
|
|
Lee Duncan |
535945 |
index cbc6c2d86745..f4517f3eb922 100644
|
|
Lee Duncan |
535945 |
--- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
|
|
Lee Duncan |
535945 |
+++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
|
|
Lee Duncan |
535945 |
@@ -3688,7 +3688,6 @@ static void debugfs_snapshot_regs_v3_hw(struct hisi_hba *hisi_hba)
|
|
Lee Duncan |
535945 |
|
|
Lee Duncan |
535945 |
do_div(timestamp, NSEC_PER_MSEC);
|
|
Lee Duncan |
535945 |
hisi_hba->debugfs_timestamp[debugfs_dump_index] = timestamp;
|
|
Lee Duncan |
535945 |
- hisi_hba->debugfs_dump_index++;
|
|
Lee Duncan |
535945 |
|
|
Lee Duncan |
535945 |
debugfs_snapshot_prepare_v3_hw(hisi_hba);
|
|
Lee Duncan |
535945 |
|
|
Lee Duncan |
535945 |
@@ -3704,6 +3703,7 @@ static void debugfs_snapshot_regs_v3_hw(struct hisi_hba *hisi_hba)
|
|
Lee Duncan |
535945 |
debugfs_create_files_v3_hw(hisi_hba);
|
|
Lee Duncan |
535945 |
|
|
Lee Duncan |
535945 |
debugfs_snapshot_restore_v3_hw(hisi_hba);
|
|
Lee Duncan |
535945 |
+ hisi_hba->debugfs_dump_index++;
|
|
Lee Duncan |
535945 |
}
|
|
Lee Duncan |
535945 |
|
|
Lee Duncan |
535945 |
static ssize_t debugfs_trigger_dump_v3_hw_write(struct file *file,
|
|
Lee Duncan |
535945 |
|