From 76ed1ab158038d5b017ddb80b5d28d9dfe62232b Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 12 Aug 2016 10:07:16 -0400 Subject: [PATCH] Provide a workaround for SD350 beacon SD350 standard command does not stay on indefinitely. Provide a workaround to cause that to stay on. --- xCAT-server/lib/xcat/plugins/ipmi.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/ipmi.pm b/xCAT-server/lib/xcat/plugins/ipmi.pm index 58eef13ea..77b65bebb 100644 --- a/xCAT-server/lib/xcat/plugins/ipmi.pm +++ b/xCAT-server/lib/xcat/plugins/ipmi.pm @@ -524,6 +524,10 @@ sub on_bmc_connect { } elsif ($command eq "rspreset") { return resetbmc($sessdata); } elsif ($command eq "rbeacon") { + unless (defined $sessdata->{device_id}) { #need get device id data initted for SD350 workaround + $sessdata->{ipmisession}->subcmd(netfn => 6, command => 1, data => [], callback => \&gotdevid, callback_args => $sessdata); + return; + } return beacon($sessdata); } elsif ($command eq "rsetboot") { return setboot($sessdata); @@ -2354,7 +2358,9 @@ sub beacon { #if stuck with 1.5, say light for 255 seconds. In 2.0, specify to turn it on forever if ($subcommand eq "on") { - if ($ipmiv2) { + if ($sessdata->{mfg_id} == 19046 and $sessdata->{prod_id} == 13616) { # Lenovo SD350 + $sessdata->{ipmisession}->subcmd(netfn => 0x3a, command => 6, data => [ 1, 1 ], callback => \&beacon_answer, callback_args => $sessdata); + } elsif ($ipmiv2) { $sessdata->{ipmisession}->subcmd(netfn => 0, command => 4, data => [ 0, 1 ], callback => \&beacon_answer, callback_args => $sessdata); } else { $sessdata->{ipmisession}->subcmd(netfn => 0, command => 4, data => [0xff], callback => \&beacon_answer, callback_args => $sessdata);