You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to request write FRU via dynamic-sensors, It always fails. I saw that its response code is "sensor is invalid".
I checked in the source code, I see that in the getFru function, it sets the device's ID to 1 if the device's ID is 0 as below
// Set devId to 1 if devId is 0.
// 0 is reserved for baseboard and set to 1 in recalculateHashes().
if (!devId)
devId = 1;
But I see in the recalculateHashes function, the device ID of the baseboard is still 0 as below
uint8_t fruHash = 0;
if (chassisType.compare(chassisTypeRackMount) != 0)
{
fruHash = hasher(fru.first.str);
// can't be 0xFF based on spec, and 0 is reserved for baseboard
if (fruHash == 0 || fruHash == 0xFF)
{
fruHash = 1;
}
}
std::pair<uint8_t, uint8_t> newDev(fruBus, fruAddr);
bool emplacePassed = false;
while (!emplacePassed)
{
auto resp = deviceHashes.emplace(fruHash, newDev);
emplacePassed = resp.second;
if (!emplacePassed)
{
fruHash++;
// can't be 0xFF based on spec, and 0 is reserved for
// baseboard
if (fruHash == 0XFF)
{
fruHash = 0x1;
}
}
}
I have to remove setting device's ID in the getFru function to pass this issue. Is this right?
Thang Tran
The text was updated successfully, but these errors were encountered:
Hi all,
When I try to request write FRU via dynamic-sensors, It always fails. I saw that its response code is "sensor is invalid".
I checked in the source code, I see that in the getFru function, it sets the device's ID to 1 if the device's ID is 0 as below
But I see in the recalculateHashes function, the device ID of the baseboard is still 0 as below
I have to remove setting device's ID in the getFru function to pass this issue. Is this right?
Thang Tran
The text was updated successfully, but these errors were encountered: