!25 修复sas_dev命令显示sas设备信息为0问题
From: @veega2022 Reviewed-by: @chenjunxin1992 Signed-off-by: @chenjunxin1992
This commit is contained in:
commit
fbeb17c0f2
43
0004-hikptool-fix-print-sas_dev-info-error-problem.patch
Normal file
43
0004-hikptool-fix-print-sas_dev-info-error-problem.patch
Normal file
@ -0,0 +1,43 @@
|
||||
From 1a4f58e149d14146d399878418bdba9dc824e0a6 Mon Sep 17 00:00:00 2001
|
||||
From: veega2022 <zhuweijia@huawei.com>
|
||||
Date: Thu, 6 Apr 2023 11:33:14 +0000
|
||||
Subject: [PATCH] hikptool: fix print sas_dev info error problem
|
||||
|
||||
the volatile modifier is added because the O2 compilation optimization is enbaled.
|
||||
As a result, the pointer data is not updated.
|
||||
|
||||
Signed-off-by: veega2022 <zhuweijia@huawei.com>
|
||||
---
|
||||
sas/sas_func/sas_read_dev.c | 2 +-
|
||||
tool_lib/tool_lib.h | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/sas/sas_func/sas_read_dev.c b/sas/sas_func/sas_read_dev.c
|
||||
index 382a1ef..d01f95f 100644
|
||||
--- a/sas/sas_func/sas_read_dev.c
|
||||
+++ b/sas/sas_func/sas_read_dev.c
|
||||
@@ -77,7 +77,7 @@ static void print_dev_link(const uint32_t *reg_save, uint32_t reg_num)
|
||||
|
||||
static void print_dev_info(const void *reg_save, uint32_t reg_num)
|
||||
{
|
||||
- struct hikp_sas_itct *itct = (struct hikp_sas_itct *)reg_save;
|
||||
+ volatile struct hikp_sas_itct *itct = (volatile struct hikp_sas_itct *)reg_save;
|
||||
|
||||
printf("The device information as below:\n");
|
||||
printf("dev_type: %d\n", itct->dw0.dev_type);
|
||||
diff --git a/tool_lib/tool_lib.h b/tool_lib/tool_lib.h
|
||||
index 29e7e8c..b211175 100644
|
||||
--- a/tool_lib/tool_lib.h
|
||||
+++ b/tool_lib/tool_lib.h
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#define TOOL_NAME "hikptool"
|
||||
|
||||
-#define TOOL_VER "1.0.12"
|
||||
+#define TOOL_VER "1.0.13"
|
||||
|
||||
#define HI_GET_BITFIELD(value, start, mask) (((value) >> (start)) & (mask))
|
||||
#define HI_SET_FIELD(origin, shift, val) ((origin) |= (val) << (shift))
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
Name: hikptool
|
||||
Summary: A userspace tool for Linux providing problem location on Kunpeng chips
|
||||
Version: 1.0.0
|
||||
Release: 8
|
||||
Release: 9
|
||||
License: MulanPSL2
|
||||
Source: %{name}-%{version}.tar.gz
|
||||
ExclusiveOS: linux
|
||||
@ -17,6 +17,7 @@ ExclusiveArch: aarch64
|
||||
Patch0001: 0001-socip-Return-EINVAL-when-the-parameter-check-fails.patch
|
||||
Patch0002: 0002-fix-compiler-security-option-problem.patch
|
||||
Patch0003: 0003-fix-the-security-compilation-PIE-issue.patch
|
||||
Patch0004: 0004-hikptool-fix-print-sas_dev-info-error-problem.patch
|
||||
|
||||
%description
|
||||
This package contains the hikptool
|
||||
@ -69,6 +70,9 @@ fi
|
||||
/sbin/ldconfig
|
||||
|
||||
%changelog
|
||||
* Thu Apr 06 2023 veega2022 <zhuweijia@huawei.com> 1.0.0-9
|
||||
- fix sas device info print error bug
|
||||
|
||||
* Wed Mar 15 2023 veega2022 <zhuweijia@huawei.com> 1.0.0-8
|
||||
- fix security compilation PIE issue
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user