diff options
| author | njames <njames@us.ibm.com> | 2015-03-26 10:56:01 -0500 |
|---|---|---|
| committer | njames <njames@us.ibm.com> | 2015-03-26 10:56:02 -0500 |
| commit | fbacc2daba74829d47f1a49d3ce2c330121eb9c2 (patch) | |
| tree | 31c5c7520f198c760c64d91c5bc5598710e52579 | |
| parent | f54af0c8354c8d691c15f8c664c020185331b164 (diff) | |
| download | serverwiz-fbacc2daba74829d47f1a49d3ce2c330121eb9c2.tar.gz serverwiz-fbacc2daba74829d47f1a49d3ce2c330121eb9c2.zip | |
msbswap fix
| -rw-r--r-- | scripts/Targets.pm | 17 | ||||
| -rw-r--r-- | scripts/processMrw.pl | 46 |
2 files changed, 48 insertions, 15 deletions
diff --git a/scripts/Targets.pm b/scripts/Targets.pm index 29f688d..8cf9bc4 100644 --- a/scripts/Targets.pm +++ b/scripts/Targets.pm @@ -48,6 +48,7 @@ sub new TOP_LEVEL => "sys-0", TOPOLOGY => undef, report_log => "", + vpd_num => 0, DMI_FSI_MAP => { '0' => '3', '1' => '2', @@ -337,8 +338,15 @@ sub buildHierarchy { foreach my $b (@{ $target_xml->{bus} }) { + if (ref($b->{dest_path}) eq "HASH") { + $b->{dest_path}=""; + } + if (ref($b->{source_path}) eq "HASH") { + $b->{source_path}=""; + } my $source_target = $key . "/" . $b->{source_path} . $b->{source_target}; + my $dest_target = $key . "/" . $b->{dest_path} . $b->{dest_target}; my $bus_type = $b->{bus_type}; push( @@ -582,8 +590,8 @@ sub processMcs $parent_affinity . "/mcs-$mcs/membuf-$membufnum"); $self->setAttribute($membuf, "PHYS_PATH", $node_phys . "/membuf-$membufnum"); - $self->setAttribute($membuf, "VPD_REC_NUM", - $self->getAttribute($membuf, "POSITION")); + # $self->setAttribute($membuf, "VPD_REC_NUM", + # $self->getAttribute($membuf, "POSITION")); ## copy DMI bus attributes to membuf $self->setAttribute($unit, "EI_BUS_TX_LANE_INVERT", @@ -867,11 +875,14 @@ sub findConnections my $dest_parent = $self->getTargetParent($dest_target); my $type = $self->getMrwType($dest_parent); my $dest_type = $self->getType($dest_parent); + my $dest_class = $self->getAttribute($dest_parent,"CLASS"); if ($type eq "NA") { $type = $dest_type; } - + if ($type eq "NA") { + $type = $dest_class; + } if ($type eq $end_type || $end_type eq "") { $connections{CONN}[$num]{SOURCE}=$child; diff --git a/scripts/processMrw.pl b/scripts/processMrw.pl index f087f48..95a7ec2 100644 --- a/scripts/processMrw.pl +++ b/scripts/processMrw.pl @@ -671,10 +671,16 @@ sub processAbus my $target = shift; my $found_abus = 0; - $targetObj->setAttribute($target, "PEER_PATH","physical:na"); - $targetObj->setAttribute($target, "EI_BUS_TX_LANE_INVERT","0"); - $targetObj->setAttribute($target, "EI_BUS_TX_MSBSWAP","0"); - # $targetObj->setAttribute($target, "PEER_TARGET",""); + if ($targetObj->isBadAttribute($target, "PEER_PATH")) + { + $targetObj->setAttribute($target, "PEER_PATH","physical:na"); + } + $targetObj->setAttribute($target, "EI_BUS_TX_LANE_INVERT","0"); + if ($targetObj->isBadAttribute($target, "EI_BUS_TX_MSBSWAP")) + { + $targetObj->setAttribute($target, "EI_BUS_TX_MSBSWAP","0"); + } + # $targetObj->setAttribute($target, "PEER_TARGET",""); my $abus_child_conn = $targetObj->getFirstConnectionDestination($target); if ($abus_child_conn ne "") @@ -791,12 +797,12 @@ sub processPcie #iop_swap{iop}{clk swap}{clk group reversal} $iop_swap{0}{0}{'00'}=$t[0]; - $iop_swap{0}{0}{'01'}=$t[1]; - $iop_swap{0}{0}{'10'}=$t[2]; + $iop_swap{0}{0}{'10'}=$t[1]; + $iop_swap{0}{0}{'01'}=$t[2]; $iop_swap{0}{0}{'11'}=$t[3]; $iop_swap{0}{1}{'00'}=$t[4]; - $iop_swap{0}{1}{'01'}=$t[5]; - $iop_swap{0}{1}{'10'}=$t[6]; + $iop_swap{0}{1}{'10'}=$t[5]; + $iop_swap{0}{1}{'01'}=$t[6]; $iop_swap{0}{1}{'11'}=$t[7]; $iop_swap{1}{0}{'00'}=$t[8]; @@ -804,8 +810,8 @@ sub processPcie $iop_swap{1}{0}{'10'}=$t[10]; $iop_swap{1}{0}{'11'}=$t[11]; $iop_swap{1}{1}{'00'}=$t[12]; - $iop_swap{1}{1}{'01'}=$t[13]; - $iop_swap{1}{1}{'10'}=$t[14]; + $iop_swap{1}{1}{'10'}=$t[13]; + $iop_swap{1}{1}{'01'}=$t[14]; $iop_swap{1}{1}{'11'}=$t[15]; my @lane_eq; @@ -962,13 +968,12 @@ sub processMembufVpdAssociation { my $targetObj = shift; my $target = shift; - my $vpds=$targetObj->findConnections($target,"I2C","VPD"); if ($vpds ne "" ) { my $vpd = $vpds->{CONN}->[0]; - my $membuf_assocs=$targetObj->findConnections($vpd->{DEST_PARENT}, "LOGICAL_ASSOCIATION","MEMBUF"); + if ($membuf_assocs ne "") { foreach my $membuf_assoc (@{$membuf_assocs->{CONN}}) { my $membuf_target = $membuf_assoc->{DEST_PARENT}; @@ -979,8 +984,25 @@ sub processMembufVpdAssociation $membuf_assoc->{BUS_NUM}, "ISDIMM_MBVPD_INDEX"); $targetObj->setAttribute( $membuf_target,"ISDIMM_MBVPD_INDEX",$index); + $targetObj->setAttribute($membuf_target, + "VPD_REC_NUM",$targetObj->{vpd_num}); + } + } + my $node_assocs=$targetObj->findConnections($vpd->{DEST_PARENT}, + "LOGICAL_ASSOCIATION","CARD"); + + if ($node_assocs ne "") { + foreach my $node_assoc (@{$node_assocs->{CONN}}) { + my $mb_target = $node_assoc->{DEST_PARENT}; + my $node_target = $targetObj->getTargetParent($mb_target); + setEepromAttributes($targetObj, + "EEPROM_VPD_PRIMARY_INFO",$node_target,$vpd); + $targetObj->setAttribute($node_target, + "VPD_REC_NUM",$targetObj->{vpd_num}); + print ">>> $node_target,$targetObj->{vpd_num}\n"; } } + $targetObj->{vpd_num}++; } } |

