commit | 213ee21f5fc6132938a628ecf0d6c2553bcefa62 | [log] [tgz] |
---|---|---|
author | krishnar4 <krishnar@ami.com> | Fri Nov 11 15:39:30 2022 +0530 |
committer | krishna Raj <krishnar@ami.com> | Thu Dec 08 10:41:29 2022 +0000 |
tree | 77db56115d0c8a1558b8eb60c99e754333341840 | |
parent | dcf24b0d615848961daff167c7e45dfa4c6b4c51 [diff] [blame] |
Fru-device : Extended support for 16bit logic bus The uint8_t bus of getFruInfo() restricted the number of logical I2C buses that we could implement in the sysfs interface, and it was unfortunately static_cast'ed to uint_8.which limit on busses to 255. while Linux kernel can extend the logical I2C bus number to more than 512 without any issues. This commit add the support of 16 bit logical bus. reference Link :- https://lore.kernel.org/all/CACWQX82=MuAavxCqOerxi-Sdywh0xatb-f+1YzGyVSg74oNGqA@mail.gmail.com/T/ Tested : fru-device successfully recognizes all 8 and 16 bit logic bus. dependent commit:- https://gerrit.openbmc.org/c/openbmc/phosphor-host-ipmid/+/58635 Signed-off-by: krishnar4 <krishnar@ami.com> Change-Id: I4cea81999dc194a1b6915681eeefc846580de15f
diff --git a/src/fru_utils.cpp b/src/fru_utils.cpp index e030ac8..4199439 100644 --- a/src/fru_utils.cpp +++ b/src/fru_utils.cpp
@@ -768,7 +768,7 @@ return static_cast<unsigned int>(area) + 1; } -std::vector<uint8_t>& getFRUInfo(const uint8_t& bus, const uint8_t& address) +std::vector<uint8_t>& getFRUInfo(const uint16_t& bus, const uint8_t& address) { auto deviceMap = busMap.find(bus); if (deviceMap == busMap.end())