|
Sinny Kumari |
5c7d267 |
From f5a8a079dff00e3d71631a9d8899bfa5c11028e1 Mon Sep 17 00:00:00 2001
|
|
Sinny Kumari |
5c7d267 |
From: Ankit Kumar <ankit@linux.vnet.ibm.com>
|
|
Sinny Kumari |
5c7d267 |
Date: Wed, 15 Nov 2017 15:40:02 +0530
|
|
Sinny Kumari |
5c7d267 |
Subject: [PATCH 2/3] Add host number in device location code to distinguish
|
|
Sinny Kumari |
5c7d267 |
different devices
|
|
Sinny Kumari |
5c7d267 |
|
|
Sinny Kumari |
5c7d267 |
This patch adds host number in location code as well to differentiate
|
|
Sinny Kumari |
5c7d267 |
two different devices if both has same bus, target and lun number.
|
|
Sinny Kumari |
5c7d267 |
|
|
Sinny Kumari |
5c7d267 |
H1-B0-T0-L0 [on]
|
|
Sinny Kumari |
5c7d267 |
H0-B0-T0-L0 [off]
|
|
Sinny Kumari |
5c7d267 |
|
|
Sinny Kumari |
5c7d267 |
Signed-off-by: Ankit Kumar <ankit@linux.vnet.ibm.com>
|
|
Sinny Kumari |
5c7d267 |
[Added host value check and removing hyphen so that location code start
|
|
Sinny Kumari |
5c7d267 |
with H<x> - Vasant]
|
|
Sinny Kumari |
5c7d267 |
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
|
|
Sinny Kumari |
5c7d267 |
---
|
|
Sinny Kumari |
5c7d267 |
src/internal/sys_interface/devicetreecollector.cpp | 10 ++++++----
|
|
Sinny Kumari |
5c7d267 |
1 file changed, 6 insertions(+), 4 deletions(-)
|
|
Sinny Kumari |
5c7d267 |
|
|
Sinny Kumari |
5c7d267 |
diff --git a/src/internal/sys_interface/devicetreecollector.cpp b/src/internal/sys_interface/devicetreecollector.cpp
|
|
Sinny Kumari |
5c7d267 |
index dc7ff54..6afbe85 100644
|
|
Sinny Kumari |
5c7d267 |
--- a/src/internal/sys_interface/devicetreecollector.cpp
|
|
Sinny Kumari |
5c7d267 |
+++ b/src/internal/sys_interface/devicetreecollector.cpp
|
|
Sinny Kumari |
5c7d267 |
@@ -765,7 +765,7 @@ ERROR:
|
|
Sinny Kumari |
5c7d267 |
{
|
|
Sinny Kumari |
5c7d267 |
Component *parent;
|
|
Sinny Kumari |
5c7d267 |
ostringstream val;
|
|
Sinny Kumari |
5c7d267 |
- const DataItem *target, *lun, *bus;
|
|
Sinny Kumari |
5c7d267 |
+ const DataItem *target, *lun, *bus, *host;
|
|
Sinny Kumari |
5c7d267 |
|
|
Sinny Kumari |
5c7d267 |
/* Build up a distinct YL based on parents YL - for device such as
|
|
Sinny Kumari |
5c7d267 |
* scsi, ide, usb, etc that do not generate ibm,loc-code
|
|
Sinny Kumari |
5c7d267 |
@@ -778,7 +778,9 @@ ERROR:
|
|
Sinny Kumari |
5c7d267 |
target = fillMe->getDeviceSpecific("XT");
|
|
Sinny Kumari |
5c7d267 |
lun = fillMe->getDeviceSpecific("XL");
|
|
Sinny Kumari |
5c7d267 |
bus = fillMe->getDeviceSpecific("XB");
|
|
Sinny Kumari |
5c7d267 |
- if (target != NULL && lun != NULL && bus != NULL) {
|
|
Sinny Kumari |
5c7d267 |
+ host = fillMe->getDeviceSpecific("XH");
|
|
Sinny Kumari |
5c7d267 |
+ if (host != NULL && target != NULL &&
|
|
Sinny Kumari |
5c7d267 |
+ lun != NULL && bus != NULL) {
|
|
Sinny Kumari |
5c7d267 |
if (fillMe->mPhysicalLocation.dataValue != "")
|
|
Sinny Kumari |
5c7d267 |
val << fillMe->mPhysicalLocation.dataValue;
|
|
Sinny Kumari |
5c7d267 |
else if
|
|
Sinny Kumari |
5c7d267 |
@@ -787,8 +789,8 @@ ERROR:
|
|
Sinny Kumari |
5c7d267 |
else
|
|
Sinny Kumari |
5c7d267 |
val << getAttrValue( parent->deviceTreeNode.dataValue,
|
|
Sinny Kumari |
5c7d267 |
"ibm,loc-code" );
|
|
Sinny Kumari |
5c7d267 |
- val << "-B" << bus->dataValue << "-T" << target->dataValue
|
|
Sinny Kumari |
5c7d267 |
- << "-L" << lun->dataValue;
|
|
Sinny Kumari |
5c7d267 |
+ val << "H" << host->dataValue << "-B" << bus->dataValue
|
|
Sinny Kumari |
5c7d267 |
+ << "-T" << target->dataValue << "-L" << lun->dataValue;
|
|
Sinny Kumari |
5c7d267 |
fillMe->mPhysicalLocation.setValue( val.str( ), 60 ,
|
|
Sinny Kumari |
5c7d267 |
__FILE__, __LINE__ );
|
|
Sinny Kumari |
5c7d267 |
}
|
|
Sinny Kumari |
5c7d267 |
--
|
|
Sinny Kumari |
5c7d267 |
2.14.3
|
|
Sinny Kumari |
5c7d267 |
|