Commit c1f87047 authored by Yihang Li's avatar Yihang Li Committed by JiangShui
Browse files

scsi: hisi_sas: Correct the number of global debugfs registers

driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8IL6H


CVE: NA

----------------------------------------------------------------------

In function debugfs_debugfs_snapshot_global_reg_v3_hw() it uses
debugfs_axi_reg.count (which is the number of axi debugfs registers) to
acquire the number of global debugfs registers.

Use debugfs_global_reg.count to acquire the number of global debugfs
registers instead.

Fixes: 623a4b6d ("scsi: hisi_sas: Move debugfs code to v3 hw driver")
Signed-off-by: default avatarYihang Li <liyihang9@huawei.com>
Signed-off-by: default avatarXiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: default avatarxiabing <xiabing12@h-partners.com>
parent 0d2836cb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3425,7 +3425,7 @@ static void debugfs_snapshot_global_reg_v3_hw(struct hisi_hba *hisi_hba)
	u32 *databuf = hisi_hba->debugfs_regs[dump_index][DEBUGFS_GLOBAL].data;
	int i;

	for (i = 0; i < debugfs_axi_reg.count; i++, databuf++)
	for (i = 0; i < debugfs_global_reg.count; i++, databuf++)
		*databuf = hisi_sas_read32(hisi_hba, 4 * i);
}