Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rinv dimm display for Power nodes #6858

Merged
merged 1 commit into from
Oct 22, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 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 All @@ -4245,6 +4253,7 @@ sub add_fruhash {
} elsif (ref $sessdata->{currfrudata}) {
if ($sessdata->{currfrutype} and $sessdata->{currfrutype} eq 'dimm') {
add_textual_frus($fruhash, $sessdata->{currfrusdr}->id_string, "", "product", "dimm,hw", $sessdata);
add_textual_frus($fruhash, $sessdata->{currfrusdr}->id_string, "Board ", "board", "dimm,hw", $sessdata);
} else {
add_textual_frus($fruhash, $sessdata->{currfrusdr}->id_string, "Board ", "board", undef, $sessdata);
add_textual_frus($fruhash, $sessdata->{currfrusdr}->id_string, "Product ", "product", undef, $sessdata);
Expand Down