Matt Ploetz | f6ae507 | 2015-04-08 08:50:20 -0500 | [diff] [blame] | 1 | From 42ad0709dfe4c053498660fe9bc884126082c2d6 Mon Sep 17 00:00:00 2001 |
| 2 | From: Norman James <njames@us.ibm.com> |
| 3 | Date: Tue, 17 Mar 2015 23:49:24 -0500 |
| 4 | Subject: [PATCH] Serverwiz2: TX_MSBSWAP and PEER_PATH fix |
| 5 | |
| 6 | Change-Id: I733f9c09837482469365b4de533f3560d049d0a6 |
| 7 | --- |
| 8 | src/usr/targeting/common/Targets.pm | 7 +++++++ |
| 9 | src/usr/targeting/common/processMrw.pl | 29 ++++++++++++++++------------- |
| 10 | 2 files changed, 23 insertions(+), 13 deletions(-) |
| 11 | |
| 12 | diff --git a/src/usr/targeting/common/Targets.pm b/src/usr/targeting/common/Targets.pm |
| 13 | index 29f6bcb..ea5ffde 100644 |
| 14 | --- a/src/usr/targeting/common/Targets.pm |
| 15 | +++ b/src/usr/targeting/common/Targets.pm |
| 16 | @@ -338,8 +338,15 @@ sub buildHierarchy |
| 17 | { |
| 18 | foreach my $b (@{ $target_xml->{bus} }) |
| 19 | { |
| 20 | + if (ref($b->{dest_path}) eq "HASH") { |
| 21 | + $b->{dest_path}=""; |
| 22 | + } |
| 23 | + if (ref($b->{source_path}) eq "HASH") { |
| 24 | + $b->{source_path}=""; |
| 25 | + } |
| 26 | my $source_target = |
| 27 | $key . "/" . $b->{source_path} . $b->{source_target}; |
| 28 | + |
| 29 | my $dest_target = $key . "/" . $b->{dest_path} . $b->{dest_target}; |
| 30 | my $bus_type = $b->{bus_type}; |
| 31 | push( |
| 32 | diff --git a/src/usr/targeting/common/processMrw.pl b/src/usr/targeting/common/processMrw.pl |
| 33 | index 691cbcb..7133534 100644 |
| 34 | --- a/src/usr/targeting/common/processMrw.pl |
| 35 | +++ b/src/usr/targeting/common/processMrw.pl |
| 36 | @@ -667,11 +667,15 @@ sub processAbus |
| 37 | my $target = shift; |
| 38 | |
| 39 | my $found_abus = 0; |
| 40 | - $targetObj->setAttribute($target, "PEER_PATH","physical:na"); |
| 41 | - $targetObj->setAttribute($target, "EI_BUS_TX_LANE_INVERT","0"); |
| 42 | - $targetObj->setAttribute($target, "EI_BUS_TX_MSBSWAP","0"); |
| 43 | - # $targetObj->setAttribute($target, "PEER_TARGET",""); |
| 44 | - |
| 45 | + if ($targetObj->isBadAttribute($target, "PEER_PATH")) |
| 46 | + { |
| 47 | + $targetObj->setAttribute($target, "PEER_PATH","physical:na"); |
| 48 | + } |
| 49 | + $targetObj->setAttribute($target, "EI_BUS_TX_LANE_INVERT","0"); |
| 50 | + if ($targetObj->isBadAttribute($target, "EI_BUS_TX_MSBSWAP")) |
| 51 | + { |
| 52 | + $targetObj->setAttribute($target, "EI_BUS_TX_MSBSWAP","0"); |
| 53 | + } |
| 54 | my $abus_child_conn = $targetObj->getFirstConnectionDestination($target); |
| 55 | if ($abus_child_conn ne "") |
| 56 | { |
| 57 | @@ -787,12 +791,12 @@ sub processPcie |
| 58 | |
| 59 | #iop_swap{iop}{clk swap}{clk group reversal} |
| 60 | $iop_swap{0}{0}{'00'}=$t[0]; |
| 61 | - $iop_swap{0}{0}{'01'}=$t[1]; |
| 62 | - $iop_swap{0}{0}{'10'}=$t[2]; |
| 63 | + $iop_swap{0}{0}{'10'}=$t[1]; |
| 64 | + $iop_swap{0}{0}{'01'}=$t[2]; |
| 65 | $iop_swap{0}{0}{'11'}=$t[3]; |
| 66 | $iop_swap{0}{1}{'00'}=$t[4]; |
| 67 | - $iop_swap{0}{1}{'01'}=$t[5]; |
| 68 | - $iop_swap{0}{1}{'10'}=$t[6]; |
| 69 | + $iop_swap{0}{1}{'10'}=$t[5]; |
| 70 | + $iop_swap{0}{1}{'01'}=$t[6]; |
| 71 | $iop_swap{0}{1}{'11'}=$t[7]; |
| 72 | |
| 73 | $iop_swap{1}{0}{'00'}=$t[8]; |
| 74 | @@ -800,8 +804,8 @@ sub processPcie |
| 75 | $iop_swap{1}{0}{'10'}=$t[10]; |
| 76 | $iop_swap{1}{0}{'11'}=$t[11]; |
| 77 | $iop_swap{1}{1}{'00'}=$t[12]; |
| 78 | - $iop_swap{1}{1}{'01'}=$t[13]; |
| 79 | - $iop_swap{1}{1}{'10'}=$t[14]; |
| 80 | + $iop_swap{1}{1}{'10'}=$t[13]; |
| 81 | + $iop_swap{1}{1}{'01'}=$t[14]; |
| 82 | $iop_swap{1}{1}{'11'}=$t[15]; |
| 83 | |
| 84 | my @lane_eq; |
| 85 | @@ -958,13 +962,12 @@ sub processMembufVpdAssociation |
| 86 | { |
| 87 | my $targetObj = shift; |
| 88 | my $target = shift; |
| 89 | - |
| 90 | my $vpds=$targetObj->findConnections($target,"I2C","VPD"); |
| 91 | if ($vpds ne "" ) { |
| 92 | my $vpd = $vpds->{CONN}->[0]; |
| 93 | - |
| 94 | my $membuf_assocs=$targetObj->findConnections($vpd->{DEST_PARENT}, |
| 95 | "LOGICAL_ASSOCIATION","MEMBUF"); |
| 96 | + |
| 97 | if ($membuf_assocs ne "") { |
| 98 | foreach my $membuf_assoc (@{$membuf_assocs->{CONN}}) { |
| 99 | my $membuf_target = $membuf_assoc->{DEST_PARENT}; |
| 100 | -- |
| 101 | 1.8.2.2 |
| 102 | |