Skip to content

Commit

Permalink
Fixing flipport attribute for processors
Browse files Browse the repository at this point in the history
Change-Id: I9e1342c0012b54d8322d7bd29451da07a682f242
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/54652
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
CI-Ready: Dean Sanner <dsanner@us.ibm.com>
CI-Ready: William G. Hoffa <wghoffa@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
  • Loading branch information
venkateshsainath authored and wghoffa committed Feb 23, 2018
1 parent 5324435 commit 13de75c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/usr/targeting/common/Targets.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1604,6 +1604,7 @@ sub setFsiAttributes
my $phys_path = shift;
my $fsi_port = shift;
my $flip_port = shift;
my $altfsiswitch = shift;

$self->setAttribute($target, "FSI_MASTER_TYPE","NO_MASTER");
if ($type eq "FSIM")
Expand Down Expand Up @@ -1634,7 +1635,7 @@ sub setFsiAttributes
}
else
{
if ($flip_port eq 0 )
if ($altfsiswitch eq 0 )
{
$self->setAttribute($target, "FSI_MASTER_CHIP",$phys_path);
$self->setAttribute($target, "FSI_MASTER_PORT", $fsi_port);
Expand Down
16 changes: 15 additions & 1 deletion src/usr/targeting/common/processMrw.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1383,6 +1383,7 @@ sub processFsi
my $proc_path = $targetObj->getAttribute($parentTarget,"PHYS_PATH");
my $fsi_child_target = $targetObj->getTargetParent($fsi_child_conn);
my $flip_port = 0;
my $altfsiswitch = 0;
# If this is a proc that can be a master, then we need to set flip_port
# attribute in FSI_OPTIONS. $flip_port tells us which FSI port to write to.
Expand Down Expand Up @@ -1444,13 +1445,26 @@ sub processFsi
{
my $fcid = $targetObj->getAttribute($parentTarget,"FABRIC_CHIP_ID");
if($fcid eq 1)
{
$altfsiswitch = 1;
}
}
}
my $dest_type = $targetObj->getType($fsi_child_target);
if ($dest_type eq "PROC" )
{
my $proc_type = $targetObj->getAttribute($fsi_child_target, "PROC_MASTER_TYPE");
if ($proc_type eq "ACTING_MASTER" || $proc_type eq "MASTER_CANDIDATE" )
{
my $fcid = $targetObj->getAttribute($fsi_child_target,"FABRIC_CHIP_ID");
if($fcid eq 1)
{
$flip_port = 1;
}
}
}
$targetObj->setFsiAttributes($fsi_child_target,
$type,$cmfsi,$proc_path,$fsi_link,$flip_port);
$type,$cmfsi,$proc_path,$fsi_link,$flip_port,$altfsiswitch);
}
}
Expand Down

0 comments on commit 13de75c

Please sign in to comment.