Skip to content

Commit

Permalink
rinv dimm display for Power nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
gurevichmark committed Oct 13, 2020
1 parent 4f4ffb5 commit 5d4a7e7
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions xCAT-server/lib/xcat/plugins/ipmi.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3950,7 +3950,8 @@ sub initfru_zero {
next;
}

if ($sdr->fru_subtype == 0x1) { #DIMM
if ($sdr->id_string =~ "DIMM") { #DIMM.
# Can not always use "fru_subtype=1" for DIMM, sometimes on Power it is 2
push @{ $sessdata->{dimmfru} }, $sdr;
} elsif ($sdr->fru_subtype == 0 or $sdr->fru_subtype == 2) {
push @{ $sessdata->{genhwfru} }, $sdr;
Expand Down Expand Up @@ -4213,7 +4214,14 @@ sub add_fruhash {
$sessdata->{frudex} += 1;
} elsif ($sessdata->{currfrutype} and $sessdata->{currfrutype} eq 'dimm') {
$fruhash = decode_spd(@{ $sessdata->{currfrudata} });
if ($fruhash->{product}->{model} =~ "Unrecognized SPD") {
# If decode_spd() was not able to parse SPD data for DIMM, try parsefru()
#
# Yes, it is a goto statement here. Ugly, but removes the need to restructure
goto PARSEFRU_DIMM;
}
} else {
PARSEFRU_DIMM:
my $err;
$global_sessdata = $sessdata; #pass by global, evil, but practical this time
($err, $fruhash) = parsefru($sessdata->{currfrudata});
Expand All @@ -4226,7 +4234,7 @@ sub add_fruhash {
$fru->rec_type("hw");
}
$fru->value($err);
if ($sessdata->{currfrusdr}) {
if ($sessdata->{currfrusdr} and scalar keys %{$sessdata->{currfrusdr}} ) {
$fru->desc($sessdata->{currfrusdr}->id_string);
}
if (exists($sessdata->{frudex})) {
Expand Down

0 comments on commit 5d4a7e7

Please sign in to comment.