- Resolves: RHEL-115186, Enhance lsvpd to update VPD for Nvidia OTS Adapters

- Resolves: RHEL-102468, Update to 1.7.17
This commit is contained in:
Than Ngo 2025-12-08 18:14:09 +01:00
parent 7276748967
commit b383c4b79e
5 changed files with 31 additions and 106 deletions

1
.gitignore vendored
View File

@ -17,3 +17,4 @@ lsvpd-1.6.8.tar.gz
/lsvpd-1.7.13.tar.gz
/lsvpd-1.7.14.tar.gz
/lsvpd-1.7.15.tar.gz
/lsvpd-1.7.17.tar.gz

View File

@ -1,102 +0,0 @@
commit 67945a23ac7c680359c81df4eb20769d996615e5
Author: Sathvika Vasireddy <sv@linux.ibm.com>
Date: Mon May 12 14:23:28 2025 +0530
lsvpd: Enhance tools to print device information in tuple format
Update device information display to use tuple format showing vendor ID,
device ID, subsystem vendor ID, and subsystem device ID. Change output
from ethernet (10141015) to ethernet (15b3,1015), (1014,061f)
for improved readability and more complete device identification.
Currently, for a PCI device,
./lscfg -vl 0033:01:00.0
0033:01:00.0 uverbs12 mlx5_12 enP51p1s0f0 ptp24 ethernet U78D2.001.RCH0060-P1-C3-T1
ethernet (10141015)
With the fix,
./lscfg -vl 0033:01:00.0
0033:01:00.0 uverbs12 mlx5_12 enP51p1s0f0 ptp24 ethernet U78D2.001.RCH0060-P1-C3-T1
ethernet (15b3,1015), (1014,061f)
Tested-by: Krishan Saraswat <krishang@linux.vnet.ibm.com>
Signed-off-by: Sathvika Vasireddy <sv@linux.ibm.com>
diff --git a/src/internal/sys_interface/sysfstreecollector.cpp b/src/internal/sys_interface/sysfstreecollector.cpp
index 03eb7da..07bcf68 100644
--- a/src/internal/sys_interface/sysfstreecollector.cpp
+++ b/src/internal/sys_interface/sysfstreecollector.cpp
@@ -1490,7 +1490,6 @@ ERROR:
fillMe->mManufacturer.setValue( val,
50, __FILE__, __LINE__ );
- os << hex << setw( 4 ) << setfill( '0' ) << manID;
}
}
else
@@ -1500,7 +1499,6 @@ ERROR:
fillMe->mManufacturer.setValue( val, 50,
__FILE__, __LINE__ );
- os << hex << setw( 4 ) << setfill( '0' ) << subMan;
}
// Fill Device Model
@@ -1509,7 +1507,6 @@ ERROR:
{
if( manID != UNKNOWN_ID )
{
- os << hex << setw( 4 ) << setfill( '0' )<< devID;
val = mPciTable->getName( manID, devID );
if( val != "" )
fillMe->mModel.setValue( val, 80,
@@ -1518,7 +1515,6 @@ ERROR:
}
else
{
- os << hex << setw( 4 ) << setfill( '0' )<< subID;
val = mPciTable->getName( manID, devID, subID );
if( val != "" )
fillMe->mModel.setValue( val, 80, __FILE__, __LINE__ );
@@ -1527,7 +1523,12 @@ ERROR:
fillMe->mDescription.setValue( val, 80, __FILE__, __LINE__ );
}
- if( os.str( ) != "ffffffff" )
+ os << "(" << hex << setw(4) << setfill('0') << manID << ","
+ << hex << setw(4) << setfill('0') << devID << "), ("
+ << hex << setw(4) << setfill('0') << subMan << ","
+ << hex << setw(4) << setfill('0') << subID << ")";
+
+ if( os.str( ) != "(ffff,ffff), (ffff,ffff)" )
fillMe->mCDField.setValue( os.str( ), 100, __FILE__, __LINE__ );
}
diff --git a/src/output/lscfg.cpp b/src/output/lscfg.cpp
index 8c9eec7..bad23a8 100644
--- a/src/output/lscfg.cpp
+++ b/src/output/lscfg.cpp
@@ -337,7 +337,7 @@ void printVPD( Component* root )
if( val != "" )
{
- os << " (" << val << ")";
+ os << " " << val;
}
if( val.length( ) + root->getDescription( ).length( ) <= 35 )
diff --git a/src/output/lsvpd.cpp b/src/output/lsvpd.cpp
index e77ffe0..70d4a9e 100644
--- a/src/output/lsvpd.cpp
+++ b/src/output/lsvpd.cpp
@@ -169,7 +169,7 @@ void printVPD( Component* root )
string val = string( root->getCD( ) );
if ( val != "" )
- cout << " (" << val << ")";
+ cout << " " << val;
cout << endl;
}

View File

@ -0,0 +1,22 @@
commit 1d2dc3d83734ea7c669905993adcae386b1db91d
Author: Sathvika Vasireddy <sv@linux.ibm.com>
Date: Thu Dec 4 21:32:42 2025 +0530
lsvpd: Add FRU number for Spyre cards
Update setCustomVPDFields to print FRU number for Spyre devices.
Signed-off-by: Sathvika Vasireddy <sv@linux.ibm.com>
diff --git a/src/internal/sys_interface/sysfstreecollector.cpp b/src/internal/sys_interface/sysfstreecollector.cpp
index 7af2fb7..f7e074a 100644
--- a/src/internal/sys_interface/sysfstreecollector.cpp
+++ b/src/internal/sys_interface/sysfstreecollector.cpp
@@ -1731,6 +1731,7 @@ ERROR:
case 0x101406A7:
case 0x101406A8:
fillMe->mFeatureCode.setValue("ECSE", 95, __FILE__, __LINE__);
+ fillMe->mFRU.setValue("03PN188", 100, __FILE__, __LINE__);
fillMe->addDeviceSpecific( "CC", "Customer Card ID Number", "2E1F", 95);
break;
case 0x15b31021: // Nvidia ConnectX-7 PF

View File

@ -1,6 +1,6 @@
Name: lsvpd
Version: 1.7.15
Release: 7%{?dist}
Version: 1.7.17
Release: 1%{?dist}
Summary: VPD/hardware inventory utilities for Linux
License: GPL-2.0-or-later
@ -9,7 +9,7 @@ Source: https://github.com/power-ras/%{name}/archive/v%{version}/%{name}-%{versi
# upstream patches
# lsvpd: Enhance tools to print device information in tuple format
Patch10: lsvpd-1.2.15-subvendor_device-not-matching.patch
Patch10: lsvpd-add-FRU-number-for-Spyre-cards.patch
BuildRequires: gcc-c++
BuildRequires: libvpd-devel >= 2.2.9
@ -72,6 +72,10 @@ exit 0
%dir %{_sysconfdir}/lsvpd
%changelog
* Mon Dec 08 2025 Than Ngo <than@redhat.com> - 1.7.17-1
- Resolves: RHEL-115186, Enhance lsvpd to update VPD for Nvidia OTS Adapters
- Resolves: RHEL-102468, Update to 1.7.17
* Tue Aug 05 2025 Than Ngo <than@redhat.com> - 1.7.15-7
- Resolves: RHEL-104383, subvendor_device output is not matching

View File

@ -1 +1 @@
SHA512 (lsvpd-1.7.15.tar.gz) = 5e70bf52fec7b7c6ede3dca2a0def9fa10ba36c4421a8b875928c7eb4036c24ad828d8381f233896aed36b8fdc014a38b05b000d883dc23d209f7bbd2b781305
SHA512 (lsvpd-1.7.17.tar.gz) = 4f2ddc1e25a1f3b1b38e102d5fa8e12dffaea37fbfb405c77ac80f6a3ec38ab827a3b2f8f33a926d29347f7d4a144d4a65fb6f8c8aa7280854e99acfd133b9c2