From 39abec2ef925cb850d1220f8c43ae27832128516 Mon Sep 17 00:00:00 2001 From: ertaozh Date: Tue, 11 Jul 2017 22:25:38 -0400 Subject: [PATCH 1/2] Fix issue 3420: Changes required to support more detailed firmware information for LC Big Data boxes --- xCAT-server/lib/xcat/plugins/ipmi.pm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/ipmi.pm b/xCAT-server/lib/xcat/plugins/ipmi.pm index 859283636..f98656bf0 100644 --- a/xCAT-server/lib/xcat/plugins/ipmi.pm +++ b/xCAT-server/lib/xcat/plugins/ipmi.pm @@ -1611,8 +1611,10 @@ sub isopenpower { my $sessdata = shift; if ($sessdata->{prod_id} == 43707 and $sessdata->{mfg_id} == 0) { return 1; - } - else { + # mfg_id 10876 is for Supermicro, prod_id 2355 for B&S, and 0 for Boston + } elsif (($sessdata->{prod_id} == 0 or $sessdata->{prod_id} == 2355) and $sessdata->{mfg_id} == 10876) { + return 1; + } else { return 0; } } @@ -3971,7 +3973,7 @@ sub add_fruhash { $fru->rec_type("hw"); } $fru->value($err); - if (exists($sessdata->{currfrusdr})) { + if ($sessdata->{currfrusdr}) { $fru->desc($sessdata->{currfrusdr}->id_string); } if (exists($sessdata->{frudex})) { @@ -4214,6 +4216,9 @@ sub parsefru { return "Unrecognized FRU format", undef; } } + elsif (!$bytes->[1] and !$bytes->[2] and !$bytes->[3] and !$bytes->[4] and !$bytes->[5]) { + return "No data available", undef; + } if ($bytes->[1]) { #The FRU spec, unfortunately, gave no easy way to tell the size of internal area #consequently, will find the next defined field and preserve the addressing and size of current FRU #area until then From 50f5d4c64916ea6ea86641d0a30f371f9c3150bf Mon Sep 17 00:00:00 2001 From: ertaozh Date: Tue, 11 Jul 2017 22:44:08 -0400 Subject: [PATCH 2/2] modify comments for mfg_id and prod_id in ipmi module --- xCAT-server/lib/xcat/plugins/ipmi.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/ipmi.pm b/xCAT-server/lib/xcat/plugins/ipmi.pm index f98656bf0..2c7d5abe4 100644 --- a/xCAT-server/lib/xcat/plugins/ipmi.pm +++ b/xCAT-server/lib/xcat/plugins/ipmi.pm @@ -1610,9 +1610,10 @@ sub isfpc { sub isopenpower { my $sessdata = shift; if ($sessdata->{prod_id} == 43707 and $sessdata->{mfg_id} == 0) { + # mft_id 0 and prod_id 43707 is for Firestone,Minsky return 1; - # mfg_id 10876 is for Supermicro, prod_id 2355 for B&S, and 0 for Boston } elsif (($sessdata->{prod_id} == 0 or $sessdata->{prod_id} == 2355) and $sessdata->{mfg_id} == 10876) { + # mfg_id 10876 is for Supermicro, prod_id 2355 for B&S, and 0 for Boston return 1; } else { return 0;