iprutils: on PowerNV, some of IOAs showed the wrong physical location

With iprutils 2.4.2 in PowerNV system, sometime some of IOAs still showed
the wrong phyiscal location. This patch fixes the issue.

signed-off-by: Wen Xiong<wenxiong@linux.vnet.ibm.com>
This commit is contained in:
Wen Xiong 2014-07-23 15:55:16 -05:00
commit ed25e2a520

View file

@ -1940,6 +1940,7 @@ static void ipr_get_pci_slots()
ioa->physical_location[0] = '\0';
for_each_ioa(ioa) {
memset(devspec, 0, sizeof(devspec));
sprintf(attr, "/sys/bus/pci/devices/%s/devspec",
ioa->pci_address);
rc = read_attr_file(attr, devspec, PATH_MAX);
@ -1947,6 +1948,7 @@ static void ipr_get_pci_slots()
if (rc)
continue;
memset(loc_code, 0, sizeof(loc_code));
sprintf(locpath, "/proc/device-tree%s/ibm,loc-code",
devspec);
rc = read_attr_file(locpath, loc_code,