Skip to content

Commit

Permalink
processMrw: set OBUS_SLOT_INDEX to not connected based on mrw conn
Browse files Browse the repository at this point in the history
Change-Id: Ib43f87f170082e1e3b971b515d9fab13a584794a
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41545
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Reviewed-by: Matthew A. Ploetz <maploetz@us.ibm.com>
Reviewed-by: Elizabeth K. Liner <eliner@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
Prachi Gupta authored and dcrowell77 committed Jun 19, 2017
1 parent 2895249 commit 8702e5d
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/usr/targeting/common/processMrw.pl
Original file line number Diff line number Diff line change
Expand Up @@ -943,21 +943,20 @@ sub processObus

if ($obus eq "")
{
#No connections mean, we need to remove all the children and the obus
#No connections mean, we need to set the OBUS_SLOT_INDEX to -1
#to mark that they are not connected
$targetObj->log($target,"no bus connection found");
$targetObj->log($target,"removing target and it's children");
foreach my $obrick (@{ $targetObj->getTargetChildren($target) })
{
$targetObj->removeTarget($obrick);
$targetObj->setAttribute($obrick, "OBUS_SLOT_INDEX", -1);
}
$targetObj->removeTarget($target);
}
else
{
#Loop through all the bricks and figure out if it connected to an
#obusslot. If it is connected, then store the slot information (position)
#in the obus_brick target as OBUS_SLOT_INDEX. If it is not connected,
#remove obus brick target.
#set the value to -1 to mark that they are not connected
my $match = 0;
foreach my $obrick (@{ $targetObj->getTargetChildren($target) })
{
Expand All @@ -976,11 +975,11 @@ sub processObus
}
}

#This brick is not connected to anything, remove
#This brick is not connected to anything, set the value of OBUS_SLOT_INDEX to -1
#to mark that they are not connected
if ($match eq 0)
{
$targetObj->log($target,"no bus conn, removing target");
$targetObj->removeTarget($obrick);
$targetObj->setAttribute($obrick, "OBUS_SLOT_INDEX", -1);
}
}
}
Expand Down

0 comments on commit 8702e5d

Please sign in to comment.